<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Using EXTENSIONIN in Bapi SALESORDER_CREATFROMDAT2 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-extensionin-in-bapi-salesorder-creatfromdat2/m-p/1116385#M107563</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Create a structure Append to add your Z-fields into VBAP. It's better to create own structure and insert it into append structure of VBAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Add this structure (with the new fields) to structure VBAPKOZ;&lt;/P&gt;&lt;P&gt;- Create the structure-x and insert in VBAPKOZX, this enhanchement is to indicate which fields have to be changed.&lt;/P&gt;&lt;P&gt;So&lt;/P&gt;&lt;P&gt;- you'll create ZVBAP where there FIELD1, FIELD2...;&lt;/P&gt;&lt;P&gt;- Append ZVBAP to VBAP table and VBAPKOZ structure;&lt;/P&gt;&lt;P&gt;- you'll create ZVBAPX with FIELD1, FIELD2... here all fields have to be type CHAR1;&lt;/P&gt;&lt;P&gt;- Append ZVBAPX to VBAPKOZX structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Jan 2006 16:12:45 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-01-05T16:12:45Z</dc:date>
    <item>
      <title>Using EXTENSIONIN in Bapi SALESORDER_CREATFROMDAT2</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-extensionin-in-bapi-salesorder-creatfromdat2/m-p/1116382#M107560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Need someone to throw some light on how to use the EXTENSION IN Table in this BAPI.  We have a structure appended to VBAP at this client and will be using this bapi to create Sales orders.  I would like to post the relevant info into the fields appended in VBAP.  I read through the documentation provided in the BAPI and here are a couple of things that don't seem clear....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it says "define these customer structures in the structures VBAPKOZ, VBAPKOZX, BAPE_VBAP &amp;amp; BAPE_VBAPX.  Should the name of the structure appended matter ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Adjust the Above structures for customer enhancements to table VBAP.  How do we do this ?  Any Idea ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jan 2006 15:51:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-extensionin-in-bapi-salesorder-creatfromdat2/m-p/1116382#M107560</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-05T15:51:09Z</dc:date>
    </item>
    <item>
      <title>Re: Using EXTENSIONIN in Bapi SALESORDER_CREATFROMDAT2</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-extensionin-in-bapi-salesorder-creatfromdat2/m-p/1116383#M107561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Prashant,&lt;/P&gt;&lt;P&gt;You should append the same fields (as are in VBAP ) to BAPE_VBAP. While appending the fields to BAPE_VBAPX the name should be same but type should be flag. I guess they woyld have already extended VBAPKOZ to match with VBAP.&lt;/P&gt;&lt;P&gt; SE11, enter BAPE_VBAP. menu GOTO, Append Struture.&lt;/P&gt;&lt;P&gt;This way you can adjust BAPE_VBAP.If you debug this BAPI a bit you will get better understanding of how this extension is used and how values should be passed.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Anuranjan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jan 2006 16:08:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-extensionin-in-bapi-salesorder-creatfromdat2/m-p/1116383#M107561</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-05T16:08:20Z</dc:date>
    </item>
    <item>
      <title>Re: Using EXTENSIONIN in Bapi SALESORDER_CREATFROMDAT2</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-extensionin-in-bapi-salesorder-creatfromdat2/m-p/1116384#M107562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there is table parameter &amp;lt;b&amp;gt;EXTENSIONIN&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;you need to fill that table with appropriate value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jan 2006 16:10:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-extensionin-in-bapi-salesorder-creatfromdat2/m-p/1116384#M107562</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-05T16:10:18Z</dc:date>
    </item>
    <item>
      <title>Re: Using EXTENSIONIN in Bapi SALESORDER_CREATFROMDAT2</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-extensionin-in-bapi-salesorder-creatfromdat2/m-p/1116385#M107563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Create a structure Append to add your Z-fields into VBAP. It's better to create own structure and insert it into append structure of VBAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Add this structure (with the new fields) to structure VBAPKOZ;&lt;/P&gt;&lt;P&gt;- Create the structure-x and insert in VBAPKOZX, this enhanchement is to indicate which fields have to be changed.&lt;/P&gt;&lt;P&gt;So&lt;/P&gt;&lt;P&gt;- you'll create ZVBAP where there FIELD1, FIELD2...;&lt;/P&gt;&lt;P&gt;- Append ZVBAP to VBAP table and VBAPKOZ structure;&lt;/P&gt;&lt;P&gt;- you'll create ZVBAPX with FIELD1, FIELD2... here all fields have to be type CHAR1;&lt;/P&gt;&lt;P&gt;- Append ZVBAPX to VBAPKOZX structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jan 2006 16:12:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-extensionin-in-bapi-salesorder-creatfromdat2/m-p/1116385#M107563</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-05T16:12:45Z</dc:date>
    </item>
    <item>
      <title>Re: Using EXTENSIONIN in Bapi SALESORDER_CREATFROMDAT2</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-extensionin-in-bapi-salesorder-creatfromdat2/m-p/1116386#M107564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anuranjan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the prompt Reply.  Yes, I did append the same fields to BAPE_VBAP that are in the append structure of VBAP.  And appended the checkbox structure which are used for flagging... in the BAPE_VBAPX.  I also had to do it similarly for VBAPKOZ and VBAPKOZX.  However, the documentation for the BAPI (5th point) says we need to then adjust VBAP after doing the above..  Hence my doubt as in how do we adjust VBAP ?  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jan 2006 16:14:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-extensionin-in-bapi-salesorder-creatfromdat2/m-p/1116386#M107564</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-05T16:14:56Z</dc:date>
    </item>
    <item>
      <title>Re: Using EXTENSIONIN in Bapi SALESORDER_CREATFROMDAT2</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-extensionin-in-bapi-salesorder-creatfromdat2/m-p/1116387#M107565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you need to do some thing like this..  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IF ZZPRCQTE &amp;lt;&amp;gt; SPACE.
    MOVE HDRREC-SALES_ORDER TO VBAK-DATA-VBELN.
    MOVE ZZPRCQTE TO VBAK-DATA-ZZPRCQTE.
    VBAK-DATA-STRUCTURE = 'BAPE_VBAK'.
    APPEND VBAK-DATA TO ADD-DATA.
    CLEAR VBAK-DATA.
  ENDIF.

  CLEAR ZZPRCQTE.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; IF IDCREC-DEFECT_CODE &amp;lt;&amp;gt; SPACE.
    MOVE HDRREC-SALES_ORDER TO VBAP-DATA-VBELN.
    MOVE IHD-ITEM TO VBAP-DATA-POSNR.
    MOVE IDCREC-DEFECT_CODE TO VBAP-DATA-ZZDEFECTCD.
    VBAP-DATA-STRUCTURE = 'BAPE_VBAP'.
    APPEND VBAP-DATA TO ADD-DATA.
    CLEAR VBAP-DATA.
  ENDIF.
  MOVE TRUE TO PROCESSED_RECORD.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
       EXPORTING
            SALESDOCUMENT       = SALESDOCUMENT
            ORDER_HEADER_IN     = BAPISDHD1
            logic_switch        = logic_switch
            TESTRUN             = TESTRUN
            CONVERT_PARVW_AUART = 'X'
       IMPORTING
            SALESDOCUMENT_EX    = SALESDOC-EX
       TABLES
            RETURN              = BAPIRETURN
            ORDER_ITEMS_IN      = BAPISDITM
            ORDER_PARTNERS      = BAPIPARNR
            ORDER_SCHEDULES_IN  = BAPISCHDL
            ORDER_CONDITIONS_IN = BAPICOND
            ORDER_TEXT          = BAPISDTEXT
            EXTENSIONIN         = ADD-DATA
            PARTNERADDRESSES    = BAPIADDR1.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check it the above one helps..&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jan 2006 16:16:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-extensionin-in-bapi-salesorder-creatfromdat2/m-p/1116387#M107565</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-05T16:16:12Z</dc:date>
    </item>
    <item>
      <title>Re: Using EXTENSIONIN in Bapi SALESORDER_CREATFROMDAT2</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-extensionin-in-bapi-salesorder-creatfromdat2/m-p/1116388#M107566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;after appending the structure , you just go to the table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;choose menu Utilities - &amp;gt;Database Utility -&amp;gt;Activate and adjust.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jan 2006 16:19:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-extensionin-in-bapi-salesorder-creatfromdat2/m-p/1116388#M107566</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-05T16:19:33Z</dc:date>
    </item>
    <item>
      <title>Re: Using EXTENSIONIN in Bapi SALESORDER_CREATFROMDAT2</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-extensionin-in-bapi-salesorder-creatfromdat2/m-p/1116389#M107567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks ........ wanted to confirm that .. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks everyone for their 2 cents ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jan 2006 16:31:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-extensionin-in-bapi-salesorder-creatfromdat2/m-p/1116389#M107567</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-05T16:31:26Z</dc:date>
    </item>
    <item>
      <title>Re: Using EXTENSIONIN in Bapi SALESORDER_CREATFROMDAT2</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-extensionin-in-bapi-salesorder-creatfromdat2/m-p/1116390#M107568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Prasanth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can fill the extension segment like the following code.. here i populated some z fields into header extension segment..It would help you to populate Extension segments...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FORM FILL_BAPI_HEAD_EXTN TABLES   P_BAPI_EXTN STRUCTURE BAPIPAREX
                         USING    P_SALESDOCUMENT
                                  P_ORDER_HEADER_IN
                                  STRUCTURE ZVECLMORDHEAD.

  CLEAR: R_BAPE_VBAK,
         R_BAPE_VBAKX.

