<?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: Test a Bapi in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/test-a-bapi/m-p/4333186#M1032383</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All the inputs which are required for the corresponding dialog transaction (ME21N) are mandatory for the BAPI, too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While it is possible to test the BAPI_PO_CREATE1 using transaction SE37 (Function Builder) I can highly recommend to write a simple eCATT script (transaction &lt;STRONG&gt;SECATT&lt;/STRONG&gt; ) which just calls the BAPI (FUN pattern) because you can evaluate the returned messages much easier and faster.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Aug 2008 16:04:56 GMT</pubDate>
    <dc:creator>uwe_schieferstein</dc:creator>
    <dc:date>2008-08-26T16:04:56Z</dc:date>
    <item>
      <title>Test a Bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/test-a-bapi/m-p/4333182#M1032379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to figure out a Bapi for Puchase order create, which I assume is Bapi_Po_create.&lt;/P&gt;&lt;P&gt;I would like to figure out how I can test the Bapi and how can I find out the mandatory fields for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be appreciated with points &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;DJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Aug 2008 14:11:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/test-a-bapi/m-p/4333182#M1032379</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-26T14:11:53Z</dc:date>
    </item>
    <item>
      <title>Re: Test a Bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/test-a-bapi/m-p/4333183#M1032380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;goto SE37 and specify the BAPI...&lt;/P&gt;&lt;P&gt;Try specfying the values in various parameters... Now try to execute and if the mandatory fields need to be specified it doesnot run but asks for the fields...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Aug 2008 14:14:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/test-a-bapi/m-p/4333183#M1032380</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-26T14:14:07Z</dc:date>
    </item>
    <item>
      <title>Re: Test a Bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/test-a-bapi/m-p/4333184#M1032381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hiii&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;simple way is go to SE37--&amp;gt;enter FM name -&amp;gt;press display-&amp;gt;select import...here can see a column called OPTIONAL.if it is marked then fields are not mendatory or else compulsary fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best way to test BAPI is debug mode.and check return parameters.it will take time but you will get to know whole data transfering process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;twinkal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Aug 2008 14:18:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/test-a-bapi/m-p/4333184#M1032381</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-26T14:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: Test a Bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/test-a-bapi/m-p/4333185#M1032382</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;Please use BAPI_PO_CREATE1 instead of BAPI_PO_CREATE. the latter one is obsolete.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This code will help you to know which fields can be used to create PO. To find the mandatory fields, you can check SE37 -&amp;gt; pass on the BAPI name and check the export, import and tables parameters. If optional is not selected, then you have to pass value to them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   gs_poheader-ref_1      = delivery.&lt;/P&gt;&lt;P&gt;    gs_poheader-creat_date = sy-datum.&lt;/P&gt;&lt;P&gt;    gs_poheader-created_by = sy-uname.&lt;/P&gt;&lt;P&gt;    gs_poheader-langu      = sy-langu.&lt;/P&gt;&lt;P&gt;    gs_poheader-doc_date   = sy-datum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CLEAR gs_poheaderx.&lt;/P&gt;&lt;P&gt;    gs_poheaderx-doc_type   = 'X'.&lt;/P&gt;&lt;P&gt;    gs_poheaderx-purch_org  = 'X'.&lt;/P&gt;&lt;P&gt;    gs_poheaderx-vendor     = 'X'.&lt;/P&gt;&lt;P&gt;    gs_poheaderx-pur_group  = 'X'.&lt;/P&gt;&lt;P&gt;    gs_poheaderx-ref_1      = 'X'.&lt;/P&gt;&lt;P&gt;    gs_poheaderx-creat_date = 'X'.&lt;/P&gt;&lt;P&gt;    gs_poheaderx-created_by = 'X'.&lt;/P&gt;&lt;P&gt;    gs_poheaderx-langu      = 'X'.&lt;/P&gt;&lt;P&gt;    gs_poheaderx-doc_date   = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF gt_delitem[] IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    LOOP AT gt_delitem INTO gs_delitem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      CLEAR: gs_poitem, gs_poitemx.&lt;/P&gt;&lt;P&gt;      gs_poitem-po_item  = gs_delitem-posnr.&lt;/P&gt;&lt;P&gt;      gs_poitem-material = gs_delitem-matnr.&lt;/P&gt;&lt;P&gt;      gs_poitem-plant    = gv_plant.&lt;/P&gt;&lt;P&gt;      gs_poitem-quantity = gs_delitem-lfimg.&lt;/P&gt;&lt;P&gt;      gs_poitem-shipping = space.&lt;/P&gt;&lt;P&gt;      gs_poitem-tax_code = gv_taxid.&lt;/P&gt;&lt;P&gt;      gs_poitem-po_unit = gs_delitem-meins.&lt;/P&gt;&lt;P&gt;      APPEND gs_poitem TO gt_poitem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      gs_poitemx-po_item  = gs_delitem-posnr.&lt;/P&gt;&lt;P&gt;      gs_poitemx-po_itemx = 'X'.&lt;/P&gt;&lt;P&gt;      gs_poitemx-material = 'X'.&lt;/P&gt;&lt;P&gt;      gs_poitemx-plant    = 'X'.&lt;/P&gt;&lt;P&gt;      gs_poitemx-quantity = 'X'.&lt;/P&gt;&lt;P&gt;      gs_poitemx-shipping = 'X'.&lt;/P&gt;&lt;P&gt;      gs_poitemx-tax_code = 'X'.&lt;/P&gt;&lt;P&gt;      gs_poitemx-po_unit = 'X'.&lt;/P&gt;&lt;P&gt;      APPEND gs_poitemx TO gt_poitemx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      CLEAR: gs_poschedule, gs_poschedulex.&lt;/P&gt;&lt;P&gt;      gs_poschedule-po_item = gs_delitem-posnr.&lt;/P&gt;&lt;P&gt;      gs_poschedule-delivery_date = lv_date.&lt;/P&gt;&lt;P&gt;      APPEND gs_poschedule TO gt_poschedule.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      gs_poschedulex-po_item = gs_delitem-posnr.&lt;/P&gt;&lt;P&gt;      gs_poschedulex-po_itemx = 'X'.&lt;/P&gt;&lt;P&gt;      gs_poschedulex-delivery_date = 'X'.&lt;/P&gt;&lt;P&gt;      APPEND gs_poschedulex TO gt_poschedulex.&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;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;Create Purchase Order.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;  IF gs_poheader IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CLEAR: gv_ponum.&lt;/P&gt;&lt;P&gt;    REFRESH gt_return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'BAPI_PO_CREATE1'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        poheader         = gs_poheader&lt;/P&gt;&lt;P&gt;        poheaderx        = gs_poheaderx&lt;/P&gt;&lt;P&gt;        testrun          = testrun&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        exppurchaseorder = gv_ponum&lt;/P&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;        return           = gt_return&lt;/P&gt;&lt;P&gt;        poitem           = gt_poitem&lt;/P&gt;&lt;P&gt;        poitemx          = gt_poitemx&lt;/P&gt;&lt;P&gt;        poschedule       = gt_poschedule&lt;/P&gt;&lt;P&gt;        poschedulex      = gt_poschedulex.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;Check for error messages&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;    LOOP AT gt_return INTO gs_return WHERE type = 'E'&lt;/P&gt;&lt;P&gt;                                     OR    type = 'A'.&lt;/P&gt;&lt;P&gt;      EXIT.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF sy-subrc &amp;lt;&amp;gt; 0 AND gv_ponum IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          wait = 'X'.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;Return the values to Calling Program&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;    IF gv_ponum IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;      purchaseorder = gv_ponum.&lt;/P&gt;&lt;P&gt;      IF gt_poitem IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;        LOOP AT gt_poitem INTO gs_poitem.&lt;/P&gt;&lt;P&gt;          CLEAR gs_item.&lt;/P&gt;&lt;P&gt;          MOVE-CORRESPONDING gs_poitem TO gs_item.&lt;/P&gt;&lt;P&gt;          gs_item-po_number = gv_ponum.&lt;/P&gt;&lt;P&gt;          APPEND gs_item TO po_items.&lt;/P&gt;&lt;P&gt;        ENDLOOP.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Kartavya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Aug 2008 14:41:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/test-a-bapi/m-p/4333185#M1032382</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-26T14:41:08Z</dc:date>
    </item>
    <item>
      <title>Re: Test a Bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/test-a-bapi/m-p/4333186#M1032383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All the inputs which are required for the corresponding dialog transaction (ME21N) are mandatory for the BAPI, too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While it is possible to test the BAPI_PO_CREATE1 using transaction SE37 (Function Builder) I can highly recommend to write a simple eCATT script (transaction &lt;STRONG&gt;SECATT&lt;/STRONG&gt; ) which just calls the BAPI (FUN pattern) because you can evaluate the returned messages much easier and faster.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Aug 2008 16:04:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/test-a-bapi/m-p/4333186#M1032383</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2008-08-26T16:04:56Z</dc:date>
    </item>
    <item>
      <title>Re: Test a Bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/test-a-bapi/m-p/4333187#M1032384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Also check out how to test BAPI in SE37 and write the results to the data base (perform commit work) without any additional developement [Easy BAPI testing in SE37|http://dominiktylczynskien.wordpress.com/2011/07/06/easy-bapi-testing-in-se37/]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dominik Tylczynski&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jul 2011 09:29:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/test-a-bapi/m-p/4333187#M1032384</guid>
      <dc:creator>Dominik_Tylczynski</dc:creator>
      <dc:date>2011-07-08T09:29:31Z</dc:date>
    </item>
  </channel>
</rss>

