<?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: how to use bapi in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi/m-p/1256587#M146346</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;Have a look into these links for BAPI usage...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/abap/bapi/example.htm" target="test_blank"&gt;http://www.sapgenie.com/abap/bapi/example.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html" target="test_blank"&gt;http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regs,&lt;/P&gt;&lt;P&gt;jaga&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Apr 2006 10:48:58 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-04-19T10:48:58Z</dc:date>
    <item>
      <title>how to use bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi/m-p/1256580#M146339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi ,&lt;/P&gt;&lt;P&gt;    i got a requirement to use a bapi instead of bdc.&lt;/P&gt;&lt;P&gt;how to use any standard bapi,if anyone of u used bapi can u send me the sample code.can anyone help on this?&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;&lt;P&gt;sriram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Apr 2006 10:18:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi/m-p/1256580#M146339</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-19T10:18:43Z</dc:date>
    </item>
    <item>
      <title>Re: how to use bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi/m-p/1256581#M146340</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;Please mention ur mail id. I shall send you some documents.&lt;/P&gt;&lt;P&gt;Refer this thread:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="1201872"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/bapi.htm" target="test_blank"&gt;http://www.sap-img.com/bapi.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_46c/helpdata/de/9b/417f07ee2211d1ad14080009b0fb56/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_46c/helpdata/de/9b/417f07ee2211d1ad14080009b0fb56/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html" target="test_blank"&gt;http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sappoint.com/abap.html" target="test_blank"&gt;http://www.sappoint.com/abap.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html" target="test_blank"&gt;http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2005/helpdata/en/a5/3ec8074ac011d1894e0000e829fbbd/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2005/helpdata/en/a5/3ec8074ac011d1894e0000e829fbbd/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/abap/bapi/index.htm" target="test_blank"&gt;http://www.sapgenie.com/abap/bapi/index.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="856422"&gt;&lt;/A&gt;&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;Gayathri&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Gayathri Hariharan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Apr 2006 10:26:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi/m-p/1256581#M146340</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-19T10:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: how to use bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi/m-p/1256582#M146341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Srirama,&lt;/P&gt;&lt;P&gt; This is a smaple bapi usage:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/bapi-goodsmvt-create-to-post-goods-movement.htm" target="test_blank"&gt;http://www.sap-img.com/abap/bapi-goodsmvt-create-to-post-goods-movement.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Instead of MIFO transaction.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Apr 2006 10:27:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi/m-p/1256582#M146341</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-19T10:27:22Z</dc:date>
    </item>
    <item>
      <title>Re: how to use bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi/m-p/1256583#M146342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi sriram,&lt;/P&gt;&lt;P&gt;u can consider bapi as a function module n pass the parameters that r required fr the bapi. first u need to find out if a bapi exists for the particular upload..then within the bapi, read the documentations that clearly mentions the working of the parameters...&lt;/P&gt;&lt;P&gt;we had used a bapi for PO ( me21n ) upload.. send me ur id..i ll put it up there,...&lt;/P&gt;&lt;P&gt;hope it hwlps,&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bikash&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Apr 2006 10:28:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi/m-p/1256583#M146342</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-19T10:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: how to use bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi/m-p/1256584#M146343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;   BAPI is like function module ; fill data in to the parameters ; in the same way like FM. analyze the table and relationship.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Manoj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Apr 2006 10:29:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi/m-p/1256584#M146343</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-19T10:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: how to use bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi/m-p/1256585#M146344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;   Refer this link for complete guide to BAPI.&lt;/P&gt;&lt;P&gt;   Alternatively if u giv ur Email id i can giv u document which explains step by step example.&lt;/P&gt;&lt;P&gt;  &lt;A href="http://www.sapgenie.com/abap/bapi/index.htm" target="test_blank"&gt;http://www.sapgenie.com/abap/bapi/index.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Latheesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Apr 2006 10:35:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi/m-p/1256585#M146344</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-19T10:35:00Z</dc:date>
    </item>
    <item>
      <title>Re: how to use bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi/m-p/1256586#M146345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If its not too much, please send me too some docs about BAPI and other SAP/ABAP related docs. my e-mail ID is viraylab@yahoo.com. Thanks a lot!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Apr 2006 10:40:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi/m-p/1256586#M146345</guid>
      <dc:creator>aris_hidalgo</dc:creator>
      <dc:date>2006-04-19T10:40:53Z</dc:date>
    </item>
    <item>
      <title>Re: how to use bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi/m-p/1256587#M146346</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;Have a look into these links for BAPI usage...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/abap/bapi/example.htm" target="test_blank"&gt;http://www.sapgenie.com/abap/bapi/example.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html" target="test_blank"&gt;http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regs,&lt;/P&gt;&lt;P&gt;jaga&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Apr 2006 10:48:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi/m-p/1256587#M146346</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-19T10:48:58Z</dc:date>
    </item>
    <item>
      <title>Re: how to use bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi/m-p/1256588#M146347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!!&lt;/P&gt;&lt;P&gt;Bapis are used just like a fuction module. Only thing to take care is its interface parameters. Those should be right and Bapis return a internal table for exceptions. no sy-subrc check is done on a BAPI.&lt;/P&gt;&lt;P&gt;Sample code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report  ztypes no standard page heading message-id z5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Purpose: To check Delivery Completion Date in Transaction ME23N for all&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        purchase orders whose Delivery Completion Date is unchecked&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Type Declaration                                                     *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: begin of type_ekpo,                                     "Internal Table for Purchasing Document Item&lt;/P&gt;&lt;P&gt;          ebeln type ebeln,                                    "Purchasing Document Number&lt;/P&gt;&lt;P&gt;          ebelp type ebelp,                                    "Item Number of Purchasing Document&lt;/P&gt;&lt;P&gt;          elikz type elikz,                                    "Delivery Completed Indicator&lt;/P&gt;&lt;P&gt;          bukrs type bukrs,                                    "Company Code&lt;/P&gt;&lt;P&gt;          ekorg type ekorg,&lt;/P&gt;&lt;P&gt;       end of type_ekpo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: begin of i_return.&lt;/P&gt;&lt;P&gt;        include structure bapiret2.&lt;/P&gt;&lt;P&gt;types: end of i_return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: begin of i_poitem.&lt;/P&gt;&lt;P&gt;        include structure bapimepoitem.&lt;/P&gt;&lt;P&gt;types: end of i_poitem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: begin of i_poitemx.&lt;/P&gt;&lt;P&gt;        include structure bapimepoitemx.&lt;/P&gt;&lt;P&gt;types: end of i_poitemx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: begin of i_poheader.&lt;/P&gt;&lt;P&gt;        include structure bapimepoheader.&lt;/P&gt;&lt;P&gt;types: end of i_poheader.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: begin of i_poheaderx.&lt;/P&gt;&lt;P&gt;        include structure bapimepoheaderx.&lt;/P&gt;&lt;P&gt;types: end of i_poheaderx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: type_t_ekpo type standard table of type_ekpo,&lt;/P&gt;&lt;P&gt;       type_t_poitem type standard table of i_poitem,&lt;/P&gt;&lt;P&gt;       type_t_poitemx type standard table of i_poitemx,&lt;/P&gt;&lt;P&gt;       type_t_return type standard table of i_return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal Table Definition                                            *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: t_ekpo type type_t_ekpo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: t_poitem type  type_t_poitem,&lt;/P&gt;&lt;P&gt;      t_poitemx type type_t_poitemx,&lt;/P&gt;&lt;P&gt;      t_return type type_t_return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Variables                                                            *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: v_ebeln type ekko-ebeln.                                         "Variable used for validation at selection screen level&lt;/P&gt;&lt;P&gt;data: v_ebeln1 type ekko-ebeln.&lt;/P&gt;&lt;P&gt;data: v_bukrs type ekko-bukrs.&lt;/P&gt;&lt;P&gt;data: v_ekorg type ekko-ekorg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Workareas used for different types                                   *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: s_ekpo type type_ekpo,&lt;/P&gt;&lt;P&gt;      s_poitem type i_poitem,&lt;/P&gt;&lt;P&gt;      s_poitemx type i_poitemx,&lt;/P&gt;&lt;P&gt;      s_return type i_return,&lt;/P&gt;&lt;P&gt;      t_poheader type i_poheader,&lt;/P&gt;&lt;P&gt;      t_poheaderx type i_poheaderx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Selection-Screen                                                     *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection-screen begin of block b1 with frame title text-001.&lt;/P&gt;&lt;P&gt;select-options: s_ebeln for v_ebeln1 obligatory.&lt;/P&gt;&lt;P&gt;select-options: s_bukrs for v_bukrs.&lt;/P&gt;&lt;P&gt;select-options: s_ekorg for v_ekorg.&lt;/P&gt;&lt;P&gt;selection-screen end of block b1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;At Selection-Screen                                                  *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at selection-screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if not s_ebeln is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    select single ebeln&lt;/P&gt;&lt;P&gt;         into v_ebeln&lt;/P&gt;&lt;P&gt;         from ekko&lt;/P&gt;&lt;P&gt;         where ebeln in s_ebeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      message e035.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Start of Selection                                                   *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  perform z_query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*CHANGING DELIVERY INDICATOR USING BAPI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  perform z_change.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp;      Form  Z_QUERY&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; --&amp;gt;  p1        text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; &amp;lt;--  p2        text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form z_query .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get the purchase orders from S_EBELN into the range T_EBELN&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  refresh t_ekpo.&lt;/P&gt;&lt;P&gt;  clear t_ekpo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if not s_ebeln is initial.&lt;/P&gt;&lt;P&gt;    select p&lt;SUB&gt;ebeln p&lt;/SUB&gt;bukrs p&lt;SUB&gt;ekorg q&lt;/SUB&gt;ebelp q~elikz&lt;/P&gt;&lt;P&gt;           from ekko as p&lt;/P&gt;&lt;P&gt;           inner join ekpo as q&lt;/P&gt;&lt;P&gt;           on p&lt;SUB&gt;ebeln = q&lt;/SUB&gt;ebeln&lt;/P&gt;&lt;P&gt;           into corresponding fields of table t_ekpo&lt;/P&gt;&lt;P&gt;           where p~ebeln in s_ebeln&lt;/P&gt;&lt;P&gt;           and p~bukrs in s_bukrs&lt;/P&gt;&lt;P&gt;           and p~ekorg in s_ekorg&lt;/P&gt;&lt;P&gt;           and q~elikz &amp;lt;&amp;gt; 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      message e035.&lt;/P&gt;&lt;P&gt;    else.&lt;/P&gt;&lt;P&gt;      sort t_ekpo by ebeln ebelp.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.                    " Z_QUERY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  Z_CHANGE&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; --&amp;gt;  p1        text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; &amp;lt;--  p2        text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form z_change .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*LOOPING AT I_EKPO&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at t_ekpo into s_ekpo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    refresh t_poitem.&lt;/P&gt;&lt;P&gt;    clear t_poitem.&lt;/P&gt;&lt;P&gt;    refresh t_poitemx.&lt;/P&gt;&lt;P&gt;    clear t_poitemx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    clear s_poitem.&lt;/P&gt;&lt;P&gt;    clear s_poitemx.&lt;/P&gt;&lt;P&gt;    clear s_return.&lt;/P&gt;&lt;P&gt;    clear t_poheader.&lt;/P&gt;&lt;P&gt;    clear t_poheaderx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    t_poheader-po_number = s_ekpo-ebeln.&lt;/P&gt;&lt;P&gt;    t_poheaderx-po_number = 'x'.&lt;/P&gt;&lt;P&gt;    t_poheader-comp_code = s_ekpo-bukrs.&lt;/P&gt;&lt;P&gt;    t_poheaderx-comp_code = 'x'.&lt;/P&gt;&lt;P&gt;    t_poheader-purch_org = s_ekpo-ekorg.&lt;/P&gt;&lt;P&gt;    t_poheaderx-purch_org = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    s_poitem-po_item = s_ekpo-ebelp.&lt;/P&gt;&lt;P&gt;    s_poitem-no_more_gr = 'X'.&lt;/P&gt;&lt;P&gt;    append s_poitem to t_poitem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    s_poitemx-po_item = s_ekpo-ebelp.&lt;/P&gt;&lt;P&gt;    s_poitemx-po_itemx = 'X'.&lt;/P&gt;&lt;P&gt;    s_poitemx-no_more_gr = 'X'.&lt;/P&gt;&lt;P&gt;    append s_poitemx to t_poitemx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*CALL BAPI TO CHANGE PO&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    call function 'BAPI_PO_CHANGE'&lt;/P&gt;&lt;P&gt;      exporting&lt;/P&gt;&lt;P&gt;        purchaseorder = s_ekpo-ebeln&lt;/P&gt;&lt;P&gt;        poheader      = t_poheader&lt;/P&gt;&lt;P&gt;        poheaderx     = t_poheaderx&lt;/P&gt;&lt;P&gt;      tables&lt;/P&gt;&lt;P&gt;        return        = t_return&lt;/P&gt;&lt;P&gt;        poitem        = t_poitem&lt;/P&gt;&lt;P&gt;        poitemx       = t_poitemx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*COMMIT TRANSACTION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    read table t_return with key type = 'E' into s_return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;      perform z_rollback.&lt;/P&gt;&lt;P&gt;    else.&lt;/P&gt;&lt;P&gt;      perform z_commit.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    clear s_ekpo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.                    " Z_CHANGE&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  Z_ROLLBACK&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; --&amp;gt;  p1        text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; &amp;lt;--  p2        text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form z_rollback .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call function 'BAPI_TRANSACTION_ROLLBACK'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.                    " Z_ROLLBACK&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  Z_COMMIT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; --&amp;gt;  p1        text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; &amp;lt;--  p2        text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form z_commit .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call function 'BAPI_TRANSACTION_COMMIT'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.                    " Z_COMMIT&lt;/P&gt;&lt;P&gt;&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;Sangeeta.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Plz donot forget to award points.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Apr 2006 11:07:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi/m-p/1256588#M146347</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-19T11:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: how to use bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi/m-p/1256589#M146348</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;Check the sample code to upload material master data using BAPI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT Z_BAPI_MAT.


