Skip to Content
0
Sep 22, 2005 at 06:27 PM

Execute a BDC in background

55 Views

Hi ,

My program works well when it is executed online , but when executed in the background there is no error message, but the required operation is not done.

My requirement is to delimit Contingent Workers IT0000 and IT0001 based on a given date.

Program is able to delimit the IT0000 record and not able to delimit the IT0001 record.

But the same code is working i.e. delimiting both the IT0000 and IT0001 records if I execute in Foreground.

Below is the code

__________________

LOOP AT T_IT0001.

*Intial Screen PA30 enter IT0000 and subty 95 'Intial Screen

PERFORM BDC_DYNPRO USING 'SAPMP50A' '1000'.

PERFORM BDC_FIELD USING 'BDC_OKCODE'

'=INS'.

PERFORM BDC_FIELD USING 'RP50G-PERNR'

T_IT0001-PERNR.

PERFORM BDC_FIELD USING 'BDC_SUBSCR'

'/1PAPAXX/HDR_70060A 0100SUBSCR_HEADER'.

PERFORM BDC_FIELD USING 'BDC_SUBSCR'

'SAPMP50A 0320SUBSCR_ITMENU'.

PERFORM BDC_FIELD USING 'BDC_SUBSCR'

'SAPMP50A 0330SUBSCR_TIME'.

PERFORM BDC_FIELD USING 'RP50G-TIMR6'

'X'.

PERFORM BDC_FIELD USING 'BDC_SUBSCR'

'SAPMP50A 0350SUBSCR_ITKEYS'.

PERFORM BDC_FIELD USING 'BDC_CURSOR'

'RP50G-SUBTY'.

PERFORM BDC_FIELD USING 'RP50G-CHOIC'

'0000'.

PERFORM BDC_FIELD USING 'RP50G-SUBTY'

'95'.

*IT0000 Enter Start Dt for termination i.e Rundate 1st screen

PERFORM BDC_DYNPRO USING 'MP000000' '2000'.

PERFORM BDC_FIELD USING 'BDC_CURSOR'

'P0000-BEGDA'.

PERFORM BDC_FIELD USING 'BDC_OKCODE'

'=UPD'.

PERFORM BDC_FIELD USING 'P0000-BEGDA'

G_ACTION_DT.

*IT0001 click save with same rundate 2nd screen

PERFORM BDC_DYNPRO USING 'MP000100' '2010'.

PERFORM BDC_FIELD USING 'BDC_CURSOR'

'P0001-BEGDA'.

PERFORM BDC_FIELD USING 'BDC_OKCODE'

'=UPD'.

PERFORM BDC_FIELD USING 'P0001-BEGDA'

G_ACTION_DT.

PERFORM BDC_FIELD USING 'P0001-PLANS'

T_IT0001-PLANS.

PERFORM BDC_FIELD USING 'BDC_SUBSCR'

'MP000100 0100SUB0001'.

PERFORM BDC_FIELD USING 'BDC_SUBSCR'

'SAPMP50A 0090SUBSCREEN_T582C'.

CALL TRANSACTION 'PA30' USING T_BDCDATA MODE 'A'.

  • CALL TRANSACTION 'PA30' USING T_BDCDATA MODE 'N'

  • MESSAGES INTO T_ERROR.

FREE: T_BDCDATA.

ENDLOOP.

ENDFORM. " BDCREC_DELIMIT

________________________________________________________

Please let me know if you have any suggestions.