‎2008 Jan 15 4:58 AM
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
-
My codes as 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. "USER_COMMAND_9000 INPUT
MODULE USER_COMMAND_9001 INPUT.
IF SY-UCOMM = 'SAVE'.
IF IO_NAME IS INITIAL.
MESSAGE E004(ZMSG02).
ELSE.
PERFORM INSERT_TABLE.
ENDIF.
ENDIF.
ENDMODULE. "USER_COMMAND_9000 INPUT
MODULE USER_COMMAND_9002 INPUT.
IF SY-UCOMM = 'SAVE'.
IF IO_AGE IS INITIAL .
MESSAGE E005(ZMSG02).
ELSE.
PERFORM INSERT_TABLE.
ENDIF.
ENDIF.
ENDMODULE.
MODULE USER_COMMAND_9003 INPUT.
IF SY-UCOMM = 'SAVE'.
IF IO_GENDER IS INITIAL.
MESSAGE E006(ZMSG02).
ELSE.
PERFORM INSERT_TABLE.
ENDIF.
ENDIF.
ENDMODULE.
-
Screen 9000 codes
-
PROCESS BEFORE OUTPUT.
*&SPWIZARD: PBO FLOW LOGIC FOR TABSTRIP 'TABNAME2'
MODULE TABNAME2_ACTIVE_TAB_SET.
CALL SUBSCREEN:
9001_SCA INCLUDING G_TABNAME2-PROG '9001',
9002_SCA INCLUDING G_TABNAME2-PROG '9002',
9003_SCA INCLUDING G_TABNAME2-PROG '9003'.
MODULE STATUS_9000.
*
PROCESS AFTER INPUT.
*&SPWIZARD: PAI FLOW LOGIC FOR TABSTRIP 'TABNAME2'
CALL SUBSCREEN:
9001_SCA,
9002_SCA,
9003_SCA.
MODULE TABNAME2_ACTIVE_TAB_GET.
MODULE USER_COMMAND_9000.
-
Screen 9001
-
PROCESS BEFORE OUTPUT.
MODULE PBO_9001.
PROCESS AFTER INPUT.
CHAIN.
FIELD:IO_NAME.
MODULE USER_COMMAND_9001.
ENDCHAIN.
-
Screen 9002
-
PROCESS BEFORE OUTPUT.
MODULE PBO_9002.
*
PROCESS AFTER INPUT.
CHAIN.
FIELD:IO_AGE.
MODULE USER_COMMAND_9002.
ENDCHAIN.
-
Screen 9003
-
PROCESS BEFORE OUTPUT.
MODULE PBO_9003.
*
PROCESS AFTER INPUT.
CHAIN.
FIELD:IO_GENDER.
MODULE USER_COMMAND_9003.
ENDCHAIN.
-
Please tell me what is wrong with my codes? Please type out the codes to let me understand. I will reward all useful answers
Edited by: JuzMe on Jan 15, 2008 5:36 AM
‎2008 Jan 15 5:21 AM
Hi,
if i think right first tab input is mandatory, if u provide input for first tab then automaticaly second and third tab inputs enable,
to remove mandatory input for first tab then u can see the screen attributes....
reward points if useful,
seshu.
‎2008 Jan 15 5:23 AM
Can tell me where should I edit my codes to do as you said? The best please provide me with sample codes.
‎2008 Jan 15 6:18 AM
Hi,
Give some default values to input fields like IO_NAME etc., in TOP INCLDE.
like:
IO_NAME type <its type> value 'XYZ'.
The reason for the problem is that you have set the error message for the input field of first tab if it is initial. In tabstrip it will not allow you to enter further values till you fill that input field acording to your code. So before going to second tab you must ensure that the input field in the first tab is not initial.
So I hope by giving default values you can do that. Else you have to give warning message like "The input field of first tab is not entered. Do you want to continue?" etc..
Regards,
Renjith Michael.
‎2008 Jan 15 11:26 AM
Hi,
Try this code in the PAI module where you have written the code for the SAVE button.This might help you.
CASE SY-UCOMM.
WHEN 'SAVE'.
*Checking for the active tab*
tab_po-activetab = 'TAB_ITEM'. '"tab_po is the tabstrip name and TAB_ITEM is the tab name.
LOOP AT SCREEN.
To make the screen editable.
screen-active = 1.
ENDLOOP.
If this code works then you can implement the same code for other tabs in the tabstrip.
Revert for any querries.
Reward points if helpfull.
Regards,
Kashyap Ivaturi