**********************************************************************
*                STRUCTURE  DECLARATIONS                             *
**********************************************************************

TABLES: BAPIMATHEAD,  "Headerdata
        BAPI_MARA,    "Clientdata
        BAPI_MARAX,   "Clientdatax
        BAPI_MARC,    "Plantdata
        BAPI_MARCX,   "Plantdatax
        BAPI_MAKT,    "Material description
        BAPIRET2.     "Return messages

DATA:V_FILE TYPE STRING.


DATA:
  BEGIN OF LSMW_MATERIAL_MASTER,
    MATNR(018) TYPE C,  "Material number
    MTART(004) TYPE C,  "Material type
    MBRSH(001) TYPE C,  "Industry sector
    WERKS(004) TYPE C,  "Plant
    MAKTX(040) TYPE C,  "Material description
    DISMM(002) TYPE C,  "Extra Field Added In the Program as itsrequired
    MEINS(003) TYPE C,  "Base unit of measure
    MATKL(009) TYPE C,  "Material group
    SPART(002) TYPE C,  "Division
    LABOR(003) TYPE C,  "Lab/office
    PRDHA(018) TYPE C,  "Product hierarchy
    MSTAE(002) TYPE C,  "X-plant matl status
    MTPOS_MARA(004) TYPE C,  "Gen item cat group
    BRGEW(017) TYPE C,  "Gross weight
    GEWEI(003) TYPE C,  "Weight unit
    NTGEW(017) TYPE C,  "Net weight
    GROES(032) TYPE C,  "Size/Dimensions
    MAGRV(004) TYPE C,  "Matl grp pack matls
    BISMT(018) TYPE C,  "Old material number
    WRKST(048) TYPE C,  "Basic material
    PROFL(003) TYPE C,  "DG indicator profile
    KZUMW(001) TYPE C,  "Environmentally rlvt
    BSTME(003) TYPE C,  "Order unit
    VABME(001) TYPE C,
    EKGRP(003) TYPE C,  "Purchasing group
    XCHPF(001) TYPE C,  "Batch management
    EKWSL(004) TYPE C,  "Purchasing key value
    WEBAZ(003) TYPE C,  "GR processing time
    MFRPN(040) TYPE C,  "Manufacturer part number
    MFRNR(010) TYPE C,  "Manufacturer number
    VPRSV(001) TYPE C,  "Price control indicator
    STPRS(015) TYPE C,  "Standard price
    BWPRH(014) TYPE C,  "Commercial price1
    BKLAS(004) TYPE C,  "Valuation class
  END OF LSMW_MATERIAL_MASTER.


