‎2008 Feb 01 8:37 AM
I have 3 tabstrips with 1 textbox at each tabstrip. When user did not key in the textbox in the first tab, the user is unable to select the other 2 tabs unless they keyed in the textbox in the first tab.
How am I suppose to do that? Codes examples is appreciated.
‎2008 Feb 01 5:41 PM
Hi Juzme,
There is one approach. Every tabstrip has a function code that triggers it right, most commonly TAB1, TAB2 and TAB3. Assume these are the function codes which you have attached to the tabs.
Now in the PBO you can put the following logic:
data: wa type sy-ucomm, itab like standard table of wa.
move 'TAB2' to wa. append wa to itab.
move 'TAB3' to wa. append wa to itab.
if textbox is initial.
set pf-status 'PF_STAT' excluding itab.
else.
set pf-status 'PF_STAT'.
endif.
What this will do is, if the text box field (here assumed to be "textbox" is not entered, the pf status shall deactivate the tabstrip 2 and 3, only when entered would they be activated.
Please try this out and let me know.
Cheers,
Aditya
‎2008 Feb 01 5:41 PM
Hi Juzme,
There is one approach. Every tabstrip has a function code that triggers it right, most commonly TAB1, TAB2 and TAB3. Assume these are the function codes which you have attached to the tabs.
Now in the PBO you can put the following logic:
data: wa type sy-ucomm, itab like standard table of wa.
move 'TAB2' to wa. append wa to itab.
move 'TAB3' to wa. append wa to itab.
if textbox is initial.
set pf-status 'PF_STAT' excluding itab.
else.
set pf-status 'PF_STAT'.
endif.
What this will do is, if the text box field (here assumed to be "textbox" is not entered, the pf status shall deactivate the tabstrip 2 and 3, only when entered would they be activated.
Please try this out and let me know.
Cheers,
Aditya
‎2008 Feb 04 12:56 AM
If I got textbox at the other 2 tabs namely: textbox2 at tab2 and textbox3 at tab3, how am I suppose to do the same if one of these textbox are empty?
Do I have to modify the codes given? Can show me the example?
‎2008 Feb 04 12:46 PM
Hi,
Maintain the following code in the PBO of the main screen:
data: wa type sy-ucomm, itab like standard table of wa.
*assuming t_tabstrip is your tabstrip control name
case t_tabstrip-aktiv.
*If first tab is selected
when 'TAB1'.
if textbox1 is initial.
*check textbox in first tab
refresh itab.
move 'TAB2' to wa. append wa to itab.
move 'TAB3' to wa. append wa to itab.
endif.
when 'TAB2'.
*if second tab is selected
if textbox2 is initial.
*check textbox in second tab
refresh itab.
move 'TAB1' to wa. append wa to itab.
move 'TAB3' to wa. append wa to itab.
endif.
when 'TAB3'.
*if third tab is selected
if textbox3 is initial.
*check textbox in third tab
refresh itab.
move 'TAB1' to wa. append wa to itab.
move 'TAB2' to wa. append wa to itab.
endif.
endcase.
set pf-status 'PF_STAT' excluding itab.