<?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: Using BDC Background/Foreground in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-bdc-background-foreground/m-p/7781276#M1585463</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The error implies that in the flow of the Tcode: PO13, it goes into a screen which has a GUI SPLIT Container. Since there is no access to GUI components in background mode the session throws an exception, while it works fine in foreground mode, as it has access to the GUI Components.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Soln: Generate a new recording in SHDB, and while creating the recording choose "Simulate Background Mode" and try, if this doesn't work then possible workarounds are as given below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Workaround: Check if there is a way to alter the screen flow, so that it can avoid this screen where it needs GUI interaction. Alternatively a better solution would be to look for a BAPI/FM which could replicate the "PO13" functionality.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If neither of the above are possible, then the only option left would be to run this in foreground always.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 31 Mar 2011 10:47:53 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-03-31T10:47:53Z</dc:date>
    <item>
      <title>Using BDC Background/Foreground</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-bdc-background-foreground/m-p/7781270#M1585457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am writing a BDC batch program to upload details via the PO13 (Maintain Position) screen. Everything appears to work&lt;/P&gt;&lt;P&gt;ok. A BDC session is created and I can see this in SM35.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I run the session in the foreground everyting works ok and the new records are entered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, If I run the session in the background then errors appear and no records are committed.&lt;/P&gt;&lt;P&gt;I get the error 'Runtime error RAISE_EXCEPTION has occurred'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would anyone know looking at my code below what I need to do in order to get things working.&lt;/P&gt;&lt;P&gt;I would really appreciate any help on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; 

  LOOP AT excel_tab INTO excel_wa WHERE error IS INITIAL.

    PERFORM bdc_dynpro USING 'SAPMH5A0'          '5100'.
    PERFORM bdc_field  USING 'BDC_CURSOR'        'PM0D1-SEARK'.
    PERFORM bdc_field  USING 'BDC_OKCODE'        '/00'.
    PERFORM bdc_field  USING 'PPHDR-PLVAR'       '01'.
    PERFORM bdc_field  USING 'PM0D1-SEARK'       excel_wa-position.
    PERFORM bdc_field  USING 'PM0D1-TIMR6'       'X'.
    PERFORM bdc_field  USING 'PPHDR-BEGDA'       '01.03.2011'.
    PERFORM bdc_field  USING 'PPHDR-ENDDA'       '31.12.9999'.
    PERFORM bdc_dynpro USING 'SAPMH5A0'          '5100'.
    PERFORM bdc_field  USING 'BDC_OKCODE'        '=INSE'.
    PERFORM bdc_field  USING 'PPHDR-PLVAR'       '01'.
    PERFORM bdc_field  USING 'BDC_CURSOR'        'TT_T777T-ITEXT(08)'.
    PERFORM bdc_field  USING 'PM0D1-SEARK'       excel_wa-position.
    PERFORM bdc_field  USING 'BDC_CURSOR'        'PPHDR-BEGDA'.
    PERFORM bdc_field  USING 'PM0D1-TIMR6'       'X'.
    PERFORM bdc_field  USING 'PPHDR-BEGDA'       '01.03.2011'.
    PERFORM bdc_field  USING 'PPHDR-ENDDA'       '31.12.9999'.
    PERFORM bdc_field  USING 'MARKFELD(08)'      'X'.

    PERFORM bdc_dynpro USING 'MP101000'          '2000'.
    PERFORM bdc_field  USING 'BDC_OKCODE'        '=UPD'.
    PERFORM bdc_field  USING 'P1010-SUBTY'       '0011'.
    PERFORM bdc_field  USING 'PX010-HILFM(01)'   excel_wa-hilfm.

    PERFORM bdc_dynpro USING 'SAPMH5A0'          '5100'.
    PERFORM bdc_field  USING 'BDC_OKCODE'        '=BACK'.

    PERFORM bdc_field  USING 'PPHDR-PLVAR'       '01'.
    PERFORM bdc_field  USING 'PM0D1-SEARK'       excel_wa-position.

    PERFORM session_insert USING 'PO13'.


  ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Mar 2011 10:12:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-bdc-background-foreground/m-p/7781270#M1585457</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-31T10:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: Using BDC Background/Foreground</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-bdc-background-foreground/m-p/7781271#M1585458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you post details from the runtime error?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Mar 2011 10:15:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-bdc-background-foreground/m-p/7781271#M1585458</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-31T10:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: Using BDC Background/Foreground</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-bdc-background-foreground/m-p/7781272#M1585459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andy!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you clear your BDCTAB in FORM SESSION_INSERT?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Last screen looks strange! You pass some values (PLVAR, SEARK) but leave with code 'BACK'. Are you sure that is right? Maybe you should record it anew to compare your program with recorder data!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Klaus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Mar 2011 10:24:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-bdc-background-foreground/m-p/7781272#M1585459</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-31T10:24:16Z</dc:date>
    </item>
    <item>
      <title>Re: Using BDC Background/Foreground</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-bdc-background-foreground/m-p/7781273#M1585460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chen, thanks for replying. I get the error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;A RAISE statement in the program "CL_GUI_SPLITTER_CONTAINER=====CP" raised the&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;STRONG&gt;exception&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;                                                                     &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;condition "CNTL_SYSTEM_ERROR".&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;                                                 &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Since the exception was not intercepted by a superior&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;                          &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;program, processing was terminated.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;                                                                                &lt;STRONG&gt;Short description of exception condition:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;                                                                                &lt;STRONG&gt;For detailed documentation of the exception condition, use&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;                     &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Transaction SE37 (Function Library). You can take the called&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;                   &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;function module from the display of active calls.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Mar 2011 10:25:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-bdc-background-foreground/m-p/7781273#M1585460</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-31T10:25:36Z</dc:date>
    </item>
    <item>
      <title>Re: Using BDC Background/Foreground</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-bdc-background-foreground/m-p/7781274#M1585461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Klaus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for replying. I have just entered the following two lines of code to&lt;/P&gt;&lt;P&gt;clear the BDC data but I am still getting the error when I run the job in background.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
    PERFORM clear_bdc_data.
    PERFORM end_transaction.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Mar 2011 10:31:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-bdc-background-foreground/m-p/7781274#M1585461</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-31T10:31:45Z</dc:date>
    </item>
    <item>
      <title>Re: Using BDC Background/Foreground</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-bdc-background-foreground/m-p/7781275#M1585462</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;please have a look at &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note 721791 - Dump when running a batch input session in OM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It says, that batch-input may not work for PO13 an some cases!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And it contains some hints!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Klaus&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Klaus Babl on Mar 31, 2011 1:34 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Mar 2011 10:42:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-bdc-background-foreground/m-p/7781275#M1585462</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-31T10:42:45Z</dc:date>
    </item>
    <item>
      <title>Re: Using BDC Background/Foreground</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-bdc-background-foreground/m-p/7781276#M1585463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The error implies that in the flow of the Tcode: PO13, it goes into a screen which has a GUI SPLIT Container. Since there is no access to GUI components in background mode the session throws an exception, while it works fine in foreground mode, as it has access to the GUI Components.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Soln: Generate a new recording in SHDB, and while creating the recording choose "Simulate Background Mode" and try, if this doesn't work then possible workarounds are as given below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Workaround: Check if there is a way to alter the screen flow, so that it can avoid this screen where it needs GUI interaction. Alternatively a better solution would be to look for a BAPI/FM which could replicate the "PO13" functionality.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If neither of the above are possible, then the only option left would be to run this in foreground always.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Mar 2011 10:47:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-bdc-background-foreground/m-p/7781276#M1585463</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-31T10:47:53Z</dc:date>
    </item>
    <item>
      <title>Re: Using BDC Background/Foreground</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-bdc-background-foreground/m-p/7781277#M1585464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Many thanks for replying chen and Klaus. It is much appreciated.&lt;/P&gt;&lt;P&gt;I'll look at the note you suggested.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again many thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Mar 2011 11:45:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-bdc-background-foreground/m-p/7781277#M1585464</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-31T11:45:30Z</dc:date>
    </item>
  </channel>
</rss>