**********************************************************************
*                INTERNAL TABLE DECLARATIONS                         *
**********************************************************************

*to store the input data
DATA:
  BEGIN OF it_matmaster OCCURS 0.
        INCLUDE STRUCTURE LSMW_MATERIAL_MASTER.

DATA:
  END OF it_matmaster.

*for material description
DATA:BEGIN OF IT_MATERIALDESC OCCURS 0.
     INCLUDE STRUCTURE BAPI_MAKT .
DATA:END OF IT_MATERIALDESC.

*to return messages
DATA:BEGIN OF IT_RETURN OCCURS 0.
     INCLUDE STRUCTURE BAPIRET2.
DATA:END OF IT_RETURN.

************************************************************************
*  SELECTION SCREEN
************************************************************************
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-002.

PARAMETERS:P_FILE LIKE RLGRAP-FILENAME OBLIGATORY.
SELECTION-SCREEN END OF BLOCK B1 .

************************************************************************
* AT SELECTION SCREEN
************************************************************************
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
  CALL FUNCTION 'F4_FILENAME'
    EXPORTING
      PROGRAM_NAME  = SYST-CPROG
      DYNPRO_NUMBER = SYST-DYNNR
      FIELD_NAME    = 'P_FILE'
    IMPORTING
      FILE_NAME     = P_FILE.



