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

TABS & SUBSCREEN IN REPORT

vallamuthu_madheswaran2
Active Contributor
0 Likes
748

Hi friends,

I want to use TABs & Subscreens in a report without using dialog programming. is it possible?

if it is possible then please give some useful sample code.

Thanks & Regards,

Vallamuthu.M

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
714

Hi,

Go through this:

report demo_sel_screen_with_tabstrip.

data flag(1) type c.

* SUBSCREEN 1

selection-screen begin of screen 100 as subscreen.
selection-screen begin of block b1 with frame.
parameters: p1(10) type c,
            p2(10) type c,
            p3(10) type c.
selection-screen end of block b1.
selection-screen end of screen 100.

* SUBSCREEN 2

selection-screen begin of screen 200 as subscreen.
selection-screen begin of block b2 with frame.
parameters: q1(10) type c obligatory,
            q2(10) type c obligatory,
            q3(10) type c obligatory.
selection-screen end of block b2.
selection-screen end of screen 200.

* STANDARD SELECTION SCREEN

selection-screen: begin of tabbed block mytab for 10 lines,
                  tab (20) button1 user-command push1,
                  tab (20) button2 user-command push2,
                  tab (20) button3 user-command push3
                                   default screen 300,
                  end of block mytab.

initialization.
  button1 = text-010.
  button2 = text-020.
  button3 = text-030.
  mytab-prog = sy-repid.
  mytab-dynnr = 100.
  mytab-activetab = 'BUTTON1'.

at selection-screen.
  case sy-dynnr.
    when 1000.
      case sy-ucomm.
        when 'PUSH1'.
          mytab-dynnr = 100.
          mytab-activetab = 'BUTTON1'.
        when 'PUSH2'.
          mytab-dynnr = 200.
          mytab-activetab = 'BUTTON2'.
      endcase.
    when 100.
      message s888(sabapdocu) with text-040 sy-dynnr.
    when 200.
      message s888(sabapdocu) with text-040 sy-dynnr.
  endcase.

module init_0100 output.
  loop at screen.
    if screen-group1 = 'MOD'.
      case flag.
        when 'X'.
          screen-input = '1'.
        when ' '.
          screen-input = '0'.
      endcase.
      modify screen.
    endif.
  endloop.
endmodule.

module user_command_0100 input.
  message s888(sabapdocu) with text-050 sy-dynnr.
  case sy-ucomm.
    when 'TOGGLE'.
      if flag = ' '.
        flag = 'X'.
      elseif flag = 'X'.
        flag = ' '.
      endif.
  endcase.
endmodule.

start-of-selection.
  write: / 'P1:', p1,'Q1:', q1,
         / 'P2:', p2,'Q2:', q2,
         / 'P3:', p3,'Q3:', q3.


Jogdand M B

Hi friends,

I want to use TABs & Subscreens in a report without using dialog programming. is it possible?

if it is possible then please give some useful sample code.

Thanks & Regards,

Vallamuthu.M

4 REPLIES 4
Read only

Former Member
0 Likes
714

Hi,

Yes..it is possible..

Check this link for a sample code

http://help.sap.com/saphelp_nw2004s/helpdata/en/00/deb23789e95378e10000009b38f8cf/content.htm

Thanks

Naren

Read only

Former Member
0 Likes
715

Hi,

Go through this:

report demo_sel_screen_with_tabstrip.

data flag(1) type c.

* SUBSCREEN 1

selection-screen begin of screen 100 as subscreen.
selection-screen begin of block b1 with frame.
parameters: p1(10) type c,
            p2(10) type c,
            p3(10) type c.
selection-screen end of block b1.
selection-screen end of screen 100.

* SUBSCREEN 2

selection-screen begin of screen 200 as subscreen.
selection-screen begin of block b2 with frame.
parameters: q1(10) type c obligatory,
            q2(10) type c obligatory,
            q3(10) type c obligatory.
selection-screen end of block b2.
selection-screen end of screen 200.

* STANDARD SELECTION SCREEN

selection-screen: begin of tabbed block mytab for 10 lines,
                  tab (20) button1 user-command push1,
                  tab (20) button2 user-command push2,
                  tab (20) button3 user-command push3
                                   default screen 300,
                  end of block mytab.

initialization.
  button1 = text-010.
  button2 = text-020.
  button3 = text-030.
  mytab-prog = sy-repid.
  mytab-dynnr = 100.
  mytab-activetab = 'BUTTON1'.

at selection-screen.
  case sy-dynnr.
    when 1000.
      case sy-ucomm.
        when 'PUSH1'.
          mytab-dynnr = 100.
          mytab-activetab = 'BUTTON1'.
        when 'PUSH2'.
          mytab-dynnr = 200.
          mytab-activetab = 'BUTTON2'.
      endcase.
    when 100.
      message s888(sabapdocu) with text-040 sy-dynnr.
    when 200.
      message s888(sabapdocu) with text-040 sy-dynnr.
  endcase.

module init_0100 output.
  loop at screen.
    if screen-group1 = 'MOD'.
      case flag.
        when 'X'.
          screen-input = '1'.
        when ' '.
          screen-input = '0'.
      endcase.
      modify screen.
    endif.
  endloop.
endmodule.

module user_command_0100 input.
  message s888(sabapdocu) with text-050 sy-dynnr.
  case sy-ucomm.
    when 'TOGGLE'.
      if flag = ' '.
        flag = 'X'.
      elseif flag = 'X'.
        flag = ' '.
      endif.
  endcase.
endmodule.

start-of-selection.
  write: / 'P1:', p1,'Q1:', q1,
         / 'P2:', p2,'Q2:', q2,
         / 'P3:', p3,'Q3:', q3.


Jogdand M B

Read only

former_member196299
Active Contributor
0 Likes
714

hi ,

Use of subscreens is possible without using dialog programming . check for the use of CALL Screen syntax .

Check for sample programs in ABAPDOCU transaction !

Did u mean TABs as Tab-strips ?

I am not sure if you can use it in report programming !

Regards ,

Ranjita

Read only

vallamuthu_madheswaran2
Active Contributor
0 Likes
714

I AM SOLVING OWN

Message was edited by:

vallamuthu madheswaran