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

Problem with tab strip in report programing

Former Member
0 Likes
1,814

hi,

I have coded 4 tab strips in a report program.Each tab has some obligatory fields.

My requirement is user must fill all obligatory fields.

suppose if I enter values only one tab and execute , its not asking the obligatory fields in other tabs.may be this is the behaviour of tab strips.

To check the obligatory fields,I wrote cheks in at selection screen with error message.In this case, suppose I didnt enter values in 2nd tab, the error message is coming under 1st tab screen and I am not able to select the 2nd tab.

Can any body tells me how to overcome this issu.

pavan meda

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,203

Hi,

I have faced the same problem about 6 months back. So, to solve it, don't make the fields obligatory from the screen painter or anywhere else. Instead use flags to achieve the same result. Whenever an user clicks on the second/third/fourth tab, before calling the respective subscreen, check for those fields. If those fields are initial or user has entered some invalid values, dont call the subscreen for second/third/fourth tab. Instead, give an error message. Also, make the active-tab as whichever tab is active. This will solve your problem. Also, you will get an error message for a particular tab on that tab only & not on any other tab.

Reward points if the answer is helpful.

Regards,

Mukul

8 REPLIES 8
Read only

Manohar2u
Active Contributor
0 Likes
1,203

in this case why are you using tabstrip? You are not displaying the fields to the user but saying its mandatory :-(...not a good idea to use tab strip...

Go for normal selection wcreen with radio buttons and using modif id by enabling relevant selection fields..

Read only

Former Member
0 Likes
1,203

I agree with Manohar. The users will not appreciate it If you force them to press multiple tabs to enter the required fields. Try putting the usual fields (including all mandatory ones on the first tab. The other tabs should be reserved for selection criteria that are not often used.

Rob

Read only

Former Member
0 Likes
1,203

Hi, user only suggested the tab strips.

Read only

Former Member
0 Likes
1,203

So explain to the user the problems they will have using tabstrips. You can save time for both of you by avoiding this.

Rob

Read only

Former Member
0 Likes
1,203

Hi Pavan.

As per my understanding of your program, the AT-SELECTION SCREEN is getting executed for all the tab-strips. Instead of that you can try grouping the obligatory fields in different tab-strips under different group names and then write AT-SELECTION SCREEN for each group separately. Check the additions available with AT-SELECTION SCREEN for this

I hope this will help.

Regards.

Vaishali.

Read only

Former Member
0 Likes
1,203

Hi If you have given Check routine and error message after entering the routine it will stop the processing at error message. so that only it is not going to second tabstrip.

so dont give error messages in routines(at least for obligatory field check).

Goto the subscreens you are using in the tabstrips through screen painter

and there goto attributes. In that select PROGRAM Tab.In that below input check box one drop down field with name INPUT. Select it to REQUIRED.

other wise you can do it throght this

In subscreen

ELEMENT LIST ->Special Attr. ->INPUT Change this drop down menu to REQUIRED.

You have to do it for all the fields which are obligatory.

In this case control will move to the particular tabstrip and particular field and asks for input.

By

Yuvaram

reward if Helpful

Read only

Former Member
0 Likes
1,204

Hi,

I have faced the same problem about 6 months back. So, to solve it, don't make the fields obligatory from the screen painter or anywhere else. Instead use flags to achieve the same result. Whenever an user clicks on the second/third/fourth tab, before calling the respective subscreen, check for those fields. If those fields are initial or user has entered some invalid values, dont call the subscreen for second/third/fourth tab. Instead, give an error message. Also, make the active-tab as whichever tab is active. This will solve your problem. Also, you will get an error message for a particular tab on that tab only & not on any other tab.

Reward points if the answer is helpful.

Regards,

Mukul

Read only

Former Member
0 Likes
1,203

Hi,

Check this example..

Basically you have to check the sy-ucomm not equal to the tab button function code (marked in bold)....

Note: The only thing is I have to press the second button twice to get to the second tab..But it works..

SELECTION-SCREEN BEGIN OF TABBED BLOCK tb1 FOR 10 LINES.

SELECTION-SCREEN TAB (30) tab1 USER-COMMAND tab1 DEFAULT SCREEN 1001.

SELECTION-SCREEN TAB (30) tab2 USER-COMMAND tab2 DEFAULT SCREEN 1002.

SELECTION-SCREEN END OF BLOCK tb1.

SELECTION-SCREEN BEGIN OF SCREEN 1001 AS SUBSCREEN.

PARAMETERS: p_1 TYPE matnr.

SELECTION-SCREEN END OF SCREEN 1001.

SELECTION-SCREEN BEGIN OF SCREEN 1002 AS SUBSCREEN.

PARAMETERS: p_2 TYPE kunnr.

SELECTION-SCREEN END OF SCREEN 1002.

INITIALIZATION.

tab1 = 'Material'.

tab2 = 'Customer'.

AT SELECTION-SCREEN.

<b> CHECK sy-ucomm <> 'TAB1' AND sy-ucomm <> 'TAB2'.</b>

IF p_1 IS INITIAL.

MESSAGE e000 WITH 'Required entry'.

ENDIF.

IF p_2 IS INITIAL.

MESSAGE e000 WITH 'Required entry'.

ENDIF.

START-OF-SELECTION.

WRITE: / p_1.

WRITE: / p_2.

Thanks,

Naren