<?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: bdc error manageing in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-error-manageing/m-p/1160917#M120429</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A little modification of your code to suit your needs. Reply if more help is needed.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: begin of itab occurs 0 , 
trtyp like ztrlr-trtyp,
trptr like ztrlr-trptr,
gjhar like ztrlr-gjhar,
billdat like ztrlr-billdat,
bilmat like ztrlr-bilmat,
lrno like ztrlr-lrno,
lramt like ztrpaybrk-lramt,
end of itab.

data: itab2 like itab occurs 0 with header line. "to store error records.






PARAMETERS : p_fname LIKE ibipparms-path OBLIGATORY.

include bdcrecx1.

start-of-selection.

perform open_group.

&amp;lt;b&amp;gt;loop at itab.&amp;lt;/b&amp;gt;
perform bdc_dynpro using 'ZTR_MP_LR_ASSIGN' '0001'.
perform bdc_field using 'BDC_OKCODE'
'=ENT'.
perform bdc_field using 'BDC_CURSOR'
'ZTRBILL-BILAMT'.
perform bdc_field using 'ZTRLR-TRTYP'
'N'.
perform bdc_field using 'ZTRLR-TRPTR'
'0000900036'.
perform bdc_field using 'ZTRLR-GJAHR'
'2004'.
perform bdc_field using 'ZTRBILL-BILNR'
'123456789'.
perform bdc_field using 'ZTRBILL-BILLDAT'
'08022006'.
perform bdc_field using 'ZTRBILL-BILAMT'
'10000'.
perform bdc_dynpro using 'ZTR_MP_LR_ASSIGN' '0002'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'BDC_CURSOR'
'ZTR_VIEW_LRAMT-LRAMT(14)'.
perform bdc_field using 'ZTR_VIEW_LRAMT-LRAMT(01)'
'2500'.
perform bdc_field using 'ZTR_VIEW_LRAMT-LRAMT(02)'
'2500'.
perform bdc_field using 'ZTR_VIEW_LRAMT-LRAMT(03)'
'2500'.
perform bdc_field using 'ZTR_VIEW_LRAMT-LRAMT(04)'
'2500'.
perform bdc_dynpro using 'ZTR_MP_LR_ASSIGN' '0002'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'BDC_CURSOR'
'ZTRLR-TRTYP'.
perform bdc_dynpro using 'ZTR_MP_LR_ASSIGN' '0002'.
perform bdc_field using 'BDC_OKCODE'
'=SAVE'.
perform bdc_field using 'BDC_CURSOR'
'ZTRLR-TRTYP'.
perform bdc_dynpro using 'ZTR_MP_LR_ASSIGN' '0001'.
perform bdc_field using 'BDC_OKCODE'
'/EEXIT'.
perform bdc_field using 'BDC_CURSOR'
'ZTRLR-TRTYP'.
perform bdc_transaction using 'ZTRBILL'.
&amp;lt;b&amp;gt;if rc &amp;lt;&amp;gt; 0.
  append itab to itab2.
  delete itab.
