Application Development 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: 

Issue with creation of variants for program RKKRPRRE

bala_krishna007
Participant
0 Kudos

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

1 ACCEPTED SOLUTION

roberto_vacca2
Active Contributor
0 Kudos

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

4 REPLIES 4

roberto_vacca2
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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

Juwin
Active Contributor
0 Kudos

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

0 Kudos

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.