<?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 Populating Customized fields in Sales Order Creation using BAPI in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/populating-customized-fields-in-sales-order-creation-using-bapi/m-p/1504785#M233372</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a requirement that, I need to populate 2 customized fields which are appedned in the VBAK tables through Append structure. I am using BAPI_SALESORDER_CREATEFROMDAT2 FM for creating it. &lt;/P&gt;&lt;P&gt;Could anybody tell me how to send these 2 coustomized field values in this BAPI using EXTERNIN parameter. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Rajesh&lt;/P&gt;&lt;P&gt;rajeshkatkoori@yahoo.com&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Aug 2006 07:19:01 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-08-04T07:19:01Z</dc:date>
    <item>
      <title>Populating Customized fields in Sales Order Creation using BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/populating-customized-fields-in-sales-order-creation-using-bapi/m-p/1504785#M233372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a requirement that, I need to populate 2 customized fields which are appedned in the VBAK tables through Append structure. I am using BAPI_SALESORDER_CREATEFROMDAT2 FM for creating it. &lt;/P&gt;&lt;P&gt;Could anybody tell me how to send these 2 coustomized field values in this BAPI using EXTERNIN parameter. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Rajesh&lt;/P&gt;&lt;P&gt;rajeshkatkoori@yahoo.com&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Aug 2006 07:19:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/populating-customized-fields-in-sales-order-creation-using-bapi/m-p/1504785#M233372</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-04T07:19:01Z</dc:date>
    </item>
    <item>
      <title>Re: Populating Customized fields in Sales Order Creation using BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/populating-customized-fields-in-sales-order-creation-using-bapi/m-p/1504786#M233373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check the Documentation of that BAPI u will get some idea? or else wait for sample code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Prabhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Aug 2006 07:23:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/populating-customized-fields-in-sales-order-creation-using-bapi/m-p/1504786#M233373</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-04T07:23:38Z</dc:date>
    </item>
    <item>
      <title>Re: Populating Customized fields in Sales Order Creation using BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/populating-customized-fields-in-sales-order-creation-using-bapi/m-p/1504787#M233374</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;To add data to custom fields there are two appraoches.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;1)&amp;lt;/b&amp;gt;Using the &amp;lt;b&amp;gt;EXTENSIONIN&amp;lt;/b&amp;gt; in the Tables option in the FM &amp;lt;b&amp;gt;BAPI_SALESORDER_CREATEFROMDAT2&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the Documentation for the same,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Customer Enhancement for VBAK, VBAP, VBEP&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;i&amp;gt;Description&amp;lt;/i&amp;gt;&lt;/P&gt;&lt;P&gt;You can use this parameter to transfer user-specific enhancments to a BAPI. The customer has to complete the EXTENSION structure and the system automatically continues processing it. If you have not defined any user-specific fields, then you can transfer a blank EXTENSIONIN structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Technical information about Customer Enhancements&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following description uses an example to explain how to proceed with customer enhancements to the SD tables VBAK, VBKD, VBAP and VBEP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The customer has added their own fields to table VBAP using the INCLUDE structure CUTEST. This structure contains 2 fields:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CFIELD1, CHAR 10
