2009 Dec 15 10:30 AM
Moderator message: please use a meaningful subject in future
Hi,
I am displaying 5 fields in ALV report where heading of all 5 fields are like
1. Purchase Order
2. SES Number
3. PO Type
4. GR Date
5. Invoice Amount
But in report i could see only first 10 characters of heading..i.e,
Instead of "Purchse Order" it is displaying "Purchase O'..first 10 charaters. How to display complete heading ...
Structure LVC_S_FCAT
Short Description ALV control: Field catalog
Please help
Edited by: ABAPer 007 on Dec 15, 2009 4:02 PM
Edited by: Matt on Dec 15, 2009 11:50 AM
2009 Dec 15 10:37 AM
Hello,
Are you populating the fieldcat table using LVC_FIELDCATALOG_MERGE or manually populating the fieldcat?
Please clarify.
BR,
Suhas
Hello,
Are you populating the fieldcat table using LVC_FIELDCATALOG_MERGE or manually populating the fieldcat?
Please clarify.
BR,
Suhas
2009 Dec 15 10:35 AM
Hi,
Increase outputlen option in the field catalog.
wa_fc-outputlen = '30'.
2009 Dec 15 10:37 AM
Hello,
Are you populating the fieldcat table using LVC_FIELDCATALOG_MERGE or manually populating the fieldcat?
Please clarify.
BR,
Suhas
2009 Dec 15 10:42 AM
Hi,
Directly populating IT_FIELDCATALOG.... Not used MERGE.
if we increase outpuit length field values will be restricted to 30 characters......
2009 Dec 15 10:45 AM
Hi,
You can use below fields in the struture fieldcatalog.
fieldcatalog-seltext_m = 'Purchase Order'.
fieldcatalog-seltext_l = 'Purchase Order'.
fieldcatalog-seltext_s = 'Purchase Order'.Rgds
Anversha
2009 Dec 15 10:48 AM
Hello,
In the structure LVC_S_FCAT you have the field SCRTEXT_L. This is the longest column name that is allowed in the fieldcat (40 chars).
In your fieldcat you have to pass the values as:
ST-FIELDCAT-SCRTEXT_L = 'Purchase Order'.
ST-FIELDCAT-COLDDICTXT = 'L'.Try this & check.
BR,
Suhas
2009 Dec 15 10:48 AM
anversha,
i did the same...Ok to be more specific to question, how can we tell SAP which label to use. As u specifed thr are 3 labels short, medium and long...s/m is now using short..how to tell it to use Medium or long. evenif u give more than 10 char in short like fieldcatalog-seltext_s = 'Purchase Order' only 10 characters will be displayed.
2009 Dec 15 10:50 AM
2009 Dec 15 10:53 AM
Hi,
do like this.
fieldcatalog--reptext = 'Purchase Order'.
fieldcatalog-seltext_l = 'Purchase Order'.
fieldcatalog-outputlen = 30.if u gave the field
gd_layout-colwidth_optimize = 'X',then remove 'X' and put
space.Rgds
Anversha
2009 Dec 15 10:55 AM
>
> U r a genius...
Unfortunately i am not. Spending time in SDN forums makes you learn a few smart tricks of the trade ...
Cheers,
Suhas
2009 Dec 15 10:50 AM
Hi,
Mention the field length as below.
*-- Filling catalogue with
PERFORM fill_catalogue USING:
* Column O/P field Length Desc
1 'TELNR' 17 text-a01,
2 'INV_DATE' 13 text-a02,
3 'PERNR' 15 text-a03,
4 'NAME' 40 text-a04,
5 'KOSTL' 14 text-a05,
6 'AMTTOPAY' 12 text-a06,
7 'VAT' 10 text-a07,
8 'COMMTAX' 15 text-a08,
9 'USRID' 17 text-a09,
10 'EXPAMT' 14 text-a10,
11 'EXPVAT' 11 text-a11,
12 'EXPCOMMTAX' 16 text-a12,
13 'SALARYPERD' 18 text-a13,
14 'SALARYAMT' 23 text-a14.
*&---------------------------------------------------------------------*
*& Form Name : Fill_catalogue *
*&---------------------------------------------------------------------*
*& Description : Populating the Field Catalogue *
*&---------------------------------------------------------------------*
*& Parameters : FP_COL_POS ---> Column Position *
*& FP_FIELD ---> Field name *
*& FP_LEN ---> Field length *
*& FP_SELTEXT_L ---> Field Description *
*&---------------------------------------------------------------------*
FORM fill_catalogue USING fp_col_pos
fp_field
fp_len
fp_seltext_l.
*-- Local data declaration
DATA: lws_fieldcat TYPE slis_fieldcat_alv.
*-- Set FieldCatalog Attributes
lws_fieldcat-col_pos = fp_col_pos.
lws_fieldcat-fieldname = fp_field.
lws_fieldcat-seltext_l = fp_seltext_l.
lws_fieldcat-outputlen = fp_len.
*-- Update FieldCatalog Table
APPEND lws_fieldcat TO int_fieldcat.
CLEAR lws_fieldcat.
ENDFORM. " fill_catalogueTexts refer to the text symbols maintained for the ALV header.
Regards,
Amit
Edited by: AMIT BISHT on Dec 15, 2009 11:53 AM
2009 Dec 15 10:51 AM
Moderator message: please use a meaningful subject in future
2009 Dec 15 10:52 AM
Hi,
Define the layout and pass the following parameteras 'X'.
wa_layout- colwidth_optimize = 'X'.
It will automatically take care of the field length.
No need to give output length =XXXX.
Giving colwidth_optimize ='X'. is the best practices.
Regards,
Pravin
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |