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

Submit program RKAZCJ47

Former Member
0 Likes
1,191

Hi,

I am trying to submit the report RKAZCJ47 using submit statement.

I am passing the variant from my custom program using submit. But this report  RKAZCJ47 has a field called selection variant (which in turn has another variant which calls the report RKPSEL00 selction-screen).

I have to pass the variant dynamically to the selection screen of the report RKPSEL00 from my custom program

Any idea of how can we go ahead with this?

Thanks

Prabu

8 REPLIES 8
Read only

Former Member
0 Likes
1,074

Hi

I depends on the logic you need to choose the variant:

It's a normal parameter for RKAZCJ47, so you can transfer it in the SUBMIT...but which?

We can help you only if you explain how you want to get the variant.

Max

Read only

0 Likes
1,074

Hi,

Thanks for your response.

I am using one custom class. In that, I want to submit the report RKAZCJ47 and pass the set of WBS elements dynamically to that report RKPSEL00.

Please let me know if you any other information.

Thanks,

Prabu

Read only

0 Likes
1,074

Hi

You can use the fm RS_CREATE_VARIANT in order to create the variant  for RKPSEL00 before calling RKAZCJ47

After running you can call fm RS_VARIANT_DELETE to delete the variant created before

Max

Read only

0 Likes
1,074

Hi,

I have created a variant for RKPSEL00. (eg. : ZRKPSEL00) and that has to be passed as a parameter to the report RKAZCJ47 along with other values.

When I submit the program RKAZCJ47, I am getting all the parameters passed including the selection parameter ZRKPSEL00. But, the values like WBS which I passed along with the variant ZRKPSEL00 is not getting passed.

Am I doing something wrong?

Thanks

Prabu

Read only

0 Likes
1,074

The sample code which i have written as follows.

DATA : lt_var_con TYPE TABLE OF RSPARAMS,
       lt_var_text
TYPE TABLE OF VARIT,
       lt_var_desc
LIKE varid.
DATA : lw_var_con TYPE RSPARAMS,
       lw_var_text
TYPE varit,
       lw_var_desc
LIKE varid.

lw_var_con
-selname = 'PS-0050072'.
lw_var_con
-kind = 'S'.
lw_var_con
-sign = 'I'.
lw_var_con
-option = 'EQ'.
lw_var_con
-low = 'PS-0050072'.APPEND lw_var_con TO lt_var_con.

lw_var_text
-langu = 'E'.
lw_var_text
-report = 'RKPSEL00'.
lw_var_text
-variant = 'ZPS_PLAN_OH1'.
lw_var_text
-vtext = 'test'.APPEND lw_var_text TO lt_var_text.

lw_var_desc
-report = 'RKPSEL00'.
lw_var_desc
-variant = 'ZPS_PLAN_OH1'.
CALL FUNCTION 'RS_CREATE_VARIANT'
 
EXPORTING
    CURR_REPORT                    
= 'RKPSEL00'
    CURR_VARIANT                   
= 'ZPS_PLAN_OH1'
    VARI_DESC                      
= lw_var_desc 

  TABLES
    VARI_CONTENTS                  
= lt_var_con
    VARI_TEXT                      
= lt_var_text
EXCEPTIONS
   ILLEGAL_REPORT_OR_VARIANT      
= 1
   ILLEGAL_VARIANTNAME            
= 2
   NOT_AUTHORIZED                 
= 3
   NOT_EXECUTED                   
= 4
   REPORT_NOT_EXISTENT            
= 5
   REPORT_NOT_SUPPLIED            
= 6
   VARIANT_EXISTS                 
= 7
   VARIANT_LOCKED                 
= 8
  
OTHERS                          = 9.
SUBMIT RKAZCJ47 VIA SELECTION-SCREEN WITH VARIANT = 'ZPS_PLAN_OH1'
                                    
WITH p_versn = '0'
                                    
WITH p_from  = '01'
                                    
WITH p_to    = '11'
                                    
WITH p_gjahr = '2013'
                                    
WITH p_test  = ' '
                                    
WITH p_list  = 'X'.

Read only

0 Likes
1,074

First check sy-subrc in your program after the call to 'RS_CREATE_VARIANT'.Maybe an error occurred during creation of the variant, which will give you a hint.

Second thing is the selname of your select options, is the name really 'PS-0050072' or is this the value of the selection parameter. If it is the value and not the name, then that is the reason why it is not passed. If 'PS-0050072'  is the name of the selection parameter, is  'PS-0050072' then also the value ? That sounds a bit strange to me.

But I can't start this program in my system because certain functions are not customized, so I was not able to check the selection parameter names.

Read only

0 Likes
1,074

Hi Peter,

Thanks for your response.

I have changed the name as PROJECT . Even though, i am not getting the project name which i have passed the value field in the RKPSEL00 variant screen.

Thanks,

Prabu

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,074

Usually

  • I get the selection of the caller/driver program with FM RS_REFRESH_FROM_SELECTOPTIONS.
  • Then check existence of variant of RKPSEL00 with FM RS_VARIANT_EXISTS.
  • If it already exists, read current parameters with RS_VARIANT_VALUES_TECH_DATA
  • Opt: read parameter of a system default variant (created with a name like CUS&xxx ) created in development
  • Merge selection screen parameters between current variant and driver program current selection
  • Then update variant with RS_CHANGE_CREATED_VARIANT or create with RS_CREATE_VARIANT
  • Then submlt RKAZCJ45, RKAZCJO9 or RKAZCJ47 with this variant name

Hints :

  • Most of those FM use same structure for parameters : RSPARAMS

(Other option removed, CJ46 does not allow BDC, multiple commit.)

Regards,

Raymond