*--  Append Reference to external source of claim
  MOVE:   P_ORDER_HEADER_IN-ZZEXTSRCECLM   TO  R_BAPE_VBAK-ZZEXTSRCECLM
.
  IF P_ORDER_HEADER_IN-AUGRU = K_205.
*-- Append Installation Year
    MOVE: P_ORDER_HEADER_IN-ZVINSTYR       TO  R_BAPE_VBAK-ZVINSTYR,
*-- Append Installation Month
          P_ORDER_HEADER_IN-ZVINSTMO       TO  R_BAPE_VBAK-ZVINSTMO,
*-- Append Reported Year
          P_ORDER_HEADER_IN-ZVRPTONYR      TO  R_BAPE_VBAK-ZVRPTONYR,
*-- Append Reported Month
          P_ORDER_HEADER_IN-ZVRPTONMO      TO  R_BAPE_VBAK-ZVRPTONMO.
  ENDIF.

  MOVE: 'BAPE_VBAK'                TO  P_BAPI_EXTN-STRUCTURE,
         R_BAPE_VBAK               TO  P_BAPI_EXTN+30.

  APPEND P_BAPI_EXTN.
  CLEAR: P_BAPI_EXTN,
         R_BAPE_VBAK.

  MOVE:    K_X                       TO  R_BAPE_VBAKX-ZZEXTSRCECLM.

  IF P_ORDER_HEADER_IN-AUGRU = K_205.
    MOVE:  K_X                       TO  R_BAPE_VBAKX-ZVINSTYR,
           K_X                       TO  R_BAPE_VBAKX-ZVINSTMO,
           K_X                       TO  R_BAPE_VBAKX-ZVRPTONYR,
           K_X                       TO  R_BAPE_VBAKX-ZVRPTONMO.
  ENDIF.
  MOVE:  'BAPE_VBAKX'                TO  P_BAPI_EXTN-STRUCTURE,
         R_BAPE_VBAKX                TO  P_BAPI_EXTN+30.

  APPEND P_BAPI_EXTN.
  CLEAR: P_BAPI_EXTN,
         R_BAPE_VBAKX.

ENDFORM.                    " FILL_BAPI_HEAD_EXTN
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sreekanth G&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jan 2006 16:50:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-extensionin-in-bapi-salesorder-creatfromdat2/m-p/1116390#M107568</guid>
      <dc:creator>sreekanthgo</dc:creator>
      <dc:date>2006-01-05T16:50:15Z</dc:date>
    </item>
  </channel>
</rss>

