‎2013 Dec 10 11:12 AM
Hello,
I have problem with sending parameter values between report and smartform print program.
There is a screen field called pnptimed (pretty combobox).
In the smartform I defined variant with period and other necessary settings, but my report program should override those settings.
SUBMIT (ip_program) VIA SELECTION-SCREEN
USING SELECTION-SET ip_variant
WITH SELECTION-TABLE lt_rspar
WITH pnptimed eq pnptimed
TO SAP-SPOOL SPOOL PARAMETERS is_print_params
WITHOUT SPOOL DYNPRO
USER sy-uname VIA JOB l_jobname NUMBER l_job_count
AND RETURN.
When i run the report, there is no changes applied to the PNPTIMED combobox, It always take the option defined in the variant.
In lt_rspar I have:
DATA: lt_rspar TYPE TABLE OF rsparams,
ls_rspar LIKE LINE OF lt_rspar.
ls_rspar-selname = 'PNPPERNR'.
ls_rspar-kind = 'S'.
ls_rspar-sign = 'I'.
ls_rspar-option = 'EQ'.
ls_rspar-low = ip_pernr.
APPEND ls_rspar TO lt_rspar.
I tried to set the PNPTIMED using the lt_rspar, but it also don't work.
Could you please help me?
‎2013 Dec 10 11:16 AM
You are using USING SELECTION-SET ip_variant is it setting the value same as IP_VARIANT is? Can you please comment this variant stuff and use only parameter table and check if it work
Nabheet
‎2013 Dec 10 11:16 AM
You are using USING SELECTION-SET ip_variant is it setting the value same as IP_VARIANT is? Can you please comment this variant stuff and use only parameter table and check if it work
Nabheet
‎2013 Dec 10 12:33 PM
Hello nabheet madan
but when I comment the following line
USING SELECTION-SET ip_variant
my other parameters will be not set up properly.
‎2013 Dec 10 12:56 PM
Because when you use variant it iugnores other stuff...So i would suggest you to do as follow. Before submit read the variant data and fill the parameter table accordinlgy
Nabheet
‎2013 Dec 11 10:15 AM
Hello,
In my opinion variant is overwritten by parameters. So I don't have to read variant parameters and then fill the lt_rspar table.
So I can use submit in this form:
SUBMIT (ip_program) "VIA SELECTION-SCREEN
USING SELECTION-SET ip_variant
WITH SELECTION-TABLE lt_rspar
WITH pnptimed = pnptimed
TO SAP-SPOOL SPOOL PARAMETERS is_print_params
WITHOUT SPOOL DYNPRO
USER sy-uname VIA JOB l_jobname NUMBER l_job_count
AND RETURN.
Anyway I fixed the problem. In my lt_rspar table I had few parameters that were making mess with selection screen of smartform.
Thank you for your time