‎2008 Feb 26 3:51 PM
Hi guru.
When I set an error message in PAI ( not in chain - enchain or in loop - endloop ),
it is not possible work on dynpro because the fields are protected ( in other words they are not input fields ).
Can I solve it?
Regards
Angela
‎2008 Feb 26 4:12 PM
Hi Angela,
Is you requirement to make fields as changable, if that is the case you can try with FIeld XXXX Module XXX.
Regards,
Kiran I
‎2008 Feb 26 5:16 PM
‎2008 Feb 26 8:07 PM
Hi,
here´s one possible solution:
PAI
FIELD yourfield MODULE check_yourfield.
MODULE check_yourfield.
IF NOT yourfield IS INITIAL.
PERFORM do_your_checks_here.
ELSE.
LOOP AT SCREEN.
CASE SCREEN-NAME.
WHEN 'yourfield'.
screen-input = '1'.
MODIFY SCREEN.
ENDCASE.
ENDLOOP.
SET CURSOR FIELD yourfield.
MESSAGE E001(yourmessageclass).
ENDIF.
ENDMODULE.
Best regards.
‎2008 May 19 10:04 AM
Not sure if you've since solved this, but the approach I usually take is to set a flag in the PAI that indicates there was an exception and issues an "S" type message, and allow the PAI to flow back to the PBO and position the cursor on the "bad" data field... the user can't see what happens other than the cursor moves to the erroneous data and the message is displayed at the bottom of the screen (don;t forget to clear the exception flag in the PBO once used though).
Jonathan