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

regarding validations of screen in modulepool programming

Former Member
0 Likes
481

hi experts,

I have to do field control based on some fields, the fields may undergo "optional", "mandatory", "display only after first entry" "warning message" for "mandatory" fields and "Error Message" for "mandatory fields".

But the above should not be hard coded. It should be controlled via a maintenance table.

can any one tell me how to do this?

1 ACCEPTED SOLUTION
Read only

alejandro_bindi
Active Contributor
0 Likes
458

If I get right what your requirement is (modify statuses of the fields depending on program status and conditions) I think what you need to do is to create a Z customizing table with the key field defined as "fieldname" (i don't recall the data element as of now). Then you select from that table and set each field screen status depending on what the table has defined for that field (other key fields of the table could be the conditions and the remaining fields the properties to set). Then you create a mainteinance view of the table (from SE11) and finally create a transaction to call the SM30 trx with the table as parameter.

Hope that helps.

Greetings

4 REPLIES 4
Read only

former_member196299
Active Contributor
0 Likes
458

Hi Srinivas ,

If you d't want to handle the errors directly using message statement , then you can handle in the following way . Collect the message numbers and the messages in an i. tab. and then pass it to a function module BALW_BAPIRETURN_GET2 .In return you will have an internal table with all the error messages . If you want to show the user a popup for error messages then you can use fm FB_MESSAGES_DISPLAY_POPUP.

Thanks

Ranjita

Read only

Former Member
0 Likes
457

Hi,

For your requirement, the type of messages you want to give during execution has to be done by calling a Function Module "CM_F_MESSAGE". exporting

ARBGB = <Message Id>

MSGNR = <Message Number>

MSGTY = either I or E or W depending on your requirement

MSGV1 = <Message you want to give>

thanks,

sksingh

Read only

alejandro_bindi
Active Contributor
0 Likes
459

If I get right what your requirement is (modify statuses of the fields depending on program status and conditions) I think what you need to do is to create a Z customizing table with the key field defined as "fieldname" (i don't recall the data element as of now). Then you select from that table and set each field screen status depending on what the table has defined for that field (other key fields of the table could be the conditions and the remaining fields the properties to set). Then you create a mainteinance view of the table (from SE11) and finally create a transaction to call the SM30 trx with the table as parameter.

Hope that helps.

Greetings

Read only

Former Member
0 Likes
457

Thanks experts i got my answer.