**********************************************************************
*                TO UPLOAD THE DATA                                  *
**********************************************************************

START-OF-SELECTION.
V_FILE = P_FILE.
CALL FUNCTION 'GUI_UPLOAD'
  EXPORTING
    filename                      = V_FILE
   FILETYPE                      = 'ASC'
   HAS_FIELD_SEPARATOR           = 'X'
*   HEADER_LENGTH                 = 0
*   READ_BY_LINE                  = 'X'
*   DAT_MODE                      = ' '
* IMPORTING
*   FILELENGTH                    =
*   HEADER                        =
  tables
    data_tab                      =  IT_MATMASTER
 EXCEPTIONS
   FILE_OPEN_ERROR               = 1
   FILE_READ_ERROR               = 2
   NO_BATCH                      = 3
   GUI_REFUSE_FILETRANSFER       = 4
   INVALID_TYPE                  = 5
   NO_AUTHORITY                  = 6
   UNKNOWN_ERROR                 = 7
   BAD_DATA_FORMAT               = 8
   HEADER_NOT_ALLOWED            = 9
   SEPARATOR_NOT_ALLOWED         = 10
   HEADER_TOO_LONG               = 11
   UNKNOWN_DP_ERROR              = 12
   ACCESS_DENIED                 = 13
   DP_OUT_OF_MEMORY              = 14
   DISK_FULL                     = 15
   DP_TIMEOUT                    = 16
   OTHERS                        = 17
          .
