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: 

TRM Error Message Screen via RF (only relevant if you have worked on TRM)

aidan_mulcahy
Active Participant
0 Kudos

Hi All,

I am calling an error message screen from the PAI of our custom Source RF Picking screen.

This error is called using


CALL FUNCTION 'LMBP_STEP_MESSAGE_DISPLAY'
  EXPORTING
    I_MSGTY         = 'I'
    I_MSGNO         = '897'
    I_MSGID         = 'S1'
    I_MSGV1         = 'Testing'
   IS_RLMBP        = rlmbp
   IS_TRPRP        = gs_TRPRP.

The message screen appears correctly but when I press the button on the error screen, the program goes back to the Menu screen, rather than the Source screen.

Has anyone output their own messages in RF-TRM?

Thanks.

1 ACCEPTED SOLUTION

former_member194669
Active Contributor
0 Kudos

Try to pass the following values in I_MSGTY and check

"E" - error message

"Q" - query message


CALL FUNCTION 'LMBP_STEP_MESSAGE_DISPLAY'
  EXPORTING
    I_MSGTY         = 'Q'  " <<--Try to pass here Q or E
    I_MSGNO         = '897'
    I_MSGID         = 'S1'
    I_MSGV1         = 'Testing'
   IS_RLMBP        = rlmbp
   IS_TRPRP        = gs_TRPRP.

6 REPLIES 6

former_member194669
Active Contributor
0 Kudos

Try to pass the following values in I_MSGTY and check

"E" - error message

"Q" - query message


CALL FUNCTION 'LMBP_STEP_MESSAGE_DISPLAY'
  EXPORTING
    I_MSGTY         = 'Q'  " <<--Try to pass here Q or E
    I_MSGNO         = '897'
    I_MSGID         = 'S1'
    I_MSGV1         = 'Testing'
   IS_RLMBP        = rlmbp
   IS_TRPRP        = gs_TRPRP.

0 Kudos

Thanks for that.

I tried that but it only gives me a Question and Yes/No screen.

I really believe there must be a smiple way to do this as we cannot be the first people who want to send their own messages.

Any other thoughts?

0 Kudos

What about "E" ?

if you checked the code inside this fm for E


  if sy-msgty = gc_msgty_e.
    message id sy-msgid type sy-msgty number sy-msgno
       with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    exit.
  endif.

So control will NOT go to menu after message display

otherwise.

after the function module call try to clear the okcode, so control will again go back to PBO of the same screen

0 Kudos

'E' won't work either. That message statement will cause a direct message to be sent to the screen which will not work in the RF environment.

What we have found so far is that the message needs to be called before the return_data module in the PAI (as we need the check to happen before SAP's standard checks). After the FM is called the ok_code needs to be set to the value we need so that it returns to the source.

It doesn't seem like a good way to do it, but it works.

Have you ever sent your own messages to the screen?

Do you (anyone) have a TRM RF-Programming Cookbook to advize on the best way to make our own screens?

Thanks for the help.

0 Kudos

I have used following function module for message to RF screen.


 call function 'CALL_MESSAGE_SCREEN'
    exporting
      i_msgid          = message_id
      i_lang           = sy-langu
      i_msgno          = message_number
      i_msgv1          = message_var1
      i_msgv2          = message_var2
      i_msgv3          = message_var3
      i_msgv4          = message_var4
      i_condense       = ' '
      i_non_lmob_envt  = 'X'
    exceptions
      invalid_message1 = 01.

After the fm call Ok_code has been controlled as per out needs.

0 Kudos

Isn't that the FM to use in standard WM-RF? Can I use that here too?

Have you developed in TRM-RF? Do you have any good documentation? I can't find anything really useful apart from SAP Help, which is too basic.

Thanks again.