2012 May 11 10:50 PM
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
2012 May 12 5:39 PM
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
2012 May 12 12:02 AM
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
2012 May 12 4:39 AM
You should use Simulate Background processing when using SHDB and use that recording when you are using BDC.
2012 May 12 6:41 AM
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.
*&---------------------------------------------------------------------*
2012 May 12 5:39 PM
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
2012 May 12 7:21 PM
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
2012 May 14 5:36 AM
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.