<?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 BAPI Enhancement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-enhancement/m-p/7933244#M1600006</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;I'm planning to add new table in BAPI*change.(I'm not Appening or Doing a Include )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will I be able to change the BAPI without Access Key Shd I add Extensionin and Extensionout to the Table.&lt;/P&gt;&lt;P&gt;Do I have to chekc for any preRequisites before Starting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to run in Debug and find out the Values are updating Only problem is there are no input Parameters for them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for all your Suggestions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Jun 2011 20:40:18 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-06-01T20:40:18Z</dc:date>
    <item>
      <title>BAPI Enhancement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-enhancement/m-p/7933244#M1600006</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;I'm planning to add new table in BAPI*change.(I'm not Appening or Doing a Include )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will I be able to change the BAPI without Access Key Shd I add Extensionin and Extensionout to the Table.&lt;/P&gt;&lt;P&gt;Do I have to chekc for any preRequisites before Starting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to run in Debug and find out the Values are updating Only problem is there are no input Parameters for them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for all your Suggestions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jun 2011 20:40:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-enhancement/m-p/7933244#M1600006</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-06-01T20:40:18Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI Enhancement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-enhancement/m-p/7933245#M1600007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ghanta,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For which bapi you need extension. There is a  provision to that in sales order,quotation etc. Please elaborate the requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Madhu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jun 2011 04:28:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-enhancement/m-p/7933245#M1600007</guid>
      <dc:creator>madhu_vadlamani</dc:creator>
      <dc:date>2011-06-02T04:28:33Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI Enhancement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-enhancement/m-p/7933246#M1600008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you have custom ZZ fields on VBAP and VBAK then you can update these fields using the standard BAPI to create or change the order and update these fields.&lt;/P&gt;&lt;P&gt;A lot has been spoken about this but nowhere does it spell out the pitfalls and give you an end-to-end procedure on how to do it. I even found some "SAP Experts - Ask a question" on Search SAP give a complete wrong answer!!! So here is the correct way to do it. &lt;/P&gt;&lt;P&gt;To do so you first need to ensure that the following 5 tables are in synch.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) VBAP: In your append structure you specify your ZZFIELD with the data type as needed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) BAPE_VBAP: In the append structure here also add the ZZFIELD with the data type as needed with limitations. No decimals. Try and stick to char characters&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) BAPE_VBAPX: In the append structure add the field ZZFIELD of type BAPIUPDATE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(NOTE: (2) and (3) must have the same number of fields in the same order)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) VBAPKOZ: In the append structure here also add the ZZFIELD with the data type as needed with limitations. No decimals. Try and stick to char characters&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5) VBAPKOZX: In the append structure add the field ZZFIELD of type BAPIUPDATE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(NOTE: (4) and (5) must have the same number of fields in the same order)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Similarly do for VBAK, BAPE_VBAK, BAPE_VBAKX, VBAKKOZ and VBAKKOZX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next we get to the code to fill in the structure EXTENSIONIN&lt;/P&gt;&lt;P&gt;I will demonstrate how to call the create sales order BAPI with custom fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Local definitions&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA: wa_extensionin TYPE bapiparex,&lt;/P&gt;&lt;P&gt;wa_bape_vbap   TYPE bape_vbap,&lt;/P&gt;&lt;P&gt;wa_bape_vbapx  TYPE bape_vbapx,&lt;/P&gt;&lt;P&gt;wa_bape_vbak   TYPE bape_vbak,&lt;/P&gt;&lt;P&gt;wa_bape_vbakx  TYPE bape_vbakx,&lt;/P&gt;&lt;P&gt;lv_posnr       TYPE posnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Processing the header extension&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CLEAR wa_bape_vbak.&lt;/P&gt;&lt;P&gt;wa_bape_vbak-ZZFIELD     = 'HDRTEST'.&lt;/P&gt;&lt;P&gt;wa_extensionin-structure = 'BAPE_VBAK'.&lt;/P&gt;&lt;P&gt;wa_extensionin+30(960)   = wa_bape_vbak.&lt;/P&gt;&lt;P&gt;append wa_extensionin to lt_extensionin.&lt;/P&gt;&lt;P&gt;clear wa_extensionin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Processing the line extension&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;LOOP AT line_items INTO wa_lineitems.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ADD 10 TO lv_posnr.   &lt;/P&gt;&lt;P&gt;CLEAR wa_bape_vbap.&lt;/P&gt;&lt;P&gt;wa_bape_vbap-ZZFIELD     = 'TEST'.&lt;/P&gt;&lt;P&gt;wa_extensionin-structure = 'BAPE_VBAP'.&lt;/P&gt;&lt;P&gt;wa_bape_vbap-posnr       = lv_posnr.&lt;/P&gt;&lt;P&gt;wa_extensionin+30(960)   = wa_bape_vbap.&lt;/P&gt;&lt;P&gt;append wa_extensionin to lt_extensionin.&lt;/P&gt;&lt;P&gt;clear wa_extensionin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR wa_bape_vbapx.&lt;/P&gt;&lt;P&gt;wa_bape_vbapx-ZZFIELD    = 'X'.&lt;/P&gt;&lt;P&gt;wa_extensionin-structure = 'BAPE_VBAPX'.&lt;/P&gt;&lt;P&gt;wa_bape_vbapx-posnr      = lv_posnr.&lt;/P&gt;&lt;P&gt;wa_extensionin+30(960)   = wa_bape_vbapx.&lt;/P&gt;&lt;P&gt;append wa_extensionin to lt_extensionin.&lt;/P&gt;&lt;P&gt;clear wa_extensionin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Then the call to the BAPI&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;order_header_in  = ls_order_header_in&lt;/P&gt;&lt;P&gt;order_header_inx = ls_order_header_inx&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;salesdocument    = lv_salesdocument&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;return           = lt_ret2&lt;/P&gt;&lt;P&gt;order_items_in   = lt_order_items_in&lt;/P&gt;&lt;P&gt;order_items_inx  = lt_order_items_inx&lt;/P&gt;&lt;P&gt;order_partners   = lt_order_partners&lt;/P&gt;&lt;P&gt;order_keys       = lt_order_keys&lt;/P&gt;&lt;P&gt;extensionin      = lt_extensionin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: If you have a need to force a different Business Object type or wish to see the extension return fields then use the function SD_SALESDOCUMENT_CREATE instead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'SD_SALESDOCUMENT_CREATE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;sales_header_in     = ls_order_header_in&lt;/P&gt;&lt;P&gt;sales_header_inx    = ls_order_header_inx&lt;/P&gt;&lt;P&gt;business_object     = 'BUS2032'&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;salesdocument_ex    = lv_salesdocument&lt;/P&gt;&lt;P&gt;sales_header_out    = lv_sales_header_out&lt;/P&gt;&lt;P&gt;sales_header_status = lv_sales_header_status&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;return              = lt_ret2&lt;/P&gt;&lt;P&gt;sales_items_in      = lt_order_items_in&lt;/P&gt;&lt;P&gt;sales_items_inx     = lt_order_items_inx&lt;/P&gt;&lt;P&gt;sales_partners      = lt_order_partners&lt;/P&gt;&lt;P&gt;sales_keys          = lt_order_keys&lt;/P&gt;&lt;P&gt;extensionin         = lt_extensionin&lt;/P&gt;&lt;P&gt;incomplete_log      = lt_incomplete_log&lt;/P&gt;&lt;P&gt;extensionex         = lt_extensionex.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jun 2011 11:12:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-enhancement/m-p/7933246#M1600008</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-06-02T11:12:13Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI Enhancement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-enhancement/m-p/7933247#M1600009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Madhu and Ramesh.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to add few fields and I dont want to add it to any DB TAble or existing tables in BAPI , I want to create a new table in BAPI Tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to Enhance BAPI_INCOMINGINVOICE_CHANGE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for all of your time..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jun 2011 14:07:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-enhancement/m-p/7933247#M1600009</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-06-02T14:07:00Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI Enhancement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-enhancement/m-p/7933248#M1600010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ghanta,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) What is the exact requirement 2) If you add new tables in bapi what you are going to keep in that 3) Where you will move that tables data. Elaborate the requirement  more.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Madhu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jun 2011 04:17:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-enhancement/m-p/7933248#M1600010</guid>
      <dc:creator>madhu_vadlamani</dc:creator>
      <dc:date>2011-06-03T04:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI Enhancement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-enhancement/m-p/7933249#M1600011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ghanta,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to add few fields and I dont want to add it to any DB TAble or existing tables in BAPI , I want to create a new table in BAPI Tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;You can do the above without any access keys, if you are on ECC 6.0, you can use the enhance interface option of the FM and add an optional tables parameter. Once, you have done this you can use the implicit enhancement option in the beginning/end of the FM to add custom logic to handle the data in the new table parameter or you can use BADI - MRM_BAPI_MAPPING, if it gets triggered in the flow of the BAPI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now if you are in ECC .50 or less, then you will have to use the extensions table parameter, and check the BADI - MRM_BAPI_MAPPING(i am not sure if it is available).&lt;/P&gt;&lt;P&gt;Else, you can export the custom values into memory before calling the BAPI and importing it the &lt;STRONG&gt;SAVE&lt;/STRONG&gt;BEFORE* method of the BADI - INVOICE_UPDATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jun 2011 06:27:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-enhancement/m-p/7933249#M1600011</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-06-03T06:27:47Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI Enhancement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-enhancement/m-p/7933250#M1600012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank You Chen! I was able to add Table ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Madhu I just need to pass the values now I will be able to do that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jun 2011 14:32:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-enhancement/m-p/7933250#M1600012</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-06-03T14:32:37Z</dc:date>
    </item>
  </channel>
</rss>

