<?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: Reg:BAPI RFC in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-bapi-rfc/m-p/3474474#M835146</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if u specify destination in bapis dey become remote capable..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(BAPI) Predefined interface to data and processes in an SAP application, which is stored in the Business Object Repository and can be called remotely...i.e. from other systems..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u can read data from other systems and create data in ur system with same details as from other system..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for dis dere must be a valid link b/w 2 systems and also u've to specify destination in bapi call.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;plz reward points if dis helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Mar 2008 08:11:09 GMT</pubDate>
    <dc:creator>former_member188827</dc:creator>
    <dc:date>2008-03-12T08:11:09Z</dc:date>
    <item>
      <title>Reg:BAPI RFC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-bapi-rfc/m-p/3474472#M835144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How to create BAPI-RFC?wht is the purpose of bapi rfc?&lt;/P&gt;&lt;P&gt;plz send me urgently.........&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Mar 2008 08:05:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-bapi-rfc/m-p/3474472#M835144</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-12T08:05:46Z</dc:date>
    </item>
    <item>
      <title>Re: Reg:BAPI RFC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-bapi-rfc/m-p/3474473#M835145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&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="4988334"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Mar 2008 08:07:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-bapi-rfc/m-p/3474473#M835145</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-12T08:07:44Z</dc:date>
    </item>
    <item>
      <title>Re: Reg:BAPI RFC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-bapi-rfc/m-p/3474474#M835146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if u specify destination in bapis dey become remote capable..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(BAPI) Predefined interface to data and processes in an SAP application, which is stored in the Business Object Repository and can be called remotely...i.e. from other systems..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u can read data from other systems and create data in ur system with same details as from other system..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for dis dere must be a valid link b/w 2 systems and also u've to specify destination in bapi call.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;plz reward points if dis helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Mar 2008 08:11:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-bapi-rfc/m-p/3474474#M835146</guid>
      <dc:creator>former_member188827</dc:creator>
      <dc:date>2008-03-12T08:11:09Z</dc:date>
    </item>
    <item>
      <title>Re: Reg:BAPI RFC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-bapi-rfc/m-p/3474475#M835147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Programming a BAPI consists of some tasks like: &amp;#149;Defining BAPI Data structures ( using SE11 )&lt;/P&gt;&lt;P&gt;&amp;#149;Creating BAPI Function Modules (For each method)&lt;/P&gt;&lt;P&gt;&amp;#149;Defining BAPI Methods in the BOR&lt;/P&gt;&lt;P&gt;&amp;#149;Documentation of the BAPI &lt;/P&gt;&lt;P&gt;&amp;#149;Generate ALE interface for asynchronous BAPIs &lt;/P&gt;&lt;P&gt;&amp;#149;Generate and release &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE:&lt;/P&gt;&lt;P&gt;Here we will not be covering the two points &amp;#150; Documentation of BAPI and Generating ALE Interface for asynchronous BAPIs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: You can use the BAPI explorer (T-code BAPI) to get a step-by-step instruction / checklist in how to create a BAPI. In the BAPI explorer select the Project tab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;EXAMPLE &amp;#150; HOW TO CREATE A BAPI&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;In the example we will create a BAPI that reads some information about the line items for a Sales Invoice from table VBRP based on the Invoice No. that is supplied to the import parameter of the BAPI Function Module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BAPI Name ZGetInvoiceItems &lt;/P&gt;&lt;P&gt;Function group ZBAPIVIN &lt;/P&gt;&lt;P&gt;Function module: ZBAPI_GET_BILL_ITEMS&lt;/P&gt;&lt;P&gt;FM Import parameters : IV_BILLNO TYPE ZBAPI_BILL_ITEMS-VBELN &lt;/P&gt;&lt;P&gt;FM Tables :IT_VBRP LIKE ZBAPI_BILL_ITEMS&lt;/P&gt;&lt;P&gt;FM Export parameters : RETURN LIKE BAPIRETURN &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Defining BAPI Structures&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the basic step followed while creating BAPIs. All the relevant structures that are required for BAPI have to be created using T-Code SE11. The structures can be created for Import/Tables parameters. Use Data type -&amp;gt; Structure &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In our case we do not have multiple inputs but just one input i.e. Sales Invoice No. and so we have not made use of any structure for the purpose. But if required, structure can be used for import parameter also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following are the components of structure ZBAPI_BILL_ITEMS:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Field Name Description&lt;/P&gt;&lt;P&gt;VBELN Invoice Number&lt;/P&gt;&lt;P&gt;POSNR Invoice Item Number&lt;/P&gt;&lt;P&gt;MATNR Material Number&lt;/P&gt;&lt;P&gt;FKIMG Quantity&lt;/P&gt;&lt;P&gt;VRKME Sales Units (Quantity)&lt;/P&gt;&lt;P&gt;NETWR Amount&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Point of Caution&lt;/P&gt;&lt;P&gt;It is required to define a structure for every parameter in the BAPI and use of same structures which are used in existing applications cannot be done 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;&lt;/P&gt;&lt;P&gt;Screenshot of Structure &amp;#150; ZBAPI_BILL_ITEMS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Creating BAPI Function Modules (For each method)&lt;/P&gt;&lt;P&gt;We must create new function group for each BAPI. If the BAPIs are related then the same can be grouped under the same FUNCTION GROUP to enable the sharing of global data amongst the related BAPIs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Screenshot of Attributes Tab in the FM ZBAPI_BILL_ITEMS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Screenshot of Import Parameters Tab in the FM ZBAPI_BILL_ITEMS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Screenshot of Export Parameters Tab in the FM ZBAPI_BILL_ITEMS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE:&lt;/P&gt;&lt;P&gt;Since Remote Enabled module processing type is selected and the Import/Export parameters can only be BY VALUE for an RFC enabled function module, select the checkbox for Pass Value for each IMPORT/EXPORT parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Screenshot of Tables Tab in the FM ZBAPI_BILL_ITEMS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code in the Function Module ZBAPI_BILL_ITEMS &amp;amp; &lt;/P&gt;&lt;P&gt;related Includes in the Function Group&lt;/P&gt;&lt;P&gt;&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 LZBAPIVINU01.&lt;/P&gt;&lt;P&gt;"ZBAPI_GET_BILL_ITEMS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INCLUDE LZBAPIVINTOP &amp;#147; Global data &lt;/P&gt;&lt;P&gt;FUNCTION-POOL ZBAPIVIN. "MESSAGE-ID&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES: VBRK, VBRP.&lt;/P&gt;&lt;P&gt;DATA: T_VBRP LIKE ZBAPI_BILL_ITEMS OCCURS 0.&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 BY BAPI FUNCTION MODULE&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;INCLUDE LZBAPIVINU01 - Subroutines &lt;/P&gt;&lt;P&gt;***INCLUDE LZBAPIVINU01.&lt;/P&gt;&lt;P&gt;FUNCTION ZBAPI_GET_BILL_ITEMS.&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(IV_BILLNO) TYPE VBELN&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;*" IT_VBRP STRUCTURE ZBAPI_BILL_ITEMS&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Check if the Invoice exists&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;select single *&lt;/P&gt;&lt;P&gt;from vbrk&lt;/P&gt;&lt;P&gt;where vbeln eq iv_billno.&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;If not return the error message&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 = iv_billno.&lt;/P&gt;&lt;P&gt;perform return_bapi_message using message&lt;/P&gt;&lt;P&gt;changing return.&lt;/P&gt;&lt;P&gt;exit.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;If the Invoice exists, get all the required item lines information&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;in the table it_vbrp&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;refresh it_vbrp.&lt;/P&gt;&lt;P&gt;clear vbrp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select vbeln posnr matnr fkimg vrkme netwr&lt;/P&gt;&lt;P&gt;into table it_vbrp&lt;/P&gt;&lt;P&gt;from vbrp&lt;/P&gt;&lt;P&gt;where vbeln eq iv_billno.&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;&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;FORM RETURN_BAPI_MESSAGE *&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; VALUE(IV_MESSAGE) *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;--&amp;gt; XV_RETURN *&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 return_bapi_message using value(iv_message) like message&lt;/P&gt;&lt;P&gt;changing xv_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 = iv_message-msgty&lt;/P&gt;&lt;P&gt;cl = iv_message-msgid&lt;/P&gt;&lt;P&gt;number = iv_message-msgno&lt;/P&gt;&lt;P&gt;par1 = iv_message-msgv1&lt;/P&gt;&lt;P&gt;par2 = iv_message-msgv2&lt;/P&gt;&lt;P&gt;par3 = iv_message-msgv3&lt;/P&gt;&lt;P&gt;par4 = iv_message-msgv4&lt;/P&gt;&lt;P&gt;importing&lt;/P&gt;&lt;P&gt;bapireturn = xv_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;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vineela.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Mar 2008 08:45:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-bapi-rfc/m-p/3474475#M835147</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-12T08:45:00Z</dc:date>
    </item>
  </channel>
</rss>

