Application Development 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: 

Tabstrip with mandatory fields(disabling)

Former Member
0 Kudos

Hi,

I have created selection screen with 2 tab stips. There are some mandatory fields on both the strips. Suppose i want to navigate to Strip to with out filling mandatory fields in strip one, the program will not allow. How can i achieve this. Can we disable madatory fields dynamically???

If i click on Strip 2 mandatrory fields on Strip 1 should be disabled and vice versa.

Provide me some solutions.

3 REPLIES 3

former_member585865
Contributor
0 Kudos

Hi,

Check in the Program itself don't give in the Tab strip fields as mandatory.

have a module in the pai and check mandatory there.

just see below example,


-----Name.
  IF zres_k-name IS INITIAL.
    MESSAGE 'Name cann''t be blank' TYPE 'S'
                            DISPLAY LIKE 'E'.
    v_error = 'X'.
*    ok_code = 'PERDET'.
    resumetab-activetab = 'PERDET'.
    v_dummy = 'OTHERS'.
    EXIT.
*-----Date of Birth.
  ELSEIF zres_k-dob IS INITIAL.
    MESSAGE 'Date of Birth cann''t be blank' TYPE 'S'
                                     DISPLAY LIKE 'E'.
    v_error = 'X'.
    resumetab-activetab = 'PERDET'.
    v_dummy = 'ZRES_K-NAME'.
    EXIT.
*-----Street/postal Code.
  ELSEIF zres_k-street  IS INITIAL OR zres_k-post_code IS INITIAL.
    MESSAGE 'Street/Postal Code cann''t be blank' TYPE 'S'
                                          DISPLAY LIKE 'E'.
    v_error = 'X'.
    resumetab-activetab = 'PERDET'.
    v_dummy = 'ZRES_K-FATHER_NAME'.
    EXIT.

0 Kudos

Hi, even I have the same problem as Vishnu. The solution you have provided is fine but as per the requirement, the fields have to be mandatory.  I tried using a function type "E" for the tabstrip and used the 'AT EXIT-COMMAND' wherein I gave the code as follows:

MODULE CHECK1 AT EXIT-COMMAND.

inside module CHECK1.

CASE SY-UCOMM.

WHEN 'TAB1'.

TS-ACTIVETAB = 'X'.

L_DYNPRO = '1000'.

WHEN 'TAB2'.

TS-ACTIVETAB = 'X'.

L_DYNPRO = '2000'.

ENDCASE.

TAB1 and TAB2 are the function codes for tabstrips, TS is the tabstrip control, L_DYNPRO is the screen number.

But still its not working. Can u please suggest something?

0 Kudos

Hi Vishnu,

disabling the field which is mandatory will not skip the field check,

we have to use AT_EXIT_COMMAND,