‎2009 Aug 25 6:36 AM
Hello All-
I have a requriement where the Interface has the ALV output where the user is allowed the user activity for validating and posting the records through buttons on the ALV after selecting the records through the checkboxes , Now I want to execute the interface in the background, is that possible with the current scenario.
Thanks in advance
Jatender
‎2009 Aug 25 6:45 AM
hi
you can use this code for the baground
DATA: JOBNAME LIKE TBTCJOB-JOBNAME VALUE
'ORDER_REPORT'.
DATA: JOBCOUNT LIKE TBTCJOB-JOBCOUNT,
HOST LIKE MSXXLIST-HOST.
DATA: BEGIN OF STARTTIME.
INCLUDE STRUCTURE TBTCSTRT.
DATA: END OF STARTTIME.
DATA: STARTTIMEIMMEDIATE LIKE BTCH0000-CHAR1.
* Job open
CALL FUNCTION 'JOB_OPEN'
EXPORTING
DELANFREP = ' '
JOBGROUP = ' '
JOBNAME = JOBNAME
SDLSTRTDT = SY-DATUM
SDLSTRTTM = SY-UZEIT
IMPORTING
JOBCOUNT = JOBCOUNT
EXCEPTIONS
CANT_CREATE_JOB = 01
INVALID_JOB_DATA = 02
JOBNAME_MISSING = 03.
IF SY-SUBRC NE 0.
"error processing
ENDIF.
SUBMIT ZPRODREC02 AND RETURN VIA SELECTION-SCREEN
USER SY-UNAME
VIA JOB JOBNAME
NUMBER JOBCOUNT.
IF SY-SUBRC > 0.
"error processing
ENDIF.
DATA: JOB_RELEASED LIKE BTCH0000-CHAR1.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
JOBCOUNT = JOBCOUNT
JOBNAME = JOBNAME
STRTIMMED = 'X'
IMPORTING
JOB_WAS_RELEASED = JOB_RELEASED
EXCEPTIONS
OTHERS = 99.
Regard,
nawa
‎2009 Aug 25 6:51 AM
Hello Jatender,
You can also use CALL FUNCTION 'JOB_SUBMIT' to submit the interface in background.
Thanks,
Augustin.