‎2009 Dec 07 5:22 AM
Hello,
Is there any method to continue the program execution in PAI after displaying a warning message.
I will elaborate the sitution with an example below
loop at itab into wa_area.
if wa_area-fieldvalue is initial.
MESSAGE ID 'ZMSG' TYPE 'W' NUMBER 001. " display warning message if fieldvalue is initial
endif.
screen element = wa_area-fieldvalue. " assigning field value into screen fields.
endloop.
the problem is after displaying warning message the execution is started again from top. It does not continue execution from the line where it displayed warning message.
Any pointers to overcome this problem????
‎2009 Dec 07 5:28 AM
Hi,
Use SET CURSOR after displaying the warning message so that it remains at the same line.
Thanks,
Sri.
‎2009 Dec 07 5:40 AM
hi Sri,
I think set cursor keyword is used to set the cursor on a particular screen element.
will it be possible for the program execution as mentioned in my post????
thanks
‎2009 Dec 07 5:43 AM
Apologies.
I misunderstood your question. I thought you want the cursor to be placed in the field where you rise the warning message.
‎2009 Dec 07 5:37 AM
‎2009 Dec 07 5:56 AM
‎2009 Dec 07 5:43 AM
‎2009 Dec 07 5:46 AM
ya right now i am using information message but it needs to be changed to warning message
‎2009 Dec 07 6:25 AM
hi,
loop at itab into wa_area.
if wa_area-fieldvalue is initial.
MESSAGE ID 'ZMSG' TYPE 'W' NUMBER 001. " display warning message if fieldvalue is initial
endif.
screen element = wa_area-fieldvalue. " assigning field value into screen fields.
endloop.
in this code if u want to run some code after the warning message then write it under the warning message , so that after the warning message if u press enter the code below the warning message gets executed .
regards
‎2009 Dec 08 5:01 AM
the code written after warning message is not executed. once i press enter , the whole program is executed once more and the execution stops at the same warning message
‎2009 Dec 08 5:33 AM
I dont think there should be any restriction for using Information message as an warning to the user .
If it is not at all agreeable to use Information Message , then try to use Pop ups to show warning. This may solve your purpose.
‎2009 Dec 07 6:46 AM
Hi,
i think the error message type is not continue u r current loop so u can use
message ' msg no ' type 'S' display like 'E'.
i think its work ...
Regards,
Abhilash
‎2009 Dec 07 6:48 AM
Hi,
Is wa_area-fieldvalue is screen field. In case
Write your code in Module -- Mod1 .. This should solve your problem.
LOOP Itab..
FIELD <> MODULE <mod1>.
ENDLOOP.
Nag
‎2009 Dec 07 7:11 AM
You can use Success Message Display Like Warning.
This will work .