<?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 Call Transaction in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-transaction/m-p/3725319#M896615</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Explain different mode in Call Transaction.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Apr 2008 13:29:35 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-04-28T13:29:35Z</dc:date>
    <item>
      <title>Call Transaction</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-transaction/m-p/3725319#M896615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Explain different mode in Call Transaction.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Apr 2008 13:29:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-transaction/m-p/3725319#M896615</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-28T13:29:35Z</dc:date>
    </item>
    <item>
      <title>Re: Call Transaction</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-transaction/m-p/3725320#M896616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;CALL TRANSACTION tcod ... MODE mode &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The specified processing mode can accept the following values: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'A' Display screen &lt;/P&gt;&lt;P&gt;'E' Display screen only if an error occurs &lt;/P&gt;&lt;P&gt;'N' No display &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the addition MODE is not specified, the processing mode is set to 'A' .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The MODE Parameter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the MODE parameter to specify whether data transfer processing should be displayed as it happens. You can choose between three modes: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A Display all. All screens and the data that goes in them appear when you run your program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;N No display. All screens are processed invisibly, regardless of whether there are errors or not. Control returns to your program as soon as transaction processing is finished. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E Display errors only. The transaction goes into display mode as soon as an error in one of the screens is detected. You can then correct the error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a look at below link for details:&lt;/P&gt;&lt;P&gt;[Using CALL TRANSACTION USING for Data Transfer |http://help.sap.com/saphelp_sm32/helpdata/en/fa/09715a543b11d1898e0000e8322d00/content.htm] &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vibha&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please mark all the useful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Apr 2008 13:33:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-transaction/m-p/3725320#M896616</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-28T13:33:08Z</dc:date>
    </item>
    <item>
      <title>Re: Call Transaction</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-transaction/m-p/3725321#M896617</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;CALL TRANSACTION - bdc_options &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax &lt;/P&gt;&lt;P&gt;... { {[MODE mode] [UPDATE upd]} &lt;/P&gt;&lt;P&gt;    | [OPTIONS FROM opt] } &lt;/P&gt;&lt;P&gt;    [MESSAGES INTO itab] ... . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Extras: &lt;/P&gt;&lt;P&gt;1. ... MODE mode &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. ... UPDATE upd &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. ... OPTIONS FROM opt &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. ... MESSAGES INTO itab &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Control of batch input processing with the USING addition. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... MODE mode &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;The MODE addition determines the processing mode for batch input processing. As mode, you can specify a character-type data object. Its possible content and effect is displayed in the following table. Without use of one of the additions MODE or OPTIONS FROM, the effect is the same as if mode had the content "A". &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mode Effect &lt;/P&gt;&lt;P&gt;"A" Processing with display of screens &lt;/P&gt;&lt;P&gt;"E" Display of screens only if an error occurs &lt;/P&gt;&lt;P&gt;"N" Processing without display of screens. If a breakpoint is reached in one of the called transactions, processing is terminated with sy-subrc same as 1001. The field sy-msgty contains "S", sy-msgid contains "00", sy-msgno contains "344", sy-msgv1 contains "SAPMSSY3", and sy-msgv2 contains "0131". &lt;/P&gt;&lt;P&gt;"P" Processing without display of the screens. If a breakpoint is reached in one of the called transactions, the system branches to the ABAP Debugger. &lt;/P&gt;&lt;P&gt;Others Like "A".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Apr 2008 13:43:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-transaction/m-p/3725321#M896617</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-28T13:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: Call Transaction</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-transaction/m-p/3725322#M896618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi check this program for the different modes in call transaction...&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;&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;ENDFORM. " get_count&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end-of-selection.&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>Mon, 28 Apr 2008 13:47:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-transaction/m-p/3725322#M896618</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-28T13:47:12Z</dc:date>
    </item>
  </channel>
</rss>

