<?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: BAPI in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi/m-p/2444258#M547347</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;You can browse all the BAPI's in a system from the transaction BAPI, there you can naviagte to your BAPI and then execute it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Jun 2007 06:32:22 GMT</pubDate>
    <dc:creator>seshatalpasai_madala</dc:creator>
    <dc:date>2007-06-26T06:32:22Z</dc:date>
    <item>
      <title>BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi/m-p/2444256#M547345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          I HAVE CREATED ONE BAPI .&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;THIS IS MY FM AND RELEASED&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FUNCTION 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(BAPI_ORDER_STATUS_IMPORT) TYPE  ZBAPI_ORDER_STATUS_IMPORT&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;&lt;/P&gt;&lt;P&gt;&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:G_BAPISTAT like ZBAPISTAT,&lt;/P&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;P&gt;DATA: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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: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;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;&lt;/P&gt;&lt;P&gt;    CHECK NOT MESSAGE IS INITIAL.&lt;/P&gt;&lt;P&gt;&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       = MESSAGE-MSGTY&lt;/P&gt;&lt;P&gt;            CL         = MESSAGE-MSGID&lt;/P&gt;&lt;P&gt;            NUMBER     = MESSAGE-MSGNO&lt;/P&gt;&lt;P&gt;            PAR1       = MESSAGE-MSGV1&lt;/P&gt;&lt;P&gt;            PAR2       = MESSAGE-MSGV2&lt;/P&gt;&lt;P&gt;            PAR3       = MESSAGE-MSGV3&lt;/P&gt;&lt;P&gt;            PAR4       = 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 = RETURN&lt;/P&gt;&lt;P&gt;       EXCEPTIONS&lt;/P&gt;&lt;P&gt;            OTHERS     = 1.&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;CONCATENATE 'OR' BAPI_ORDER_STATUS_IMPORT-orderid INTO l_objnr.&lt;/P&gt;&lt;P&gt;  IF BAPI_ORDER_STATUS_IMPORT-CHECK = '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 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;    CHECK NOT MESSAGE IS INITIAL.&lt;/P&gt;&lt;P&gt;&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       = MESSAGE-MSGTY&lt;/P&gt;&lt;P&gt;            CL         = MESSAGE-MSGID&lt;/P&gt;&lt;P&gt;            NUMBER     = MESSAGE-MSGNO&lt;/P&gt;&lt;P&gt;            PAR1       = MESSAGE-MSGV1&lt;/P&gt;&lt;P&gt;            PAR2       = MESSAGE-MSGV2&lt;/P&gt;&lt;P&gt;            PAR3       = MESSAGE-MSGV3&lt;/P&gt;&lt;P&gt;            PAR4       = 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 = RETURN&lt;/P&gt;&lt;P&gt;       EXCEPTIONS&lt;/P&gt;&lt;P&gt;            OTHERS     = 1.&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;     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-LANG.&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;&lt;/P&gt;&lt;P&gt;ENDFUNCTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THEN I WENT SWO1 AND DONE ALL STEPS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOW I WANT CHECK OUTPUT .HOW ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;IF YOU HAVE ANY BAPI OBJECT PLEASE SEND IT.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EMAIL:ashuvalal@gmail.com&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THANK YOU&lt;/P&gt;&lt;P&gt;ASHOK KUMAR&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2007 06:28:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi/m-p/2444256#M547345</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-26T06:28:27Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi/m-p/2444257#M547346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ashok,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BADI creation &lt;/P&gt;&lt;P&gt;STEP 1 - Define a structures for the BAPI&lt;/P&gt;&lt;P&gt;STEP 2 - Write Function Module&lt;/P&gt;&lt;P&gt;STEP 3 - Create the API Method Using the BAPI 5 WIZARD&lt;/P&gt;&lt;P&gt;STEP 4 - Final steps&lt;/P&gt;&lt;P&gt;This BAPI reads system status for a production order from table JEST and system status &lt;/P&gt;&lt;P&gt;text fro table TJ02T&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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 &lt;/P&gt;&lt;P&gt;ZBAPI_ORDER_STATUS_IMPORT:     AUFNR Order number (Keyfield)&lt;/P&gt;&lt;P&gt;                                               SPRAS Language ExcludeInactive - Checkbox -                              &lt;/P&gt;&lt;P&gt;                                                Exclude  inactive status&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tables                                                     T_BAPISTAT type ZBAPISTAT:&lt;/P&gt;&lt;P&gt;                                             OBJNR like JEST-OBJNR&lt;/P&gt;&lt;P&gt;                                             STAT like JEST-STAT&lt;/P&gt;&lt;P&gt;                                             INACT like JEST-INACT&lt;/P&gt;&lt;P&gt;                                             TXT04 like TJ02T-TXT04&lt;/P&gt;&lt;P&gt;                                             TXT30 likeTJ02T-TXT30&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Export parameters                                  RETURN like BAPIRETURN&lt;/P&gt;&lt;P&gt;STEP 1 - Define a structures for the BAPI&lt;/P&gt;&lt;P&gt;In this step structures for the parameters and tables of the function module used for &lt;/P&gt;&lt;P&gt;the BAPI are defined.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use Data type -&amp;gt; Structure&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Define the following structures:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ZBAPI_ORDER_STATUS_IMPORT which contains the following fields:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ORDERID Order number (Keyfield)&lt;/P&gt;&lt;P&gt;SPRAS Language&lt;/P&gt;&lt;P&gt;ExcludeInactive - Checkbox - Exclude inactive status&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ZBAPISTAT:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OBJNR like JEST-OBJNR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STAT like JEST-STAT&lt;/P&gt;&lt;P&gt;INACT like JEST-INACT&lt;/P&gt;&lt;P&gt;TXT04 like TJ02T-TXT04&lt;/P&gt;&lt;P&gt;TXT30 likeTJ02T-TXT30&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Important note:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will have to define a structure for every parameter in the BAPI. You cannot use &lt;/P&gt;&lt;P&gt;the same structures used in existing applications because BAPI structures are frozen &lt;/P&gt;&lt;P&gt;when BAPIs are released and then there are restrictions on changing them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ZBAPI_ORDER_STATUS_IMPORT&lt;/P&gt;&lt;P&gt;ZBAPI_ORDER_S&lt;/P&gt;&lt;P&gt;TATUS_IMPORT&lt;/P&gt;&lt;P&gt;ZBAPISTAT&lt;/P&gt;&lt;P&gt;STEP 2 - Write Function Module&lt;/P&gt;&lt;P&gt;Important notes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Each BAPI must have its own function group.&lt;/P&gt;&lt;P&gt;Under the attrbutes tab remember to select Processing Type Remote Enabled &lt;/P&gt;&lt;P&gt;module, otherwise the function module cannot be invoked via RFC and used as a &lt;/P&gt;&lt;P&gt;BAPI&lt;/P&gt;&lt;P&gt;Import/Export parameters can only be BY VALUE for an RFC enabled function &lt;/P&gt;&lt;P&gt;module&lt;/P&gt;&lt;P&gt;We are only creating one BAPI in this example, but you can create related BAPIs &lt;/P&gt;&lt;P&gt;in the same function pool, so they will be able to share global data.&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;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;/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;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;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;attributes&lt;/P&gt;&lt;P&gt;Import Parameters&lt;/P&gt;&lt;P&gt;Export Parameters&lt;/P&gt;&lt;P&gt;Tables&lt;/P&gt;&lt;P&gt;Code&lt;/P&gt;&lt;P&gt;Notes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The subroutine SET_RETURN_MESSAGE is a standard routine used for BAPIs that use the BAPIRETURN structure&lt;/P&gt;&lt;P&gt;In form Z_BAPI_GET_ORDER_SYSTEM_STATUS there is a test IF 1 = 2. If the test is true a mesage 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 &lt;/P&gt;&lt;P&gt;is included is, that it create a reference for the message, so that the WHERE USED funstionallity 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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INCLUDE LZBAPISTATUSUXX&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;  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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INCLUDE LZBAPISTATUSTOP - Global data&lt;/P&gt;&lt;P&gt;&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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;P&gt;&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INCLUDE LZBAPISTATUSF01 - Subroutines&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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;/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;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&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;&lt;/P&gt;&lt;P&gt;CHECK NOT MESSAGE IS INITIAL.&lt;/P&gt;&lt;P&gt;&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;&lt;/P&gt;&lt;P&gt;&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;&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;**&lt;/P&gt;&lt;P&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  BAPIRET2&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;P&gt;&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;&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;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;&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;&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;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;&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;ENDFUNCTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STEP 3: Create the API Method Using the BAPI WIZARD&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 &lt;/P&gt;&lt;P&gt;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 &lt;/P&gt;&lt;P&gt;outside program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: Each functionmodule corresponds to a method in the BOR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go to the Busines Object Builder SWO1.&lt;/P&gt;&lt;P&gt;&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 &lt;/P&gt;&lt;P&gt;this example it would be obvious to create the Object type as a subtype of BUS2005 Production order. However, to illustrate how to &lt;/P&gt;&lt;P&gt;create a new Object type from scratch, we will do this.&lt;/P&gt;&lt;P&gt;&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 &lt;/P&gt;&lt;P&gt;necessary to create the object type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Supertype: Not relevant because we are creating our object from scratch&lt;/P&gt;&lt;P&gt;&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 craeted &lt;/P&gt;&lt;P&gt;earlier. The program name must not be the name of an existinbg 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;Press enter and create the new business object. Note that when you create the business object a standard interface, an attribute ObjectType and the &lt;/P&gt;&lt;P&gt;methods ExistenceCheck and Display are automatically generated. These cannot be changed !&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;P&gt;&lt;/P&gt;&lt;P&gt;The next step is to add the Z_BAPI_GET_ORDER_STATUS method to the business object. Select Utillities -&amp;gt; API methods -&amp;gt; Add method and write the name of the &lt;/P&gt;&lt;P&gt;functionmodule in the dialogbox. Next the dialogbox show below will be shown. This is the start screen of the BAPI wizard. Proceed with wizard by pressing the  button.&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;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;/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;P&gt;&lt;/P&gt;&lt;P&gt;After you have finished the wizard, tyou will notice that the ZGetOrderStatus has been added to &lt;/P&gt;&lt;P&gt;the business object:&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;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;You can doubleclick on the method to see its properties. To use the business object you must change the Object type status to Implemented. Use menu Edit-&amp;gt;Change releases &lt;/P&gt;&lt;P&gt;status-&amp;gt;Object type-&amp;gt;To implemented. No you can test thge object (Press F8).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that the BAPI wizard has added a wrapper class for the function module so it can be sued as method in the business object. Choose menu Goto-&amp;gt;Program to display the &lt;/P&gt;&lt;P&gt;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; &lt;/P&gt;&lt;P&gt;STEP 4: Final steps &lt;/P&gt;&lt;P&gt;When the Business object has been checked and the documentation created, the follwing steps must be &lt;/P&gt;&lt;P&gt;carried out:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Release the BAPI function module (in the Function Builder).&lt;/P&gt;&lt;P&gt;Release the business object type (in the BOR ObjectType -&amp;gt; Change release status to -&amp;gt; Implemented ).&lt;/P&gt;&lt;P&gt;Release the BAPI as a method in the BOR (Release the methods you has created - Set the cursor on the &lt;/P&gt;&lt;P&gt;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;For potential write BAPIs: Release the IDoc and its segments&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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;Don't forget to reward if useful....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2007 06:31:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi/m-p/2444257#M547346</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-26T06:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi/m-p/2444258#M547347</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;You can browse all the BAPI's in a system from the transaction BAPI, there you can naviagte to your BAPI and then execute it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2007 06:32:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi/m-p/2444258#M547347</guid>
      <dc:creator>seshatalpasai_madala</dc:creator>
      <dc:date>2007-06-26T06:32:22Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi/m-p/2444259#M547348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ashok Kumar,&lt;/P&gt;&lt;P&gt; Hope if you have executed SW01 then your BAPI API registered in BAPI transaction.&lt;/P&gt;&lt;P&gt;Check BAPI trancation. Whether your BAPI is appearing in the list.&lt;/P&gt;&lt;P&gt;call your BAPI in the program BAPI_GET_ORDER_SYSTEM_STATUS&lt;/P&gt;&lt;P&gt;or executre your function directly from SW01 by clicking on execute button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if useful!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2007 06:32:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi/m-p/2444259#M547348</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-26T06:32:25Z</dc:date>
    </item>
  </channel>
</rss>

