2007 Jun 07 6:37 AM
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
2007 Jun 07 6:41 AM
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
2007 Jun 07 6:39 AM
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
2007 Jun 07 6:41 AM
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
2007 Jun 07 6:41 AM
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
2007 Jun 08 8:41 AM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |