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

ABAP program set schedule job

Former Member
0 Likes
751

I have a program which will call another transaction using BDC. When i set the program run as schedule. which will start and end at the same time. But i can run the program through sa38. Is it can not set as schedule. Thanks!

5 REPLIES 5
Read only

Former Member
0 Likes
723

hi,

Im not getting ur req clearly but u can schedule a job from ABAP pgm using fn modules

JOB_OPEN

JOB_SUBMIT

JOB_CLOSE

Read only

Former Member
0 Likes
723

in bdc u should use no screen mode for background scheduling purpose.

Madhavi

Read only

0 Likes
723

How can i set no screen mode in bdc. Thanks

Read only

0 Likes
723

Hi,

Use the mode <mode> option in the call transaction stmt.

For not displaying the screens please set 'N' as mode value.

CALL TRANSACTION tcod mode N.

Please check the same.

Regards

Praba

Read only

0 Likes
723

I was set the mode to 'N'. The following is my snapshot of source code. It the program run as foreground is fine. but can't run as schedule mode using sm36. Thanks!

loop at gt_file_header_record.

clear move_flag.

perform bdc_dynpro using 'SAPMZPP004'

'0100'.

perform bdc_field using 'BDC_OKCODE'

'/00'.

perform bdc_field using 'WA_POGR-BUDAT'

gt_file_header_record-budat.

perform bdc_field using 'WA_POGR-LFSNR'

gt_file_record-lfsnr.

perform bdc_field using 'WA_POGR-BWARTWE'

'101'.

perform bdc_field using 'WA_POGR-CBELN'

gt_file_header_record-ebeln.

perform bdc_field using 'WA_POGR-WERKS'

'8011'.

perform bdc_field using 'WA_POGR-LGORT'

'9998'.

perform bdc_field using 'WA_POGR-SCLGT'

gt_file_header_record-lgort.

perform bdc_field using 'WA_POGR-FR'

gt_file_header_record-fg.

perform bdc_field using 'WA_POGR-BATCH_FILE'

gt_file_header_record-filename.

perform bdc_field using 'BDC_OKCODE'

'/8'.

perform bdc_dynpro using 'SAPMZPP004' '0200'.

perform bdc_field using 'BDC_OKCODE'

'=BU'.

perform bdc_transaction using 'ZPP004B' gt_file_header_record-ebeln

gt_file_header_record-budat

gt_file_header_record-fg.

endloop.

FORM BDC_TRANSACTION USING TCODE p_cbeln p_budat p_fr.

DATA: L_MSTRING(480).

DATA: WA_PARAMS TYPE CTU_PARAMS.

REFRESH MESSTAB.

WA_PARAMS-DISMODE = 'N'.

  • WA_PARAMS-UPDMODE = 'L'.

WA_PARAMS-UPDMODE = 'S'.

WA_PARAMS-DEFSIZE = 'X'.

CALL TRANSACTION TCODE USING BDCDATA OPTIONS FROM WA_PARAMS

MESSAGES INTO MESSTAB.

ENDFORM.