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

Screen painter

Former Member
0 Likes
681

Hi,

In one screen(designed using screen painter) I am giving some mandatory fields. I am not entering values on those fields and if I try to do back button it is not going but it is displaying the message like enter mandatory fields I don’t want like that so please help me how to activate exit and cancel buttons I mean how to write the logic for this. And one more doubt is in one screen I am giving order number and I am displaying message if order number is not exist like ‘order is not exist’ it is displaying the message but I want to clear the order number entered on the screen at the time of displaying the error message itself. Please tell me the logic and where I can insert that logic. Please help me. I will give the points.

Thanks a lot.

7 REPLIES 7
Read only

Former Member
0 Likes
659

Hi,

Open the Screen in Screen Painter & goto field Attributes.

Instead of MANDATORY, change it to REQUIRED.

Activate the screen

& run the program.

Best regards,

Prashant

Read only

Former Member
0 Likes
659

Hi,

for clearing the Order number please clear the Order number after you are validating it.... i.e. before displaying the error message.

Thanks and Regards,

Jayant Sahu

Read only

Former Member
0 Likes
659

Change the button type to 'E'

On-exit command...so that validation checks will not be applicable for those buttons.

Regards

Vasu

Read only

Former Member
0 Likes
659

hi babji.

after displaying message u just clear the field , using clear statement .

use LEAVE PROGRAM to leave the screen.

regards

prajwal.k

Read only

Former Member
0 Likes
659

hi,

For activating the back and cancel button, without entering any mandatory values, you will have to add <b>at exit command</b> FM.

The module with the addition AT EXIT-COMMAND is processed before the automatic field input checks.

You can use it for navigation. You may only use the AT EXIT-COMMAND addition with one module for

each screen. It may not have an associated FIELD statement.

For clearing the order number, clear the contents before u display the message, u will will be having the if condition to check the order number, add the code in if condition in the PAI.

<b>Hope this is helpful, Do reward.</b>

Message was edited by:

Runal Singh

Read only

Former Member
0 Likes
659

hi,

for ur first condition. to come out of screen without giving mandatory fields use AT USER-COMMAND event as

in flow logic create a new module as

module exittt -> double click on it.

in pai.

AT USER-COMMAND ON MODULE EXIT.

leave to list-processing .

or ur logic here.

2. to clear the field before displaying error message to user as

before writing error message use

EX:

CLEAR P_MATNR.

MESSAGE E000 WITH 'ENTER MATERIAL NO'.

i think u wrote ur validation in AT SELECTION SCREEN EVENT.

as for ex to display error message if p_matnr field value is not correct

AT SELECTION SCREEN

select single * from mara where matnr in p_matnr.

CLEAR P_MATNR. /// WRITE CLEAR STATEMENT HERE.

if sy-subrc ne 0.

message E000 with ' GIVE CORRECT VALUE'.

ENDIF.

if helpful reward some points.

with regards,

Suresh Aluri.

Read only

Former Member
0 Likes
659

hi,

if u want to do that when user press BACK button and mendatory fields are not filled than also it should go back than give <b>'E' function type</b> of that BACK button.

now make one module in PAI.

PROCESS AFTER INPUT.

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

and in module write like this,

<b>MODULE exit_0100 INPUT.</b>

LEAVE PROGRAM.

<b>ENDMODULE. " exit_0100 INPUT</b>

reward if useful.