2009 Mar 14 7:39 PM
Hi all,
Im doing some validation in the program, and saving the result in internal table. Based on the validation internal table contains messages as well as status ('E' or 'S'). Can i display it in ALV as a pop-up with button for status as red for 'E' and green for 'S'? Can you please tell how can we display like that?
Thanks,
Amal
Hi all,
Im doing some validation in the program, and saving the result in internal table. Based on the validation internal table contains messages as well as status ('E' or 'S'). Can i display it in ALV as a pop-up with button for status as red for 'E' and green for 'S'? Can you please tell how can we display like that?
Thanks,
Amal
2009 Mar 14 7:46 PM
Use:
Function Modlue: REUSE_ALV_POPUP _ TO _ SELECT
OR
It will just give popup..
Message 'XXXX' TYPE 'E' DISPLAY LIKE 'I'.
Message 'XXXX' TYPE 'S' DISPLAY LIKE 'I'.
Regards,
Gurpreet
2009 Mar 14 7:52 PM
for one field(status) , need to display as button, if the value is 'E' red button and if the value is 'S' green button.
2009 Mar 14 9:22 PM
Hi Amal,
Once you give
message XXXX type 'S' or TYPE 'E'.
the system variable sy-msgty is set which gives the type of the messages displayed..
there is another way you can also store the messages by declaring a table with the structure type
bdcmsgcoll , which will also hold type of the message by msgty field...
use if conditions...
if sy-msgty = 'S'.
" logic to display green button
else sy-msgty = 'E'
" logic to display red button
endif.Regards,
Siddarth
Edited by: Siddharth Chordia on Mar 14, 2009 11:19 PM
2009 Mar 14 10:17 PM
let me try to understand ur requirement first,
u want to collect ur messages into a table and display them right,
and what abt buttons, u mean icons , red and green icons?
i did not understand by colored buttons.
2009 Mar 15 6:33 PM
yes, its colored Icons.
Now im thinking of displaying it as application log. can you tell me how to display our own(custom) mesage as long text?
i.e., Im displaying message as application log for error and success message types. But for error message type i need to give more information like what the next action to be taken to resolve the error. Thinking of having that in long text option. but i dont know how give custom message as long text.
Can anyone let me know how to do this?
Thanks,
Amal
2009 Mar 15 6:43 PM
Hi Amal,
First of all, you are breaking the rules of SDN....
Rule says every new question has to be asked in the new thread,
For the answer to your question is as follows....
To create a long text....
you need to follow certain steps by which you can achieve the requirement...
1. Go to SE91, create your own custom message class. ( say you are creating by name yamal )
2. do not enter any messages in that just create it and give the short text for it that all, save and activate it.
3. now go to your program...
the place where you are writing
message 'XXXX' type 'S' or type 'E'.
comment this line and copy 'XXXX'.
then write ( say for example the message type was 'S' ) then
message s001(yamal).
now double click on yamal it will take you to the message class and 001 row...
now paste the 'XXXX' which you copied from message....
at the right of the row 001 you will find one push button
click on it
there you can enter long text for the message....
next time for another message you want a long text
write
message e002(yamal).
double click and follow the same procedure...
REMEMBER : every new message should appear on a new line.
Regards,
Siddarth
2009 Mar 15 9:05 PM
i dont think he's breaking rules. Asking multiple different questions is not allowed but his questions are interrelated they both actually point to same requirement . Isn't it?
So i think continuing in same thread is fair enough.
2009 Mar 16 12:20 AM
I think if moderators look at it, then it would be fair enough...
2009 Mar 16 8:47 AM
Siddharth,
Is it possible to pass the value dynamically to long text?
i.e., In message using 'WITH' we can pass the dynamic values to message. We can replace the & with values dynamically. Same can we do for ling text?
Thanks,
Amal
2009 Mar 16 8:55 AM
Hi Amal,
You can use Function Module:
REUSE_ALV_POPUP_TO_SELECT,
Where in that set PF status by this and add button on it:
FORM pf_status USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'FIRST'.
ENDFORM. "PF_STATUS
Then capture the user command of the button added through pf-status:
FORM comm USING ucomm LIKE sy-ucomm selfield TYPE slis_selfield.
DATA: okcode TYPE sy-ucomm.
okcode = ucomm.
CASE okcode.
WHEN 'REF'.
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
titel = 'MANSI'
txt1 = 'CREATED BY'
txt2 = SY-UNAME
* TXT3 = ' '
* TXT4 = ' '
.
endcase.
And then in the function module,REUSE_ALV_POPUP_TO_SELECT
Hope it helps
Regrds
Mansi
2009 Mar 19 1:42 PM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |