‎2008 Jul 07 10:36 AM
Hello Friends,
I have a problem with tabstrip control.
I have created a type 1 program, in selection-screen I have a tabstrip control with four tabs i.e. tab1, tab2 tab3 and tab4.
tab1 is assigned with prog1
tab2 is assigned with prog2
tab3 is assigned with prog3
tab4 is assigned with prog4
1. Default tab is tab1, if I click on tab2 it is executing tab1 program and showing tab2. If there are any mandatory fields in tab1 it is giving error message 'give data for all required fields'. If click on tab2, directly it should show tab2 selection screen it should not execute tab1 or previous tab.
2. If I execute tab4 program after execution it is showing tab1 screen, but i want to show tab4 screen.
Please help me.
Thanks in advance.
Regards.
Krishna.
‎2008 Jul 07 10:43 AM
‎2008 Jul 07 10:50 AM
Hello Swapna,
Thanks for your reply.
This is my code for tabstrip control.
AT SELECTION-SCREEN.
CASE SSCRFIELDS-UCOMM.
WHEN 'BOOK'.
tabb1-prog = 'ZAXOMM005_V1'.
tabb1-dynnr = 1.
tabb1-activetab = 'TABS1'.
option = '1'.
WHEN 'SUMM'.
tabb1-prog = 'ZAXOMM005_V1'.
tabb1-dynnr = 2.
tabb1-activetab = 'TABS2'.
option = '2'.
WHEN 'POST'.
tabb1-prog = 'ZAXOMM005_V1'.
tabb1-dynnr = 3.
tabb1-activetab = 'TABS3'.
option ='3'.
*CH01 start
WHEN 'RSET'.
tabb1-prog = 'ZAXOMM005_V1'.
tabb1-dynnr = 4.
tabb1-activetab = 'TABS4'.
option = '4'.
ENDCASE.
case option.
when '1'.
IF SSCRFIELDS-UCOMM = 'ONLI'.
if p1_werks is initial or p1_lgort is initial or
p1_bstar is initial or p1_gjahr is initial.
message e000(vz) with text-001.
endif.
ENDIF.
when '2'.
IF SSCRFIELDS-UCOMM = 'ONLI'.
if p2_gjahr is initial.
message e000(vz) with text-005.
endif.
ENDIF.
when '3'.
IF SSCRFIELDS-UCOMM = 'ONLI'.
if p3_gjahr is initial.
message e000(vz) with text-005.
endif.
ENDIF.
*CH01 start
when '4'.
IF SSCRFIELDS-UCOMM = 'ONLI'.
if s4_werks is initial or p4_gjahr is initial.
message e000(vz) with text-001.
endif.
if p4_book is initial and
p4_summ is initial.
message e000(vz) with text-022.
endif.
ENDIF.
endcase.
I can give you some more information.
If I execute from program it is working fine, if I execute from T.code it is not working properly.
Regards.
Krishna.
‎2008 Jul 07 11:00 AM
HI....
JUST Check if you hae cleared sy-ucomm field.May this field is not getting cleared.thats why its running the first program itself.
‎2008 Jul 07 11:22 AM
Hello Shlesha,
Thanks for the reply,
That is not the problem, please see my code below.
at selection screen.
AT SELECTION-SCREEN.
CASE SSCRFIELDS-UCOMM.
WHEN 'BOOK'.
tabb1-prog = 'ZAXOMM005_V1'.
tabb1-dynnr = 1.
tabb1-activetab = 'TABS1'.
option = '1'.
WHEN 'SUMM'.
tabb1-prog = 'ZAXOMM005_V1'.
tabb1-dynnr = 2.
tabb1-activetab = 'TABS2'.
option = '2'.
WHEN 'POST'.
tabb1-prog = 'ZAXOMM005_V1'.
tabb1-dynnr = 3.
tabb1-activetab = 'TABS3'.
option ='3'.
WHEN 'RSET'.
tabb1-prog = 'ZAXOMM005_V1'.
tabb1-dynnr = 4.
tabb1-activetab = 'TABS4'.
option = '4'.
ENDCASE.
case option.
when '1'.
check sy-ucomm = 'ONLI'.
if p1_werks is initial or p1_lgort is initial or
p1_bstar is initial or p1_gjahr is initial.
message e000(vz) with text-001.
endif.
when '2'.
check sy-ucomm = 'ONLI'.
if p2_gjahr is initial.
message e000(vz) with text-005.
endif.
when '3'.
check sy-ucomm = 'ONLI'.
if p3_gjahr is initial.
message e000(vz) with text-005.
endif.
when '4'.
check sy-ucomm = 'ONLI'.
if s4_werks is initial or p4_gjahr is initial.
message e000(vz) with text-001.
endif.
if p4_book is initial and
p4_summ is initial.
message e000(vz) with text-022.
endif.
endcase.
Regards.
Krishna.
‎2008 Jul 07 11:33 AM
Hi Krishna,
Instead of AT SELECTION-SCREEN event try to seggregate the fields and use the event AT SELECTION-SCREEN ON <field> . Then it will stop at screen where the error occurs. This will solve the issue.
Regards,
Swapna.
Edited by: NagaSwapna Thota on Jul 7, 2008 12:34 PM
‎2008 Jul 07 11:39 AM
clear the 'option' flag after each pass. probabaly its better u run the transaction in debugger to see the exact flow.
‎2008 Jul 07 11:56 AM
Hello Swapna,
Can you elaborate your answer please.
Regards.
Krishna.