Application Development 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: 

Message type E in PAI

Former Member
0 Kudos
423

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

4 REPLIES 4

Former Member
0 Kudos
96

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

0 Kudos
96

Sorry your ideas don't work.

Regards

Angela

former_member182371
Active Contributor
0 Kudos
96

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.

Former Member
0 Kudos
96

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