<?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 BATCH INPUT in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-input/m-p/1676093#M298186</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;How can i call a batch input in a report??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Oct 2006 20:14:39 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-10-26T20:14:39Z</dc:date>
    <item>
      <title>BATCH INPUT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-input/m-p/1676093#M298186</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;How can i call a batch input in a report??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Oct 2006 20:14:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-input/m-p/1676093#M298186</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-26T20:14:39Z</dc:date>
    </item>
    <item>
      <title>Re: BATCH INPUT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-input/m-p/1676094#M298187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use CALL TRANSACTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Oct 2006 20:16:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-input/m-p/1676094#M298187</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-26T20:16:47Z</dc:date>
    </item>
    <item>
      <title>Re: BATCH INPUT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-input/m-p/1676095#M298188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A simple call transaction report using batch input may look simular to this.  You can record the transaction using transaction SHDB, then copy the code to your program(just the PERFORM statements), then you can simply call the transaction using BDCDATA.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case, this program updates new standard prices for materials from a file on the PC which has material, plant and the new standard price, it uses transaction MR21 to update the system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0002
       no standard page heading
       line-size 132.

data: iflat type table of string with header line.

data: begin of itab occurs 0,
      matnr type marc-matnr,
      werks type marc-werks,
      stdpr(10) type c,
      end of itab.

data: pdate(10) type c.

data: bdcdata like bdcdata occurs 20 with header line,
      mode(1) type c value 'N'.

selection-screen skip 1.
parameters: p_file type localfile default
            'C:Std_Price.txt'.
parameters: p_date like sy-datum.
selection-screen skip 1.

at selection-screen on value-request for p_file.
  call function 'KD_GET_FILENAME_ON_F4'
       exporting
            static    = 'X'
       changing
            file_name = p_file.


start-of-selection.

  perform upload_data.
  perform process_records.


************************************************************************
* Upload_Data
************************************************************************
form upload_data.


  clear iflat. refresh iflat.
  clear itab. refresh itab.


  call function 'GUI_UPLOAD'
       exporting
            filename = p_file
       tables
            data_tab = iflat.


  loop at iflat.
    split iflat at ',' into itab-matnr itab-werks itab-stdpr.

    call function 'CONVERSION_EXIT_MATN1_INPUT'
         exporting
              input  = itab-matnr
         importing
              output = itab-matnr.
    append itab.
  endloop.

endform.

************************************************************************
* Process_Records
************************************************************************
form process_records.


  concatenate p_date+4(2) '/' p_date+6(2) '/' p_date(4)
          into pdate.

  loop at itab.

&amp;lt;b&amp;gt;
    perform bdc_dynpro      using 'SAPRCKM_MR21' '0201'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MR21HEAD-WERKS'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_field       using 'MR21HEAD-BUDAT'
                                pdate.
    perform bdc_field       using 'MR21HEAD-BUKRS'
                                  '0010'.
    perform bdc_field       using 'MR21HEAD-WERKS'
                                itab-werks.
    perform bdc_field       using 'MR21HEAD-SCREEN_VARIANT'
                                  'MR21_LAGERMATERIAL_0250'.
    perform bdc_dynpro      using 'SAPRCKM_MR21' '0201'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'CKI_MR21_0250-NEWVALPR(01)'.
    perform bdc_field       using 'MR21HEAD-SCREEN_VARIANT'
                                  'MR21_LAGERMATERIAL_BWKEY_0250'.
    perform bdc_field       using 'CKI_MR21_0250-MATNR(01)'
                                itab-matnr.
    perform bdc_field       using 'CKI_MR21_0250-NEWVALPR(01)'
                                itab-stdpr.
    perform bdc_dynpro      using 'SAPRCKM_MR21' '0201'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SAVE'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'CKI_MR21_0250-MATNR(02)'.
    perform bdc_field       using 'MR21HEAD-SCREEN_VARIANT'
                                  'MR21_LAGERMATERIAL_BWKEY_0250'.

    call transaction 'MR21' using bdcdata mode mode
            update 'S'.&amp;lt;/b&amp;gt;

    if sy-subrc = 0.
      write:/ 'S', itab-matnr, itab-werks,
      'updated successfully'.
    else.
      write:/ 'E', itab-matnr, itab-werks,
               'error trying to update'.
    endif.

    clear bdcdata.   refresh bdcdata.

  endloop.

endform.
&amp;lt;b&amp;gt;
************************************************************************
*      Form  BDC_DYNPRO
************************************************************************

form bdc_dynpro using  program dynpro.

  clear bdcdata.
  bdcdata-program = program.
  bdcdata-dynpro = dynpro.
  bdcdata-dynbegin = 'X'.
  append bdcdata.

endform.

************************************************************************
*      Form  BDC_FIELD
************************************************************************

form bdc_field using fnam fval.

  clear bdcdata.
  bdcdata-fnam = fnam.
  bdcdata-fval = fval.
  append bdcdata.

endform.&amp;lt;/b&amp;gt;

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Oct 2006 20:20:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-input/m-p/1676095#M298188</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-10-26T20:20:52Z</dc:date>
    </item>
    <item>
      <title>Re: BATCH INPUT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-input/m-p/1676096#M298189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This may also be helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm" target="test_blank"&gt;http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Oct 2006 20:23:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-input/m-p/1676096#M298189</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-10-26T20:23:20Z</dc:date>
    </item>
    <item>
      <title>Re: BATCH INPUT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-input/m-p/1676097#M298190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just incase you are reffering to type BINP, below info might be helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Each BINP refers to a program.&lt;/P&gt;&lt;P&gt;2. We can use SUBMIT statement for calling the program with the dataset name i.e path and file with data for uploading.&lt;/P&gt;&lt;P&gt;3. Each BINP Program has multi structures and can identified by record types.&lt;/P&gt;&lt;P&gt;4. For more on this you can refer to transactions: SXDA, SXDB and use menupath Goto-&amp;gt;DX Tools.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Eswar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Oct 2006 03:33:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-input/m-p/1676097#M298190</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-27T03:33:22Z</dc:date>
    </item>
    <item>
      <title>Re: BATCH INPUT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-input/m-p/1676098#M298191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am  going into the process of BATCH INPUT .And I need to load up students's table where his data come from a file excel and no himself like to program it &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks FOR HELP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 05 Aug 2007 17:29:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-input/m-p/1676098#M298191</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-05T17:29:33Z</dc:date>
    </item>
  </channel>
</rss>

