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

Bypassing mandatory fields

Former Member
0 Likes
2,149

If suppose i have a execute button n a function key in the output screen and i hav two mandatory fields.If i press the function key it has to go to some transaction bypassing the mandatory fields.How to proceeed this?

1 ACCEPTED SOLUTION
Read only

former_member632991
Active Contributor
0 Likes
1,513

Hi,

If u want to execute some function by bypassing all fields validation like mandatory check then while creating that function key in the pf-sattus, gice the type of that key as <b>FUNCTIONAL TYPE as 'E' i.e. exit command.</b>

This is the important point that has to be done and the fn will bw executed bypassing all fields validation.

and write the code for that function key in the module

<b>MODULE EXIT AT EXIT-COMMAND</b>.

MODULE EXIT INPUT.

CASE OK_CODE.

WHEN 'FUN_KEY'.

*GIVE UR CODE HERE.

ENDCASE.

Hope it solve ur query.

Regards,

Sonika

If suppose i have a execute button n a function key in the output screen and i hav two mandatory fields.If i press the function key it has to go to some transaction bypassing the mandatory fields.How to proceeed this?

3 REPLIES 3
Read only

Former Member
0 Likes
1,513

BY Default you should not declare them as mandatory fields.

Based on the button you press, yo u should simulate the behavior of mandatory fields.

If you execute button one, and the field is enpty, yo ushould raise an error message

if sy-ucomm = 'BUT1'.

if field is initial.

message e001(zz) 'Enter mandatory field'.

endif.

endif.

Regards,

Ravi

Read only

Former Member
0 Likes
1,513

Hi jeya,

When the user enters the execute button u can pass default value

like space or 0 to the mandatory fields.This will help u to bypass

mandatory fields.

Regards,

Pavithra.J.

>>>Reward points if u fin t useful<<<

Read only

former_member632991
Active Contributor
0 Likes
1,514

Hi,

If u want to execute some function by bypassing all fields validation like mandatory check then while creating that function key in the pf-sattus, gice the type of that key as <b>FUNCTIONAL TYPE as 'E' i.e. exit command.</b>

This is the important point that has to be done and the fn will bw executed bypassing all fields validation.

and write the code for that function key in the module

<b>MODULE EXIT AT EXIT-COMMAND</b>.

MODULE EXIT INPUT.

CASE OK_CODE.

WHEN 'FUN_KEY'.

*GIVE UR CODE HERE.

ENDCASE.

Hope it solve ur query.

Regards,

Sonika