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

tabstrips on selection screen

Former Member
0 Likes
1,001

Hi all,

I have a selection screen which has 3 tabstrips.

The screen nos are 101,102 and 103.

Now in each tab there are different input parameters and based on each tab there will be 3 different outputs.

i.e when I click on tab1 and give the required inputs i will get 1 report output.

similarly I will get different ouput in the other 2 tabs.

Can any one suggest some solution how to achieve this.

Thanks and Regards

Rj

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
958

Hi Rj,

Look for documentation at SELECTION-SCREEN - TABBED BLOCK

Adapt the sample provided, and in the START-OF-SELECTON event add a CASE/WHEN to execute whichever report you want based on mytab-dynnr value.

Hi all,

I have a selection screen which has 3 tabstrips.

The screen nos are 101,102 and 103.

Now in each tab there are different input parameters and based on each tab there will be 3 different outputs.

i.e when I click on tab1 and give the required inputs i will get 1 report output.

similarly I will get different ouput in the other 2 tabs.

Can any one suggest some solution how to achieve this.

Thanks and Regards

Rj

7 REPLIES 7
Read only

Former Member
Read only

arpit_shah
Contributor
0 Likes
958

hi,

do like this.......

selection-screen begin of tabbed block tabb1 for 9 lines.

selection-screen tab (15) text-006 user-command ucomm1

default screen 101.

selection-screen tab (15) text-007 user-command ucomm2

default screen 102.

selection-screen tab (17) text-008 user-command ucomm3

default screen 103.

selection-screen end of block tabb1.

selection-screen begin of screen 101 as subscreen.

parameter: p_field1 type i.

selection-screen end of screen 101.

selection-screen begin of screen 102 as subscreen.

parameter: p_field2 type i.

selection-screen end of screen 102.

selection-screen begin of screen 103 as subscreen.

parameter: p_field3 type i.

selection-screen end of screen 103.

Regards

Arpit

Read only

Former Member
0 Likes
958

Hi,

Check this demo program DEMO_SEL_SCREEN_IN_TABSTRIP

Regards

Read only

Former Member
0 Likes
959

Hi Rj,

Look for documentation at SELECTION-SCREEN - TABBED BLOCK

Adapt the sample provided, and in the START-OF-SELECTON event add a CASE/WHEN to execute whichever report you want based on mytab-dynnr value.

Read only

0 Likes
958

Hi Manas,

Can you please send some code as example ?

Regards,

Rj

Read only

0 Likes
958

Hi Rj,

Below is a sample code :-

{} REPORT demo_dynpro_tabstrip_server.

CONTROLS mytabstrip TYPE TABSTRIP.

DATA: ok_code TYPE sy-ucomm,

save_ok TYPE sy-ucomm.

DATA number TYPE sy-dynnr.

mytabstrip-activetab = 'PUSH2'.

number = '0120'.

CALL SCREEN 100.

MODULE status_0100 OUTPUT.

SET PF-STATUS 'SCREEN_100'.

ENDMODULE.

MODULE cancel INPUT.

LEAVE PROGRAM.

ENDMODULE.

MODULE user_command INPUT.

save_ok = ok_code.

CLEAR ok_code.

IF save_ok = 'OK'.

MESSAGE i888(sabapdocu) WITH 'MYTABSTRIP-ACTIVETAB ='

mytabstrip-activetab.

ELSE.

mytabstrip-activetab = save_ok.

CASE save_ok.

WHEN 'PUSH1'.

number = '0110'.

WHEN 'PUSH2'.

number = '0120'.

WHEN 'PUSH3'.

number = '0130'.

ENDCASE.

ENDIF.

ENDMODULE.{}

Read only

Former Member
0 Likes
958

Hi Raj,

here is the piece of code.... i hope u will get some help..

CONTROLS tab_strip TYPE TABSTRIP.

DATA: ok_code TYPE sy-ucomm,

dynnr TYPE sy-dynnr.

...

MODULE prepare_tabstrip OUTPUT.

IF tab_strip-activetab IS INITIAL OR

dynnr IS INITIAL.

tab_strip-activetab = 'TAB1'.

dynnr = '0110'.

ENDIF.

ENDMODULE.

MODULE handle_user_command INPUT.

CASE ok_code.

WHEN 'TAB1'.

dynnr = '0110'.

WHEN 'TAB2'.

dynnr = '0120'.

WHEN 'TAB3'.

dynnr = '0130'.

...

ENDCASE.

IF ok_code(3) = 'TAB'.

tab_strip-activetab = ok_code.

ENDIF.

ENDMODULE.

thanks & regards

Ashu Singh