none
SAP Schemas RRS feed

  • Question

  • Hello,

    I have a scenario of sending IDOC to SAP system for which I have got the corresponding schemas generated in biztalk using Consumer adapter service wizard. By doing this we get around 6 schemas generated along with bindings file among which we need to consider the schema ending with Send.xsd as to send idoc to SAP. However the issue now is I can see root elements names in this Send.xsd schema in biztalk not matching with the schema elements that the SAP team have provided instead the exact elements matching to SAP team schema are in the other schema here named IDOC.ORDERS05.740.3.xsd whcih is a supporting schema in fact in biztalk if I am not wrong? So can i go ahead and use this schema instead of Send schema in order to map elements to SAP team schema? can anyone explain as how SAP recognises what schema external system is sending? and is it mandatory that the schema ending with SEnd.xsd must be used in order to send into SAP?   Any hep is much appreciated. Thanks. 

    

    Tuesday, August 23, 2016 9:18 AM

Answers

  • Hi Lathaa,

    You need to use the highlighted schema (ie. 740.3.Send.xsd) for sending IDOC to SAP system.

    You should refer: Message Schemas for IDOC Operations

    Message Structures for IDOC Client Operations

    The following table shows the message structures for the Send and SendIdoc operations.

     

    Operation XML Structure Description

    Send

    <Send xmlns="[MSG_VERSION]/Idoc/[VERSION]/[IDOCTYP]/
                       [CIMTYP]/[RELNO]/Send">
      <idocData>
        <[EDI_DC40/EDI_DC] xmlns="/Types/Idoc/
         [VERSION]/[IDOCTYP]/[CIMTYP]/[RELNO]">
          <EDIDC_FIELD1>value1</ EDIDC_FIELD1>
          <EDIDC_FIELD2>value2</ EDIDC_FIELD2>
          …
        </EDI_DC40>
        <[SEGMENT_DEFN]_1>
          <[DATAHEADERCOLUMN_[SEGHDR_FLD1]>
            header_value_1
          </[DATAHEADERCOLUMN_[SEGHDR_FLD1]>
          <[DATAHEADERCOLUMN_[SEGHDR_FLD2]>
            header_value_2
          </[DATAHEADERCOLUMN_[SEGHDR_FLD2]>
          …
          <SEG_FIELD1>value1</SEG_FIELD1>
          <SEG_FIELD2>value2</SEG_FIELD2>
          …
        </[SEGMENT_DEFN]_1>
        <[SEGMENT_DEFN]_2>
          <[DATAHEADERCOLUMN_[SEGHDR_FLD1]>
            header_value_1
          </[DATAHEADERCOLUMN_[SEGHDR_FLD1]>
          <[DATAHEADERCOLUMN_[SEGHDR_FLD2]>
            header_value_2
          </[DATAHEADERCOLUMN_[SEGHDR_FLD2]>
          …
          <SEG_FIELD1>value1</SEG_FIELD1>
          <SEG_FIELD2>value2</SEG_FIELD2>
          …
        </[SEGMENT_DEFN]_2>
        …
        </[EDI_DC40/EDI_DC]>
      </idocData>
      <guid>guid</guid>
    </Send>
    

    Sends a strongly-typed IDOC to SAP

    • IDOC schema is strongly-typed.
    • Exposes control record fields.
    • Exposes data record fields including segment headers and segment fields.

    The SAP adapter associates a GUID with the SAP transaction ID (TID) that it uses to send the IDOC. You can choose whether to specify a GUID in the request message. If a GUID is not included in the request message, the SAP adapter generates one. The GUID is returned in the response message.

    Send Response

    <SendResponse xmlns="[MSG_VERSION]/Idoc/[VERSION]/
            [IDOCTYP]/[CIMTYP]/[RELNO]/Send">
      <guid>guid</guid>
    </SendResponse>
    

    Indicates that the IDOC has been sent to the SAP system.

    If the AutoConfirmSentIdocs binding property istrue, the SAP adapter automatically confirms the transaction on the SAP system, and you can ignore the GUID returned in the response. If theAutoConfirmSentIdocs binding property is false, you must invoke the RfcConfirmTransID operation with the GUID returned by the SAP adapter to complete the transaction on the SAP system.

    You can invoke theSapAdapterUtilities.ConvertGuidToTid method to obtain the TID associated with the logical unit of work (LUW).

     

    How to procced with the development. Refer: http://tutorial.programming4.us/windows_server/biztalk-server-2010---installation-of-wcf-sap-adapter-(part-4)---idoc-deep-dive,-building-a-biztalk-application-%E2%80%94-sending-idoc.aspx


    Rachit Sikroria (Microsoft Azure MVP)


    Tuesday, August 23, 2016 9:26 AM
    Moderator
  • Hi Latha

    The 740 Send schema that you have highlighted is the correct one to be used as the Request schema to SAP.

    Don't worry and use this schema in your solution. 

    Basically, the SAP datatypes/segments are defined in the IDOC.ORDERS05.740.3.xsd schema. The Send schema imports the IDOC.ORDERS05.740.3.xsd schema and that's how the SAP datatypes are available in the Send schema.

    As an example, look into the E2EDP01010 node in the Send schema. You will find that the data structure type for it is - E1EDP01 (which is a SAP segment name). So, any time you are confused while using the Send schema in your mapping, you can check the "Data Structure Type" property for that element - it will show you the correct SAP segment name.


    Thanks Arindam



    Tuesday, August 23, 2016 9:19 AM
    Moderator

All replies

  • Hi Latha

    The 740 Send schema that you have highlighted is the correct one to be used as the Request schema to SAP.

    Don't worry and use this schema in your solution. 

    Basically, the SAP datatypes/segments are defined in the IDOC.ORDERS05.740.3.xsd schema. The Send schema imports the IDOC.ORDERS05.740.3.xsd schema and that's how the SAP datatypes are available in the Send schema.

    As an example, look into the E2EDP01010 node in the Send schema. You will find that the data structure type for it is - E1EDP01 (which is a SAP segment name). So, any time you are confused while using the Send schema in your mapping, you can check the "Data Structure Type" property for that element - it will show you the correct SAP segment name.


    Thanks Arindam



    Tuesday, August 23, 2016 9:19 AM
    Moderator
  • Hi Lathaa,

    You need to use the highlighted schema (ie. 740.3.Send.xsd) for sending IDOC to SAP system.

    You should refer: Message Schemas for IDOC Operations

    Message Structures for IDOC Client Operations

    The following table shows the message structures for the Send and SendIdoc operations.

     

    Operation XML Structure Description

    Send

    <Send xmlns="[MSG_VERSION]/Idoc/[VERSION]/[IDOCTYP]/
                       [CIMTYP]/[RELNO]/Send">
      <idocData>
        <[EDI_DC40/EDI_DC] xmlns="/Types/Idoc/
         [VERSION]/[IDOCTYP]/[CIMTYP]/[RELNO]">
          <EDIDC_FIELD1>value1</ EDIDC_FIELD1>
          <EDIDC_FIELD2>value2</ EDIDC_FIELD2>
          …
        </EDI_DC40>
        <[SEGMENT_DEFN]_1>
          <[DATAHEADERCOLUMN_[SEGHDR_FLD1]>
            header_value_1
          </[DATAHEADERCOLUMN_[SEGHDR_FLD1]>
          <[DATAHEADERCOLUMN_[SEGHDR_FLD2]>
            header_value_2
          </[DATAHEADERCOLUMN_[SEGHDR_FLD2]>
          …
          <SEG_FIELD1>value1</SEG_FIELD1>
          <SEG_FIELD2>value2</SEG_FIELD2>
          …
        </[SEGMENT_DEFN]_1>
        <[SEGMENT_DEFN]_2>
          <[DATAHEADERCOLUMN_[SEGHDR_FLD1]>
            header_value_1
          </[DATAHEADERCOLUMN_[SEGHDR_FLD1]>
          <[DATAHEADERCOLUMN_[SEGHDR_FLD2]>
            header_value_2
          </[DATAHEADERCOLUMN_[SEGHDR_FLD2]>
          …
          <SEG_FIELD1>value1</SEG_FIELD1>
          <SEG_FIELD2>value2</SEG_FIELD2>
          …
        </[SEGMENT_DEFN]_2>
        …
        </[EDI_DC40/EDI_DC]>
      </idocData>
      <guid>guid</guid>
    </Send>
    

    Sends a strongly-typed IDOC to SAP

    • IDOC schema is strongly-typed.
    • Exposes control record fields.
    • Exposes data record fields including segment headers and segment fields.

    The SAP adapter associates a GUID with the SAP transaction ID (TID) that it uses to send the IDOC. You can choose whether to specify a GUID in the request message. If a GUID is not included in the request message, the SAP adapter generates one. The GUID is returned in the response message.

    Send Response

    <SendResponse xmlns="[MSG_VERSION]/Idoc/[VERSION]/
            [IDOCTYP]/[CIMTYP]/[RELNO]/Send">
      <guid>guid</guid>
    </SendResponse>
    

    Indicates that the IDOC has been sent to the SAP system.

    If the AutoConfirmSentIdocs binding property istrue, the SAP adapter automatically confirms the transaction on the SAP system, and you can ignore the GUID returned in the response. If theAutoConfirmSentIdocs binding property is false, you must invoke the RfcConfirmTransID operation with the GUID returned by the SAP adapter to complete the transaction on the SAP system.

    You can invoke theSapAdapterUtilities.ConvertGuidToTid method to obtain the TID associated with the logical unit of work (LUW).

     

    How to procced with the development. Refer: http://tutorial.programming4.us/windows_server/biztalk-server-2010---installation-of-wcf-sap-adapter-(part-4)---idoc-deep-dive,-building-a-biztalk-application-%E2%80%94-sending-idoc.aspx


    Rachit Sikroria (Microsoft Azure MVP)


    Tuesday, August 23, 2016 9:26 AM
    Moderator
  • Hi Arindam,

    Yes, I can see the same way as shown above for my schema as well . Now I get it completely and need not worry about the naming conventions which I get to see on Biztalk side. This makes sense now.  Thanks a lot for your prompt response. Much appreciated.    

    Tuesday, August 23, 2016 12:54 PM
  • Hi Rachit,

    Yeah i get it now, thanks much for your prompt response. This info is of help to understand on SAP schemas as which are segment type/definitions in the structure defined. Thanks again. 

    • Marked as answer by Lathaa Tuesday, August 23, 2016 1:17 PM
    • Unmarked as answer by Lathaa Tuesday, August 23, 2016 1:17 PM
    Tuesday, August 23, 2016 12:56 PM