07-26-2007 11:10 AM
Hi Guys,
In one of the program I made I display an error message which flashes on the status bar. Now I wanted to pass some data which the user could see when he/she double clicks in the status bar and long text is displayed.
I created a message class (SE91) and created a message and inserted a long text. So now when I double click the window opens with long text.
But the problem is I want to pass some data as well. If i pass data it is displayed in the message that flashes in the bottom. How do I pass data to long text???
The data that i pass is reflected same in title of long text. I wanted to pass some data that is displayed in long text only but its not happening.
I would be glad if someone can help me out.
Thanks,
JG
07-26-2007 11:16 AM
Hello,
Use FM MASS_MESSAGE_SHOW_LONGTEXT
CALL FUNCTION 'MASS_MESSAGE_SHOW_LONGTEXT'
EXPORTING
ARBGB = PT_MESG_FAILURE-ARBGB
MSGNR = PT_MESG_FAILURE-TXTNR
MSGV1 = PT_MESG_FAILURE-MSGV1
MSGV2 = PT_MESG_FAILURE-MSGV2
MSGV3 = PT_MESG_FAILURE-MSGV3
MSGV4 = PT_MESG_FAILURE-MSGV4
EXCEPTIONS
NOT_FOUND = 1.
Regards
Kiran
07-26-2007 11:16 AM
in your long text you need the variable &1, &2, ... up to &4 i think but it may go further.
when done you canll the message like
Message 303(test) using EKKO-EBELN EKPO-EBELP
assuming your long text is
"the record &1 psoition &2 doesnt exist" your output will be
the record 381000131 position 00010 doesnt exist.
07-26-2007 11:51 AM
Use PERFORM - ENDPERFORM as SAP SCRIPT.
/: PERFORM GET_VALUE IN PROGRAM 'YOUR PROGRAM'
/: CHANGING &V1&
/: CHANGING &V2&
.
.
.
/: CHANGING &Vn&
/: ENDPERFORM
Now you can use this variable anywhere in the long text.
In the long text screen,
Goto->Change editor
In line editor mode than insert this code.
In 'YOUR PROGRAM'
FORM GET_VALUE TABLES IN_TAB STRUCTURE ITCSY
OUT_TAB STRUCTURE ITCSY.
READ TABLE OUT_TAB WITH KEY 'V1'.
CHECK SY-SUBRC = 0.
OUT_TAB-VALUE = 'Your value'.
MODIFY OUT_TAB INDEX sy-index.
.
.
.
ENDFOROM
Regards,
A.Singh
Message was edited by:
Amarjit Singh
07-27-2007 6:33 AM
Thanks a lot guys for your help. After trying & analyzing the solution I think the best way is to use a perform within the sap script. I will try and implement that.
But I am using a function module and the error is being generated there. So can I call a function module from a sapscript.
I will try... Thanks again.
07-27-2007 8:23 AM
Please note an important point:
Your long text should come in 'In modal dialog box'.
HELP->F1 help (tab)-> In modal dialog box.
By the way you can print those varible value using
&V1& -
&V4&
This value you can pass using
Message () with 'Value for V1' 'Value for V2' 'Value for V3' 'Value for V4'
In your message define four place holder:
XXX & & & &
Regards,
A.Singh