<?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 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1371865#M182927</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai Prakash&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The BDCMSGCOLL does not have the messages text. It has only the message type, number and message parameters. &lt;/P&gt;&lt;P&gt;You have to read the message text. (recall that the database table T100 stores all the messages.) &lt;/P&gt;&lt;P&gt;There are more than one method of doing this. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Following is the psuedocode for one of the methods. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP for the internal table IT1 which has data value from flat file. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call transcation using.... &lt;/P&gt;&lt;P&gt;if SY-SUBRC &amp;lt;&amp;gt; 0. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read the dictionary table T100 FOR ALL ENTRIES in BDCMSGCOLL. &lt;/P&gt;&lt;P&gt;(also use the condition T100-SPRAS = SY-LANGU (the log on language. This is because you need only the message texts in English if the user is logged in English language) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF message type is E , then, transfer the contents of this particular error record to file x. (TRANSFER......) &lt;/P&gt;&lt;P&gt;( Ignore all other messages. Only consider type 'E' messages. Ignore other types of messages.) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(You can also store the message text from T100 and the error record in another internal table IT2) &lt;/P&gt;&lt;P&gt;..... &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;Please note that the client might ask you for a file of records which could not be uploaded. &lt;/P&gt;&lt;P&gt;Give him the file created in the above psuedocode. (most often you will have to do this). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise just display the error messages and the error records in the internal table IT2 in the form of a list. &lt;/P&gt;&lt;P&gt;Thats it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternatively, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of &lt;/P&gt;&lt;P&gt;" Read the dictionary table T100 FOR ALL ENTRIES in BDCMSGCOLL." &lt;/P&gt;&lt;P&gt;you can use the function module &lt;/P&gt;&lt;P&gt;WRITE_MESSAGES to read the messages. &lt;/P&gt;&lt;P&gt;Please refer to the function module for the list of parameters. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also refer FORMAT_MESSAGES function module. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the following Code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report Z_CALLTRANS_VENDOR_01&lt;/P&gt;&lt;P&gt;no standard page heading line-size 255.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;Generated data section with specific formatting - DO NOT CHANGE ***&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;data: begin of it_lfa1 occurs 0,&lt;/P&gt;&lt;P&gt;KTOKK like lfa1-ktokk,&lt;/P&gt;&lt;P&gt;NAME1 like lfa1-name1,&lt;/P&gt;&lt;P&gt;SORTL like lfa1-sortl,&lt;/P&gt;&lt;P&gt;LAND1 like lfa1-land1,&lt;/P&gt;&lt;P&gt;end of it_lfa1.&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;End generated data section ***&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;data : it_bdc like bdcdata occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*DATA: IT_MESSAGES TYPE TABLE OF BDCMSGCOLL WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;*DATA: LV_MESSAGE(255).&lt;/P&gt;&lt;P&gt;data : it_messages like bdcmsgcoll occurs 0 with header line.&lt;/P&gt;&lt;P&gt;data : V_message(255).&lt;/P&gt;&lt;P&gt;data : V_flag.&lt;/P&gt;&lt;P&gt;data : V_datum1 type sy-datum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : begin of it_mesg occurs 0,&lt;/P&gt;&lt;P&gt;message(100),&lt;/P&gt;&lt;P&gt;end of it_mesg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*V_datum1 = sy-datum-1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters : P_Sess like APQI-GROUPID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;perform Get_data.&lt;/P&gt;&lt;P&gt;*perform open_group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_lfa1.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02K' '0100'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'RF02K-KTOKK'.&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 'RF02K-KTOKK'&lt;/P&gt;&lt;P&gt;it_lfa1-KTOKK.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02K' '0110'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'LFA1-LAND1'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=UPDA'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'LFA1-NAME1'&lt;/P&gt;&lt;P&gt;it_lfa1-name1.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'LFA1-SORTL'&lt;/P&gt;&lt;P&gt;it_lfa1-sortl.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'LFA1-LAND1'&lt;/P&gt;&lt;P&gt;it_lfa1-land1.&lt;/P&gt;&lt;P&gt;call transaction 'XK01' using it_bdc&lt;/P&gt;&lt;P&gt;mode 'N'&lt;/P&gt;&lt;P&gt;update 'S'&lt;/P&gt;&lt;P&gt;messages into it_messages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;if V_flag &amp;lt;&amp;gt; 'X'.&lt;/P&gt;&lt;P&gt;perform open_group.&lt;/P&gt;&lt;P&gt;V_flag = 'X'.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;perform bdc_transaction. "using 'XK01'.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;perform format_messages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;refresh : it_bdc,it_messages.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;if V_flag = 'X'.&lt;/P&gt;&lt;P&gt;perform close_group.&lt;/P&gt;&lt;P&gt;endif.&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; Form Get_data&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;text&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;--&amp;gt; p1 text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;&amp;lt;-- p2 text&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;P&gt;FORM Get_data .&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'UPLOAD'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;FILENAME = 'C:\srinu_vendor.txt'&lt;/P&gt;&lt;P&gt;FILETYPE = 'DAT'&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;DATA_TAB = it_lfa1&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;CONVERSION_ERROR = 1&lt;/P&gt;&lt;P&gt;INVALID_TABLE_WIDTH = 2&lt;/P&gt;&lt;P&gt;INVALID_TYPE = 3&lt;/P&gt;&lt;P&gt;NO_BATCH = 4&lt;/P&gt;&lt;P&gt;UNKNOWN_ERROR = 5&lt;/P&gt;&lt;P&gt;GUI_REFUSE_FILETRANSFER = 6&lt;/P&gt;&lt;P&gt;OTHERS = 7&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " Get_data&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; Form bdc_dynpro&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;text&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;--&amp;gt;P_0061 text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;--&amp;gt;P_0062 text&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;P&gt;FORM BDC_DYNPRO USING PROGRAM DYNPRO.&lt;/P&gt;&lt;P&gt;CLEAR it_BDC.&lt;/P&gt;&lt;P&gt;it_BDC-PROGRAM = PROGRAM.&lt;/P&gt;&lt;P&gt;it_BDC-DYNPRO = DYNPRO.&lt;/P&gt;&lt;P&gt;it_BDC-DYNBEGIN = 'X'.&lt;/P&gt;&lt;P&gt;APPEND it_BDC.&lt;/P&gt;&lt;P&gt;ENDFORM.&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;Insert field *&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;P&gt;FORM BDC_FIELD USING FNAM FVAL.&lt;/P&gt;&lt;P&gt;CLEAR it_BDC.&lt;/P&gt;&lt;P&gt;it_BDC-FNAM = FNAM.&lt;/P&gt;&lt;P&gt;it_BDC-FVAL = FVAL.&lt;/P&gt;&lt;P&gt;APPEND it_BDC.&lt;/P&gt;&lt;P&gt;ENDFORM.&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; Form format_messages&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;text&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;--&amp;gt; p1 text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;&amp;lt;-- p2 text&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;P&gt;FORM format_messages .&lt;/P&gt;&lt;P&gt;loop at it_messages.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'FORMAT_MESSAGE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;ID = it_messages-MSGID&lt;/P&gt;&lt;P&gt;LANG = 'EN'&lt;/P&gt;&lt;P&gt;NO = it_messages-MSGNR&lt;/P&gt;&lt;P&gt;V1 = it_messages-MSGV1&lt;/P&gt;&lt;P&gt;V2 = it_messages-MSGV2&lt;/P&gt;&lt;P&gt;V3 = it_messages-MSGV3&lt;/P&gt;&lt;P&gt;V4 = it_messages-MSGV4&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;MSG = V_message&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;NOT_FOUND = 1&lt;/P&gt;&lt;P&gt;OTHERS = 2&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;write : / V_message.&lt;/P&gt;&lt;P&gt;clear : V_message.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;ENDFORM. " format_messages&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; Form open_group&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;text&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;--&amp;gt; p1 text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;&amp;lt;-- p2 text&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;P&gt;FORM open_group .&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BDC_OPEN_GROUP'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;CLIENT = SY-MANDT&lt;/P&gt;&lt;P&gt;GROUP = P_Sess&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;HOLDDATE = V_datum1&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;KEEP = 'X'&lt;/P&gt;&lt;P&gt;USER = SY-UNAME&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;write : / 'Session Creating wit Name : ',P_Sess.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " open_group&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; Form close_group&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;text&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;--&amp;gt; p1 text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;&amp;lt;-- p2 text&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;P&gt;FORM close_group .&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BDC_CLOSE_GROUP'.&lt;/P&gt;&lt;P&gt;ENDFORM. " close_group&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; Form bdc_transaction&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;text&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;--&amp;gt;P_0132 text&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;P&gt;FORM bdc_transaction. "USING VALUE(P_0132).&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BDC_INSERT'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;TCODE = 'XK01'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;POST_LOCAL = NOVBLOCAL&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;PRINTING = NOPRINT&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;SIMUBATCH = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CTUPARAMS = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;DYNPROTAB = it_bdc&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;INTERNAL_ERROR = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;NOT_OPEN = 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;QUEUE_ERROR = 3&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;TCODE_INVALID = 4&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;PRINTING_INVALID = 5&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;POSTING_INVALID = 6&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;OTHERS = 7&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " bdc_transaction&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; regards&lt;/P&gt;&lt;P&gt;Sreenivasulu P&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 Jun 2006 11:59:34 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-06-02T11:59:34Z</dc:date>
    <item>
      <title>Bdc</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1371857#M182919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Frens,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; how do i handle error in the middle of data transfer in BDC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jun 2006 11:05:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1371857#M182919</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-02T11:05:18Z</dc:date>
    </item>
    <item>
      <title>Re: Bdc</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1371858#M182920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;if you are using call transaction then put the mode as &amp;lt;b&amp;gt;'E'&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jun 2006 11:06:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1371858#M182920</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-02T11:06:46Z</dc:date>
    </item>
    <item>
      <title>Re: Bdc</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1371859#M182921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;run  the  bdc  in  mode   'E'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jun 2006 11:08:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1371859#M182921</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-02T11:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: Bdc</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1371860#M182922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe you cannot validate once the screen is started processing. The BDC process will only pass values the screen and calls the function code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hence we need to validate the data before assigning them to screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt; Thomas.&lt;/P&gt;&lt;P&gt; Please mark points if helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jun 2006 11:10:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1371860#M182922</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-02T11:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: Bdc</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1371861#M182923</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;If u want to handle error in the middle of the BDC,&lt;/P&gt;&lt;P&gt;it is not possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when u make the session, if u use the sesion method,&lt;/P&gt;&lt;P&gt;then u can process the session in foreground and then if any error occurs u can able to correct them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when it is in background u can't able to handle it in the middle of the BDC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When U call transaction also is the same case.&lt;/P&gt;&lt;P&gt;U have to process it in foreground.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But u can able to catch the errors and process the session once again by changing the file or correcting the errors...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Simha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jun 2006 11:11:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1371861#M182923</guid>
      <dc:creator>Simha_</dc:creator>
      <dc:date>2006-06-02T11:11:37Z</dc:date>
    </item>
    <item>
      <title>Re: Bdc</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1371862#M182924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;type the command /bde in the command field for switching from forground mode to display err only mode or give mode E statically in your CALL TRANSACTION statement..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Abdul Hakim&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark all useful answers..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jun 2006 11:12:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1371862#M182924</guid>
      <dc:creator>abdul_hakim</dc:creator>
      <dc:date>2006-06-02T11:12:56Z</dc:date>
    </item>
    <item>
      <title>Re: Bdc</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1371863#M182925</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;by using the mode 'E' if error comes your transaction will stop for correction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wasim Ahmed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jun 2006 11:14:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1371863#M182925</guid>
      <dc:creator>dani_mn</dc:creator>
      <dc:date>2006-06-02T11:14:04Z</dc:date>
    </item>
    <item>
      <title>Re: Bdc</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1371864#M182926</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;for the error records create the session, and then handle the errors later when you free.&lt;/P&gt;&lt;P&gt;or else use MODE E so that you can handle the errors there it self...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jun 2006 11:28:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1371864#M182926</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-02T11:28:26Z</dc:date>
    </item>
    <item>
      <title>Re: Bdc</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1371865#M182927</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai Prakash&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The BDCMSGCOLL does not have the messages text. It has only the message type, number and message parameters. &lt;/P&gt;&lt;P&gt;You have to read the message text. (recall that the database table T100 stores all the messages.) &lt;/P&gt;&lt;P&gt;There are more than one method of doing this. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Following is the psuedocode for one of the methods. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP for the internal table IT1 which has data value from flat file. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call transcation using.... &lt;/P&gt;&lt;P&gt;if SY-SUBRC &amp;lt;&amp;gt; 0. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read the dictionary table T100 FOR ALL ENTRIES in BDCMSGCOLL. &lt;/P&gt;&lt;P&gt;(also use the condition T100-SPRAS = SY-LANGU (the log on language. This is because you need only the message texts in English if the user is logged in English language) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF message type is E , then, transfer the contents of this particular error record to file x. (TRANSFER......) &lt;/P&gt;&lt;P&gt;( Ignore all other messages. Only consider type 'E' messages. Ignore other types of messages.) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(You can also store the message text from T100 and the error record in another internal table IT2) &lt;/P&gt;&lt;P&gt;..... &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;Please note that the client might ask you for a file of records which could not be uploaded. &lt;/P&gt;&lt;P&gt;Give him the file created in the above psuedocode. (most often you will have to do this). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise just display the error messages and the error records in the internal table IT2 in the form of a list. &lt;/P&gt;&lt;P&gt;Thats it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternatively, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of &lt;/P&gt;&lt;P&gt;" Read the dictionary table T100 FOR ALL ENTRIES in BDCMSGCOLL." &lt;/P&gt;&lt;P&gt;you can use the function module &lt;/P&gt;&lt;P&gt;WRITE_MESSAGES to read the messages. &lt;/P&gt;&lt;P&gt;Please refer to the function module for the list of parameters. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also refer FORMAT_MESSAGES function module. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the following Code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report Z_CALLTRANS_VENDOR_01&lt;/P&gt;&lt;P&gt;no standard page heading line-size 255.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;Generated data section with specific formatting - DO NOT CHANGE ***&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;data: begin of it_lfa1 occurs 0,&lt;/P&gt;&lt;P&gt;KTOKK like lfa1-ktokk,&lt;/P&gt;&lt;P&gt;NAME1 like lfa1-name1,&lt;/P&gt;&lt;P&gt;SORTL like lfa1-sortl,&lt;/P&gt;&lt;P&gt;LAND1 like lfa1-land1,&lt;/P&gt;&lt;P&gt;end of it_lfa1.&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;End generated data section ***&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;data : it_bdc like bdcdata occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*DATA: IT_MESSAGES TYPE TABLE OF BDCMSGCOLL WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;*DATA: LV_MESSAGE(255).&lt;/P&gt;&lt;P&gt;data : it_messages like bdcmsgcoll occurs 0 with header line.&lt;/P&gt;&lt;P&gt;data : V_message(255).&lt;/P&gt;&lt;P&gt;data : V_flag.&lt;/P&gt;&lt;P&gt;data : V_datum1 type sy-datum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : begin of it_mesg occurs 0,&lt;/P&gt;&lt;P&gt;message(100),&lt;/P&gt;&lt;P&gt;end of it_mesg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*V_datum1 = sy-datum-1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters : P_Sess like APQI-GROUPID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;perform Get_data.&lt;/P&gt;&lt;P&gt;*perform open_group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_lfa1.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02K' '0100'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'RF02K-KTOKK'.&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 'RF02K-KTOKK'&lt;/P&gt;&lt;P&gt;it_lfa1-KTOKK.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02K' '0110'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'LFA1-LAND1'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=UPDA'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'LFA1-NAME1'&lt;/P&gt;&lt;P&gt;it_lfa1-name1.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'LFA1-SORTL'&lt;/P&gt;&lt;P&gt;it_lfa1-sortl.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'LFA1-LAND1'&lt;/P&gt;&lt;P&gt;it_lfa1-land1.&lt;/P&gt;&lt;P&gt;call transaction 'XK01' using it_bdc&lt;/P&gt;&lt;P&gt;mode 'N'&lt;/P&gt;&lt;P&gt;update 'S'&lt;/P&gt;&lt;P&gt;messages into it_messages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;if V_flag &amp;lt;&amp;gt; 'X'.&lt;/P&gt;&lt;P&gt;perform open_group.&lt;/P&gt;&lt;P&gt;V_flag = 'X'.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;perform bdc_transaction. "using 'XK01'.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;perform format_messages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;refresh : it_bdc,it_messages.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;if V_flag = 'X'.&lt;/P&gt;&lt;P&gt;perform close_group.&lt;/P&gt;&lt;P&gt;endif.&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; Form Get_data&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;text&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;--&amp;gt; p1 text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;&amp;lt;-- p2 text&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;P&gt;FORM Get_data .&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'UPLOAD'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;FILENAME = 'C:\srinu_vendor.txt'&lt;/P&gt;&lt;P&gt;FILETYPE = 'DAT'&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;DATA_TAB = it_lfa1&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;CONVERSION_ERROR = 1&lt;/P&gt;&lt;P&gt;INVALID_TABLE_WIDTH = 2&lt;/P&gt;&lt;P&gt;INVALID_TYPE = 3&lt;/P&gt;&lt;P&gt;NO_BATCH = 4&lt;/P&gt;&lt;P&gt;UNKNOWN_ERROR = 5&lt;/P&gt;&lt;P&gt;GUI_REFUSE_FILETRANSFER = 6&lt;/P&gt;&lt;P&gt;OTHERS = 7&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " Get_data&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; Form bdc_dynpro&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;text&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;--&amp;gt;P_0061 text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;--&amp;gt;P_0062 text&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;P&gt;FORM BDC_DYNPRO USING PROGRAM DYNPRO.&lt;/P&gt;&lt;P&gt;CLEAR it_BDC.&lt;/P&gt;&lt;P&gt;it_BDC-PROGRAM = PROGRAM.&lt;/P&gt;&lt;P&gt;it_BDC-DYNPRO = DYNPRO.&lt;/P&gt;&lt;P&gt;it_BDC-DYNBEGIN = 'X'.&lt;/P&gt;&lt;P&gt;APPEND it_BDC.&lt;/P&gt;&lt;P&gt;ENDFORM.&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;Insert field *&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;P&gt;FORM BDC_FIELD USING FNAM FVAL.&lt;/P&gt;&lt;P&gt;CLEAR it_BDC.&lt;/P&gt;&lt;P&gt;it_BDC-FNAM = FNAM.&lt;/P&gt;&lt;P&gt;it_BDC-FVAL = FVAL.&lt;/P&gt;&lt;P&gt;APPEND it_BDC.&lt;/P&gt;&lt;P&gt;ENDFORM.&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; Form format_messages&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;text&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;--&amp;gt; p1 text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;&amp;lt;-- p2 text&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;P&gt;FORM format_messages .&lt;/P&gt;&lt;P&gt;loop at it_messages.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'FORMAT_MESSAGE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;ID = it_messages-MSGID&lt;/P&gt;&lt;P&gt;LANG = 'EN'&lt;/P&gt;&lt;P&gt;NO = it_messages-MSGNR&lt;/P&gt;&lt;P&gt;V1 = it_messages-MSGV1&lt;/P&gt;&lt;P&gt;V2 = it_messages-MSGV2&lt;/P&gt;&lt;P&gt;V3 = it_messages-MSGV3&lt;/P&gt;&lt;P&gt;V4 = it_messages-MSGV4&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;MSG = V_message&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;NOT_FOUND = 1&lt;/P&gt;&lt;P&gt;OTHERS = 2&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;write : / V_message.&lt;/P&gt;&lt;P&gt;clear : V_message.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;ENDFORM. " format_messages&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; Form open_group&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;text&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;--&amp;gt; p1 text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;&amp;lt;-- p2 text&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;P&gt;FORM open_group .&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BDC_OPEN_GROUP'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;CLIENT = SY-MANDT&lt;/P&gt;&lt;P&gt;GROUP = P_Sess&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;HOLDDATE = V_datum1&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;KEEP = 'X'&lt;/P&gt;&lt;P&gt;USER = SY-UNAME&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;write : / 'Session Creating wit Name : ',P_Sess.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " open_group&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; Form close_group&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;text&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;--&amp;gt; p1 text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;&amp;lt;-- p2 text&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;P&gt;FORM close_group .&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BDC_CLOSE_GROUP'.&lt;/P&gt;&lt;P&gt;ENDFORM. " close_group&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; Form bdc_transaction&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;text&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;--&amp;gt;P_0132 text&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;P&gt;FORM bdc_transaction. "USING VALUE(P_0132).&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BDC_INSERT'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;TCODE = 'XK01'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;POST_LOCAL = NOVBLOCAL&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;PRINTING = NOPRINT&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;SIMUBATCH = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CTUPARAMS = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;DYNPROTAB = it_bdc&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;INTERNAL_ERROR = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;NOT_OPEN = 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;QUEUE_ERROR = 3&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;TCODE_INVALID = 4&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;PRINTING_INVALID = 5&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;POSTING_INVALID = 6&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;OTHERS = 7&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " bdc_transaction&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; regards&lt;/P&gt;&lt;P&gt;Sreenivasulu P&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jun 2006 11:59:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1371865#M182927</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-02T11:59:34Z</dc:date>
    </item>
    <item>
      <title>Re: Bdc</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1371866#M182928</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Prakash,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once the transaction is called, the user has no control over the processing if its in &amp;lt;b&amp;gt;Mode N&amp;lt;/b&amp;gt; (No screen mode). In &amp;lt;b&amp;gt;Mod E&amp;lt;/b&amp;gt; &amp;lt;i&amp;gt;(Show error screens only)&amp;lt;/i&amp;gt; user can take the proper action.  So any error handling, if its to be automated  should be planned before the Call Transaction.&lt;/P&gt;&lt;P&gt;You can get the details of the error message using the following function module &amp;lt;b&amp;gt;BAPI_MESSAGE_GETDETAIL&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;You can get the error details to be passed from table &amp;lt;b&amp;gt;T100&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Arun Sambargi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Arun Sambargi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Arun Sambargi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jun 2006 14:07:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1371866#M182928</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-02T14:07:46Z</dc:date>
    </item>
  </channel>
</rss>

