After message type e, program doesn't return to selection-screen ABAP

江枫思渺然 提交于 2019-12-23 12:27:59

问题


I'm trying to use a message type E in my report. The thing is that when the message is triggered, the program doesn't return to the selection-screen. Can anyone help me? Here's the code I use to achieve this:

IF rb_tri IS NOT INITIAL AND p_trim-low IS INITIAL.

  MESSAGE e038.

ENDIF.

Thanks :)


回答1:


When I combine your question with your answer I offer another solution:

Don't make your test after starting the process (START-OF-SELECTION) but on the selection screen:

PARAMETER: p_test.

AT SELECTION-SCREEN.
  IF p_test IS INITIAL.
    MESSAGE e038(00).
  ENDIF.

The E-message blocks the selection screen until the problem is solved.




回答2:


I found the aswer. I should have used a S message and display it like a E type message. To get back to the selection-screen I had to use LEAVE LIST_PRECESSING. The code is below:

START-OF-SELECTION.

IF rb_tri IS NOT INITIAL AND p_trim-low IS INITIAL.

  MESSAGE s038 DISPLAY LIKE 'E'.
  Leave list-processing.

ENDIF.

Thank you anyway.




回答3:


Message text-001 TYPE 'S' Display LIKE 'E' 

or

At selection screen on radiobutton group rad1.
  if condition
    message text-001 type 'I' display like 'E'.
    set screen 1000.
    leave screen.
  endif


来源:https://stackoverflow.com/questions/11832700/after-message-type-e-program-doesnt-return-to-selection-screen-abap

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!