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

to remove error message....

Former Member
0 Likes
894

hi i am calling a program from selection screen of another program

for eg program one has selectio screen with a button

Case ok_code.

when 'BUT1'.

SUBMIT zprogram2 and return.

now prpgram tws has selection screen

field 1 mandatory

field 2 mandatory

now when ipress the butoon the second program program2 iand its selection screen is displayed but when it is called it is displaying the error message of to make entry in all fields as when it comes when user don't enter in mandatory field

please let me know how to avoid this errro as i am calling only the program with above code the user is not entrying anything so the message should not come whille calling the program2 ...

regards

Arora

1 ACCEPTED SOLUTION
Read only

sachin_mathapati
Contributor
0 Likes
790

Hi Nishant,

Do not make the selection scrren field as mandatory in Program2 , instead raise error message in Program2 if the selection screen fields are blank..

AT SELECTION-SCREEN.

If so_field1 is initial.

Error: Field 1 is mandatory.

Endif.

If so_field2 is initial.

Error: Field 2 is mandatory.

Endif.

Reward if Helpful..

Regards,

Sachin M M

Edited by: Sachin Mathapati on Jul 2, 2008 11:42 AM

6 REPLIES 6
Read only

sachin_mathapati
Contributor
0 Likes
791

Hi Nishant,

Do not make the selection scrren field as mandatory in Program2 , instead raise error message in Program2 if the selection screen fields are blank..

AT SELECTION-SCREEN.

If so_field1 is initial.

Error: Field 1 is mandatory.

Endif.

If so_field2 is initial.

Error: Field 2 is mandatory.

Endif.

Reward if Helpful..

Regards,

Sachin M M

Edited by: Sachin Mathapati on Jul 2, 2008 11:42 AM

Read only

former_member195383
Active Contributor
0 Likes
790

Hi ..

In ur program2 check if u are using select options as below...

SELECT-OPTIONS: s_rsnum FOR rkpf-rsnum obligatory.

if so then remove the obligatory from selectoption....

The error message will not come again.....

Reward points if useful....

Read only

0 Likes
790

hi Rudra

i dont want to remove the obligatory part as its a obligatory feield only as conveyed in my first message

i want to remove the error message when the screen is called first as it should only come whenuser does nto enters sth in it

the solution provied above will work but i need to put some check in my above code only or if there is some other better way to do so while calling screen or if i am missing sth

regards

Nishant

Read only

0 Likes
790

Hi Arora,

As said..

Do not make the selection screen fields as obligatory but instead raise error in Program2 if the selection screen field is blank..

At selection screen.

If s_field1 is initial.

Raise error.

Endif.

Hope this will solve your problem.

Regards,

Sachin M M

Read only

0 Likes
790

Hi Arora...

if my understanding of the issue is clear...then i ll suggest the following..

1.export a variable to memory from the first program....

say wf_memo..

Now import that variable in program 2.

Put a check in program 2..

if not wf_memo is initial.(means program2 is called by program1)

giv an error message as "The X filed is empty .."

endif.

try that or

2. put a check in the program1 itself...if empty it will ask for entering value...

Hope one of the abv solutions will help u..

Read only

Former Member
0 Likes
790

got the solution ...thanks all