07-21-2015 3:18 PM
Hello experts,
Can any one explain the creation of variants for program RKKRPRRE, this program does not have any selection criteria.
We want to run the program in back ground and it requires a variant for running this. Please note that this does not have an selection screen.
A quick check of the program , I am pretty sure that there is a way for running in back ground.
thanks,
Balu
07-21-2015 3:31 PM
Hi.
You can't create variants for this program. You can only create a program or a batch-input that calls this program with parameters you need.
The only way to run it in a background mode is to put this code in a Z* program with all data you need as input in a variant and launch it:
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
MODE = 'CURRENT'
NO_DIALOG = 'X'
IMPORTING
OUT_PARAMETERS = L_PRI_PARAMS.
CHECK SY-SUBRC = 0.
CONCATENATE 'RECHERCHE_' AUFK-WERKS '_'
KKRDYN00-VONPER KKRDYN00-VONJHR '_'
KKRDYN00-BISPER KKRDYN00-BISJHR
INTO L_JOBNAME.
PERFORM JOB_PARAMETERS_FILL TABLES L_SELPA_TBL.
CALL FUNCTION 'K_BATCH_REQUEST'
EXPORTING
PAR_DIALG = 'X'
PAR_JNAME = L_JOBNAME
PAR_PRINT = 'X'
PAR_PRIPA = L_PRI_PARAMS
PAR_RNAME = 'RKKRVBC0'
PAR_SDMSG = 'X'
PAR_RFCGN = 'P_SRV_GR'
PAR_RFCGR = KKRDYN00-PARAL_SERV
TABLES
TAB_SELPA = L_SELPA_TBL.
Hope to help
Bye
07-21-2015 3:31 PM
Hi.
You can't create variants for this program. You can only create a program or a batch-input that calls this program with parameters you need.
The only way to run it in a background mode is to put this code in a Z* program with all data you need as input in a variant and launch it:
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
MODE = 'CURRENT'
NO_DIALOG = 'X'
IMPORTING
OUT_PARAMETERS = L_PRI_PARAMS.
CHECK SY-SUBRC = 0.
CONCATENATE 'RECHERCHE_' AUFK-WERKS '_'
KKRDYN00-VONPER KKRDYN00-VONJHR '_'
KKRDYN00-BISPER KKRDYN00-BISJHR
INTO L_JOBNAME.
PERFORM JOB_PARAMETERS_FILL TABLES L_SELPA_TBL.
CALL FUNCTION 'K_BATCH_REQUEST'
EXPORTING
PAR_DIALG = 'X'
PAR_JNAME = L_JOBNAME
PAR_PRINT = 'X'
PAR_PRIPA = L_PRI_PARAMS
PAR_RNAME = 'RKKRVBC0'
PAR_SDMSG = 'X'
PAR_RFCGN = 'P_SRV_GR'
PAR_RFCGR = KKRDYN00-PARAL_SERV
TABLES
TAB_SELPA = L_SELPA_TBL.
Hope to help
Bye
07-21-2015 3:32 PM
Hi Balu,
You say "We want to run the program in back ground and it requires a variant for running this", but does it?
If the program doesn't have a selection screen then when you define a job in SM36 it will be possible to create the step with this program and nothing in the variant name.
regards,
Nick
07-21-2015 3:32 PM
RKKRVBC0 is the program behind RKKRPRRE, which is called when you check the 'Background processing' checkbox. Hence, please schedule a background job for RKKRVBC0 program.
Thanks,
Juwin
05-25-2016 6:00 AM
I had a requirement of running KKRV as a job from another background job. I tried by submitting the program RKKRPRRE for KKRV but it seems to run indefinite and causing a big issue in Production server.
Thanks a lot Juwin, Without knowing your info to run RKKRVBC0 instead of RKKRPRRE my problem would have delayed for longer time.
Thanks once again Juwin. Keep rocking.
-Vignesh.