<?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 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi/m-p/1137237#M113475</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I dont know anything abot BAPI&lt;/P&gt;&lt;P&gt;could anyone suggest me where to get&lt;/P&gt;&lt;P&gt;the materials for BAPI&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Feb 2006 04:33:30 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-02-08T04:33:30Z</dc:date>
    <item>
      <title>BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi/m-p/1137237#M113475</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I dont know anything abot BAPI&lt;/P&gt;&lt;P&gt;could anyone suggest me where to get&lt;/P&gt;&lt;P&gt;the materials for BAPI&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2006 04:33:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi/m-p/1137237#M113475</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-08T04:33:30Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi/m-p/1137238#M113476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;lt;a href="http://www.sap-img.com/bapi.htm"&amp;gt;http://www.sap-img.com/bapi.htm&amp;lt;/a&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2006 04:36:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi/m-p/1137238#M113476</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-08T04:36:34Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi/m-p/1137239#M113477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&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;/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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2006 04:37:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi/m-p/1137239#M113477</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-08T04:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi/m-p/1137240#M113478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Go through the followinng site.these may help u to learn BAPI.&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;in this site go to documentation.&lt;/P&gt;&lt;P&gt;there you find lot of pdf files on BAPI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&amp;amp;Regards,&lt;/P&gt;&lt;P&gt;sunil.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2006 04:38:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi/m-p/1137240#M113478</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-08T04:38:16Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi/m-p/1137241#M113479</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;In general BAPI is just another remotely enabled FUNCTION MODULE (RFC) used to interface with  SAP from external systems. PL go through &amp;lt;a href="http://help.sap.com/saphelp_47x200/helpdata/en/84/73ba3bd14a6a6ae10000000a114084/frameset.htm"&amp;gt;SAP Help&amp;lt;/a&amp;gt; for additional info,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suresh Datti&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2006 04:38:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi/m-p/1137241#M113479</guid>
      <dc:creator>suresh_datti</dc:creator>
      <dc:date>2006-02-08T04:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi/m-p/1137242#M113480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there are lot of materials in&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;help.sap.com --&amp;gt;documentaiton&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.sap.com/www.sap-img.com" target="test_blank"&gt;www.sap-img.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.sap.com/www.sapgenie.com" target="test_blank"&gt;www.sapgenie.com&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;kishore&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2006 04:39:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi/m-p/1137242#M113480</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-08T04:39:55Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi/m-p/1137243#M113481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1.	STEP 1 - Define a structures for the BAPI &lt;/P&gt;&lt;P&gt;2.	STEP 2 - Write Function Module &lt;/P&gt;&lt;P&gt;3.	STEP 3 - Create the API Method Using the BAPI WIZARD &lt;/P&gt;&lt;P&gt;4.	STEP 4 - Final steps &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This BAPI reads system status for a production order from table JEST and system status text from table TJ02T &lt;/P&gt;&lt;P&gt;Name 	ZGetOrderStatus &lt;/P&gt;&lt;P&gt;Function group 	ZBAPISTATUS &lt;/P&gt;&lt;P&gt;Function module: 	Z_BAPI_GET_ORDER_STATUS &lt;/P&gt;&lt;P&gt;Import parameters: 	ORDER_STATUS_IMPORT type ZBAPI_ORDER_STATUS_IMPORT: &lt;/P&gt;&lt;P&gt;&amp;#149;	AUFNR Order number (Keyfield) &lt;/P&gt;&lt;P&gt;&amp;#149;	SPRAS Language &lt;/P&gt;&lt;P&gt;&amp;#149;	ExcludeInactive - Checkbox - Exclude inactive status &lt;/P&gt;&lt;P&gt;Tables 	T_BAPISTAT type ZBAPISTAT: &lt;/P&gt;&lt;P&gt;&amp;#149;	OBJNR like JEST-OBJNR &lt;/P&gt;&lt;P&gt;&amp;#149;	STAT like JEST-STAT &lt;/P&gt;&lt;P&gt;&amp;#149;	INACT like JEST-INACT &lt;/P&gt;&lt;P&gt;&amp;#149;	TXT04 like TJ02T-TXT04 &lt;/P&gt;&lt;P&gt;&amp;#149;	TXT30 likeTJ02T-TXT30 &lt;/P&gt;&lt;P&gt;Export parameters 	RETURN like BAPIRETURN &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;STEP1&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;In this step a structures for the parameters and tables of the function module used for the BAPI are defined. &lt;/P&gt;&lt;P&gt;Use Data type -&amp;gt; Structure &lt;/P&gt;&lt;P&gt;Define the following structures: &lt;/P&gt;&lt;P&gt;ZBAPI_ORDER_STATUS_IMPORT, which contains the following fields: &lt;/P&gt;&lt;P&gt;&amp;#149;	ORDERID Order number (Keyfield) &lt;/P&gt;&lt;P&gt;&amp;#149;	SPRAS Language &lt;/P&gt;&lt;P&gt;&amp;#149;	ExcludeInactive - Checkbox - Exclude inactive status &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ZBAPISTAT: &lt;/P&gt;&lt;P&gt;OBJNR like JEST-OBJNR &lt;/P&gt;&lt;P&gt;&amp;#149;	STAT like JEST-STAT &lt;/P&gt;&lt;P&gt;&amp;#149;	INACT like JEST-INACT &lt;/P&gt;&lt;P&gt;&amp;#149;	TXT04 like TJ02T-TXT04 &lt;/P&gt;&lt;P&gt;&amp;#149;	TXT30 likeTJ02T-TXT30 &lt;/P&gt;&lt;P&gt;Important note: &lt;/P&gt;&lt;P&gt;You will have to define a structure for every parameter in the BAPI. You cannot use the same structures used in existing applications because BAPI structures are frozen when BAPIs are released and then there are restrictions on changing them. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;STEP 2 - Write Function Module&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Important notes: &lt;/P&gt;&lt;P&gt;&amp;#149;	Each BAPI must have its own function group. &lt;/P&gt;&lt;P&gt;&amp;#149;	Under the attributes tab remember to select Processing Type Remote Enabled module, otherwise the function module cannot be invoked via RFC and used as a BAPI &lt;/P&gt;&lt;P&gt;&amp;#149;	Import/Export parameters can only be BY VALUE for an RFC enabled function module &lt;/P&gt;&lt;P&gt;&amp;#149;	We are only creating one BAPI in this example, but you can create related BAPIs in the same function pool, so they will be able to share global data. &lt;/P&gt;&lt;P&gt;Code &lt;/P&gt;&lt;P&gt;Notes: &lt;/P&gt;&lt;P&gt;&amp;#149;	The subroutine SET_RETURN_MESSAGE is a standard routine used for BAPIs that use the BAPIRETURN structure &lt;/P&gt;&lt;P&gt;&amp;#149;	In form Z_BAPI_GET_ORDER_SYSTEM_STATUS there is a test IF 1 = 2. If the test is true a message is displayed. The condition will obviously never be true, and we will never want to display a message in a BAPI. The reason why it is included is, that it creates a reference for the message, so that the WHERE USED functionality can be used for the message. This is the SAP standard way to handle it, copied from the Company Code GetList BAPI. &lt;/P&gt;&lt;P&gt;INCLUDE LZBAPISTATUSUXX &lt;/P&gt;&lt;P&gt;*****************************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  THIS FILE IS GENERATED BY THE FUNCTION LIBRARY.             *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  NEVER CHANGE IT MANUALLY, PLEASE!                           *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*****************************************************************&lt;/P&gt;&lt;P&gt;INCLUDE LZBAPISTATUSU02.&lt;/P&gt;&lt;P&gt;                    "Z_BAPI_GET_ORDER_SYSTEM_STATUS&lt;/P&gt;&lt;P&gt;INCLUDE LZBAPISTATUSTOP - Global data&lt;/P&gt;&lt;P&gt;FUNCTION-POOL ZBAPISTATUS.                  "MESSAGE-ID Z3&lt;/P&gt;&lt;P&gt;Types:&lt;/P&gt;&lt;P&gt;  begin of Type_tj02t,&lt;/P&gt;&lt;P&gt;    istat  like tj02t-istat,&lt;/P&gt;&lt;P&gt;    txt04  like tj02t-txt04,&lt;/P&gt;&lt;P&gt;    txt30  like tj02t-txt30,&lt;/P&gt;&lt;P&gt;  end of type_tj02t.&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Declarations for TABLE parameter&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  T_BAPISTAT like ZBAPISTAT occurs 0,&lt;/P&gt;&lt;P&gt;  G_BAPISTAT like ZBAPISTAT,&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Table for object texts&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  t_tj02t    type type_tj02t occurs 0,&lt;/P&gt;&lt;P&gt;  g_tj02t    type type_tj02t.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Structure for return messages&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;  BEGIN OF MESSAGE,&lt;/P&gt;&lt;P&gt;    MSGTY LIKE SY-MSGTY,&lt;/P&gt;&lt;P&gt;    MSGID LIKE SY-MSGID,&lt;/P&gt;&lt;P&gt;    MSGNO LIKE SY-MSGNO,	&lt;/P&gt;&lt;P&gt;    MSGV1 LIKE SY-MSGV1,&lt;/P&gt;&lt;P&gt;    MSGV2 LIKE SY-MSGV2,&lt;/P&gt;&lt;P&gt;    MSGV3 LIKE SY-MSGV3,&lt;/P&gt;&lt;P&gt;    MSGV4 LIKE SY-MSGV4,&lt;/P&gt;&lt;P&gt;  END OF MESSAGE.&lt;/P&gt;&lt;P&gt;INCLUDE LZBAPISTATUSF01 - Subroutines&lt;/P&gt;&lt;P&gt;***INCLUDE LZBAPISTATUSF01 .&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;&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  SET_RETURN_MESSAGE&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;This routine is used for setting the BAPI return message.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;The routine is a standard routine for BAPIs that handles the message&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;structure for the BAPIRETURN structure. It has been copied from the&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;BAPI Company Code Getlist&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;P_MESSAGE  text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     &amp;lt;--P_RETURN  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 SET_RETURN_MESSAGE USING    VALUE(P_MESSAGE)   LIKE MESSAGE&lt;/P&gt;&lt;P&gt;                        CHANGING P_RETURN  LIKE BAPIRETURN.&lt;/P&gt;&lt;P&gt;  CHECK NOT MESSAGE IS INITIAL.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'BALW_BAPIRETURN_GET'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            TYPE       = P_MESSAGE-MSGTY&lt;/P&gt;&lt;P&gt;            CL         = P_MESSAGE-MSGID&lt;/P&gt;&lt;P&gt;            NUMBER     = P_MESSAGE-MSGNO&lt;/P&gt;&lt;P&gt;            PAR1       = P_MESSAGE-MSGV1&lt;/P&gt;&lt;P&gt;            PAR2       = P_MESSAGE-MSGV2&lt;/P&gt;&lt;P&gt;            PAR3       = P_MESSAGE-MSGV3&lt;/P&gt;&lt;P&gt;            PAR4       = P_MESSAGE-MSGV4&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         LOG_NO     = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         LOG_MSG_NO = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;       IMPORTING&lt;/P&gt;&lt;P&gt;            BAPIRETURN = P_RETURN&lt;/P&gt;&lt;P&gt;       EXCEPTIONS&lt;/P&gt;&lt;P&gt;            OTHERS     = 1.&lt;/P&gt;&lt;P&gt;endform.                    " SET_RETURN_MESSAGE&lt;/P&gt;&lt;P&gt;FUNCTION Z_BAPI_GET_ORDER_STATUS&lt;/P&gt;&lt;P&gt;FUNCTION z_bapi_get_order_system_status.&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;"Local interface:&lt;/P&gt;&lt;P&gt;*"  IMPORTING&lt;/P&gt;&lt;P&gt;*"     VALUE(I_AUFNR) TYPE  AUFNR&lt;/P&gt;&lt;P&gt;*"     VALUE(I_SPRAS) TYPE  SPRAS DEFAULT SY-LANGU&lt;/P&gt;&lt;P&gt;*"     VALUE(I_EXCLUDEINACTIVE) TYPE  CHAR1 OPTIONAL&lt;/P&gt;&lt;P&gt;*"  EXPORTING&lt;/P&gt;&lt;P&gt;*"     VALUE(RETURN) TYPE  BAPIRETURN&lt;/P&gt;&lt;P&gt;*"  TABLES&lt;/P&gt;&lt;P&gt;*"      T_BAPISTAT STRUCTURE  ZBAPISTAT&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt; DATA:&lt;/P&gt;&lt;P&gt;   l_aufnr LIKE afko-aufnr,&lt;/P&gt;&lt;P&gt;   l_objnr LIKE jest-objnr.&lt;/P&gt;&lt;P&gt;********************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Check if order exists&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;********************************************&lt;/P&gt;&lt;P&gt; SELECT SINGLE aufnr&lt;/P&gt;&lt;P&gt;    FROM afko&lt;/P&gt;&lt;P&gt;    INTO  l_aufnr&lt;/P&gt;&lt;P&gt;    WHERE aufnr = BAPI_ORDER_STATUS_IMPORT-orderid.&lt;/P&gt;&lt;P&gt;  IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;    CLEAR message.&lt;/P&gt;&lt;P&gt;    message-msgty = 'E'.&lt;/P&gt;&lt;P&gt;    message-msgid = 'Z3'.&lt;/P&gt;&lt;P&gt;    message-msgno = '000'.&lt;/P&gt;&lt;P&gt;    message-msgv1 = BAPI_ORDER_STATUS_IMPORT-orderid.&lt;/P&gt;&lt;P&gt;    PERFORM set_return_message USING    message&lt;/P&gt;&lt;P&gt;                               CHANGING return.&lt;/P&gt;&lt;P&gt;    IF 1 = 2.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    The only reason to include this statement, that will obviously&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    never execute, is that it will create a referecence so that you&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    can find out where a particular message is being used. This&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    functionality is used by the BAPIs programmed by SAP&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      MESSAGE e000(z3).&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  CHECK return IS INITIAL.&lt;/P&gt;&lt;P&gt;********************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Read order status&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;********************************************&lt;/P&gt;&lt;P&gt; CONCATENATE 'OR' BAPI_ORDER_STATUS_IMPORT-orderid INTO l_objnr.&lt;/P&gt;&lt;P&gt;  IF BAPI_ORDER_STATUS_IMPORT-i_excludeinactive = 'X'.&lt;/P&gt;&lt;P&gt;    SELECT objnr stat inact&lt;/P&gt;&lt;P&gt;      FROM  jest&lt;/P&gt;&lt;P&gt;      INTO  TABLE t_bapistat&lt;/P&gt;&lt;P&gt;      WHERE objnr = l_objnr AND&lt;/P&gt;&lt;P&gt;            inact &amp;lt;&amp;gt; 'X'.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    SELECT objnr stat inact&lt;/P&gt;&lt;P&gt;      FROM  jest&lt;/P&gt;&lt;P&gt;      INTO  TABLE t_bapistat&lt;/P&gt;&lt;P&gt;      WHERE objnr = l_objnr.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  No object status found&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    CLEAR message.&lt;/P&gt;&lt;P&gt;    message-msgty = 'E'.&lt;/P&gt;&lt;P&gt;    message-msgid = 'Z3'.&lt;/P&gt;&lt;P&gt;    message-msgno = '001'.&lt;/P&gt;&lt;P&gt;    message-msgv1 = BAPI_ORDER_STATUS_IMPORT-orderid.&lt;/P&gt;&lt;P&gt;    PERFORM set_return_message USING    message&lt;/P&gt;&lt;P&gt;                               CHANGING return.&lt;/P&gt;&lt;P&gt;    IF 1 = 2.&lt;/P&gt;&lt;P&gt;      MESSAGE e001(z3).&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  CHECK return IS INITIAL.&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;Read order status texts&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;********************************************&lt;/P&gt;&lt;P&gt;  SELECT istat txt04 txt30&lt;/P&gt;&lt;P&gt;    FROM tj02t&lt;/P&gt;&lt;P&gt;    INTO TABLE t_tj02t&lt;/P&gt;&lt;P&gt;    FOR ALL ENTRIES IN t_bapistat&lt;/P&gt;&lt;P&gt;    WHERE istat = t_bapistat-stat AND&lt;/P&gt;&lt;P&gt;          spras = BAPI_ORDER_STATUS_IMPORT-i_spras.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SORT t_tj02t BY istat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT t_bapistat INTO g_bapistat.&lt;/P&gt;&lt;P&gt;    READ TABLE t_tj02t&lt;/P&gt;&lt;P&gt;      WITH KEY istat = g_bapistat-stat BINARY SEARCH&lt;/P&gt;&lt;P&gt;     INTO g_tj02t.&lt;/P&gt;&lt;P&gt;    IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;      MOVE:&lt;/P&gt;&lt;P&gt;        g_tj02t-txt04 TO g_bapistat-txt04,&lt;/P&gt;&lt;P&gt;        g_tj02t-txt30 TO g_bapistat-txt30.&lt;/P&gt;&lt;P&gt;      MODIFY t_bapistat FROM g_bapistat TRANSPORTING txt04 txt30.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt; ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDFUNCTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;STEP 3 - Create the API Method Using the BAPI WIZARD&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;The BAPI wizard is used toTo expose the remote function module as a BAPI. The wizard will generate some additional code, so the function module is a valid method of the BOR. This allows the BAPi to be called as a workflow method in addition to be called by an outside program. &lt;/P&gt;&lt;P&gt;Note: Each function module corresponds to a method in the BOR &lt;/P&gt;&lt;P&gt;Go to the Business Object Builder SWO1. &lt;/P&gt;&lt;P&gt;You can either create the new Object type as a subtype of an existing business object or create a new business object from scratch. In this example it would be obvious to create the Object type as a subtype of BUS2005 Production order. However, to illustrate how to create a new Object type from scratch, we will do this. &lt;/P&gt;&lt;P&gt;In the Object/Interface type field write the name of the new Business Object: ZORDERSTAT. Press enter and fill in the additional fields necessary to create the object type. &lt;/P&gt;&lt;P&gt;Supertype: Not relevant because we are creating our object from scratch &lt;/P&gt;&lt;P&gt;Program. This is the name of the program where the wizard generates code for the Object type, NOT the function module we created earlier. The program name must not be the name of an existing program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="5" type="ul"&gt;&lt;P&gt;          Implementation of object type ZORDERSTAT           *****&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;INCLUDE &amp;lt;OBJECT&amp;gt;.&lt;/P&gt;&lt;P&gt;BEGIN_DATA OBJECT. " Do not change.. DATA is generated&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;only private members may be inserted into structure private&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;" begin of private,&lt;/P&gt;&lt;P&gt;"   to declare private attributes remove comments and&lt;/P&gt;&lt;P&gt;"   insert private attributes here ...&lt;/P&gt;&lt;P&gt;" end of private,&lt;/P&gt;&lt;P&gt;      KEY LIKE SWOTOBJID-OBJKEY.&lt;/P&gt;&lt;P&gt;END_DATA OBJECT. " Do not change.. DATA is generated&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BEGIN_METHOD ZGETORDERSTATUS CHANGING CONTAINER.&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;      BAPIORDERSTATUSIMPORT LIKE ZBAPI_ORDER_STATUS_IMPORT,&lt;/P&gt;&lt;P&gt;      RETURN LIKE BAPIRETURN,&lt;/P&gt;&lt;P&gt;      TBAPISTAT LIKE ZBAPISTAT OCCURS 0.&lt;/P&gt;&lt;P&gt;  SWC_GET_ELEMENT CONTAINER 'BapiOrderStatusImport'&lt;/P&gt;&lt;P&gt;       BAPIORDERSTATUSIMPORT.&lt;/P&gt;&lt;P&gt;  SWC_GET_TABLE CONTAINER 'TBapistat' TBAPISTAT.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'Z_BAPI_GET_ORDER_STATUS'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      BAPI_ORDER_STATUS_IMPORT = BAPIORDERSTATUSIMPORT&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      RETURN = RETURN&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      T_BAPISTAT = TBAPISTAT&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      OTHERS = 01.&lt;/P&gt;&lt;P&gt;  CASE SY-SUBRC.&lt;/P&gt;&lt;P&gt;    WHEN 0.            " OK&lt;/P&gt;&lt;P&gt;    WHEN OTHERS.       " to be implemented&lt;/P&gt;&lt;P&gt;  ENDCASE.&lt;/P&gt;&lt;P&gt;  SWC_SET_ELEMENT CONTAINER 'Return' RETURN.&lt;/P&gt;&lt;P&gt;  SWC_SET_TABLE CONTAINER 'TBapistat' TBAPISTAT.&lt;/P&gt;&lt;P&gt;END_METHOD.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;STEP 4 - Final steps&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;When the Business object has been checked and the documentation created, the following steps must be carried out: &lt;/P&gt;&lt;P&gt;&amp;#149;	Release the BAPI function module (in the Function Builder). &lt;/P&gt;&lt;P&gt;&amp;#149;	Release the business object type (in the BOR ObjectType -&amp;gt; Change release status to -&amp;gt; Implemented ). &lt;/P&gt;&lt;P&gt;&amp;#149;	Release the BAPI as a method in the BOR (Release the methods you has created - Set the cursor on the method then&lt;/P&gt;&lt;P&gt;Edit -&amp;gt; Change release status -&amp;gt; Object type component -&amp;gt; To released ) &lt;/P&gt;&lt;P&gt;&amp;#149;	For potential write BAPIs: Release the IDoc and its segments &lt;/P&gt;&lt;P&gt;You can now display the BAPI in the BAPI Explorer:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Satesh R&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2006 04:41:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi/m-p/1137243#M113481</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-08T04:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi/m-p/1137244#M113482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Deepak,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is a Bapi learning guide which will take u step by step.&lt;/P&gt;&lt;P&gt;hvae a look at this site.&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;check this also..,&lt;/P&gt;&lt;P&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;/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;&lt;/P&gt;&lt;P&gt;this has number of related links .&lt;/P&gt;&lt;P&gt;&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="856422"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  hope it helps..,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Vinoth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2006 04:44:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi/m-p/1137244#M113482</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-08T04:44:48Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi/m-p/1137245#M113483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot guys.&lt;/P&gt;&lt;P&gt;that was a huge information on BAPI&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2006 05:04:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi/m-p/1137245#M113483</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-08T05:04:22Z</dc:date>
    </item>
  </channel>
</rss>

