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

Problem with tabstrip 'Save' button

Former Member
0 Likes
1,339

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

13 REPLIES 13
Read only

Former Member
0 Likes
1,271

Hai Juzme,

For your First Screen : Your did your code like if IO_NAME is initial then you are showing error message. so the output is showing like that only.

For second Screen : I think problem in screen painter attributes, Once you check the input field and output field Check boxes.

Regards,

Nagaraju.

Read only

Former Member
0 Likes
1,271

I tried to change the Input attributes and still the same outcome. Any other solutions?

Read only

Former Member
0 Likes
1,271

Hi,

Try this code in the tabstrip screens:

loop at screen.

if sy-dynnr = 'your screen no'.

if screen-name = <your io field name>.

screen-input = 1.

modify screen.

endif.

endif.

modify screen.

endloop.

Hope this helps. Also check whether you have the active tab as youre required one itself.

regards,

Renjith Michael.

Read only

Former Member
0 Likes
1,271

Where am I suppose to put the code you mentioned? Is it at my screen 9000 codes?

Please tell me exactly where to put exactly. Here is my 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.

-


Read only

0 Likes
1,271

Hi,

Try putting the code in your subscreen's PBOs.

ie., for tab1 put the code in pbo of 9001 etc...

Regards,

Renjith Michael.

Read only

Former Member
0 Likes
1,271

I got this problem when I try to put the code to my screen 9001.

http://img267.imageshack.us/img267/7522/erroryo4.png

How am I suppose to put the code?

Read only

0 Likes
1,271

Hi

You cannot write this logic in the Flow logic part of your screen program

Please write something like this,

                  • Flow Logic Part **************

Process Before Output.

Module Modify_screen.

******************************************

              • In you Include *****************

Module Modify_Screen.

loop at screen.

if sy-dynnr = '9001'.

if screen-name = 'IO_NAME'.

screen-inpur = 1.

modify screen.

endif.

endif.

endloop.

Endmodule.

******************************************

Hope this help !

~ Ranganath

Read only

0 Likes
1,271

Hi,

It is due to the reason that you cannot directly code thatin the PBOitself.

Instead, in the place you have added the code create a module, say,

PROCESS BEFORE OUTPUT.

module input_data.

double click on the modulename and create it.

Inside the module wirte the same code you wrote earlier and activate.

Regards,

Renjith Michael.

Read only

Former Member
0 Likes
1,271

The problem still remains even after i did that.

Read only

0 Likes
1,271

Hi,

Just try changing the Erroe Messages to Status Messages like:

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).

to

IF IO_NAME IS INITIAL.

MESSAGE S004(ZMSG02).

CLEAR SY-UCOMM.

ELSEIF IO_AGE IS INITIAL.

MESSAGE S005(ZMSG02).

CLEAR SY-UCOMM.

ELSEIF IO_GENDER IS INITIAL.

MESSAGE S006(ZMSG02).

Change any other error messages also to Status messages.

just to see if this causes the error. If so we will find an alternate solution.

Regards,

Renjith Michael.

Edited by: Renjith Michael on Jan 10, 2008 1:20 PM

Read only

Former Member
0 Likes
1,271

I will still need to use the E error messages. Any other solutions?

Read only

0 Likes
1,271

Hi,

You can use the Error messages. but in some cases the error messages can cause this kind of problems. So you can check if this is the cause and later you can revert to the original. or judt try by setting defult values to the input fields.

Regards,

Renjith Michael.

Edited by: Renjith Michael on Jan 10, 2008 2:34 PM

Read only

Former Member
0 Likes
1,271

then how do i check this problem?