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: 

Saving tabstrip - error msg problem

Former Member
0 Kudos

When I click on the 'Save' button for my tabstrip which has 3 tabs, the error is shown for what i want for the first tab as shown at this link:

http://img185.imageshack.us/img185/7290/screen1eg6.png

But when I look at my second and third tabs, the screen's input field is disabled when it is suppose to be enabled for the user to key in. The screen as show here:

http://img185.imageshack.us/img185/6615/screen2ns8.png

Line: -


My codes as below:

MODULE USER_COMMAND_9000 INPUT. Screen 9000 is the that contain the tabstrip

IF SY-UCOMM = 'BACK'.

LEAVE PROGRAM.

ELSEIF SY-UCOMM = 'EXIT'.

LEAVE PROGRAM.

ELSEIF SY-UCOMM = 'SAVE'.

IF IO_NAME IS INITIAL.

MESSAGE E004(ZMSG02).

CLEAR SY-UCOMM.

ELSEIF IO_AGE IS INITIAL.

MESSAGE E005(ZMSG02).

CLEAR SY-UCOMM.

ELSEIF IO_GENDER IS INITIAL.

MESSAGE E006(ZMSG02).

CLEAR SY-UCOMM.

ELSE.

PERFORM INSERT_TABLE.

ENDIF.

ENDIF.

ENDMODULE. "USER_COMMAND_9000 INPUT

MODULE USER_COMMAND_9001 INPUT. Screen 9001 contains the subscreen for first tab

CASE SY-UCOMM.

WHEN 'SAVE'.

IF IO_NAME IS INITIAL.

MESSAGE E004(ZMSG02).

PERFORM INSERT_TABLE.

ENDIF.

ENDCASE.

ENDMODULE. "USER_COMMAND_9000 INPUT

MODULE USER_COMMAND_9002 INPUT. Screen 9002 contains the subscreen for second tab

CASE SY-UCOMM.

WHEN 'SAVE'.

IF IO_AGE IS INITIAL.

MESSAGE E004(ZMSG02).

ELSE.

PERFORM INSERT_TABLE.

ENDIF.

ENDCASE.

ENDMODULE.

MODULE USER_COMMAND_9003 INPUT. Screen 9003 contains the subscreen for third tab

CASE SY-UCOMM.

WHEN 'SAVE'.

IF IO_GENDER IS INITIAL.

MESSAGE E004(ZMSG02).

ELSE.

PERFORM INSERT_TABLE.

ENDIF.

ENDCASE.

ENDMODULE.

Line: -


Please tell me what is wrong with my codes? Please type out the codes to let me understand. I will reward all useful answers

8 REPLIES 8

Former Member
0 Kudos

Screen are disabled because you have displayed error message at "SAVE" event.

I Belive that IO_NAME, IO_AGE and IO_GENDER are the inputable fields on your tabstrips.

Validation needs to be done with Field statement.

Example,

Process After Input. ---> Subcscreen.

Field IO_NAME module val_name.

Module val_name INPUT.

if IO_NAME is initial.

message ...

endif.

endmodule.

Similar processing needs to be done for the other two fields.

Former Member
0 Kudos

U put those fields in:

CHAIN

ENDCHAIN.

awrd points if useful

Bhupal

Former Member
0 Kudos

Currently one of the subscreen of my tab called screen 9001 the codes is like this:

-


PROCESS BEFORE OUTPUT.

MODULE PBO_9001.

PROCESS AFTER INPUT.

CHAIN.

FIELD:IO_NAME.

MODULE USER_COMMAND_9001.

ENDCHAIN.

-


Must I change this to solve the problem?

0 Kudos

Hi,

Try modifying the other subscreens PAI also in the same way putting CHAIN and ENDCHAIN.

Hope it helps.

awrd points if useful

Bhupal

Former Member
0 Kudos

I already used that to all my other subscreens

Former Member
0 Kudos

Subscreen 9001 : You have written something like this:

MODULE USER_COMMAND_9001 INPUT.

CASE SY-UCOMM.

WHEN 'SAVE'.

IF IO_NAME IS INITIAL.

MESSAGE E004(ZMSG02).

PERFORM INSERT_TABLE.

ENDIF.

ENDCASE.

ENDMODULE.

You need to remove the check for SY-UCOMM from 9001 module and chain-endchain block should read somethink like this given below:

MODULE USER_COMMAND_9001 INPUT.

IF IO_NAME IS INITIAL.

MESSAGE E004(ZMSG02).

ENDIF.

ENDMODULE.

Similar thing needs to happen in other two tab strips.

In main screen 9000 - user command shuld not include these checks and it should read like the code given below:

MODULE USER_COMMAND_9000 INPUT.

IF SY-UCOMM = 'BACK'.

LEAVE PROGRAM.

ELSEIF SY-UCOMM = 'EXIT'.

LEAVE PROGRAM.

ELSEIF SY-UCOMM = 'SAVE'.

PERFORM INSERT_TABLE.

ENDIF.

ENDMODULE. "

Edited by: Richa Gupta on Jan 9, 2008 9:51 AM

Former Member
0 Kudos

That still dun solve the problem. Any other solutions?

Former Member
0 Kudos

Any solution?