ENDIF.
endloop.&amp;lt;/b&amp;gt;perform close_group.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Wenceslaus G&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Feb 2006 05:58:11 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-02-09T05:58:11Z</dc:date>
    <item>
      <title>bdc error manageing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-error-manageing/m-p/1160914#M120426</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi '&lt;/P&gt;&lt;P&gt;need a little solution ,&lt;/P&gt;&lt;P&gt;iam doing a bdc of z transaction and need help &lt;/P&gt;&lt;P&gt;well i have to check the iinput with amounts &lt;/P&gt;&lt;P&gt;if user input amount suppose 10,000 , and after if the amonut is break into &lt;/P&gt;&lt;P&gt;suppose 2000,3000 4000 for same bill number and its should be equal to 1000 then &lt;/P&gt;&lt;P&gt;only the bdc has to perform other wise the requirement is it should store the &lt;/P&gt;&lt;P&gt;error(how to store in itab by appending or) into a error file and should not perform the bdc and very importnat that &lt;/P&gt;&lt;P&gt;error record should delete from internal table ...iam new so need help &lt;/P&gt;&lt;P&gt;pls &lt;/P&gt;&lt;P&gt;i will be thankfull if get  a sample code.&lt;/P&gt;&lt;P&gt;regards.&lt;/P&gt;&lt;P&gt;the code&lt;/P&gt;&lt;P&gt;data: begin of itab occurs 0 , &lt;/P&gt;&lt;P&gt;      trtyp  like ztrlr-trtyp,&lt;/P&gt;&lt;P&gt;      trptr  like ztrlr-trptr,&lt;/P&gt;&lt;P&gt;      gjhar  like ztrlr-gjhar,&lt;/P&gt;&lt;P&gt;      billdat like ztrlr-billdat,&lt;/P&gt;&lt;P&gt;      bilmat  like ztrlr-bilmat,&lt;/P&gt;&lt;P&gt;      lrno    like ztrlr-lrno,&lt;/P&gt;&lt;P&gt;      lramt   like ztrpaybrk-lramt,&lt;/P&gt;&lt;P&gt;      end of itab.&lt;/P&gt;&lt;P&gt;      &lt;/P&gt;&lt;P&gt;data: itab2 like itab occurs 0 with header line.   "to store error records.&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;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS :   p_fname LIKE ibipparms-path OBLIGATORY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;include bdcrecx1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform open_group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'ZTR_MP_LR_ASSIGN' '0001'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '=ENT'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'ZTRBILL-BILAMT'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'ZTRLR-TRTYP'&lt;/P&gt;&lt;P&gt;                              'N'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'ZTRLR-TRPTR'&lt;/P&gt;&lt;P&gt;                              '0000900036'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'ZTRLR-GJAHR'&lt;/P&gt;&lt;P&gt;                              '2004'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'ZTRBILL-BILNR'&lt;/P&gt;&lt;P&gt;                              '123456789'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'ZTRBILL-BILLDAT'&lt;/P&gt;&lt;P&gt;                              '08022006'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'ZTRBILL-BILAMT'&lt;/P&gt;&lt;P&gt;                              '10000'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'ZTR_MP_LR_ASSIGN' '0002'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'ZTR_VIEW_LRAMT-LRAMT(14)'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'ZTR_VIEW_LRAMT-LRAMT(01)'&lt;/P&gt;&lt;P&gt;                              '2500'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'ZTR_VIEW_LRAMT-LRAMT(02)'&lt;/P&gt;&lt;P&gt;                              '2500'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'ZTR_VIEW_LRAMT-LRAMT(03)'&lt;/P&gt;&lt;P&gt;                              '2500'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'ZTR_VIEW_LRAMT-LRAMT(04)'&lt;/P&gt;&lt;P&gt;                              '2500'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'ZTR_MP_LR_ASSIGN' '0002'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'ZTRLR-TRTYP'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'ZTR_MP_LR_ASSIGN' '0002'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '=SAVE'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'ZTRLR-TRTYP'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'ZTR_MP_LR_ASSIGN' '0001'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/EEXIT'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'ZTRLR-TRTYP'.&lt;/P&gt;&lt;P&gt;perform bdc_transaction using 'ZTRBILL'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform close_group.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Feb 2006 05:36:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-error-manageing/m-p/1160914#M120426</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-09T05:36:36Z</dc:date>
    </item>
    <item>
      <title>Re: bdc error manageing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-error-manageing/m-p/1160915#M120427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;"Check the data&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;perform bdc_transaction using 'FI01' changing err rc.

write:/ 'after calling transaction : rc ',rc,'   err ',err.

