cancel
Showing results for 
Search instead for 
Did you mean: 

Tabstrip and Form Printing - Help Needed!!!

Former Member
0 Kudos

Hi Experts!

I have two tabstrips, and i have attached a subscreen with this control. In subscreen I have a two table controls one for first tab strip and for second tab strip as well. I have attached a smartform with this control, form is triggered when the Print button is pressed.

What i want to do is, I want to print the form based on which tab strip is active. Like if first tab strip is active I want to print the data of the first tabstrips table control, similarly i want to do it with the second tab strip. If user enter data in both tab strips then it should print the data the of both the controls based on which tabstrip is selected.

I have tried it, but it loads the data which is entered first irrespective of the selected tabstrip.

Here is the code I am trying

Here i am setting the sy-ucomm value for each tabstrip.


 IF sy-ucomm = 'TESTTAB'. " first tab strip
    reffstrip-activetab = sy-ucomm.
  ELSEIF sy-ucomm = 'REFFTAB'. " second tab strip
    reffstrip-activetab = sy-ucomm .
  ENDIF.

Here i am printing the form.


DATA: lf_formname TYPE tdsfname.
DATA: lf_fm_name  TYPE rs38l_fnam.

  wa_cparam-no_dialog = 'X'.
  wa_cparam-preview = 'X'.
  wa_output-tddest = 'LP01.'.

  lf_formname = 'ZHC_REFFERAL_LETTER'.

  CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
      formname           = lf_formname
    IMPORTING
      fm_name            = lf_fm_name
    EXCEPTIONS
      no_form            = 1
      no_function_module = 2
      OTHERS             = 3.
  CALL FUNCTION lf_fm_name
    EXPORTING
      str_test           = str_test
      str_cp             = str_cp
      control_parameters = wa_cparam
      output_options     = wa_output
      user_settings      = space
    TABLES
      itab_exam          = itab_exam
      itab_letters       = itab_letters
      itab_medicine      = itab_medicine.

Please help me.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Little confused. So you want to call the same layout with different values. Also all the interface parameters also same in both the cases.

So where is the difficult / issues for the same? Just do the data retrieval part in the below if conditiona s per your req.

IF sy-ucomm = 'TESTTAB'. " first tab strip

reffstrip-activetab = sy-ucomm.

      • select data for this tab

ELSEIF sy-ucomm = 'REFFTAB'. " second tab strip

reffstrip-activetab = sy-ucomm .

      • select data for this tab

ENDIF.

Regards,

Selva K.

Former Member
0 Kudos

Yes layout is same, but I want to print with the change of values. Like first tab will have different values and other would have different values. I will try your solution. Is there any other solution?

Former Member
0 Kudos

Yes layout is same, but I want to print with the change of values. Like first tab will have different values and other would have different values. I will try your solution. Is there any other solution?