10-10-2008 7:09 AM
Hi all,I have an ALV report in which there is a field with the length 255 char,while displaying I want it to be not more than 40 char,how can I achieve it? I tried changing the size in fieldcatalog,but it hasen't worked.
Thanks in advance and remember,all helpful answers will get points.
10-10-2008 7:11 AM
Is it possible that you extract the first 40 char and then put it into field catalog? i.e. text+0(40)?
Regards,
Leon
10-10-2008 7:14 AM
Thanks Leon,but my client wants all the data should be there,when he scrolls the coloumn,he should get all the data.
10-10-2008 7:15 AM
Hi,
Can you check the fieldcatalog again. Can you show the sample code.
Thanks & Regards,
Navneeth K.
10-10-2008 7:17 AM
if you use these options , it automatically controls the length to 40 chars.
fieldcat-ddic_outputlen = 40.
fieldcat-intlen = 40.
try to set these two and see how it works.
10-10-2008 7:25 AM
Thanks all 4 u r replies but as I said already I checked it by keeping a break point inside the code,what I did exactly is I used FM merge and then Iam looping the fieldcatalog and modifiying the fieldcatalog internal table at that field as :
fieldcat-ddic_outputlen = 40.
fieldcat-intlen = 40.
Please tell me any other solution.
10-10-2008 7:37 AM
if you are using the merge function then you have to loop and modify the fieldcatalog for the column which you want.
10-10-2008 7:27 AM
Hi,
Try this code
sfld-tabname = 'I_FINAL'. [Internal Table Name]
sfld-fieldname = 'HZUON'. [Field Name]
sfld-seltext_l = 'Rate%'. [Text]
sfld-outputlen = '10'. [Length specify 40 here]
APPEND to fieldcatalog internal.
Thanks
Anil.D
10-10-2008 8:08 AM
fieldcatalog-outputlen = 10.
fieldcatalog-emphasize = 'X'.
fieldcatalog-key = 'X'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.