Skip to Content
author's profile photo Former Member
Former Member

Sending the PNPTIMED using SUBMIT function - problem

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?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Dec 10, 2013 at 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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Nabheet Madan

      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 😉

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.