2005 Feb 03 9:19 AM
Hi Everyone,
I have a small query Iam sure someone must have done it.
Is it possible to attach quickinfo in ALV list.
In my assignment I have to show the material description for a material number as quickinfo.
Please let me know which parameter we need to set in the fieldcatalog to get it.
Thanks and Regards
Varun
2005 Feb 03 2:54 PM
I want to make sure I understand your request.
You need a dynamic tooltip to show up? Its value will depend on the material number that the user is pointing to?
If so, the techniques described so far will only give you a static tooltip for the entire column.
2005 Feb 03 9:43 AM
Hi Varun,
You can use tooltip attribute given in field catalog for which field you want Quick info. Specify value in this tool tip attribute then you can see Quick info for that column.
I hope it will help you.
2005 Feb 03 9:58 AM
Hi Bhavik,
Thanks for ur help.
Iam trying to attach material description to the material.
Iam not able to find the attribute tooltip in the fieldcatalog.Also material description is another field which has to be attached with the material number. If u have a sample of how we set the tooltipn attribute it will be great.
Regards
Varun
2005 Feb 03 10:35 AM
Hi Bhavik and everyone,
Iam working on version 4.7.
The tooltip attribute is not there in fieldcatalog i tried to search it. Is there any other attribute by which we can get it.
thanks
Varun
2005 Feb 03 11:10 AM
Hi Varun
There is an field by name TIPDDICTXT in LVC_T_FCAT...
Hope that would help U...
Regards,
Immanuel
2005 Feb 03 11:39 AM
2005 Feb 03 11:11 AM
Hi varun,
Are you using Object-oriented approach for ALV display?
I have tried it in object oriented approach of ALV.
In this Tooltip attribute is given field catalog.
Let me know the status.
2005 Feb 03 2:54 PM
I want to make sure I understand your request.
You need a dynamic tooltip to show up? Its value will depend on the material number that the user is pointing to?
If so, the techniques described so far will only give you a static tooltip for the entire column.
2005 Feb 03 11:45 PM
Hi
I agree with Charles. ALV Grid has not the feature of dynamic runtime tooltips, at least for now.
*--Serdar
2005 Feb 04 4:26 AM
Hi Varun,
As Serdar and Charles have said, you cannot have the tooltip for the material as material text, since the tooltip in this case would have to be determined dynamically.
However, if you are very particular on having this, there's a small work-around involving a small compromise. ALV Grid does not allow a tooltip for the column contents, but with one exception. If a column contains icons, then you can have a tooltip for each icon in the column (i.e., on each row, you can have a different tool tip text for the icon).
In your case, just beside the material you can have a small column of icons. You can display the same icon on all the columns and have a different tool-tip text for each row, which would be the material text for the material on that row.
Please do let me know if you are interested in using this option, and I can provide you a small code sample.
Regards,
Anand Mandalika.
2005 Feb 04 4:42 AM
I am definitely interested, Poornanand.
Regards,
Subramanian V.
2005 Feb 04 5:19 AM
Hi Charles/Anand and everyone!
Thanks for those really good suggestions.
Anand if u could kindly forward me the code i will be highly oblidged.
Iam going to try both the ideas that u forward to me.The suggestion that charles gave I have tried it and it works well.
Iam going to try out the other one.
Thanks Again for your support
and do keep track and so will I.
Regards
Varun
2005 Feb 04 6:07 AM
Hello Varun / Subramanian,
Thanks for your interest in this. Here's the code:
Prelude: The program has one screen(0100), which has a custom control area (named CC)
as it's only element. The Flow Logic has only one PBO Module (called PBO). The program
displays an ALV Grid with two columns, one for the Material and the other to contain
an icon. This icon will have a tooltip text, which is the material text for the material
in the first column of that row.
data : container type ref to cl_gui_custom_container,
alv_grid type ref to cl_gui_alv_grid.
data: fcat type lvc_t_fcat,
fs_fcat type lvc_s_fcat,
begin of itab occurs 0,
matnr type matnr,
text(44) type c,
end of itab.
start-of-selection.
call screen 100.
module pbo output.
create object container
exporting container_name = 'CC'.
create object alv_grid
exporting i_parent = container.
fs_fcat-fieldname = 'MATNR'.
fs_fcat-ref_table = 'MARA'.
append fs_fcat to fcat.
fs_fcat-fieldname = 'TEXT'.
fs_fcat-outputlen = 4.
fs_fcat-coltext = 'Text'.
fs_fcat-INTTYPE = 'C'.
fs_fcat-SELTEXT = 'Description'.
fs_fcat-icon = 'X'.
append fs_fcat to fcat.
select distinct matnr
maktx
from makt
up to 10 rows
into (itab-matnr , itab-text)
where spras = 'EN'.
* @0P@ is the icon code that I have chosen here.
* obviously, you can choose something else.
concatenate '@0PQ'
itab-text
'@'
into itab-text.
append itab.
endselect.
call method alv_grid->set_table_for_first_display
changing
IT_FIELDCATALOG = fcat
IT_OUTTAB = itab[].
endmodule.
Please note that, for the sake of simplicity, I have not writeen any PAI module. So you cannot come back to the program from the screen. You can have one button on the screen which says "Back" or something like that...
Regards,
Anand Mandalika.
P.S. Go to <a href="http://help.sap.com/saphelp_erp2004/helpdata/en/ff/4649baf17411d2b486006094192fe3/content.htm">this link</a>in the SAP documentation where the icon with tooltip is mentioned.
2005 Feb 04 6:32 AM
Hi Anand,
This one really works.Thanks.
The logic works perfect.
This one is kewl.
Note: If someone in the forum has new inputs for us do post it maybe we are able to find something new on it.
Thanks once again Anand
Regards
Varun
2005 Feb 04 6:52 AM
2005 Feb 04 7:07 AM
2005 Feb 04 11:03 AM
Hi Anand
It is a very good work-around. Thanks for sharing it...
*--Serdar
2005 Feb 04 2:01 AM
How about these ideas?
You could right click on the material number and bring up a context menu with the material description in it. There is a limit on the text size but I do not remember what it is. If they select the description from the menu, it would have a function code assigned to it that would not do anything.
You could set the material number as a hotspot and a click will bring up a popup window with the material description.
You could put the material description just to the right of the material number. Set the field size to something small like 1 to 5 characters. Then when you put the mouse pointer on the text, a tooltip like line will appear displaying the whole text.
You could make the material number field itself a combination of the number followed by the text. For example, the field might hold:
1234567891234 - Big Pump for Big Trucks
Set the display width so that only the material number can be seen. You might need to pad the material number on the right with blanks if they are not all the same length so that the text is always hidden. Then when the user points to the cell, the tooltip like line would appear showing the entire field.
Any of these ideas help you?
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |