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

FIELD VALIDATION PROBLEM

Former Member
0 Likes
776

Hello Experts,

CASE SY-UCOMM.

WHEN 'PUSH'.

CLEAR : ZRG23OPGBAL , WA_RG23OPGBAL.

ZRG23OPGBAL = WA_RG23OPGBAL.

SELECT SINGLE * FROM ZRG23OPGBAL WHERE EXGRP = WA_RG23OPGBAL-EXGRP.

IF SY-SUBRC = 0.

MESSAGE 'EXCISE GROUP ALREADY EXISTS' TYPE 'E'.

ELSEIF SY-SUBRC <> 0.

INSERT ZRG23OPGBAL.

IF SY-SUBRC = 0.

MESSAGE 'RECORD CREATED SUCESSFULLY' TYPE 'I'.

ENDIF.

ENDIF.

CLEAR : WA_RG23OPGBAL.

ENDCASE.

The above is my coding , here i have a problem ie. when ever a error message is returned , all the field becomes inactive and i am not able to enter any value into that field. So please kindly help me how i can get rid of it.

Thanks in Advance.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
733

Hi,

Use this

FIELD <scr fld name> MODULE <mod name>.

write your validation code in module and give error message in the module while validation is false.

screen field will be edit mode which you used in field statement. other fields will be display mode.

5 REPLIES 5
Read only

Former Member
0 Likes
733

show your flow logic once.

and try to use chain endchain in the flow logic.

this will enable the other fields.

Read only

Former Member
0 Likes
733

Use Chain-endchain.

And keep perticuler flields outside which you don't want to inactive while error message.

Read only

karol_seman
Active Participant
0 Likes
733

Hi Arun,

when you raise error message type 'E' always are fields are deactivated and only that field is active where was focus (resp. which is not included in chain) when the error message was triggered. To prevent this use warning messages or status messages.

Regards,

Karol

Read only

Former Member
0 Likes
733

Hi Arun,

You can make a small change in the code to make it work in the way you intend to.

In the message that you are displaying in the Code, you can display it like Error.

So, Create a message class in SE91. Store the messages there according to your requirement.

In the code you write this.

MESSAGE S001(your_message_class) DISPLAY LIKE 'E'.

With this the user will get back the screen processing and unlike an Error message this will not lock the screen.

Let me know if this solves your requirement.

Hope this will help.

Thanks,

Samantak.

Read only

Former Member
0 Likes
734

Hi,

Use this

FIELD <scr fld name> MODULE <mod name>.

write your validation code in module and give error message in the module while validation is false.

screen field will be edit mode which you used in field statement. other fields will be display mode.