<?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: LT04 BATCH INPUT TROUBLE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/lt04-batch-input-trouble/m-p/5770790#M1306523</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanx (the code wasn't mine... &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;), i solved the trouble, it's was be4 (an authirazion to write in a table in the transaction C02.&lt;/P&gt;&lt;P&gt;I'll change the logical to avoid the select inside the loop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Jun 2009 10:54:47 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-06-19T10:54:47Z</dc:date>
    <item>
      <title>LT04 BATCH INPUT TROUBLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lt04-batch-input-trouble/m-p/5770788#M1306521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hy guys i have a little trouble with my batch input. in my table t_fabb i have many rows but just after the first batch, i have an error message:MESSAGE e000(zlo) WITH 'Errore conferma OT LT04. &lt;/P&gt;&lt;P&gt;If i exit from the report ang get in again , the same row that failed , succed but the next row fail etc...&lt;/P&gt;&lt;P&gt;i can't understand why....&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT t_fabb.    
SELECT *
      FROM ltbk
     WHERE tbnum &amp;gt;= t_fabb-tbnum
       AND lznum  = t_fabb-aufnr
       AND lgnum  = '050'
       AND statu &amp;lt;&amp;gt; 'E'.

      SELECT SINGLE *
        FROM ltbp
       WHERE lgnum  = '050'
         AND elikz &amp;lt;&amp;gt; 'X'
         AND matnr = t_fabb-matnr
         AND tbnum = ltbk-tbnum
         AND charg &amp;lt;&amp;gt; ''.
      IF sy-subrc = 0.
        EXIT.
      ENDIF.
    ENDSELECT.
    IF sy-subrc &amp;lt;&amp;gt; 0.
      MESSAGE e000(zlo) WITH 'Numero OT già confermata'.
      LEAVE SCREEN.SET SCREEN 0.
    ENDIF.


    CLEAR bdcdata.
    REFRESH bdcdata.

    PERFORM bdc_dynpro      USING 'SAPML03T' '0131'.
*  PERFORM bdc_field       USING 'BDC_CURSOR'
*                               'LTBK-TBNUM'.
    PERFORM bdc_field       USING 'BDC_OKCODE'
                                  '/00'.
    PERFORM bdc_field       USING 'LTAK-LGNUM'
                                  '050'.
    PERFORM bdc_field       USING 'LTBK-TBNUM'
                                  ltbp-tbnum.
    PERFORM bdc_field       USING '*LTBP-TBPOS'
                                ltbp-tbpos.
    PERFORM bdc_field       USING 'RL03T-ALAKT'
                                  'X'.
    PERFORM bdc_field       USING 'RL03T-DUNKL'
                                   'D'.

    CALL TRANSACTION 'LT04' USING bdcdata
*{   REPLACE        LGPK901791                                        1
*                     MODE 'N'  UPDATE 'S' MESSAGES INTO messtab.
                     MODE 'E'  UPDATE 'S' MESSAGES INTO messtab.
*}   REPLACE
    IF sy-subrc = 0.
      SELECT SINGLE *
        FROM ltbp
       WHERE lgnum = '050'
         AND tbnum = ltbp-tbnum
         AND tanum &amp;lt;&amp;gt; ' '.
      IF sy-subrc = 0.
        z311a-ztanum = ltbp-tanum.
      ENDIF.
      PERFORM modify_z331a.
    ELSE.
      MESSAGE e000(zlo) WITH 'Errore conferma OT LT04'.
      LEAVE SCREEN.SET SCREEN 0.
    ENDIF.

    READ TABLE messtab WITH KEY msgtyp = 'S'
                                msgid = 'LT'
                                msgnr = '100'.

  ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2009 22:18:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lt04-batch-input-trouble/m-p/5770788#M1306521</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-18T22:18:00Z</dc:date>
    </item>
    <item>
      <title>Re: LT04 BATCH INPUT TROUBLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lt04-batch-input-trouble/m-p/5770789#M1306522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Just check in 'messtab' if there is some error messages.&lt;/P&gt;&lt;P&gt;Please note that when transfer orders are created in sequence a commit work must be placed between the calls so as to clear the global internal tables associated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of call transaction i suggest that you use the FM L_TO_CREATE_TR. Please go through teh documenttation of the FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also i find that you are doing SELECT within LOOPs. Please try to avoid it. Although it is not related to your issue; but as best practices one should avoid it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ankur Parab&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2009 05:56:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lt04-batch-input-trouble/m-p/5770789#M1306522</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-19T05:56:04Z</dc:date>
    </item>
    <item>
      <title>Re: LT04 BATCH INPUT TROUBLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lt04-batch-input-trouble/m-p/5770790#M1306523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanx (the code wasn't mine... &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;), i solved the trouble, it's was be4 (an authirazion to write in a table in the transaction C02.&lt;/P&gt;&lt;P&gt;I'll change the logical to avoid the select inside the loop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2009 10:54:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lt04-batch-input-trouble/m-p/5770790#M1306523</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-19T10:54:47Z</dc:date>
    </item>
  </channel>
</rss>