if rc &amp;lt;&amp;gt; 0.
    append record to erroritab.
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;"At your LOOP ... ENDLOOP&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT itab.
 IF err = 1.
   DELETE itab from itab.
 ENDIF.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Feb 2006 05:53:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-error-manageing/m-p/1160915#M120427</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-09T05:53:17Z</dc:date>
    </item>
    <item>
      <title>Re: bdc error manageing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-error-manageing/m-p/1160916#M120428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you can modify the include in the following way to include the of your BDC program...&lt;/P&gt;&lt;P&gt;this ia a modification made to the include bdcrecx1..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this code transfeers all the error msgs to an internal table..ERROR_ITAB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;  Include           YINCLUDE&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&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;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;  data definition&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;      Batchinputdata of single transaction&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA:   BDCDATA LIKE BDCDATA    OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      messages of call transaction&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA:   MESSTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      error session opened (' ' or 'X')&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA:   E_GROUP_OPENED.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      message texts&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;TABLES: T100 , crhd.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : itab_crhd like table of crhd with header line.&lt;/P&gt;&lt;P&gt;DATA : NODATA VALUE '/',&lt;/P&gt;&lt;P&gt;       CTUMODE LIKE CTU_PARAMS-DISMODE VALUE 'N',&lt;/P&gt;&lt;P&gt;        CUPDATE LIKE CTU_PARAMS-UPDMODE VALUE 'L'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : ERR TYPE STRING.&lt;/P&gt;&lt;P&gt;DATA : RC TYPE I,&lt;/P&gt;&lt;P&gt;       successcnt type i value 0,&lt;/P&gt;&lt;P&gt;       failcount type i value 0.&lt;/P&gt;&lt;P&gt;data : cntr type i value 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN.&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;/P&gt;&lt;P&gt;FORM OPEN_DATASET USING P_DATASET.&lt;/P&gt;&lt;P&gt;  OPEN DATASET P_DATASET&lt;/P&gt;&lt;P&gt;               FOR INPUT IN TEXT MODE&lt;/P&gt;&lt;P&gt;               ENCODING DEFAULT.&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    WRITE: / TEXT-E00, SY-SUBRC.&lt;/P&gt;&lt;P&gt;    STOP.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM CLOSE_DATASET USING P_DATASET.&lt;/P&gt;&lt;P&gt;  CLOSE DATASET P_DATASET.&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM BDC_TRANSACTION USING TCODE .&lt;/P&gt;&lt;P&gt;  DATA: L_MSTRING(480).&lt;/P&gt;&lt;P&gt;  DATA : BEGIN OF ERROR_ITAB OCCURS 0,&lt;/P&gt;&lt;P&gt;            ERROR(50),&lt;/P&gt;&lt;P&gt;            MSGTYP,&lt;/P&gt;&lt;P&gt;         END OF ERROR_ITAB.&lt;/P&gt;&lt;P&gt;  DATA : WA LIKE LINE OF ERROR_ITAB.&lt;/P&gt;&lt;P&gt;  DATA: L_SUBRC LIKE SY-SUBRC.&lt;/P&gt;&lt;P&gt;REFRESH MESSTAB.&lt;/P&gt;&lt;P&gt;    CALL TRANSACTION TCODE USING BDCDATA&lt;/P&gt;&lt;P&gt;                     MODE   'N'&lt;/P&gt;&lt;P&gt;                     UPDATE 'L'&lt;/P&gt;&lt;P&gt;                     MESSAGES INTO MESSTAB.&lt;/P&gt;&lt;P&gt;    L_SUBRC = SY-SUBRC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      LOOP AT MESSTAB.&lt;/P&gt;&lt;P&gt;      if messtab-msgtyp eq 'E'.&lt;/P&gt;&lt;P&gt;        SELECT SINGLE * FROM T100 WHERE SPRSL = MESSTAB-MSGSPRA&lt;/P&gt;&lt;P&gt;                                  AND   ARBGB = MESSTAB-MSGID&lt;/P&gt;&lt;P&gt;                                  AND   MSGNR = MESSTAB-MSGNR.&lt;/P&gt;&lt;P&gt;        IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;          L_MSTRING = T100-TEXT.&lt;/P&gt;&lt;P&gt;          IF L_MSTRING CS '&amp;amp;1'.&lt;/P&gt;&lt;P&gt;            REPLACE '&amp;amp;1' WITH MESSTAB-MSGV1 INTO L_MSTRING.&lt;/P&gt;&lt;P&gt;            REPLACE '&amp;amp;2' WITH MESSTAB-MSGV2 INTO L_MSTRING.&lt;/P&gt;&lt;P&gt;            REPLACE '&amp;amp;3' WITH MESSTAB-MSGV3 INTO L_MSTRING.&lt;/P&gt;&lt;P&gt;            REPLACE '&amp;amp;4' WITH MESSTAB-MSGV4 INTO L_MSTRING.&lt;/P&gt;&lt;P&gt;          ELSE.&lt;/P&gt;&lt;P&gt;            REPLACE '&amp;amp;' WITH MESSTAB-MSGV1 INTO L_MSTRING.&lt;/P&gt;&lt;P&gt;            REPLACE '&amp;amp;' WITH MESSTAB-MSGV2 INTO L_MSTRING.&lt;/P&gt;&lt;P&gt;            REPLACE '&amp;amp;' WITH MESSTAB-MSGV3 INTO L_MSTRING.&lt;/P&gt;&lt;P&gt;            REPLACE '&amp;amp;' WITH MESSTAB-MSGV4 INTO L_MSTRING.&lt;/P&gt;&lt;P&gt;          ENDIF.&lt;/P&gt;&lt;P&gt;          CONDENSE L_MSTRING.&lt;/P&gt;&lt;P&gt;          MOVE L_MSTRING TO ERROR_ITAB-ERROR.&lt;/P&gt;&lt;P&gt;          MOVE MESSTAB-MSGTYP TO ERROR_ITAB-MSGTYP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          APPEND ERROR_ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         delete error_itab where msgtyp = 'S'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        ELSE.&lt;/P&gt;&lt;P&gt;          MOVE  MESSTAB TO ERROR_ITAB-ERROR.&lt;/P&gt;&lt;P&gt;          APPEND ERROR_ITAB.&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;        clear itab_crhd.&lt;/P&gt;&lt;P&gt;refresh itab_crhd.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Feb 2006 05:55:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-error-manageing/m-p/1160916#M120428</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-09T05:55:47Z</dc:date>
    </item>
    <item>
      <title>Re: bdc error manageing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-error-manageing/m-p/1160917#M120429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A little modification of your code to suit your needs. Reply if more help is needed.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: begin of itab occurs 0 , 
