<?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 recording in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-recording/m-p/3777904#M909024</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1) prerequiste,, is that you msut be able to use a transaction for which you want to do the BDC. For example, you must know how to create a sales order using VA01 transaction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Go to transaction SHDB&lt;/P&gt;&lt;P&gt;3) Give the name of the transaction for which you want to do the BDC.&lt;/P&gt;&lt;P&gt;4) Go ahead and create the recording(GIve a name for your recording).&lt;/P&gt;&lt;P&gt;5) select your recording and click on the button in SHDB transaction itself, to create a BDC program for your recording.&lt;/P&gt;&lt;P&gt;6) Do minor twaeking to the generated code, if it doesn't fit your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi Kanth Talagana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 May 2008 14:48:43 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-02T14:48:43Z</dc:date>
    <item>
      <title>bdc recording</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-recording/m-p/3777903#M909023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI gurus,&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;      &lt;STRONG&gt;please send sample recoding procedure for call transaction.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kindly help me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2008 14:42:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-recording/m-p/3777903#M909023</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-02T14:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: bdc recording</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-recording/m-p/3777904#M909024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1) prerequiste,, is that you msut be able to use a transaction for which you want to do the BDC. For example, you must know how to create a sales order using VA01 transaction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Go to transaction SHDB&lt;/P&gt;&lt;P&gt;3) Give the name of the transaction for which you want to do the BDC.&lt;/P&gt;&lt;P&gt;4) Go ahead and create the recording(GIve a name for your recording).&lt;/P&gt;&lt;P&gt;5) select your recording and click on the button in SHDB transaction itself, to create a BDC program for your recording.&lt;/P&gt;&lt;P&gt;6) Do minor twaeking to the generated code, if it doesn't fit your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi Kanth Talagana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2008 14:48:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-recording/m-p/3777904#M909024</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-02T14:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: bdc recording</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-recording/m-p/3777905#M909025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is the procedure for recording with screen shots  :&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;http://www.sapdevelopment.co.uk/bdc/bdc_recording.htm&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Reward If helpful.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rock on May 2, 2008 4:59 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2008 14:49:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-recording/m-p/3777905#M909025</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-02T14:49:21Z</dc:date>
    </item>
    <item>
      <title>Re: bdc recording</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-recording/m-p/3777906#M909026</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;  &lt;STRONG&gt;i want step by step procedure.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;And my requirement is data should upload from flat flle  to&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;internal  table  .&lt;/STRONG&gt;&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;saritha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2008 15:09:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-recording/m-p/3777906#M909026</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-02T15:09:08Z</dc:date>
    </item>
    <item>
      <title>Re: bdc recording</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-recording/m-p/3777907#M909027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Depending on the source i.e presentation or application server upload the data into an internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for presentation server use function module gui_upload.&lt;/P&gt;&lt;P&gt;for application server use open dataset statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at the internal table which receives the uploaded data and split values depending on the separator into the internal table format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Indranil&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Award points if helpful&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2008 16:09:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-recording/m-p/3777907#M909027</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-02T16:09:32Z</dc:date>
    </item>
    <item>
      <title>Re: bdc recording</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-recording/m-p/3777908#M909028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;goto SHDB transaction create a new recording for the particular transaction...save the recording and select the program and click the tab PROGRAM ...u wil get all the recording in program and select transfer from recording.save the program ...and then u wil get the code in se38...&lt;/P&gt;&lt;P&gt;depending upon u r requirement and what are the feilds u have filled in transaction....create a internal table......and by using call transaction upload the data from flat file....&lt;/P&gt;&lt;P&gt;here is a sample program for xk01 transaction.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES : BEGIN OF st_vendor,&lt;/P&gt;&lt;P&gt;         ktokk TYPE rf02k-ktokk,               "account group&lt;/P&gt;&lt;P&gt;         anred TYPE lfa1-anred,                "title&lt;/P&gt;&lt;P&gt;         name1 TYPE lfa1-name1,                "vendor name&lt;/P&gt;&lt;P&gt;         sortl TYPE lfa1-sortl,                "search term&lt;/P&gt;&lt;P&gt;         pstlz TYPE lfa1-pstlz,                "postal code&lt;/P&gt;&lt;P&gt;         land1 TYPE lfa1-land1,                "country&lt;/P&gt;&lt;P&gt;         banks TYPE lfbk-banks,&lt;/P&gt;&lt;P&gt;         bankl TYPE lfbk-bankl,                "bank key&lt;/P&gt;&lt;P&gt;         bankn TYPE lfbk-bankn,                "account number&lt;/P&gt;&lt;P&gt;        END OF st_vendor.&lt;/P&gt;&lt;P&gt;TYPES : BEGIN OF st_success,&lt;/P&gt;&lt;P&gt;         lifnr TYPE lfa1-lifnr,                 "vendor number&lt;/P&gt;&lt;P&gt;         name TYPE lfa1-name1,                  "vendor name&lt;/P&gt;&lt;P&gt;        END OF st_success.&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF st_error,&lt;/P&gt;&lt;P&gt;        linno TYPE i,                           "line number&lt;/P&gt;&lt;P&gt;        message TYPE string,                    "error message&lt;/P&gt;&lt;P&gt;       END OF st_error.&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;             INTERNAL TABLE DECLARATIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;             WORK AREA DECLARATIONS&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;DATA : it_vendor TYPE STANDARD TABLE OF st_vendor,&lt;/P&gt;&lt;P&gt;       wa_vendor TYPE st_vendor,&lt;/P&gt;&lt;P&gt;       it_success TYPE STANDARD TABLE OF st_success,&lt;/P&gt;&lt;P&gt;       wa_success TYPE st_success,&lt;/P&gt;&lt;P&gt;       it_error TYPE STANDARD TABLE OF st_error,&lt;/P&gt;&lt;P&gt;       wa_error TYPE st_error,&lt;/P&gt;&lt;P&gt;       it_bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;       it_message LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.&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 DECLARATION&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;DATA : v_file TYPE string,&lt;/P&gt;&lt;P&gt;       v_tcode(4) VALUE 'XK01',&lt;/P&gt;&lt;P&gt;       v_index LIKE sy-tabix,&lt;/P&gt;&lt;P&gt;       v_totalrec TYPE i,&lt;/P&gt;&lt;P&gt;       v_errrec TYPE i,&lt;/P&gt;&lt;P&gt;       v_succrec TYPE i.&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;               SELECTION SCREEN&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;SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.&lt;/P&gt;&lt;P&gt;PARAMETERS: p_file TYPE rlgrap-filename.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK b1.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-010.&lt;/P&gt;&lt;P&gt;PARAMETERS p_mode LIKE ctu_params-dismode DEFAULT 'N' .&lt;/P&gt;&lt;P&gt;"A: show all dynpros&lt;/P&gt;&lt;P&gt;"E: show dynpro on error only&lt;/P&gt;&lt;P&gt;"N: do not display dynpro&lt;/P&gt;&lt;P&gt;PARAMETERS p_update LIKE ctu_params-updmode DEFAULT 'S'.&lt;/P&gt;&lt;P&gt;"S: synchronously&lt;/P&gt;&lt;P&gt;"A: asynchronously&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK b2.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-011.&lt;/P&gt;&lt;P&gt;PARAMETERS : p_group(12) DEFAULT '50871'.         "group name for error session&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK b3.&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;           AT  SELECTION SCREEN ON VALUE-REQUEST&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;AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'F4_FILENAME'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      program_name  = syst-cprog&lt;/P&gt;&lt;P&gt;      dynpro_number = syst-dynnr&lt;/P&gt;&lt;P&gt;      field_name    = ' '&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      file_name     = p_file.&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;              START-OF-SELECTION&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;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;  v_file = p_file.&lt;/P&gt;&lt;P&gt;*gui upload&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'GUI_UPLOAD'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      filename                = v_file&lt;/P&gt;&lt;P&gt;      filetype                = 'ASC'&lt;/P&gt;&lt;P&gt;      has_field_separator     = 'X'&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      data_tab                = it_vendor&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      file_open_error         = 1&lt;/P&gt;&lt;P&gt;      file_read_error         = 2&lt;/P&gt;&lt;P&gt;      no_batch                = 3&lt;/P&gt;&lt;P&gt;      gui_refuse_filetransfer = 4&lt;/P&gt;&lt;P&gt;      invalid_type            = 5&lt;/P&gt;&lt;P&gt;      no_authority            = 6&lt;/P&gt;&lt;P&gt;      unknown_error           = 7&lt;/P&gt;&lt;P&gt;      bad_data_format         = 8&lt;/P&gt;&lt;P&gt;      header_not_allowed      = 9&lt;/P&gt;&lt;P&gt;      separator_not_allowed   = 10&lt;/P&gt;&lt;P&gt;      header_too_long         = 11&lt;/P&gt;&lt;P&gt;      unknown_dp_error        = 12&lt;/P&gt;&lt;P&gt;      access_denied           = 13&lt;/P&gt;&lt;P&gt;      dp_out_of_memory        = 14&lt;/P&gt;&lt;P&gt;      disk_full               = 15&lt;/P&gt;&lt;P&gt;      dp_timeout              = 16&lt;/P&gt;&lt;P&gt;      OTHERS                  = 17.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;*loadind data into it_bdcdata&lt;/P&gt;&lt;P&gt;  LOOP AT it_vendor INTO wa_vendor.&lt;/P&gt;&lt;P&gt;    v_index = sy-tabix.&lt;/P&gt;&lt;P&gt;    PERFORM load_bdcdata.&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;              CALL TRANSACTION&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;    CALL TRANSACTION v_tcode USING it_bdcdata&lt;/P&gt;&lt;P&gt;                          MODE     p_mode&lt;/P&gt;&lt;P&gt;                          UPDATE p_update&lt;/P&gt;&lt;P&gt;                          MESSAGES INTO it_message.&lt;/P&gt;&lt;P&gt;*reading success&lt;/P&gt;&lt;P&gt;    IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;      READ TABLE it_message WITH KEY msgtyp = 'S'.&lt;/P&gt;&lt;P&gt;      IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;        wa_success-lifnr = it_message-msgv1.&lt;/P&gt;&lt;P&gt;        wa_success-name =  wa_vendor-name1.&lt;/P&gt;&lt;P&gt;        APPEND wa_success TO it_success.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt;*reading errors&lt;/P&gt;&lt;P&gt;      READ TABLE  it_message WITH KEY msgtyp =  'E'.&lt;/P&gt;&lt;P&gt;      IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;        CALL FUNCTION 'FORMAT_MESSAGE'&lt;/P&gt;&lt;P&gt;          EXPORTING&lt;/P&gt;&lt;P&gt;            id  = sy-msgid&lt;/P&gt;&lt;P&gt;            no  = it_message-msgnr&lt;/P&gt;&lt;P&gt;            v1  = it_message-msgv1&lt;/P&gt;&lt;P&gt;            v2  = it_message-msgv2&lt;/P&gt;&lt;P&gt;            v3  = it_message-msgv3&lt;/P&gt;&lt;P&gt;            v4  = it_message-msgv4&lt;/P&gt;&lt;P&gt;          IMPORTING&lt;/P&gt;&lt;P&gt;            msg = wa_error-message.&lt;/P&gt;&lt;P&gt;        wa_error-linno = v_index.&lt;/P&gt;&lt;P&gt;        APPEND wa_error TO it_error.&lt;/P&gt;&lt;P&gt;        CLEAR wa_error.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;*session opening&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_group&lt;/P&gt;&lt;P&gt;          holddate = sy-datum&lt;/P&gt;&lt;P&gt;          keep     = 'X'&lt;/P&gt;&lt;P&gt;          user     = sy-uname.&lt;/P&gt;&lt;P&gt;*inserting into session&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;P&gt;        TABLES&lt;/P&gt;&lt;P&gt;          dynprotab = it_bdcdata.&lt;/P&gt;&lt;P&gt;*closing session&lt;/P&gt;&lt;P&gt;      CALL FUNCTION 'BDC_CLOSE_GROUP'.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;    CLEAR: it_bdcdata, it_message.&lt;/P&gt;&lt;P&gt;    REFRESH: it_bdcdata, it_message.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&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;              SUMMARY DISPLAY&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;  DESCRIBE TABLE it_vendor LINES v_totalrec.&lt;/P&gt;&lt;P&gt;  DESCRIBE TABLE it_error LINES v_errrec.&lt;/P&gt;&lt;P&gt;  v_succrec = v_totalrec - v_errrec .&lt;/P&gt;&lt;P&gt;  WRITE : /1 text-004 COLOR 1.&lt;/P&gt;&lt;P&gt;  WRITE : /2 'Total Records Processed :', 25 v_totalrec,&lt;/P&gt;&lt;P&gt;          /2 'Error Records           :', 25 v_errrec,&lt;/P&gt;&lt;P&gt;          /2 'Successful Records      :', 25 v_succrec.&lt;/P&gt;&lt;P&gt;  SKIP 2.&lt;/P&gt;&lt;P&gt;  WRITE : /1 text-005 COLOR 1.&lt;/P&gt;&lt;P&gt;  LOOP AT it_error INTO wa_error.&lt;/P&gt;&lt;P&gt;    WRITE:/2 wa_error-linno,&lt;/P&gt;&lt;P&gt;          wa_error-message.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;  SKIP 2.&lt;/P&gt;&lt;P&gt;  WRITE : /1 text-009 COLOR 1.&lt;/P&gt;&lt;P&gt;  ULINE AT : /2(46).&lt;/P&gt;&lt;P&gt;  WRITE :/2 sy-vline ,(10) 'VENDOR NUM' , 15 sy-vline , 17 'VENDOR NAME' , 47 sy-vline.&lt;/P&gt;&lt;P&gt;  ULINE AT : /2(46).&lt;/P&gt;&lt;P&gt;  LOOP AT it_success INTO wa_success.&lt;/P&gt;&lt;P&gt;    WRITE:/2 sy-vline , wa_success-lifnr, 15 sy-vline , 17 wa_success-name , 47 sy-vline.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;  ULINE AT : /2(46).&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  append_bdcdata&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;FORM append_bdcdata  USING  p_flag p_fname p_fval.&lt;/P&gt;&lt;P&gt;  CLEAR it_bdcdata.&lt;/P&gt;&lt;P&gt;  IF p_flag = 'X'.&lt;/P&gt;&lt;P&gt;    it_bdcdata-program  = p_fname.&lt;/P&gt;&lt;P&gt;    it_bdcdata-dynpro   = p_fval.&lt;/P&gt;&lt;P&gt;    it_bdcdata-dynbegin = 'X'.&lt;/P&gt;&lt;P&gt;    APPEND it_bdcdata.&lt;/P&gt;&lt;P&gt;  ELSEIF NOT p_fval IS INITIAL.&lt;/P&gt;&lt;P&gt;    it_bdcdata-fnam = p_fname.&lt;/P&gt;&lt;P&gt;    it_bdcdata-fval = p_fval.&lt;/P&gt;&lt;P&gt;    APPEND it_bdcdata.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDFORM.                    "append_bdcdata&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  load_bdcdata&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;FORM load_bdcdata .&lt;/P&gt;&lt;P&gt;  PERFORM append_bdcdata  USING : 'X' 'SAPMF02K' '0100',&lt;/P&gt;&lt;P&gt;                                 ' ' 'BDC_OKCODE' '/00',&lt;/P&gt;&lt;P&gt;                                 ' ' 'RF02K-KTOKK' wa_vendor-ktokk,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                                 'X' 'SAPMF02K' '0110',&lt;/P&gt;&lt;P&gt;                                 ' ' 'BDC_OKCODE'  '/00',&lt;/P&gt;&lt;P&gt;                                 ' ' 'LFA1-ANRED' wa_vendor-anred,&lt;/P&gt;&lt;P&gt;                                 ' '   'LFA1-NAME1' wa_vendor-name1,&lt;/P&gt;&lt;P&gt;                                 ' '  'LFA1-SORTL' wa_vendor-sortl,&lt;/P&gt;&lt;P&gt;                                 ' '  'LFA1-PSTLZ'  wa_vendor-pstlz,&lt;/P&gt;&lt;P&gt;                                 ' '   'LFA1-LAND1' wa_vendor-land1,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                                 'X' 'SAPMF02K' '0120',&lt;/P&gt;&lt;P&gt;                                 ' ' 'BDC_OKCODE' '/00',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                                 'X' 'SAPMF02K' '0130',&lt;/P&gt;&lt;P&gt;                                 ' ' 'BDC_OKCODE' '=ENTR',&lt;/P&gt;&lt;P&gt;                                 ' ' 'LFBK-BANKS(01)'  wa_vendor-banks,&lt;/P&gt;&lt;P&gt;                                 ' ' 'LFBK-BANKL(01)' wa_vendor-bankl,&lt;/P&gt;&lt;P&gt;                                 ' ' 'LFBK-BANKN(01)' wa_vendor-bankn,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                                 'X' 'SAPMF02K' '0130',&lt;/P&gt;&lt;P&gt;                                 ' ' 'BDC_OKCODE' '=ENTR',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                                 'X' 'SAPLSPO1' '0300',&lt;/P&gt;&lt;P&gt;                                 ' ' 'BDC_OKCODE' '=YES'.&lt;/P&gt;&lt;P&gt;ENDFORM.                    " load_bdcdata&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2008 16:29:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-recording/m-p/3777908#M909028</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-02T16:29:52Z</dc:date>
    </item>
    <item>
      <title>Re: bdc recording</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-recording/m-p/3777909#M909029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi check this .....&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/309cb157-738d-2910-7691-b74c4ddba3c7" target="test_blank"&gt;https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/309cb157-738d-2910-7691-b74c4ddba3c7&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/new%2bpage" target="test_blank"&gt;https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/new%2bpage&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is the code for call transaction in different modes....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report zmppc018 no standard page heading&lt;/P&gt;&lt;P&gt;line-size 120&lt;/P&gt;&lt;P&gt;line-count 55&lt;/P&gt;&lt;P&gt;message-id zz.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Constants &lt;/P&gt;&lt;P&gt;constants : c_x type c value 'X'," Dynbegin&lt;/P&gt;&lt;P&gt;c_tcode type tstc-tcode value 'CA22'," Transaction Code&lt;/P&gt;&lt;P&gt;c_r(1) type c value 'R'," Task List type&lt;/P&gt;&lt;P&gt;c_O(1) type c value 'O',&lt;/P&gt;&lt;P&gt;c_fh(2) type c value 'FH'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variables &lt;/P&gt;&lt;P&gt;data : v_lines_in_xcel like sy-tabix,&lt;/P&gt;&lt;P&gt;v_matnr(18) type c, " Material Number&lt;/P&gt;&lt;P&gt;v_PLNNR like mapl-plnnr," Group&lt;/P&gt;&lt;P&gt;V_DATE(8) type c," System date&lt;/P&gt;&lt;P&gt;v_date1(4) type c,&lt;/P&gt;&lt;P&gt;v_date2(2) type c,&lt;/P&gt;&lt;P&gt;v_date3(2) type c,&lt;/P&gt;&lt;P&gt;V_COUNT TYPE I." Count&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Internal table for BDCDATA Structure &lt;/P&gt;&lt;P&gt;data : begin of itab_bdc_tab occurs 0.&lt;/P&gt;&lt;P&gt;include structure bdcdata.&lt;/P&gt;&lt;P&gt;data : end of itab_bdc_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Internal table for File &lt;/P&gt;&lt;P&gt;data : begin of t_file occurs 0,&lt;/P&gt;&lt;P&gt;matnr(18) type c, " Material #&lt;/P&gt;&lt;P&gt;werks(4) type c, " Plant&lt;/P&gt;&lt;P&gt;plnal(2) type n, " Group Counter&lt;/P&gt;&lt;P&gt;vornr(4) type n, " Op #&lt;/P&gt;&lt;P&gt;equnr(18) type c, " PRT Material #&lt;/P&gt;&lt;P&gt;steuf(4) type c, " Control Key&lt;/P&gt;&lt;P&gt;mgvgw(6) type n, " Qty&lt;/P&gt;&lt;P&gt;mgeinh(3) type c, " Qty Unit&lt;/P&gt;&lt;P&gt;end of t_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Internal table for Error Log &lt;/P&gt;&lt;P&gt;data : begin of i_error occurs 0,&lt;/P&gt;&lt;P&gt;matnr like mara-matnr,&lt;/P&gt;&lt;P&gt;werks like marc-werks,&lt;/P&gt;&lt;P&gt;vornr like plpo-vornr,&lt;/P&gt;&lt;P&gt;plnnr like plpo-plnnr,&lt;/P&gt;&lt;P&gt;text(90) type c,&lt;/P&gt;&lt;P&gt;end of i_error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Selection-screen &lt;/P&gt;&lt;P&gt;selection-screen : begin of block blk with frame.&lt;/P&gt;&lt;P&gt;selection-screen: skip 1.&lt;/P&gt;&lt;P&gt;parameters : p_file like rlgrap-filename obligatory,&lt;/P&gt;&lt;P&gt;P_mode type c obligatory Default 'N'.&lt;/P&gt;&lt;P&gt;selection-screen : skip 1.&lt;/P&gt;&lt;P&gt;selection-screen : end of block blk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at selection-screen on value-request for p_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;F4 value for Input file &lt;/P&gt;&lt;P&gt;perform filename_get.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;main processing &lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To get the data from file to Internal table &lt;/P&gt;&lt;P&gt;perform getdata_fromfile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at t_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fill in bdc-data for Routing maintenance screens &lt;/P&gt;&lt;P&gt;perform bdc_build_script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;insert the bdc script as a BDC transaction &lt;/P&gt;&lt;P&gt;perform bdc_submit_transaction.&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;top-of-page.&lt;/P&gt;&lt;P&gt;call function 'Z_HEADER'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXPORTING &lt;/P&gt;&lt;P&gt;FLEX_TEXT1 = &lt;/P&gt;&lt;P&gt;FLEX_TEXT2 = &lt;/P&gt;&lt;P&gt;FLEX_TEXT3 = &lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;skip 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write:/2 'Material #',24 'Plant',32 'Group',44 'Op #',&lt;/P&gt;&lt;P&gt;53 'Status Message'.&lt;/P&gt;&lt;P&gt;skip 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Form filename_get&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;F4 Value for Input File parameter &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;FORM filename_get.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'WS_FILENAME_GET'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;DEF_PATH = 'C:Temp '&lt;/P&gt;&lt;P&gt;MASK = ',.,..'&lt;/P&gt;&lt;P&gt;MODE = 'O'&lt;/P&gt;&lt;P&gt;TITLE = 'Select File '(007)&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;FILENAME = p_file&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;INV_WINSYS = 1&lt;/P&gt;&lt;P&gt;NO_BATCH = 2&lt;/P&gt;&lt;P&gt;SELECTION_CANCEL = 3&lt;/P&gt;&lt;P&gt;SELECTION_ERROR = 4&lt;/P&gt;&lt;P&gt;OTHERS = 5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " filename_get&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Form getdata_fromfile&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;text &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;FORM getdata_fromfile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'WS_UPLOAD'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;FILENAME = p_file&lt;/P&gt;&lt;P&gt;FILETYPE = 'DAT'&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;DATA_TAB = t_file&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;CONVERSION_ERROR = 1&lt;/P&gt;&lt;P&gt;FILE_OPEN_ERROR = 2&lt;/P&gt;&lt;P&gt;FILE_READ_ERROR = 3&lt;/P&gt;&lt;P&gt;INVALID_TYPE = 4&lt;/P&gt;&lt;P&gt;NO_BATCH = 5&lt;/P&gt;&lt;P&gt;UNKNOWN_ERROR = 6&lt;/P&gt;&lt;P&gt;INVALID_TABLE_WIDTH = 7&lt;/P&gt;&lt;P&gt;GUI_REFUSE_FILETRANSFER = 8&lt;/P&gt;&lt;P&gt;CUSTOMER_ERROR = 9&lt;/P&gt;&lt;P&gt;OTHERS = 10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort t_file by matnr werks plnal vornr .&lt;/P&gt;&lt;P&gt;clear v_lines_in_xcel.&lt;/P&gt;&lt;P&gt;describe table t_file lines v_lines_in_xcel.&lt;/P&gt;&lt;P&gt;if v_lines_in_xcel is initial.&lt;/P&gt;&lt;P&gt;write: / 'No data in input file'.&lt;/P&gt;&lt;P&gt;stop.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;write:/ 'Error reading input file'.&lt;/P&gt;&lt;P&gt;stop.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " getdata_fromfile&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Form bdc_build_script&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BDC Script &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;FORM bdc_build_script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Get the material number from tables ZMSMI_FERR_RAW, &lt;/P&gt;&lt;P&gt;ZMSMI_SNAP_RAW and ZMSMI_SIMP_RAW &lt;/P&gt;&lt;P&gt;perform get_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Screen 1010. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_screen using 'SAPLCPDI' '1010'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE' '=VOUE'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RC27M-MATNR' SPACE .&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RC27M-WERKS' SPACE.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RC271-VBELN' SPACE.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RC271-POSNR' SPACE.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RC271-PSPNR' SPACE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clear v_plnnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Get the Group from MAPL Table &lt;/P&gt;&lt;P&gt;select single plnnr from mapl&lt;/P&gt;&lt;P&gt;into v_plnnr&lt;/P&gt;&lt;P&gt;where matnr = t_file-matnr&lt;/P&gt;&lt;P&gt;and werks = t_file-werks&lt;/P&gt;&lt;P&gt;and loekz = space&lt;/P&gt;&lt;P&gt;and plnty = c_r&lt;/P&gt;&lt;P&gt;and plnal = t_file-plnal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RC271-PLNNR' v_plnnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Current date &lt;/P&gt;&lt;P&gt;MOVE SY-DATUM TO V_DATE. &lt;/P&gt;&lt;P&gt;perform get_date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RC271-STTAG' V_DATE.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RC271-PLNAL' t_file-plnal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Screen 5400 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_screen using 'SAPLCPDI' '5400'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE' '=OSEA'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Screen 1010 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_screen using 'SAPLCP02' '1010'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE' '=ENT1'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RC27H-VORNR' T_FILE-VORNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Screen 5400 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_screen using 'SAPLCPDI' '5400'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE' '=FHUE'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RC27X-FLG_SEL(01)' C_X.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Get the no of records from PLAS,PLPO and PLFH Tables &lt;/P&gt;&lt;P&gt;perform get_count.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Screen 0200 &lt;/P&gt;&lt;P&gt;IF V_COUNT = 0.&lt;/P&gt;&lt;P&gt;perform bdc_screen using 'SAPLCFDI' '0200'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE' '/EFIM'.&lt;/P&gt;&lt;P&gt;ELSEif v_count &amp;gt; 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Screen 0100 &lt;/P&gt;&lt;P&gt;perform bdc_screen using 'SAPLCFDI' '0100'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE' '/EFIM'.&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;Screen 0230 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_screen using 'SAPLCFDI' '0200'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE' '=BACK'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'PLFHD-MATNR' T_FILE-EQUNR.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'PLFHD-STEUF' T_FILE-STEUF.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'PLFHD-MGVGW' T_FILE-mgvgw.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'PLFHD-MGEINH' T_FILE-MGEINH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Screen 0100 &lt;/P&gt;&lt;P&gt;perform bdc_screen using 'SAPLCFDI' '0100'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE' '=BU'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " bdc_build_script&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Form get_matnr&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Get the material number from tables ZMSMI_FERR_RAW, &lt;/P&gt;&lt;P&gt;ZMSMI_SNAP_RAW and ZMSMI_SIMP_RAW &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;FORM get_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear v_matnr.&lt;/P&gt;&lt;P&gt;case t_file-werks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when '0101'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single cmatnr from zmsmi_simp_raw&lt;/P&gt;&lt;P&gt;into v_matnr where matnr = t_file-matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not v_matnr is initial.&lt;/P&gt;&lt;P&gt;clear t_file-matnr.&lt;/P&gt;&lt;P&gt;t_file-matnr = v_matnr.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when '0103'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single cmatnr from zmsmi_ferr_raw&lt;/P&gt;&lt;P&gt;into v_matnr where matnr = t_file-matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not v_matnr is initial.&lt;/P&gt;&lt;P&gt;clear t_file-matnr.&lt;/P&gt;&lt;P&gt;t_file-matnr = v_matnr.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when '0102' or '0110' or '0111' or '0112' or '0113'&lt;/P&gt;&lt;P&gt;or '0114' or '0115' or '0116' or '0117'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single cmatnr from zmsmi_snap_raw&lt;/P&gt;&lt;P&gt;into v_matnr where matnr = t_file-matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not v_matnr is initial.&lt;/P&gt;&lt;P&gt;clear t_file-matnr.&lt;/P&gt;&lt;P&gt;t_file-matnr = v_matnr.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " get_matnr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Form bdc_screen&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BDC Script for Screen fields &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&amp;gt;P_PROG Program name &lt;/P&gt;&lt;P&gt;--&amp;gt;P_SCRN Screen Number &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;FORM bdc_screen USING p_prog&lt;/P&gt;&lt;P&gt;p_scrn.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear itab_bdc_tab.&lt;/P&gt;&lt;P&gt;itab_bdc_tab-program = p_prog.&lt;/P&gt;&lt;P&gt;itab_bdc_tab-dynpro = p_scrn.&lt;/P&gt;&lt;P&gt;itab_bdc_tab-dynbegin = c_x.&lt;/P&gt;&lt;P&gt;append itab_bdc_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " bdc_screen&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Form bdc_field&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BDC Script for Screen fileds &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&amp;gt;P_NAM Field name &lt;/P&gt;&lt;P&gt;--&amp;gt;P_VAL Field value &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;FORM bdc_field USING p_nam&lt;/P&gt;&lt;P&gt;p_val.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear itab_bdc_tab.&lt;/P&gt;&lt;P&gt;itab_bdc_tab-fnam = p_nam.&lt;/P&gt;&lt;P&gt;itab_bdc_tab-fval = p_val.&lt;/P&gt;&lt;P&gt;append itab_bdc_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " bdc_field&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Form bdc_submit_transaction&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BDC_INSERT Function Module &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;FORM bdc_submit_transaction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call transaction c_tcode using itab_bdc_tab&lt;/P&gt;&lt;P&gt;mode p_mode update 'S'.&lt;/P&gt;&lt;P&gt;refresh itab_bdc_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'FORMAT_MESSAGE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;ID = SY-MSGID&lt;/P&gt;&lt;P&gt;LANG = '-E'&lt;/P&gt;&lt;P&gt;NO = SY-MSGNO&lt;/P&gt;&lt;P&gt;V1 = SY-MSGV1&lt;/P&gt;&lt;P&gt;V2 = SY-MSGV2&lt;/P&gt;&lt;P&gt;V3 = SY-MSGV3&lt;/P&gt;&lt;P&gt;V4 = SY-MSGV4&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;MSG = i_error-text&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;i_error-matnr = t_file-matnr.&lt;/P&gt;&lt;P&gt;i_error-werks = t_file-werks.&lt;/P&gt;&lt;P&gt;i_error-plnnr = v_plnnr.&lt;/P&gt;&lt;P&gt;i_error-vornr = t_file-vornr.&lt;/P&gt;&lt;P&gt;append i_error.&lt;/P&gt;&lt;P&gt;clear i_error.&lt;/P&gt;&lt;P&gt;clear t_file.&lt;/P&gt;&lt;P&gt;ENDFORM. " bdc_submit_transaction&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Form get_date&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Converted date as per CA22 Transaction &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;FORM get_date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear : v_date,&lt;/P&gt;&lt;P&gt;v_date1,&lt;/P&gt;&lt;P&gt;v_date2,&lt;/P&gt;&lt;P&gt;v_date3.&lt;/P&gt;&lt;P&gt;v_date1 = sy-datum+0(4).&lt;/P&gt;&lt;P&gt;v_date2 = sy-datum+4(2).&lt;/P&gt;&lt;P&gt;v_date3 = sy-datum+6(2).&lt;/P&gt;&lt;P&gt;concatenate v_date2 v_date3 v_date1 into v_date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " get_date&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Form get_count&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;text &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;FORM get_count.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear v_count.&lt;/P&gt;&lt;P&gt;select count(*) into v_count&lt;/P&gt;&lt;P&gt;from plas as a inner join plpo as b on a&lt;SUB&gt;plnty = b&lt;/SUB&gt;plnty&lt;/P&gt;&lt;P&gt;and a&lt;SUB&gt;plnnr = b&lt;/SUB&gt;plnnr&lt;/P&gt;&lt;P&gt;and a&lt;SUB&gt;plnkn = b&lt;/SUB&gt;plnkn&lt;/P&gt;&lt;P&gt;inner join plfh as c on c&lt;SUB&gt;plnty = a&lt;/SUB&gt;plnty&lt;/P&gt;&lt;P&gt;and c&lt;SUB&gt;plnnr = a&lt;/SUB&gt;plnnr&lt;/P&gt;&lt;P&gt;and c&lt;SUB&gt;plnal = a&lt;/SUB&gt;plnal&lt;/P&gt;&lt;P&gt;and c&lt;SUB&gt;plnfl = a&lt;/SUB&gt;plnfl&lt;/P&gt;&lt;P&gt;and c&lt;SUB&gt;plnkn = b&lt;/SUB&gt;plnkn&lt;/P&gt;&lt;P&gt;where a~plnty = c_r&lt;/P&gt;&lt;P&gt;and a~plnnr = v_plnnr&lt;/P&gt;&lt;P&gt;and a~plnal = t_file-plnal&lt;/P&gt;&lt;P&gt;and c~objct = c_O&lt;/P&gt;&lt;P&gt;and a~loekz = space&lt;/P&gt;&lt;P&gt;and b~vornr = t_file-vornr&lt;/P&gt;&lt;P&gt;and c~objty = c_fh&lt;/P&gt;&lt;P&gt;and c~loekz = space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " get_count&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Displaying Error Log &lt;/P&gt;&lt;P&gt;loop at i_error.&lt;/P&gt;&lt;P&gt;write:/2 i_error-matnr,24 i_error-werks,32 i_error-plnnr,&lt;/P&gt;&lt;P&gt;44 i_error-vornr,50 '-', 53 i_error-text.&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;regards,&lt;/P&gt;&lt;P&gt;venkat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2008 17:48:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-recording/m-p/3777909#M909029</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-02T17:48:58Z</dc:date>
    </item>
    <item>
      <title>Re: bdc recording</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-recording/m-p/3777910#M909030</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Saritha,&lt;/P&gt;&lt;P&gt;Check below steps.&lt;/P&gt;&lt;P&gt;First thing is u will not be doing recording by uploading the file. Recording will be done manually to put the logic in ur program&lt;/P&gt;&lt;P&gt;1. Open transaction &lt;STRONG&gt;SHDB&lt;/STRONG&gt;. Press New recording button in tool bar.&lt;/P&gt;&lt;P&gt;2. Give Recording name and transaction name. Press enter.&lt;/P&gt;&lt;P&gt;3. Now it will take u to the transaction initial screen.&lt;/P&gt;&lt;P&gt;4. fill in all the details in the transaction. Finally press save.&lt;/P&gt;&lt;P&gt;5. Make sure that u are using right test case for recording. If u record with wrong test data then it will create hevoc in ur program.&lt;/P&gt;&lt;P&gt;6. Now u will come back to recording screen with all the details entered in the transaction.&lt;/P&gt;&lt;P&gt;7. Now write ur program for BDC. U have to populate ur bdcdata internal table in the same order as they appear after recording.&lt;/P&gt;&lt;P&gt;8. For uploading flat file u can use somany FMs like &lt;STRONG&gt;GUI_UPLOAD&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;9. After getting the data into internal table follow below skeliton.&lt;/P&gt;&lt;P&gt;10. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT itab INTO wa_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;REFRESH: i_bdcdata[], i_messages[].&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Above statement is the common mistake which all of us does(We will miss this statement). So take care of this.&lt;/P&gt;&lt;P&gt;Populate BDCDATA internal table.&lt;/P&gt;&lt;P&gt;CALL TRANSACTION...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Display error log if any&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it is clear now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinod.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 May 2008 11:02:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-recording/m-p/3777910#M909030</guid>
      <dc:creator>vinod_vemuru2</dc:creator>
      <dc:date>2008-05-03T11:02:46Z</dc:date>
    </item>
  </channel>
</rss>

