<?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/badi in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-badi/m-p/3434407#M824805</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hai sir&lt;/P&gt;&lt;P&gt;       i want real time objects of badi/bapi functionalities. plz help me to understand these&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Feb 2008 06:28:12 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-19T06:28:12Z</dc:date>
    <item>
      <title>bapi/badi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-badi/m-p/3434407#M824805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hai sir&lt;/P&gt;&lt;P&gt;       i want real time objects of badi/bapi functionalities. plz help me to understand these&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2008 06:28:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-badi/m-p/3434407#M824805</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-19T06:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: bapi/badi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-badi/m-p/3434408#M824806</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;For BADIs pls refer : &lt;A href="http://www.sourceveda.com/page4.htm" target="test_blank"&gt;http://www.sourceveda.com/page4.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For BAPIs:&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;A href="https://community.sap.com/www.sappoint.com/abap/bapiintro.pdf" target="test_blank"&gt;www.sappoint.com/abap/bapiintro.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.sap.com/www.sap-img.com/bapi.htm" target="test_blank"&gt;www.sap-img.com/bapi.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.sap.com/www.sap-img.com/abap/bapi-conventions.htm" target="test_blank"&gt;www.sap-img.com/abap/bapi-conventions.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.sap.com/www.planetsap.com/Bapi_main_page.htm" target="test_blank"&gt;www.planetsap.com/Bapi_main_page.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.sap.com/www.sapgenie.com/abap/bapi/index.htm" target="test_blank"&gt;www.sapgenie.com/abap/bapi/index.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/bapi-to-copy-materials-from-one-plant-to-another.htm" target="test_blank"&gt;http://www.sap-img.com/abap/bapi-to-copy-materials-from-one-plant-to-another.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2008 06:33:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-badi/m-p/3434408#M824806</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-19T06:33:58Z</dc:date>
    </item>
    <item>
      <title>Re: bapi/badi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-badi/m-p/3434409#M824807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Venu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DEFINING THE BADI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) execute Tcode SE18.&lt;/P&gt;&lt;P&gt;2) Specify a definition Name : ZBADI_SPFLI&lt;/P&gt;&lt;P&gt;3) Press create&lt;/P&gt;&lt;P&gt;4) Choose the attribute tab. Specify short desc for badi.. and specify the type : &lt;/P&gt;&lt;P&gt;multiple use.&lt;/P&gt;&lt;P&gt;5) Choose the interface tab&lt;/P&gt;&lt;P&gt;6) Specify interface name: ZIF_EX_BADI_SPFLI and save.&lt;/P&gt;&lt;P&gt;7) Dbl clk on interface name to start class builder . specify a method name (name, &lt;/P&gt;&lt;P&gt;level, desc).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Method level desc&lt;/P&gt;&lt;P&gt;Linese;ection instance methos some desc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt; place the cursor on the method name desc its parameters to define the interface.&lt;/P&gt;&lt;P&gt;Parameter type refe field desc&lt;/P&gt;&lt;P&gt;I_carrid import spfli-carrid some&lt;/P&gt;&lt;P&gt;I_connid import spefi-connid some&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;9) save , check and activate&amp;#133;adapter class proposed by system is &lt;/P&gt;&lt;P&gt;ZCL_IM_IM_LINESEL is genereated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IMPLEMENTATION OF BADI DEFINITION &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) EXECUTE tcode se18.choose menuitem create from the implementation menubar.&lt;/P&gt;&lt;P&gt;2) Specify aname for implementation ZIM_LINESEL&lt;/P&gt;&lt;P&gt;3) Specify short desc.&lt;/P&gt;&lt;P&gt;4) Choose interface tab. System proposes a name fo the implementation class. &lt;/P&gt;&lt;P&gt;ZCL_IM_IMLINESEL which is already generarted.&lt;/P&gt;&lt;P&gt;5) Specify short desc for method&lt;/P&gt;&lt;P&gt;6) Dbl clk on method to insert code..(check the code in &amp;#147;AAA&amp;#148;).&lt;/P&gt;&lt;P&gt;7) Save , check and activate the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some useful URL&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt" target="test_blank"&gt;http://www.esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf" target="test_blank"&gt;http://www.esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc" target="test_blank"&gt;http://www.esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc" target="test_blank"&gt;http://www.esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.sap.com/www.sapgenie.com/publications/saptips/022006%20-%20Zaidi%20BADI.pdf" target="test_blank"&gt;www.sapgenie.com/publications/saptips/022006%20-%20Zaidi%20BADI.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/enhance/enhance_badi.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/enhance/enhance_badi.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now write a sample program to use this badi method..&lt;/P&gt;&lt;P&gt;Look for &amp;#147;BBB&amp;#148; sample program.&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;#147;AAA&amp;#148;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : wa_flights type sflight,&lt;/P&gt;&lt;P&gt;it_flights type table of sflight.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;format color col_heading.&lt;/P&gt;&lt;P&gt;write:/ 'Flight info of:', i_carrid, i_connid.&lt;/P&gt;&lt;P&gt;format color col_normal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from sflight&lt;/P&gt;&lt;P&gt;into corresponding fields of table it_flights&lt;/P&gt;&lt;P&gt;where carrid = i_carrid&lt;/P&gt;&lt;P&gt;and connid = i_connid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_flights into wa_flights.&lt;/P&gt;&lt;P&gt;write:/ wa_flights-fldate,&lt;/P&gt;&lt;P&gt;wa_flights-planetype,&lt;/P&gt;&lt;P&gt;wa_flights-price currency wa_flights-currency,&lt;/P&gt;&lt;P&gt;wa_flights-seatsmax,&lt;/P&gt;&lt;P&gt;wa_flights-seatsocc.&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;&lt;/P&gt;&lt;P&gt;&amp;#147;BBB&amp;#148;&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; Report ZBADI_TEST *&lt;/P&gt;&lt;P&gt;*&amp;amp; *&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; *&lt;/P&gt;&lt;P&gt;*&amp;amp; *&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;&lt;/P&gt;&lt;P&gt;REPORT ZBADI_TEST .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables: spfli.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: wa_spfli type spfli,&lt;/P&gt;&lt;P&gt;it_spfli type table of spfli with key carrid connid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Initialise the object of the interface.&lt;/P&gt;&lt;P&gt;data: exit_ref type ref to ZCL_IM_IM_LINESEL,&lt;/P&gt;&lt;P&gt;exit_ref1 type ref to ZIF_EX_BADISPFLI1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection-screen begin of block b1.&lt;/P&gt;&lt;P&gt;select-options: s_carr for spfli-carrid.&lt;/P&gt;&lt;P&gt;selection-screen end of block b1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;select * from spfli into corresponding fields of table it_spfli&lt;/P&gt;&lt;P&gt;where carrid in s_carr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end-of-selection.&lt;/P&gt;&lt;P&gt;loop at it_spfli into wa_spfli.&lt;/P&gt;&lt;P&gt;write:/ wa_spfli-carrid,&lt;/P&gt;&lt;P&gt;wa_spfli-connid,&lt;/P&gt;&lt;P&gt;wa_spfli-cityfrom,&lt;/P&gt;&lt;P&gt;wa_spfli-deptime,&lt;/P&gt;&lt;P&gt;wa_spfli-arrtime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hide: wa_spfli-carrid, wa_spfli-connid.&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;at line-selection.&lt;/P&gt;&lt;P&gt;check not wa_spfli-carrid is initial.&lt;/P&gt;&lt;P&gt;create object exit_ref.&lt;/P&gt;&lt;P&gt;exit_ref1 = exit_ref.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call method exit_ref1-&amp;gt;lineselection&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;i_carrid = wa_spfli-carrid&lt;/P&gt;&lt;P&gt;i_connid = wa_spfli-connid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear wa_spfli. &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;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2008 08:57:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-badi/m-p/3434409#M824807</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-19T08:57:08Z</dc:date>
    </item>
    <item>
      <title>Re: bapi/badi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-badi/m-p/3434410#M824808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read the given text and &lt;/P&gt;&lt;P&gt;Just follow the steps, You will able to program yr Ist BADI .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Business Add-Ins  (BADI)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAP Business Add-Ins (BAdIs) are one of the most important technologies used to adapt SAP software to specific requirements. BAdIs were introduced with Release 4.6 and replace function module exits. This technology is not limited to SAP applications. BAdI calls can be integrated in customer applications. These can then be enhanced by other customer applications. In the various SAP applications, BAdI calls are implemented at places where enhancements are appropriate.Business add-ins are enhancements to the standard version of the system. They can be inserted into the SAP System to accommodate user requirements too specific to be included in the standard delivery. Since specific industries often require special functions, SAP allows you to predefine these points in your software.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As with customer exits, two different views are available:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149; In the definition view, an application programmer defines exit points in a source that allow specific industry sectors, partners, and customers to attach additional coding to standard SAP source code, without having to modify the original object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149; In the implementation view, the users of Business Add-Ins can customize the logic they need or use a standard solution, if one is available.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In contrast to customer exits, Business Add-Ins no longer assume a two-level infrastructure (SAP and customer solutions), but instead allow for a multi-level system landscape (SAP, country-specific versions, industry solutions, partner, customer, and so on). You can create definitions and implementations of Business Add-Ins at any level of the system landscape.SAP guarantees the upward compatibility of all Business Add-In interfaces. Release upgrades do not affect enhancement calls from within the standard software nor do they affect the validity of call interfaces. You do not have to register Business Add-Ins in SSCR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Business Add-In enhancement technique differentiates between enhancements that can only be implemented once and enhancements that can be used actively by any number of customers at the same time. In addition, Business Add-Ins can be defined according to filter values. This allows you to differentiate between Add-In implementations using the filter Country or other criteria.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The enhancement technique is set up in such a way that it is possible to define interfaces for ABAP soure code, screens, GUI interfaces, and tables. These allow customers to include their own enhancements in the standard. A single Business Add-In contains all of the interfaces necessary to implement a specific task.&lt;/P&gt;&lt;P&gt;BADI is just an object-oriented version of user-exit. Instead of entering program code into some function module (as in customer-exit), you define some class which has to implement predefined methods and those methods are fired at predefined points just like an old user-exit. Some BADI can have multiple independent implementations which is much better for software deployment as several developers can implement the same BADI independently. BADI/UserExists are used to enhance R/3 For customer Needs. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;How To Define a New BAdI Within the Enhancement Framework (Some Basics About the BAdI,BAdI Commands in ABAP,&lt;/P&gt;&lt;P&gt;When to Use a BAdI?)&lt;/P&gt;&lt;P&gt;/people/thomas.weiss/blog/2006/04/03/how-to-define-a-new-badi-within-the-enhancement-framework--part-3-of-the-series&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to implement a BAdI And How to Use a Filter &lt;/P&gt;&lt;P&gt;/people/thomas.weiss/blog/2006/04/18/how-to-implement-a-badi-and-how-to-use-a-filter--part-4-of-the-series-on-the-new-enhancement-framework&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Introducing Business Add-Ins&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f3202186-0601-0010-6591-b832b1a0d0de" target="test_blank"&gt;https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f3202186-0601-0010-6591-b832b1a0d0de&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to implement BAdi in Enhancement Framework&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d0456c54-0901-0010-f0b3-cd765fb99702" target="test_blank"&gt;https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d0456c54-0901-0010-f0b3-cd765fb99702&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Business Add-Ins &lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/ee/a1d548892b11d295d60000e82de14a/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/ee/a1d548892b11d295d60000e82de14a/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BAdI: Customer-Defined Functions in the Formula Builder &lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Difference Between BADI and User Exits &lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/difference-between-badi-and-user-exits.htm" target="test_blank"&gt;http://www.sap-img.com/abap/difference-between-badi-and-user-exits.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To Use BADI - Business Add In you need to Understand ABAP OO Interface Concept &lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/business-add-in-you-need-to-understand-abap-oo-interface-concept.htm" target="test_blank"&gt;http://www.sap-img.com/abap/business-add-in-you-need-to-understand-abap-oo-interface-concept.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; BADI example&lt;/P&gt;&lt;P&gt;DEFINING THE BADI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)        execute Tcode  SE18.&lt;/P&gt;&lt;P&gt;2)        Specify a definition Name : ZBADI_SPFLI&lt;/P&gt;&lt;P&gt;3)        Press create&lt;/P&gt;&lt;P&gt;4)        Choose the attribute tab.  Specify short desc for badi.. and specify the type : &lt;/P&gt;&lt;P&gt;multiple use.&lt;/P&gt;&lt;P&gt;5)        Choose the interface tab&lt;/P&gt;&lt;P&gt;6)        Specify interface name: ZIF_EX_BADI_SPFLI and save.&lt;/P&gt;&lt;P&gt;7)        Dbl clk on interface name to start class builder . specify a method name (name, &lt;/P&gt;&lt;P&gt;level, desc).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Method                   level                                      desc&lt;/P&gt;&lt;P&gt;Linese;ection        instance methos                 some desc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt;        place the cursor on the method name desc its parameters to define the interface.&lt;/P&gt;&lt;P&gt;Parameter                       type                            refe field                        desc&lt;/P&gt;&lt;P&gt;I_carrid                          import                       spfli-carrid                     some&lt;/P&gt;&lt;P&gt;I_connid                         import                      spefi-connid                   some&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;9)        save , check and activate&amp;#133;adapter class proposed by system is &lt;/P&gt;&lt;P&gt;ZCL_IM_IM_LINESEL is genereated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IMPLEMENTATION OF BADI DEFINITION        &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)        EXECUTE tcode se18.choose menuitem create from the implementation menubar.&lt;/P&gt;&lt;P&gt;2)        Specify aname for implementation ZIM_LINESEL&lt;/P&gt;&lt;P&gt;3)        Specify short desc.&lt;/P&gt;&lt;P&gt;4)        Choose interface tab. System proposes a name fo the implementation class. &lt;/P&gt;&lt;P&gt;ZCL_IM_IMLINESEL which is already generarted.&lt;/P&gt;&lt;P&gt;5)        Specify short desc for method&lt;/P&gt;&lt;P&gt;6)        Dbl clk on method to insert code..(check the code in &amp;#147;AAA&amp;#148;).&lt;/P&gt;&lt;P&gt;7)        Save , check and activate the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now write a sample program to use this badi method..&lt;/P&gt;&lt;P&gt;Look for &amp;#147;BBB&amp;#148; sample program.&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;#147;AAA&amp;#148;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : wa_flights type sflight,&lt;/P&gt;&lt;P&gt;it_flights type table of sflight.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;format color col_heading.&lt;/P&gt;&lt;P&gt;write:/ 'Flight info of:', i_carrid, i_connid.&lt;/P&gt;&lt;P&gt;format color col_normal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from sflight&lt;/P&gt;&lt;P&gt;into corresponding fields of table it_flights&lt;/P&gt;&lt;P&gt;where carrid = i_carrid&lt;/P&gt;&lt;P&gt;and  connid = i_connid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_flights into wa_flights.&lt;/P&gt;&lt;P&gt;write:/ wa_flights-fldate,&lt;/P&gt;&lt;P&gt;wa_flights-planetype,&lt;/P&gt;&lt;P&gt;wa_flights-price currency wa_flights-currency,&lt;/P&gt;&lt;P&gt;wa_flights-seatsmax,&lt;/P&gt;&lt;P&gt;wa_flights-seatsocc.&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;&lt;/P&gt;&lt;P&gt;&amp;#147;BBB&amp;#148;&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; Report  ZBADI_TEST                                                  *&lt;/P&gt;&lt;P&gt;*&amp;amp;                                                                     *&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;                                                                     *&lt;/P&gt;&lt;P&gt;*&amp;amp;                                                                     *&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;&lt;/P&gt;&lt;P&gt;REPORT  ZBADI_TEST                              .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables: spfli.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: wa_spfli type spfli,&lt;/P&gt;&lt;P&gt;it_spfli type table of spfli with key carrid connid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Initialise the object of the interface.&lt;/P&gt;&lt;P&gt;data: exit_ref type ref to ZCL_IM_IM_LINESEL,&lt;/P&gt;&lt;P&gt;exit_ref1 type ref to ZIF_EX_BADI_SPFLI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection-screen begin of block b1.&lt;/P&gt;&lt;P&gt;select-options: s_carr for spfli-carrid.&lt;/P&gt;&lt;P&gt;selection-screen end of block b1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;select * from spfli into corresponding fields of table it_spfli&lt;/P&gt;&lt;P&gt;where carrid in s_carr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end-of-selection.&lt;/P&gt;&lt;P&gt;loop at it_spfli into wa_spfli.&lt;/P&gt;&lt;P&gt;write:/ wa_spfli-carrid,&lt;/P&gt;&lt;P&gt;wa_spfli-connid,&lt;/P&gt;&lt;P&gt;wa_spfli-cityfrom,&lt;/P&gt;&lt;P&gt;wa_spfli-deptime,&lt;/P&gt;&lt;P&gt;wa_spfli-arrtime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hide: wa_spfli-carrid, wa_spfli-connid.&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;at line-selection.&lt;/P&gt;&lt;P&gt;check not wa_spfli-carrid is initial.&lt;/P&gt;&lt;P&gt;create object exit_ref.&lt;/P&gt;&lt;P&gt;exit_ref1 = exit_ref.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call method exit_ref1-&amp;gt;line_section&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;i_carrid = wa_spfli-carrid&lt;/P&gt;&lt;P&gt;i_connid = wa_spfli-connid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear wa_spfli.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For BAPI:- &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just follow these steps to use the BAPI,  I have given every possible text to make u understand the whole procedure of  BAPI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FU BAPI_MATERIAL_SAVEDATA&lt;/P&gt;&lt;P&gt;Create and Change Material Master Data&lt;/P&gt;&lt;P&gt;Functionality&lt;/P&gt;&lt;P&gt;You use this method to create new material master data or to change existing material master data. The data on a material can be transferred for each call.&lt;/P&gt;&lt;P&gt;When creating material master data, you must transfer the material number, the material type, and the industry sector to the method. You must also enter a material description and its language.&lt;/P&gt;&lt;P&gt;When changing material master data, you need enter only the material number.&lt;/P&gt;&lt;P&gt;In the header data, you must select at least one view for which data is to be created. Depending on the view selected, you must maintain other required parameters. If you do not enter values for all of the required parameters, the method is ended with an error message.&lt;/P&gt;&lt;P&gt;The corresponding fields in the tables (such as CLIENTDATA) must first be supplied with data by the calling program. An indicator must also be set for each of these fields so that the data is written to the database by the method. This requires the calling program to supply the corresponding field with the indicator in a checkbox table (for example, CLIENTDATAX). Checkbox tables exist for tables that do not contain any language-dependent texts (MAKT, MLTX), International Article Numbers (MEAN), or tax classifications (MLAN). Several data records for a material can be created in these tables.&lt;/P&gt;&lt;P&gt;If a structure contains fields for units of measurement (such as structure CLIENTDATA, field BASE_UOM), language indicators (such as structure MATERIALDESCRIPTION, field LANGU), or country indicators (such as structure TAXCLASSIFICATIONS, field DEPCOUNTRY), there is always a field of the same name with the ending _ISO. This makes it possible to transfer either the internally used SAP code or a standardized ISO code for the units of measurement, language indicators, or country indicators. ISO codes are converted to an SAP code internally for further processing. The ISO code is used only if the SAP code is not transferred. If you use ISO codes, there must be a unique assignment of the ISO code to the SAP code in the following activities in Customizing for Global Parameters:&lt;/P&gt;&lt;P&gt;&amp;#149;	Check Units of Measurement&lt;/P&gt;&lt;P&gt;&amp;#149;	Define Countries&lt;/P&gt;&lt;P&gt;If you want to maintain long texts (basic data texts, internal comments, purchase order texts, material memos, or sales texts) or customer-defined fields for a material, some special conditions have to be observed. They are described in the documentation for parameters MATERIALLONGTEXT and EXTENSIONIN.&lt;/P&gt;&lt;P&gt;Parameters&lt;/P&gt;&lt;P&gt;HEADDATA&lt;/P&gt;&lt;P&gt;CLIENTDATA&lt;/P&gt;&lt;P&gt;CLIENTDATAX&lt;/P&gt;&lt;P&gt;PLANTDATA&lt;/P&gt;&lt;P&gt;PLANTDATAX&lt;/P&gt;&lt;P&gt;FORECASTPARAMETERS&lt;/P&gt;&lt;P&gt;FORECASTPARAMETERSX&lt;/P&gt;&lt;P&gt;PLANNINGDATA&lt;/P&gt;&lt;P&gt;PLANNINGDATAX&lt;/P&gt;&lt;P&gt;STORAGELOCATIONDATA&lt;/P&gt;&lt;P&gt;STORAGELOCATIONDATAX&lt;/P&gt;&lt;P&gt;VALUATIONDATA&lt;/P&gt;&lt;P&gt;VALUATIONDATAX&lt;/P&gt;&lt;P&gt;WAREHOUSENUMBERDATA&lt;/P&gt;&lt;P&gt;WAREHOUSENUMBERDATAX&lt;/P&gt;&lt;P&gt;SALESDATA&lt;/P&gt;&lt;P&gt;SALESDATAX&lt;/P&gt;&lt;P&gt;STORAGETYPEDATA&lt;/P&gt;&lt;P&gt;STORAGETYPEDATAX&lt;/P&gt;&lt;P&gt;FLAG_ONLINE&lt;/P&gt;&lt;P&gt;FLAG_CAD_CALL&lt;/P&gt;&lt;P&gt;NO_DEQUEUE&lt;/P&gt;&lt;P&gt;RETURN&lt;/P&gt;&lt;P&gt;MATERIALDESCRIPTION&lt;/P&gt;&lt;P&gt;UNITSOFMEASURE&lt;/P&gt;&lt;P&gt;UNITSOFMEASUREX&lt;/P&gt;&lt;P&gt;INTERNATIONALARTNOS&lt;/P&gt;&lt;P&gt;MATERIALLONGTEXT&lt;/P&gt;&lt;P&gt;TAXCLASSIFICATIONS&lt;/P&gt;&lt;P&gt;RETURNMESSAGES&lt;/P&gt;&lt;P&gt;PRTDATA&lt;/P&gt;&lt;P&gt;PRTDATAX&lt;/P&gt;&lt;P&gt;EXTENSIONIN&lt;/P&gt;&lt;P&gt;EXTENSIONINX&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt; BAPI to Copy Materials from one Plant to Another &lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Copy Materials from one Plant to Another&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;First run   GETDATA AS CHECKBOX, "Tick to download materials data to local harddisk&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Second run  UPDDATA AS CHECKBOX. "Tick to update date to Materials Master&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Check data in Excel before Second run&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZBAPIMM01 LINE-SIZE 255 NO STANDARD PAGE HEADING&lt;/P&gt;&lt;P&gt;                 LINE-COUNT 065(001).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES: T001L, "Storage Locations&lt;/P&gt;&lt;P&gt;        MARA,  "General Material Data&lt;/P&gt;&lt;P&gt;        MAKT,  "Material Descriptions&lt;/P&gt;&lt;P&gt;        MBEW,  "Material Valuation&lt;/P&gt;&lt;P&gt;        MARC.  "Plant Data for Material&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BAPI_HEAD   LIKE BAPIMATHEAD,&lt;/P&gt;&lt;P&gt;      BAPI_MAKT   LIKE BAPI_MAKT,    "Material Description&lt;/P&gt;&lt;P&gt;      BAPI_MARA1  LIKE BAPI_MARA,    "Client Data&lt;/P&gt;&lt;P&gt;      BAPI_MARAX  LIKE BAPI_MARAX,&lt;/P&gt;&lt;P&gt;      BAPI_MARC1  LIKE BAPI_MARC,    "Plant View&lt;/P&gt;&lt;P&gt;      BAPI_MARCX  LIKE BAPI_MARCX,&lt;/P&gt;&lt;P&gt;      BAPI_MBEW1  LIKE BAPI_MBEW,    "Accounting View&lt;/P&gt;&lt;P&gt;      BAPI_MBEWX  LIKE BAPI_MBEWX,&lt;/P&gt;&lt;P&gt;      BAPI_RETURN LIKE BAPIRET2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF INT_MAKT OCCURS 100.&lt;/P&gt;&lt;P&gt;        INCLUDE STRUCTURE BAPI_MAKT.&lt;/P&gt;&lt;P&gt;DATA: END OF INT_MAKT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF INT_MAT OCCURS 100,&lt;/P&gt;&lt;P&gt;         WERKS(4),     "Plant&lt;/P&gt;&lt;P&gt;         MTART(4),     "Material type&lt;/P&gt;&lt;P&gt;         MATNR(18),    "Material number&lt;/P&gt;&lt;P&gt;         MATKL(9) ,    "Material group&lt;/P&gt;&lt;P&gt;         MBRSH(1),     "Industry sector&lt;/P&gt;&lt;P&gt;         MEINS(3),     "Base unit of measure&lt;/P&gt;&lt;P&gt;         GEWEI(3),     "Weight Unit&lt;/P&gt;&lt;P&gt;         SPART(2),     "Division&lt;/P&gt;&lt;P&gt;         EKGRP(3),     "Purchasing group&lt;/P&gt;&lt;P&gt;         VPRSV(1),     "Price control indicator&lt;/P&gt;&lt;P&gt;         STPRS(12),    "Standard price&lt;/P&gt;&lt;P&gt;         PEINH(3),     "Price unit&lt;/P&gt;&lt;P&gt;         SPRAS(2),     "Language key&lt;/P&gt;&lt;P&gt;         MAKTX(40),     "Material description&lt;/P&gt;&lt;P&gt;       END OF INT_MAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS: &lt;/P&gt;&lt;P&gt;            PLANT    FOR  MARC-WERKS OBLIGATORY MEMORY ID PLT,&lt;/P&gt;&lt;P&gt;            MATERIAL FOR  MARA-MATNR MEMORY ID MAT,&lt;/P&gt;&lt;P&gt;            MATLTYPE FOR  MARA-MTART MEMORY ID MTY,&lt;/P&gt;&lt;P&gt;            DIVISION FOR  MARA-SPART MEMORY ID DIV.&lt;/P&gt;&lt;P&gt;PARAMETERS:  F_FILE LIKE RLGRAP-FILENAME&lt;/P&gt;&lt;P&gt;             DEFAULT 'C:DATA&amp;#26;MATERIAL.XLS' MEMORY ID F_FILE,&lt;/P&gt;&lt;P&gt;             GETDATA AS CHECKBOX, "Tick to download materials data to local harddisk&lt;/P&gt;&lt;P&gt;             UPDDATA AS CHECKBOX. "Tick to update date to Materials Master&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF GETDATA = 'X'.&lt;/P&gt;&lt;P&gt;   PERFORM DOWNLOAD_DATA.&lt;/P&gt;&lt;P&gt;   PERFORM DOWNLOAD_FILE.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;IF UPDDATA = 'X'.&lt;/P&gt;&lt;P&gt;   PERFORM UPLOAD_FILE.&lt;/P&gt;&lt;P&gt;   PERFORM UPDATE_MM.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM DOWNLOAD_DATA.&lt;/P&gt;&lt;P&gt;SELECT * FROM MARC  WHERE LVORM EQ ' '&lt;/P&gt;&lt;P&gt;                      AND WERKS IN PLANT&lt;/P&gt;&lt;P&gt;                      AND MATNR IN MATERIAL.&lt;/P&gt;&lt;P&gt;    CLEAR MARA.&lt;/P&gt;&lt;P&gt;    SELECT SINGLE * FROM MARA WHERE MATNR =  MARC-MATNR.&lt;/P&gt;&lt;P&gt;    CHECK MATLTYPE.&lt;/P&gt;&lt;P&gt;    CHECK DIVISION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CLEAR MBEW.&lt;/P&gt;&lt;P&gt;    SELECT SINGLE * FROM MBEW WHERE MATNR =  MARC-MATNR&lt;/P&gt;&lt;P&gt;                                AND BWKEY =  MARC-WERKS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CLEAR MAKT.&lt;/P&gt;&lt;P&gt;    SELECT SINGLE * FROM MAKT WHERE SPRAS =  'EN'&lt;/P&gt;&lt;P&gt;                                AND MATNR =  MARC-MATNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    WRITE:/ MARC-WERKS,    "Plant&lt;/P&gt;&lt;P&gt;            MARA-MTART,    "Material type&lt;/P&gt;&lt;P&gt;            MARA-MATNR,    "Material number&lt;/P&gt;&lt;P&gt;            MARA-MATKL,    "Material group&lt;/P&gt;&lt;P&gt;            MARA-MBRSH,    "Industry sector&lt;/P&gt;&lt;P&gt;            MARA-MEINS,    "Base unit of measure&lt;/P&gt;&lt;P&gt;            MARA-GEWEI,    "Weight Unit&lt;/P&gt;&lt;P&gt;            MARA-SPART,    "Division&lt;/P&gt;&lt;P&gt;            MARC-EKGRP,    "Purchasing group&lt;/P&gt;&lt;P&gt;            MBEW-VPRSV,    "Price control indicator&lt;/P&gt;&lt;P&gt;            MBEW-STPRS,    "Standard price&lt;/P&gt;&lt;P&gt;            MBEW-PEINH,    "Price unit&lt;/P&gt;&lt;P&gt;            MAKT-SPRAS,    "Language key&lt;/P&gt;&lt;P&gt;            MAKT-MAKTX.    "Material description&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            INT_MAT-WERKS = MARC-WERKS.    "Plant&lt;/P&gt;&lt;P&gt;            INT_MAT-MTART = MARA-MTART.    "Material type&lt;/P&gt;&lt;P&gt;            INT_MAT-MATNR = MARA-MATNR.    "Material number&lt;/P&gt;&lt;P&gt;            INT_MAT-MATKL = MARA-MATKL.    "Material group&lt;/P&gt;&lt;P&gt;            INT_MAT-MBRSH = MARA-MBRSH.    "Industry sector&lt;/P&gt;&lt;P&gt;            INT_MAT-MEINS = MARA-MEINS.    "Base unit of measure&lt;/P&gt;&lt;P&gt;            INT_MAT-GEWEI = MARA-GEWEI.    "Weight Unit&lt;/P&gt;&lt;P&gt;            INT_MAT-SPART = MARA-SPART.    "Division&lt;/P&gt;&lt;P&gt;            INT_MAT-EKGRP = MARC-EKGRP.    "Purchasing group&lt;/P&gt;&lt;P&gt;            INT_MAT-VPRSV = MBEW-VPRSV.    "Price control indicator&lt;/P&gt;&lt;P&gt;            INT_MAT-STPRS = MBEW-STPRS.    "Standard price&lt;/P&gt;&lt;P&gt;            INT_MAT-PEINH = MBEW-PEINH.    "Price unit&lt;/P&gt;&lt;P&gt;            INT_MAT-SPRAS = MAKT-SPRAS.    "Language key&lt;/P&gt;&lt;P&gt;            INT_MAT-MAKTX = MAKT-MAKTX.    "Material description&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            APPEND INT_MAT.&lt;/P&gt;&lt;P&gt;            CLEAR  INT_MAT.&lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM DOWNLOAD_FILE.&lt;/P&gt;&lt;P&gt;call function 'WS_DOWNLOAD'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    FILENAME                      = F_FILE&lt;/P&gt;&lt;P&gt;    FILETYPE                      = 'DAT'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FILETYPE                      = 'WK1'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  tables&lt;/P&gt;&lt;P&gt;    data_tab                      = INT_MAT&lt;/P&gt;&lt;P&gt;  EXCEPTIONS&lt;/P&gt;&lt;P&gt;    FILE_OPEN_ERROR               = 1&lt;/P&gt;&lt;P&gt;    FILE_WRITE_ERROR              = 2&lt;/P&gt;&lt;P&gt;    INVALID_FILESIZE              = 3&lt;/P&gt;&lt;P&gt;    INVALID_TYPE                  = 4&lt;/P&gt;&lt;P&gt;    NO_BATCH                      = 5&lt;/P&gt;&lt;P&gt;    UNKNOWN_ERROR                 = 6&lt;/P&gt;&lt;P&gt;    INVALID_TABLE_WIDTH           = 7&lt;/P&gt;&lt;P&gt;    GUI_REFUSE_FILETRANSFER       = 8&lt;/P&gt;&lt;P&gt;    CUSTOMER_ERROR                = 9&lt;/P&gt;&lt;P&gt;    OTHERS                        = 10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;   FORMAT COLOR COL_GROUP.&lt;/P&gt;&lt;P&gt;   WRITE:/ 'Data Download Successfully to your local harddisk'.&lt;/P&gt;&lt;P&gt;   SKIP.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM UPLOAD_FILE.&lt;/P&gt;&lt;P&gt;call function 'WS_UPLOAD'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    FILENAME                      = F_FILE&lt;/P&gt;&lt;P&gt;    FILETYPE                      = 'DAT'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FILETYPE                      = 'WK1'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  tables&lt;/P&gt;&lt;P&gt;    data_tab                      = INT_MAT&lt;/P&gt;&lt;P&gt;  EXCEPTIONS&lt;/P&gt;&lt;P&gt;    FILE_OPEN_ERROR               = 1&lt;/P&gt;&lt;P&gt;    FILE_WRITE_ERROR              = 2&lt;/P&gt;&lt;P&gt;    INVALID_FILESIZE              = 3&lt;/P&gt;&lt;P&gt;    INVALID_TYPE                  = 4&lt;/P&gt;&lt;P&gt;    NO_BATCH                      = 5&lt;/P&gt;&lt;P&gt;    UNKNOWN_ERROR                 = 6&lt;/P&gt;&lt;P&gt;    INVALID_TABLE_WIDTH           = 7&lt;/P&gt;&lt;P&gt;    GUI_REFUSE_FILETRANSFER       = 8&lt;/P&gt;&lt;P&gt;    CUSTOMER_ERROR                = 9&lt;/P&gt;&lt;P&gt;    OTHERS                        = 10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;   FORMAT COLOR COL_GROUP.&lt;/P&gt;&lt;P&gt;   WRITE:/ 'Data Upload Successfully from your local harddisk'.&lt;/P&gt;&lt;P&gt;   SKIP.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM UPDATE_MM.&lt;/P&gt;&lt;P&gt;LOOP AT INT_MAT.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Header&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    BAPI_HEAD-MATERIAL        = INT_MAT-MATNR.&lt;/P&gt;&lt;P&gt;    BAPI_HEAD-IND_SECTOR      = INT_MAT-MBRSH.&lt;/P&gt;&lt;P&gt;    BAPI_HEAD-MATL_TYPE       = INT_MAT-MTART.&lt;/P&gt;&lt;P&gt;    BAPI_HEAD-BASIC_VIEW      = 'X'.&lt;/P&gt;&lt;P&gt;    BAPI_HEAD-PURCHASE_VIEW   = 'X'.&lt;/P&gt;&lt;P&gt;    BAPI_HEAD-ACCOUNT_VIEW    = 'X'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Material Description&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    REFRESH INT_MAKT.&lt;/P&gt;&lt;P&gt;    INT_MAKT-LANGU           = INT_MAT-SPRAS.&lt;/P&gt;&lt;P&gt;    INT_MAKT-MATL_DESC       = INT_MAT-MAKTX.&lt;/P&gt;&lt;P&gt;    APPEND INT_MAKT.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Client Data - Basic&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    BAPI_MARA1-MATL_GROUP     = INT_MAT-MATKL.&lt;/P&gt;&lt;P&gt;    BAPI_MARA1-BASE_UOM       = INT_MAT-MEINS.&lt;/P&gt;&lt;P&gt;    BAPI_MARA1-UNIT_OF_WT     = INT_MAT-GEWEI.&lt;/P&gt;&lt;P&gt;    BAPI_MARA1-DIVISION       = INT_MAT-SPART.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    BAPI_MARAX-MATL_GROUP = 'X'.&lt;/P&gt;&lt;P&gt;    BAPI_MARAX-BASE_UOM   = 'X'.&lt;/P&gt;&lt;P&gt;    BAPI_MARAX-UNIT_OF_WT = 'X'.&lt;/P&gt;&lt;P&gt;    BAPI_MARAX-DIVISION   = 'X'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Plant - Purchasing&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    BAPI_MARC1-PLANT      = INT_MAT-WERKS.&lt;/P&gt;&lt;P&gt;    BAPI_MARC1-PUR_GROUP  = INT_MAT-EKGRP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    BAPI_MARCX-PLANT      = INT_MAT-WERKS.&lt;/P&gt;&lt;P&gt;    BAPI_MARCX-PUR_GROUP  = 'X'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Accounting&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    BAPI_MBEW1-VAL_AREA   = INT_MAT-WERKS.&lt;/P&gt;&lt;P&gt;    BAPI_MBEW1-PRICE_CTRL = INT_MAT-VPRSV.&lt;/P&gt;&lt;P&gt;    BAPI_MBEW1-STD_PRICE  = INT_MAT-STPRS.&lt;/P&gt;&lt;P&gt;    BAPI_MBEW1-PRICE_UNIT = INT_MAT-PEINH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    BAPI_MBEWX-VAL_AREA   = INT_MAT-WERKS.&lt;/P&gt;&lt;P&gt;    BAPI_MBEWX-PRICE_CTRL = 'X'.&lt;/P&gt;&lt;P&gt;    BAPI_MBEWX-STD_PRICE  = 'X'.&lt;/P&gt;&lt;P&gt;    BAPI_MBEWX-PRICE_UNIT = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    WRITE:/ BAPI_HEAD, BAPI_MARC1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    call function 'BAPI_MATERIAL_SAVEDATA'&lt;/P&gt;&lt;P&gt;      exporting&lt;/P&gt;&lt;P&gt;        HEADDATA                   = BAPI_HEAD&lt;/P&gt;&lt;P&gt;        CLIENTDATA                 = BAPI_MARA1&lt;/P&gt;&lt;P&gt;        CLIENTDATAX                = BAPI_MARAX&lt;/P&gt;&lt;P&gt;        PLANTDATA                  = BAPI_MARC1&lt;/P&gt;&lt;P&gt;        PLANTDATAX                 = BAPI_MARCX&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      FORECASTPARAMETERS         =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      FORECASTPARAMETERSX        =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      PLANNINGDATA               =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      PLANNINGDATAX              =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      STORAGELOCATIONDATA        =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      STORAGELOCATIONDATAX       =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        VALUATIONDATA              = BAPI_MBEW1&lt;/P&gt;&lt;P&gt;        VALUATIONDATAX             = BAPI_MBEWX&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      WAREHOUSENUMBERDATA        =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      WAREHOUSENUMBERDATAX       =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      SALESDATA                  = BAPI_MVKE1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      SALESDATAX                 = BAPI_MVKEX&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      STORAGETYPEDATA            =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      STORAGETYPEDATAX           =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        RETURN                     = BAPI_RETURN&lt;/P&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;        MATERIALDESCRIPTION        = INT_MAKT&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      UNITSOFMEASURE             =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      UNITSOFMEASUREX            =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      INTERNATIONALARTNOS        =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      MATERIALLONGTEXT           =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      TAXCLASSIFICATIONS         =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      RETURNMESSAGES             =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      PRTDATA                    =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      PRTDATAX                   =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      EXTENSIONIN                =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      EXTENSIONINX               =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF BAPI_RETURN-TYPE = 'E'.&lt;/P&gt;&lt;P&gt;   WRITE:/ 'Error Message ', BAPI_RETURN.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;*---End of Program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am sure this will help u &lt;/P&gt;&lt;P&gt;Regards, &lt;/P&gt;&lt;P&gt;P Singh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2008 09:46:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-badi/m-p/3434410#M824808</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-19T09:46:30Z</dc:date>
    </item>
  </channel>
</rss>