trtyp like ztrlr-trtyp,
trptr like ztrlr-trptr,
gjhar like ztrlr-gjhar,
billdat like ztrlr-billdat,
bilmat like ztrlr-bilmat,
lrno like ztrlr-lrno,
lramt like ztrpaybrk-lramt,
end of itab.

data: itab2 like itab occurs 0 with header line. "to store error records.






PARAMETERS : p_fname LIKE ibipparms-path OBLIGATORY.

include bdcrecx1.

start-of-selection.

perform open_group.

&amp;lt;b&amp;gt;loop at itab.&amp;lt;/b&amp;gt;
perform bdc_dynpro using 'ZTR_MP_LR_ASSIGN' '0001'.
perform bdc_field using 'BDC_OKCODE'
'=ENT'.
perform bdc_field using 'BDC_CURSOR'
'ZTRBILL-BILAMT'.
perform bdc_field using 'ZTRLR-TRTYP'
'N'.
perform bdc_field using 'ZTRLR-TRPTR'
'0000900036'.
perform bdc_field using 'ZTRLR-GJAHR'
'2004'.
perform bdc_field using 'ZTRBILL-BILNR'
'123456789'.
perform bdc_field using 'ZTRBILL-BILLDAT'
'08022006'.
perform bdc_field using 'ZTRBILL-BILAMT'
'10000'.
perform bdc_dynpro using 'ZTR_MP_LR_ASSIGN' '0002'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'BDC_CURSOR'
'ZTR_VIEW_LRAMT-LRAMT(14)'.
perform bdc_field using 'ZTR_VIEW_LRAMT-LRAMT(01)'
'2500'.
perform bdc_field using 'ZTR_VIEW_LRAMT-LRAMT(02)'
'2500'.
perform bdc_field using 'ZTR_VIEW_LRAMT-LRAMT(03)'
'2500'.
perform bdc_field using 'ZTR_VIEW_LRAMT-LRAMT(04)'
'2500'.
perform bdc_dynpro using 'ZTR_MP_LR_ASSIGN' '0002'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'BDC_CURSOR'
'ZTRLR-TRTYP'.
perform bdc_dynpro using 'ZTR_MP_LR_ASSIGN' '0002'.
perform bdc_field using 'BDC_OKCODE'
'=SAVE'.
perform bdc_field using 'BDC_CURSOR'
'ZTRLR-TRTYP'.
perform bdc_dynpro using 'ZTR_MP_LR_ASSIGN' '0001'.
perform bdc_field using 'BDC_OKCODE'
'/EEXIT'.
perform bdc_field using 'BDC_CURSOR'
'ZTRLR-TRTYP'.
perform bdc_transaction using 'ZTRBILL'.
&amp;lt;b&amp;gt;if rc &amp;lt;&amp;gt; 0.
  append itab to itab2.
  delete itab.
ENDIF.
endloop.&amp;lt;/b&amp;gt;perform close_group.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Wenceslaus G&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Feb 2006 05:58:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-error-manageing/m-p/1160917#M120429</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-09T05:58:11Z</dc:date>
    </item>
  </channel>
</rss>

