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

Sending the PNPTIMED using SUBMIT function - problem

Former Member
0 Likes
2,557

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?

1 ACCEPTED SOLUTION
Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
1,612

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

4 REPLIES 4
Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
1,613

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

Read only

0 Likes
1,612

Hello nabheet madan

but when I comment the following line


USING SELECTION-SET ip_variant 

my other parameters will be not set up properly.

Read only

0 Likes
1,612

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

Read only

0 Likes
1,612

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