Skip to Content
author's profile photo
Former Member

Tabstrip - mandatory fields

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Best Answer
    author's profile photo
    Former Member
    Jul 28, 2009 at 09:02 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • 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

  • author's profile photo
    Former Member
    Jul 28, 2009 at 09:35 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Jul 28, 2009 at 09:36 AM

    no need of changing the type.

    Try the method i have given

    I have used it and it was working fine

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Jul 28, 2009 at 10:11 AM

    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

    Add comment
    10|10000 characters needed characters exceeded