Skip to Content
Former Member
Aug 05, 2010 at 10:03 AM

Tabstrip and Form Printing - Help Needed!!!


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 .

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'.

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

Please help me.