‎2008 Jan 07 9:56 AM
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!
‎2008 Jan 07 10:00 AM
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
‎2008 Jan 07 10:01 AM
in bdc u should use no screen mode for background scheduling purpose.
Madhavi
‎2008 Jan 07 10:08 AM
‎2008 Jan 07 12:25 PM
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
‎2008 Jan 08 7:51 AM
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.