<?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 hi in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/hi/m-p/3077253#M729757</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;send me how prepared for Create BAPI? &lt;/P&gt;&lt;P&gt;send me any new things of BAPI with PDF format....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;s.suresh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Nov 2007 13:24:51 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-11-27T13:24:51Z</dc:date>
    <item>
      <title>hi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hi/m-p/3077253#M729757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;send me how prepared for Create BAPI? &lt;/P&gt;&lt;P&gt;send me any new things of BAPI with PDF format....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;s.suresh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2007 13:24:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hi/m-p/3077253#M729757</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-27T13:24:51Z</dc:date>
    </item>
    <item>
      <title>Re: hi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hi/m-p/3077254#M729758</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;A href="http://www.sap-img.com/abap/bapi-step-by-step-guidance.htm" target="test_blank"&gt;http://www.sap-img.com/abap/bapi-step-by-step-guidance.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2007 13:26:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hi/m-p/3077254#M729758</guid>
      <dc:creator>former_member188829</dc:creator>
      <dc:date>2007-11-27T13:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: hi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hi/m-p/3077255#M729759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;to create a BAPI in a nutshell you need access to an ABAP Workbench editor, ABAP knowledge and Developer privileges:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) BAPIs in General are created in two parts, first a Function Group and then the Function Modules.&lt;/P&gt;&lt;P&gt;Both user defined Group/Modules names must start with Z or Y. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Using the Object navigator (SE80) we must click on "EDIT OBJECT" -&amp;gt;"FUNCTION GROUP". Some dataFields&lt;/P&gt;&lt;P&gt;must be maintained:&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FunctionGroupName&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Short Description&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Development Class / Package&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) With the previously created FunctionGroup, a new FunctionModule can be added. In Object Navigator&lt;/P&gt;&lt;P&gt;mark the option "EDIT OBJECT" -&amp;gt;"FUNCTION MODULE" and click CREATE (F5) The following steps must be&lt;/P&gt;&lt;P&gt;performed:&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Set the FunctionGroupName (as defined above).&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Short Text as description&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Maintain technical data:&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After the creation of the FunctionModule, we must define the Interface (parameters for&lt;/P&gt;&lt;P&gt;external use) and the processing logic (the code itself).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) Possible values for parameters are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Import parameters.- Input for the RFC.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Export parameters.- What the RFC will return &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Tables.- Internal tables that can be transferred to/from the RFC&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Exceptions.- Definitions for possible errors inside the RFC&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When defining this parameters, the data and dataTypes must be available globally, that is, in the&lt;/P&gt;&lt;P&gt;ABAP Dictionary, also, NO GENERIC DATA TYPES MAY BE USED FOR A VARIABLE IN THE INTERFACE, such as int,&lt;/P&gt;&lt;P&gt;char, etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5) An example for import/export parameters definition is as follows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Import:&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ParameterName.- PORTAL_LOGON_NAME&lt;/P&gt;&lt;P&gt;Type.- LIKE&lt;/P&gt;&lt;P&gt;Associated type.- Z_LOGON_ID (previously defined in the Dictionary)&lt;/P&gt;&lt;P&gt;Optional .- OK&lt;/P&gt;&lt;P&gt;PassValue.- OK&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Export&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ParameterName.- CLIENT_DATA&lt;/P&gt;&lt;P&gt;Type Spec.- LIKE&lt;/P&gt;&lt;P&gt;Associated type.- Z_CLIENTS_1 (a table in the Dictionary, meaning that a structure &lt;/P&gt;&lt;P&gt;will the result of this RFC)&lt;/P&gt;&lt;P&gt;PassValue.- OK&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Exceptions&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Exception.- ERROR_CLIENT_DOES_NOT_EXIST&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6) Now he actual processing logic must be set, as ABAP source code. In this case, we get a name for User&lt;/P&gt;&lt;P&gt;logon (e.g. "Reporter") and fetch it's user ID in a mapping table. Afterwards, with this id, go to &lt;/P&gt;&lt;P&gt;clients table and get the client details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF client_eq_type,&lt;/P&gt;&lt;P&gt;client_logon TYPE int4,&lt;/P&gt;&lt;P&gt;client_number TYPE int4,&lt;/P&gt;&lt;P&gt;END OF client_eq_type .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: client_eq TYPE client_eq_type,&lt;/P&gt;&lt;P&gt;temp_client_id TYPE int4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;First find out the logon username and get the equivalence. The client_id is stored in a &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;temporary structure&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE client_number&lt;/P&gt;&lt;P&gt;FROM zclients_code_eq&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF client_eq&lt;/P&gt;&lt;P&gt;WHERE client_logon = portal_logon .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;RAISE error_client_does_not_exist .&lt;/P&gt;&lt;P&gt;ENDIF .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;temp_client_id = client_eq-client_number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE *&lt;/P&gt;&lt;P&gt;FROM zalex_clients_1&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF client_data&lt;/P&gt;&lt;P&gt;WHERE client_id = temp_client_id.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0 .&lt;/P&gt;&lt;P&gt;RAISE error_client_does_not_exist .&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;ENDFUNCTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;7) Test the function and activate.&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; Now this is very important. Go to attributes in the SE80 function Module and enable the Remote Call for this function, in order&lt;/P&gt;&lt;P&gt;to set it as RFC. PROCESSING TYPE -&amp;gt; REMOTE ENABLED MODULE&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;A href="http://www.erpgenie.com/abap/bapi/index.htm" target="test_blank"&gt;http://www.erpgenie.com/abap/bapi/index.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.erpgenie.com/abap/bapi/example.htm" target="test_blank"&gt;http://www.erpgenie.com/abap/bapi/example.htm&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;vasu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2007 13:29:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hi/m-p/3077255#M729759</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-27T13:29:35Z</dc:date>
    </item>
  </channel>
</rss>