IF sy-subrc &amp;lt;&amp;gt; 0.
 MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

**********************************************************************
*                DATA POPULATIONS                                    *
**********************************************************************


LOOP AT  IT_MATMASTER.
  BAPIMATHEAD-MATERIAL = IT_MATMASTER-MATNR.
  BAPIMATHEAD-IND_SECTOR = IT_MATMASTER-Mbrsh.
  BAPIMATHEAD-MATL_TYPE = IT_MATMASTER-Mtart.
  BAPIMATHEAD-BASIC_VIEW = 'X'.
  BAPIMATHEAD-PURCHASE_VIEW = 'X'.
  BAPIMATHEAD-ACCOUNT_VIEW = 'X'.
  BAPI_MARA-MATL_GROUP = IT_MATMASTER-MATKL.
  BAPI_MARA-OLD_MAT_NO = IT_MATMASTER-BISMT.
  BAPI_MARA-BASE_UOM = IT_MATMASTER-MEINS.
  BAPI_MARA-BASIC_MATL = IT_MATMASTER-WRKST.
  BAPI_MARA-MFR_NO = IT_MATMASTER-MFRNR.
  BAPI_MARAX-MATL_GROUP = 'X'.
  BAPI_MARAX-OLD_MAT_NO = 'X'.
  BAPI_MARAX-BASE_UOM = 'X'.
  BAPI_MARAX-BASIC_MATL = 'X'.
  BAPI_MARAX-MFR_NO = 'X'.
  BAPI_MARC-PLANT = IT_MATMASTER-WERKS.
  BAPI_MARC-PUR_GROUP = IT_MATMASTER-EKGRP.
  BAPI_MARCX-PLANT = IT_MATMASTER-WERKS.
  BAPI_MARCX-PUR_GROUP = 'X'.
  IT_MATERIALDESC-LANGU = 'EN'.
  IT_MATERIALDESC-MATL_DESC = IT_MATMASTER-MAKTX.
  append IT_materialdesc.
  CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
    EXPORTING
      headdata                   = BAPIMATHEAD
      CLIENTDATA                 = BAPI_MARA
      CLIENTDATAX                = BAPI_MARAx
     PLANTDATA                  = BAPI_MARc
     PLANTDATAX                 = BAPI_MARcx
