Quantcast
Viewing all articles
Browse latest Browse all 10425

Re: Problem related to bdc

For each transaction your calling BDC and your capturing the messages after the Loop at Final.

 

Write the message logic inside the Loop at it_Final .

it will capture for each trasnaction you process inside the Loop.

 

if you keep loop at message out side the loop it may only take the last record messages into it.

LOOP AT it_final.

***BDC DATA***

CALL TRANSACTION 'FB01' USING bdcdata

                             MODE p_mode

                              MESSAGES INTO i_messtab.

 

LOOP AT i_messtab.

     IF NOT i_messtab[] IS INITIAL.

       CALL FUNCTION 'BAPI_MESSAGE_GETDETAIL'

         EXPORTING

           id         = sy-msgid

           number     = sy-msgno

           language   = sy-langu

           textformat = 'ASC'

           message_v1 = sy-msgv1

           message_v2 = sy-msgv2

           message_v3 = sy-msgv3

           message_v4 = sy-msgv4

         IMPORTING

           message    = l_message.

       .

       CONCATENATE l_message '-' it_final-newko it_final-wrbtr it_final-budat INTO it_error-text

       SEPARATED BY ' '.

       APPEND it_error.

     ELSE.

       CONCATENATE 'DATA UPLOADED SUCCESSFULLY :' it_final-newko  it_final-wrbtr it_final-budat

       INTO it_success-text SEPARATED BY ' '.

       APPEND it_success.

     ENDIF.

     REFRESH bdcdata.

     CLEAR: it_final,l_message.

 

   ENDLOOP.

****endform.                            

ENDLOOP.


Viewing all articles
Browse latest Browse all 10425

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>