CFIELD2, CHAR 3.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The customer also requires that these two fields can be maintained with the BAPI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Maintain structure CUTEST in table VBAP&lt;/P&gt;&lt;P&gt;2. Because the BAPIs work with checkboxes, you must also define a CUTESTX checkbox for the customer structure. It should be structured like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Field name       Data element
CFIELD1            CHAR1
CFIELD2          CHAR1&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Define these customer structures in the structures VBAPKOZ und VBAPKOZX using INCLUDE or APPEND.&lt;/P&gt;&lt;P&gt;4. Add the customer structures to the BAPE_VBAP and BAPE_VBAPX BAPI structures using the APPEND technique.&lt;/P&gt;&lt;P&gt;5. Adjust the following structures for customer enhancements to table VBAK:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a) VBAKKOZ&lt;/P&gt;&lt;P&gt;b) VBAKKOZX&lt;/P&gt;&lt;P&gt;c) BAPE_VBAK&lt;/P&gt;&lt;P&gt;d) BAPE_VBAKX&lt;/P&gt;&lt;P&gt;6. Adjust the following structures for customer enhancements to table VBEK:&lt;/P&gt;&lt;P&gt;a) VBEPKOZ&lt;/P&gt;&lt;P&gt;b) VBEPKOZX&lt;/P&gt;&lt;P&gt;c) BAPE_VBEP&lt;/P&gt;&lt;P&gt;d) BAPE_VBEPX&lt;/P&gt;&lt;P&gt;7. Generally, the data should be added to the BAPI interface in the internal communication structures (VBAKKOM, and so on). There, you can process the data in the SD tables (VBAK, and so on).&lt;/P&gt;&lt;P&gt;8. If the EXTENSIONIN parameter contains customer data, you must complete at least the key fields in the relevant standard parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;i&amp;gt;For example:&amp;lt;/i&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You want to change customer field VBAP-CFIELD2 for item 20 to "XYZ" in order 4711.&lt;/P&gt;&lt;P&gt;The following entries are expected:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Import:     BAPIVBELN-VBELN       = '0000004711'  Document number
            BAPISDHD1X-UPDATEFLAG = 'U'           UPDKZ for doc header
Tables:     BAPISDITM-ITM_NUMBER  = '000020'      Item number
            BAPISDITMX-ITM_NUMBER = '000020'      Item number
          + BAPISDITMX-UPDATEFLAG = 'U'           UPDKZ for item&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You must complete the EXTENSION table as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;STRUCTURE                          VALUEPART1       1234561234567890123

BAPE_VBAP                       0000004711000020                 XYZ
BAPE_VBAPX                      0000004711000020       X&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Further Information&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;You can find more information in the BAPI programming guide in the chapter for enhancements to BAPIs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notes&lt;/P&gt;&lt;P&gt;You must complete the STRUCTURE field with the name of the relevant enhancement structure (BAPE_VBAK, BAPE_VBAP, BAPE_VBEP). You can complete the remaining fields with the append structures from the enhancement structures.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the moment, you can use the BAPI to store enhancements in the following structures:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VBAK : An enhancement to header data requires an append structure to BAPE_VBAK and an enhancement to structure VBAKKOZ.&lt;/P&gt;&lt;P&gt;VBAP : An enhancement to item data requires an append structure to BAPE_VBAP and an enhancment to structure VBAPKOZ.&lt;/P&gt;&lt;P&gt;VBEP : An enhancement to schedule line data requires an append structure to BAPE_VBEP and an enhancement to structure VBEPKOZ.&lt;/P&gt;&lt;P&gt;VBKD : If you are using an enhancement for header data, you must add an append structure to BAPE_VBAK. You also need to enhance structure VBAKKOZ. If it is for item data, you need to add an append structure to BAPE_VBAP. You must also enhance structure VBAPKOZ.&lt;/P&gt;&lt;P&gt;If you also want to work with checkboxes, each X-structure must also contain an append structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;A customer has created an order and wants to include the material long text (50 digits long).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The EXTENSIONIN structure must be completed with BAPE_VBAP. Two fields have fixed definitions in this structure. These are in the VBAP host key (VBELN, POSNR). The customer sets up an append structure that contains field ZMAT50.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Because the VBELN is normally blank when you create an order, the data can look like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STRUCTURE   |BAPE_VBAP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;2)&amp;lt;/b&amp;gt; Create the Sales Document using the FM and when successfully craeted you will get the Sales Document No in the Export parameter &amp;lt;b&amp;gt;SALESDOCUMENT&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;After its created and Committed using &amp;lt;b&amp;gt;BAPI_TRANSACTION_COMMIT&amp;lt;/b&amp;gt; , do a &amp;lt;b&amp;gt;BDC&amp;lt;/b&amp;gt; recording for the same to (&amp;lt;b&amp;gt;VA02&amp;lt;/b&amp;gt; Change Sales Order) update the fields only and save the document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;AS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Aug 2006 07:51:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/populating-customized-fields-in-sales-order-creation-using-bapi/m-p/1504787#M233374</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-04T07:51:39Z</dc:date>
    </item>
  </channel>
</rss>