*     FORECASTPARAMETERS         =
*     FORECASTPARAMETERSX        =
*     PLANNINGDATA               =
*     PLANNINGDATAX              =
*     STORAGELOCATIONDATA        =
*     STORAGELOCATIONDATAX       =
*     VALUATIONDATA              =
*     VALUATIONDATAX             =
*     WAREHOUSENUMBERDATA        =
*     WAREHOUSENUMBERDATAX       =
*     SALESDATA                  =
*     SALESDATAX                 =
*     STORAGETYPEDATA            =
*     STORAGETYPEDATAX           =
*     FLAG_ONLINE                = ' '
*     FLAG_CAD_CALL              = ' '
   IMPORTING
     RETURN                     = IT_RETURN
   TABLES
     MATERIALDESCRIPTION        = IT_MATERIALDESC
*     UNITSOFMEASURE             =
*     UNITSOFMEASUREX            =
*     INTERNATIONALARTNOS        =
*     MATERIALLONGTEXT           =
*     TAXCLASSIFICATIONS         =
*     RETURNMESSAGES             =
*     PRTDATA                    =
*     PRTDATAX                   =
*     EXTENSIONIN                =
*     EXTENSIONINX               =
            .
if sy-subrc = 0.
  CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
* EXPORTING
*   WAIT          =
* IMPORTING
*   RETURN        =
            .
endif.
 WRITE:/    IT_RETURN-TYPE,
        2   IT_RETURN-ID,
        22  IT_RETURN-NUMBER,
        25  IT_RETURN-MESSAGE.
*            IT_RETURN-LOG_NO,
*            IT_RETURN-LOG_MSG_NO,
*            IT_RETURN-MESSAGE_V1,
*            IT_RETURN-MESSAGE_V2,
*            IT_RETURN-MESSAGE_V3,
*            IT_RETURN-MESSAGE_V4,
*            IT_RETURN-PARAMETER,
*            IT_RETURN-ROW,
*            IT_RETURN-FIELD,
*            IT_RETURN-SYSTEM.

ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Apr 2006 11:09:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi/m-p/1256589#M146348</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-19T11:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: how to use bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi/m-p/1256590#M146349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi !&lt;/P&gt;&lt;P&gt;Bapis are function modules that can "simply" be called by a CALL FUNCTION from ABAP-Code....&lt;/P&gt;&lt;P&gt;You can use the SAP-BAPI-Exporer (T-Code BAPI) to find usefull bapis and see what they do and how thier parametes should be filled.&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;Rainer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some forum points would be fine if that helped you a bit...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Apr 2006 05:59:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-bapi/m-p/1256590#M146349</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-21T05:59:52Z</dc:date>
    </item>
  </channel>
</rss>

