Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SHDB background processing problem

Former Member
0 Likes
10,741

Dear experts,

We have created an SHDB program that uses a 'call transaction' to a custom Z transaction.

When we run this program In foreground mode it performs perfectly and  creates all the objects it's supposed to.

However, when running this SHDB program in background mode  in transaction SE38, it does nothing.

Does anyone know how to correct this issue? How do we run an SHDB in background mode successfully?

Thanks, 

Fernando

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
9,466

This issue happened because we had an TEXT EDIT control in our Z transaction. Thankfully we weren't using it, and we solved the problem by eliminating this field from the transaction program.

Apparently, SHDB Batch Inputs cannot be run in background if it has some special controls in the transaction.

Thank you all for your helpful replies.

Best regards,

Fernando

6 REPLIES 6
Read only

Clemenss
Active Contributor
0 Likes
9,466

Hi Fernando,

some transactions like i.e. MM01 use different screen sequences in  foreground and background. The SHDB recording allows you set simulate backround mode. Then you get the backround acreen sequence.

Regards

Clemens

Read only

Former Member
0 Likes
9,466

You should use Simulate Background processing when using SHDB and use that recording when you are using BDC.

Read only

Former Member
0 Likes
9,466

START-OF-SELECTION.

   PERFORM upload_file TABLES itab USING p_file.
   IF itab[] IS NOT INITIAL.
     PERFORM open_group.
     LOOP AT itab.
       REFRESH bdcdata.
       PERFORM bdcdata.
     ENDLOOP.

     PERFORM close_group.
   ENDIF.

*&---------------------------------------------------------------------*

FORM open_group .

   CALL FUNCTION 'BDC_OPEN_GROUP'
     EXPORTING
       client = sy-mandt
       group  = 'Ztcode'    "default session name
       user   = sy-uname
       keep   = 'X'.

ENDFORM. 

*&---------------------------------------------------------------------*

FORM close_group .

   CALL FUNCTION 'BDC_CLOSE_GROUP'.
   CALL TRANSACTION 'SM35'.

ENDFORM.

*&---------------------------------------------------------------------*

FORM bdc_insert .
   CALL FUNCTION 'BDC_INSERT'
     EXPORTING
       tcode     = 'ZTCODE'    "
Z transaction. name
     TABLES
       dynprotab = bdcdata.
ENDFORM.

*&---------------------------------------------------------------------*

FORM bdc_dynpro USING program dynpro.
   CLEAR bdcdata.
   bdcdata-program  = program.
   bdcdata-dynpro   = dynpro.
   bdcdata-dynbegin = 'X'.
   APPEND bdcdata.
ENDFORM.

*&---------------------------------------------------------------------*

FORM bdc_field USING fnam fval.
   CLEAR bdcdata.
   bdcdata-fnam = fnam.
   bdcdata-fval = fval.
   APPEND bdcdata.
ENDFORM. 

*&---------------------------------------------------------------------*

FORM bdcdata.

YOUR recording and logic


ENDFORM.

*&---------------------------------------------------------------------*

Read only

Former Member
0 Likes
9,467

This issue happened because we had an TEXT EDIT control in our Z transaction. Thankfully we weren't using it, and we solved the problem by eliminating this field from the transaction program.

Apparently, SHDB Batch Inputs cannot be run in background if it has some special controls in the transaction.

Thank you all for your helpful replies.

Best regards,

Fernando

Read only

0 Likes
9,466

Yes. In background you can not use GUI controls. But you can't control them by batch input anyway - no matter if backround or connected to a GUI online.

Regards

Clemens

Read only

Former Member
0 Likes
9,466

Hi Fernando,

Try to call the transaction using Session method and run it in Background using the following code,

  Constants:C_SESSION  TYPE APQ_GRPN   VALUE 'ZBDC'.        " Session Name


  SUBMIT RSBDCSUB EXPORTING LIST TO MEMORY

    WITH MAPPE EQ C_SESSION

    WITH VON   EQ SY-DATUM

    WITH BIS   EQ SY-DATUM

     AND RETURN.