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

Help with a module pool snippet

Former Member
0 Likes
971

Dear experts,

I am provding a small code snippet of my program from module pool .Here my aim is that incase message

'No pending gatenentry found by this no.Plz check details.' is displayed .Program should go back to screen.

However, it moves to next statement after displaying information message. What to do ?.I

dont wat to use type 'E' as it doesnot let me do anything further.


if t_zrgpno[] is initial.
clear: t_rec,t_rec[].  "Incase something was entered previously
message 'No pending gatenentry found by this no.Plz check details.' type 'I'.
leave list-processing.
endif.
endif.

*********** Check if grn attached to this process has a blank store loc
*********** if yes then direct user to old system flow in order to finish ok.
data: genmes type string.

select mblnr zeile matnr lgort from mseg into table check_542 where smbln = p_grn
and bwart = '542' and shkzg = 'S' and werks = p_werks.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
939

you can use : message 'asdasd' type 'S' display like 'E'.

and the next statement : call screen 0. take you back to the screen executing the PBO.

10 REPLIES 10
Read only

Former Member
0 Likes
939

Use

SET SCREEN 0.

EXIT.

Cheers

Preeti

Read only

0 Likes
939

This snippet is on user_command module in case to button click.

Preeti, are you sure i will stay on same screen by doing set screen 0 and exit.If no then this is

not my choice.

I will also try through nabapdocu as told by you sir.

Read only

0 Likes
939

Just execute an EXIT and don't set SCREEN to 0, so program will go out of FORM/MODULE and at the end of PAI it will execute the PBO of the screen specified in the current screen definition (usually the same - SE51-attributes-next screen)

Setting SCREEN to 0 will send you back to previous screen.

Regards,

Raymond

Read only

Former Member
0 Likes
939

Hi

There are two special key words for Flow Logic ON INPUT and ON REQUEST

issue an Error Message instead of Type S message by using above key words.

for further info please take the help of Key word documentation of help of Tcode ABAPDOCU

Cheers

Ram

Read only

Former Member
0 Likes
940

you can use : message 'asdasd' type 'S' display like 'E'.

and the next statement : call screen 0. take you back to the screen executing the PBO.

Read only

0 Likes
939

Thanx soumya ,that solves my purpose

Read only

0 Likes
939

But i will be glad incase i can print the same message in form of information

Read only

0 Likes
939

change the type to 'I'. same code remains

Read only

0 Likes
939

...display like 'I'.

Read only

Former Member
0 Likes
939

If you put it in FIELD statement in module pool program, it will allow to edit the same field, but with error message in message bar.

Thus, you can directly use MESSAGE ... TYPE 'E'.

Example: FIELD zrgpno MODULE check_zrgpno.