‎2013 Sep 19 4:13 PM
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
‎2013 Sep 19 4:20 PM
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
‎2013 Sep 19 4:48 PM
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
‎2013 Sep 19 5:03 PM
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
‎2013 Sep 19 9:27 PM
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
‎2013 Sep 19 9:31 PM
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'.
‎2013 Sep 20 9:06 AM
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.
‎2013 Sep 20 3:24 PM
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
‎2013 Sep 20 8:54 AM
Usually
Hints :
(Other option removed, CJ46 does not allow BDC, multiple commit.)
Regards,
Raymond