<?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: batch input in my own program in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-input-in-my-own-program/m-p/1954927#M393002</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;You will have to place the Include bdcrecx1 statement at the top of ur program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Mahesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Feb 2007 08:14:50 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-02-09T08:14:50Z</dc:date>
    <item>
      <title>batch input in my own program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-input-in-my-own-program/m-p/1954922#M392997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem with the using of BDC (batch input).&lt;/P&gt;&lt;P&gt;I created a "executable" BDC program and want to use it in my own program. I can view my entries in a table control and have a button to push the data from "it_input" with the BDC perform instructions into the R/3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
MODULE pai_0100 INPUT.
  IF sy-ucomm = 'BACK' OR
     sy-ucomm = 'EXIT' OR
     sy-ucomm = 'CANCEL'.
     LEAVE PROGRAM.

  ELSE.

  DATA: l_date TYPE sy-datum.

  include bdcrecx1.

  perform open_group.

  LOOP AT it_input.

  perform bdc_dynpro      using 'SAPMM07M' '0400'.
  perform bdc_field       using 'BDC_CURSOR'
                                'MKPF-BLDAT'.
  perform bdc_field       using 'BDC_OKCODE'
                                '/00'.
  perform bdc_field       using 'MKPF-BLDAT'
                                l_date.
  perform bdc_field       using 'MKPF-BUDAT'
                                l_date.
  perform bdc_field       using 'RM07M-BWARTWA'
                                bwart.
  perform bdc_field       using 'RM07M-WERKS'
                                werks.
  perform bdc_field       using 'RM07M-LGORT'
                                lgort.
  perform bdc_field       using 'XFULL'
                                'X'.
  perform bdc_field       using 'RM07M-WVERS2'
                                'X'.
  perform bdc_dynpro      using 'SAPMM07M' '0421'.
  perform bdc_field       using 'BDC_CURSOR'
                                'MSEG-CHARG(01)'.
  perform bdc_field       using 'BDC_OKCODE'
                                '=BU'.
  perform bdc_field       using 'MSEG-MATNR(01)'
                                it_input-matnr.
  perform bdc_field       using 'MSEG-ERFMG(01)'
                                it_input-erfmg.
  perform bdc_field       using 'DKACB-FMORE'
                                'X'.
  perform bdc_dynpro      using 'SAPLKACB' '0002'.
  perform bdc_field       using 'BDC_CURSOR'
                                'COBL-KOSTL'.
  perform bdc_field       using 'BDC_OKCODE'
                                '=ENTE'.
  perform bdc_field       using 'COBL-KOSTL'
                                kostl.
  perform bdc_dynpro      using 'SAPLKACB' '0002'.
  perform bdc_field       using 'BDC_CURSOR'
                                'COBL-KOSTL'.
  perform bdc_field       using 'BDC_OKCODE'
                                '=ENTE'.
  perform bdc_field       using 'COBL-KOSTL'
                                kostl.
  perform bdc_transaction using 'MB1A'.

  ENDLOOP.

  perform close_group.


  ENDIF.
ENDMODULE.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I get an error: "before statement AT, the IF statement has to be closed with ENDIF."&lt;/P&gt;&lt;P&gt;That means I cannot put my BDC into the IF-statement where I ask which button is pressed. The AT statement determine in the "include".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  IF sy-ucomm = 'BACK' OR
     sy-ucomm = 'EXIT' OR
     sy-ucomm = 'CANCEL'.
     LEAVE PROGRAM.

  ELSE.

  DATA: l_date TYPE sy-datum.

  include bdcrecx1.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anybody an idea? Do I have to put my BDC into an new REPORT, and call this report with SUBMIT? But then I have to pass the complete it_input table and some variables...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Steffen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Feb 2007 07:59:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-input-in-my-own-program/m-p/1954922#M392997</guid>
      <dc:creator>former_member183924</dc:creator>
      <dc:date>2007-02-09T07:59:19Z</dc:date>
    </item>
    <item>
      <title>Re: batch input in my own program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-input-in-my-own-program/m-p/1954923#M392998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use include before calling module pai. hopefully this should work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward me if it works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Feb 2007 08:05:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-input-in-my-own-program/m-p/1954923#M392998</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-09T08:05:02Z</dc:date>
    </item>
    <item>
      <title>Re: batch input in my own program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-input-in-my-own-program/m-p/1954924#M392999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;move your "include bdcrecx" to the end of your program, else its FORM and ENDFORM are in the middle of your IF ENDIF. And Abap don't like it &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Feb 2007 08:06:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-input-in-my-own-program/m-p/1954924#M392999</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2007-02-09T08:06:30Z</dc:date>
    </item>
    <item>
      <title>Re: batch input in my own program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-input-in-my-own-program/m-p/1954925#M393000</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;/P&gt;&lt;P&gt;put your includes in your module-pool (Rahmenprogramm)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Andreas Mann&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Feb 2007 08:07:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-input-in-my-own-program/m-p/1954925#M393000</guid>
      <dc:creator>andreas_mann3</dc:creator>
      <dc:date>2007-02-09T08:07:13Z</dc:date>
    </item>
    <item>
      <title>Re: batch input in my own program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-input-in-my-own-program/m-p/1954926#M393001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Steffen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It might be because ome restriction in PAI Module. Use form-perform instead.&lt;/P&gt;&lt;P&gt;It should be like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE pai_0100 INPUT.&lt;/P&gt;&lt;P&gt;  IF sy-ucomm = 'BACK' OR&lt;/P&gt;&lt;P&gt;     sy-ucomm = 'EXIT' OR&lt;/P&gt;&lt;P&gt;     sy-ucomm = 'CANCEL'.&lt;/P&gt;&lt;P&gt;     LEAVE PROGRAM.&lt;/P&gt;&lt;P&gt;   ELSE.&lt;/P&gt;&lt;P&gt;     PERFORM form_mybdc. &lt;/P&gt;&lt;P&gt;   ENDIF.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then in some F01 programs, create the form&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM form_mybdc. &lt;/P&gt;&lt;P&gt;  DATA: l_date TYPE sy-datum.&lt;/P&gt;&lt;P&gt;   include bdcrecx1.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  perform open_group.&lt;/P&gt;&lt;P&gt;   LOOP AT it_input.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  perform bdc_dynpro      using 'SAPMM07M' '0400'.&lt;/P&gt;&lt;P&gt;  perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;  ... etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;  perform close_group.&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this help ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Dian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Feb 2007 08:08:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-input-in-my-own-program/m-p/1954926#M393001</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-09T08:08:14Z</dc:date>
    </item>
    <item>
      <title>Re: batch input in my own program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-input-in-my-own-program/m-p/1954927#M393002</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;You will have to place the Include bdcrecx1 statement at the top of ur program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Mahesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Feb 2007 08:14:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-input-in-my-own-program/m-p/1954927#M393002</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-09T08:14:50Z</dc:date>
    </item>
  </channel>
</rss>

