<?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: Hepl need in code in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/hepl-need-in-code/m-p/1510531#M235470</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you post the entire code, it would be helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also you did not specify if there were any errors. I assume you are checking the BAPI return structure for any errors.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 20 Aug 2006 22:06:40 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-08-20T22:06:40Z</dc:date>
    <item>
      <title>Hepl need in code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hepl-need-in-code/m-p/1510527#M235466</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;I am trying to create a  reservation using bapi, its returning a value of &lt;/P&gt;&lt;P&gt;000000000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from mard into table itab up to 10 rows&lt;/P&gt;&lt;P&gt;             where werks = 'xxx'&lt;/P&gt;&lt;P&gt;             AND LGORT = 'xxx'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Prepare header data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; w_resb_header-plant      = 'xxx'.&lt;/P&gt;&lt;P&gt; w_resb_header-res_date   = sy-datum.&lt;/P&gt;&lt;P&gt; w_resb_header-created_by = sy-uname.&lt;/P&gt;&lt;P&gt; w_resb_header-cost_ctr   = s_kostl.&lt;/P&gt;&lt;P&gt; w_resb_header-move_type  = s_bwart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;  itab_resb-material   = itab-MATNR.&lt;/P&gt;&lt;P&gt;  itab_resb-plant      = ITAB-werks.&lt;/P&gt;&lt;P&gt;  itab_resb-store_loc  = ITAB-lgort.&lt;/P&gt;&lt;P&gt;  itab_resb-quantity   = 1.&lt;/P&gt;&lt;P&gt;  itab_resb-unit       =  'EA'.&lt;/P&gt;&lt;P&gt;  append itab_resb.&lt;/P&gt;&lt;P&gt;  clear itab_resb.&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;CALL FUNCTION 'BAPI_RESERVATION_CREATE'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    RESERVATION_HEADER       = w_resb_header&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  NO_COMMIT                =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  MOVEMENT_AUTO            =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;P&gt;   RESERVATION              = w_resb_no&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    RESERVATION_ITEMS        = itab_resb&lt;/P&gt;&lt;P&gt;   RETURN                   = itab_bapi_return&lt;/P&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE :  / w_resb_no.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Aug 2006 17:09:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hepl-need-in-code/m-p/1510527#M235466</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-18T17:09:37Z</dc:date>
    </item>
    <item>
      <title>Re: Hepl need in code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hepl-need-in-code/m-p/1510528#M235467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Swathi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do not forget to commit your work using BAPI_TRANSACTION_COMMIT (perhaps with WAIT = 'X').&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>Fri, 18 Aug 2006 17:15:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hepl-need-in-code/m-p/1510528#M235467</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2006-08-18T17:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: Hepl need in code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hepl-need-in-code/m-p/1510529#M235468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to see the entire program.  Please post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Aug 2006 17:20:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hepl-need-in-code/m-p/1510529#M235468</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-08-18T17:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: Hepl need in code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hepl-need-in-code/m-p/1510530#M235469</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;u r using append stmt with in a loop its goin infinite loop&lt;/P&gt;&lt;P&gt;can u chk it out&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Aug 2006 18:13:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hepl-need-in-code/m-p/1510530#M235469</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-18T18:13:01Z</dc:date>
    </item>
    <item>
      <title>Re: Hepl need in code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hepl-need-in-code/m-p/1510531#M235470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you post the entire code, it would be helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also you did not specify if there were any errors. I assume you are checking the BAPI return structure for any errors.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 Aug 2006 22:06:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hepl-need-in-code/m-p/1510531#M235470</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-20T22:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: Hepl need in code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hepl-need-in-code/m-p/1510532#M235471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Swathi,&lt;/P&gt;&lt;P&gt;  Here BAPI is returning some errors, that's why it's not creating reservation. U can catch the errors by checking the itab_bapi_return. Please check this sample of code :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF itab_resb OCCURS 10.&lt;/P&gt;&lt;P&gt;        INCLUDE STRUCTURE bapiresbc.&lt;/P&gt;&lt;P&gt;DATA: END OF itab_resb.&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF w_resb_header.&lt;/P&gt;&lt;P&gt;        INCLUDE STRUCTURE bapirkpfc.&lt;/P&gt;&lt;P&gt;DATA: END OF w_resb_header.&lt;/P&gt;&lt;P&gt;DATA: w_resb_no LIKE resb-rsnum.&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF return OCCURS 10.&lt;/P&gt;&lt;P&gt;        INCLUDE STRUCTURE bapireturn.&lt;/P&gt;&lt;P&gt;DATA: END OF return.&lt;/P&gt;&lt;P&gt;DATA : itab TYPE TABLE OF mard WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM mard INTO TABLE itab UP TO 10 ROWS&lt;/P&gt;&lt;P&gt;         WHERE werks = 'xxx'&lt;/P&gt;&lt;P&gt;         AND lgort = 'xxx'.&lt;/P&gt;&lt;P&gt;w_resb_header-created_by = sy-uname.&lt;/P&gt;&lt;P&gt;w_resb_header-res_date   = sy-datlo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT itab.&lt;/P&gt;&lt;P&gt;  itab_resb-material = itab-matnr.&lt;/P&gt;&lt;P&gt;  itab_resb-plant = itab-werks.&lt;/P&gt;&lt;P&gt;  itab_resb-store_loc = itab-lgort.&lt;/P&gt;&lt;P&gt;  itab_resb-quantity = 1.&lt;/P&gt;&lt;P&gt;  itab_resb-unit = 'EA'.&lt;/P&gt;&lt;P&gt;  APPEND itab_resb.&lt;/P&gt;&lt;P&gt;  CLEAR itab_resb.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR itab_bapi_return.&lt;/P&gt;&lt;P&gt;REFRESH itab_bapi_return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_RESERVATION_CREATE'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    reservation_header = w_resb_header&lt;/P&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;P&gt;    reservation        = w_resb_no&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    reservation_items  = itab_resb&lt;/P&gt;&lt;P&gt;    return             = itab_bapi_return&lt;/P&gt;&lt;P&gt;  EXCEPTIONS&lt;/P&gt;&lt;P&gt;    OTHERS             = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF itab_bapi_return[] IS INITIAL.&lt;/P&gt;&lt;P&gt;   DATA: return TYPE bapiret2.&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        return = return.&lt;/P&gt;&lt;P&gt;  WRITE : / w_resb_no.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;  ROLLBACK WORK.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Hope this would help u in some way.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Aug 2006 04:12:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hepl-need-in-code/m-p/1510532#M235471</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-21T04:12:43Z</dc:date>
    </item>
    <item>
      <title>Re: Hepl need in code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hepl-need-in-code/m-p/1510533#M235472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the following code is never true:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"...itab_bapi_return[] IS INITIAL."&lt;/P&gt;&lt;P&gt;the bapi always gives you something in return ... that's the idea of the return codes in general.&lt;/P&gt;&lt;P&gt; Try checking this: &lt;/P&gt;&lt;P&gt;itab_bapi_return-TYPE = 'S'&lt;/P&gt;&lt;P&gt;that means that the bapi has finished with success.&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Ivan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Aug 2006 11:53:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hepl-need-in-code/m-p/1510533#M235472</guid>
      <dc:creator>ivan_ivanov119</dc:creator>
      <dc:date>2006-08-26T11:53:53Z</dc:date>
    </item>
    <item>
      <title>Re: Hepl need in code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hepl-need-in-code/m-p/1510534#M235473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Swathi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I must disagree with Ivan that BAPIs will always return a suceess message. For me a BAPI was executed successfully if it returns either a S(uccess) message or nothing. &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>Sat, 26 Aug 2006 12:10:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hepl-need-in-code/m-p/1510534#M235473</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2006-08-26T12:10:25Z</dc:date>
    </item>
  </channel>
</rss>

