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

Tabstrip - mandatory fields

Former Member
0 Likes
2,186

Hi all,

I have a tabstrip control with diffent subscreens.

When the user push the save button all mandatory subscreen fields should be validated.

This works for the active tab (chain. fields: .... endchain.) but not for the other tabs.

How to validate the subscreen fields from main screen?

regards

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,534

Hi

At the time of saving check whether the fields in the other screens are initial

If it is initial dont perfom save

there give a message to enter values on the fields(you can do it with if.. else)

if you want based on the condition you can change the active tab and screen

If u need more clarification let me know

11 REPLIES 11
Read only

Former Member
0 Likes
1,535

Hi

At the time of saving check whether the fields in the other screens are initial

If it is initial dont perfom save

there give a message to enter values on the fields(you can do it with if.. else)

if you want based on the condition you can change the active tab and screen

If u need more clarification let me know

Read only

0 Likes
1,534

The problem is that the field checks are in the different subscreen PAIs. But only the current subscreen PAI (not all) will be triggered.

How can I do this?

Read only

0 Likes
1,534

To achieve that you have to do pagging localy (in SAP GUI). Go to tab attributes and select function type P .

Now, each time you change tabstrip all input checks are performed for all tabstrips.

Refer [tabstrips|http://help.sap.com/saphelp_nw04/helpdata/en/17/5bf1b52ba211d2954f0000e8353423/content.htm] - section Paging in the SAPgui

Regards

Marcin

Read only

0 Likes
1,534

I have changed the function code to type P but now I get the following error:

No subscreen is assigned to tabstrip pushbutton VMD_TAB_CREATE_TAB2.

Read only

0 Likes
1,534

Sorry I missed that you need to complete the following:

- you have to have one tabstrip

- each tab has to have one function code assinged to all of them i.e FCODE

- all tabs must be of type P (as mentoined before)

- each tab has separate subscreen area SUB1, SUB2, SUB3 etc

- in flow logic you need


PROCESS BEFORE OUTPUT.
  CALL SUBSCREEN: SUB1 INCLUDING SY-REPID '0110',
                  SUB2 INCLUDING SY-REPID '0120',
                  SUB3 INCLUDING SY-REPID '0130'.

PROCESS AFTER INPUT.
  CALL SUBSCREEN: SUB1,
                  SUB2,
                  SUB3.

For more info refer link I gave you. At bottom there is described program DEMO_DYNPRO_TABSTRIP_LOCAL . You can check that in system too.

Regards

Marcin

Read only

0 Likes
1,534

At the moment I do it this way. I have just one subscreen for all tabs and set the subscreens dynamically.

PBO.

CALL SUBSCREEN VMD_TAB_CREATE_SCA

INCLUDING G_VMD_TAB_CREATE-PROG G_VMD_TAB_CREATE-SUBSCREEN.

PROCESS AFTER INPUT.

CALL SUBSCREEN VMD_TAB_CREATE_SCA.

Read only

0 Likes
1,534

Hi

In a situation like your, the easy solution is create a module to check all mandatary fields and insert it in the PAI of main screen.

The MAINS SCREEN should be the same for all tabstrip, so thta module should be always triggered: u need to insert a control to do the control only for a certain situation (perhasp if the user press SAVE):

PBO.
CALL SUBSCREEN VMD_TAB_CREATE_SCA
INCLUDING G_VMD_TAB_CREATE-PROG G_VMD_TAB_CREATE-SUBSCREEN.

PROCESS AFTER INPUT.
CALL SUBSCREEN VMD_TAB_CREATE_SCA.

MODULE CHECK_FIELDS.

Max

Read only

0 Likes
1,534

So you are using one tabstrip area for all tabs and determine screen dynamically. This is ok, but only for paging and Application server.

For paging at SAP GUI you need separate subscreen areas and separate screen for each of them. Go to screen layout, place in each tab separate subscreen area VMD_TAB_CREATE_SCA1, VMD_TAB_CREATE_SCA2+, VMD_TAB_CREATE_SCA3 .

Now when you call main screen each tab receives its own unique subscreen on its own unique subscreen area . That's why you need to change it to


PBO.
CALL SUBSCREEN VMD_TAB_CREATE_SCA1 INCLUDING G_VMD_TAB_CREATE-PROG '0100'.  "here goes first subscreen in first area

"second tab - assign second subscreen to second area 
CALL SUBSCREEN VMD_TAB_CREATE_SCA2 INCLUDING G_VMD_TAB_CREATE-PROG '0200'.  

"third one
CALL SUBSCREEN VMD_TAB_CREATE_SCA3 INCLUDING G_VMD_TAB_CREATE-PROG '0300'.  

PROCESS AFTER INPUT.
"in PAI you need to call all these subsareas
CALL SUBSCREEN: VMD_TAB_CREATE_SCA1,
                                     VMD_TAB_CREATE_SCA2,
                                       VMD_TAB_CREATE_SCA3.

If you still face any problems juest read link I gave you. It will take you 15 minutes and you will certainly understand the concept.

Regards

Marcin

Read only

Former Member
0 Likes
1,534

hi,,,

consider you are having two sub screen 9000 and 9001

9000 is current screen

you are having fields X and Y in screen 9000 and A and B in 9001

while saving you check

if A is initial or B is initial or Xis initial or Y is initial

give a status message saying that enter values in all fields

else

write the code for saving

endif.

If you are doing like this the data will not be saved

Since you are giving status message you can edit all fields

Read only

Former Member
0 Likes
1,534

no need of changing the type.

Try the method i have given

I have used it and it was working fine

Read only

Former Member
0 Likes
1,534

Hi...

you tried the logic i gave you??

It will work

Am sure about it.

The only thing you have tio care is give a STATUS message at the time of saving

NOT ERROR message.

If you are giving status message all fields will be editable