07-21-2009 4:01 PM
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.
07-21-2009 4:37 PM
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.
a®
07-21-2009 4:37 PM
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.
a®
07-21-2009 6:10 PM
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?
07-21-2009 6:14 PM
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
a®
07-22-2009 8:50 AM
'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.
07-22-2009 2:02 PM
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.
a®
07-23-2009 8:05 AM
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.