Skip to Content
author's profile photo Former Member
Former Member

Dynpro field updating in PAI before executing message of type E command

Hi there.

I am coping a couple of days with problem how to update or refresh dynpro fields with new values in PAI event just before executing message of type e command.

To demonstrate my problem I have simple dynpro with two char fields (one for entering values, other for displaying only), status GUI with two buttons defined and abap program:

REPORT zsl_x .

  ok_code TYPE sy-ucomm,

  inp = 'ggg'.
  txt = 'fff'.
  SET SCREEN '1100'.

*&      Module  STATUS_1100  OUTPUT
*       text
MODULE status_1100 OUTPUT.
  SET PF-STATUS '1100'.
  SET TITLEBAR '1100'.

ENDMODULE.                 " STATUS_1100  OUTPUT
*&      Module  USER_COMMAND_1100  INPUT
*       text
MODULE user_command_1100 INPUT.
    ok_ucode TYPE sy-ucomm.
  MOVE ok_code TO ok_ucode.
  CLEAR ok_code.
  SET SCREEN 1100.
  CASE ok_ucode.
    WHEN 'BUT1'.
      inp = 'but1'.
      txt = 'Button ONE pressed'.
    WHEN 'BUT2'.
      inp = 'but2'.
      txt = 'Button TWO pressed'.
      MESSAGE e001(00) with 'Error!'.
      SET SCREEN 0.
ENDMODULE.                 " USER_COMMAND_1100  INPUT

First when running the program I press button1 (BUT1). The fields inp and txt are filled with apropriate values and dynpro displays them.

Then I press button2 (BUT2) which has defined command in PAI that should fill dynpro fields with apropriate values, then execute message command.

But the fields of dynpro are refreshed on the screen only after pressing Enter (i.e. executing GOON).

My question is if it is possible to force SAP somehow to refres dynpro fields right before displaying of error message. I other words I need the correct field values to be displayed on the screen when user sees the error message.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Nov 22, 2007 at 02:34 PM

    You can try using the FM DYNP_VALUES_UPDATE to update the field with values before raising the error message



    reward points if useful

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 22, 2007 at 02:42 PM

    Hi the values will get refreshed once MODULE status_1100 OUTPUT executes. But before that only you are giving error message. That's why screen is not getting refreshed.

    That is not possible to refresh values before PBO...

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.