2011 Nov 15 1:49 PM
Peace be Upon you All,
How can I make a Label (Field Label) for a Predefined Type ?
I was appending a Structure to a Table, to add a 'Text' Field with a 'String' type
so I added the field ZZTEXT with the predefined type 'STRING' and added a Description
but in the ALV Output, it had now label on top of it
I know that Field labels are stored for the Data Elements
but I don't want to use a data element 'Component Type'
SO, how can I add a field label to the Output without Creating a New Data Element ???
Thanks in advance
Peace be Upon you All,
How can I make a Label (Field Label) for a Predefined Type ?
I was appending a Structure to a Table, to add a 'Text' Field with a 'String' type
so I added the field ZZTEXT with the predefined type 'STRING' and added a Description
but in the ALV Output, it had now label on top of it
I know that Field labels are stored for the Data Elements
but I don't want to use a data element 'Component Type'
SO, how can I add a field label to the Output without Creating a New Data Element ???
Thanks in advance
2011 Nov 15 2:14 PM
Hi ,
Please refer link http://wiki.sdn.sap.com/wiki/display/ABAP/ALVTUTOTIALFORBEGINERSWITH+EXAMPLES .
Hope this will resolve your issue.
Regards,
Rahul Mahajan
2011 Nov 16 2:10 PM
Hi,
When you build field catalog for your ALV,you can sepcify what label you want.
Example.
FORM buid_fieldcatalog.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = sy-repid
i_internal_tabname = 'IT_ALV1'
i_inclname = sy-repid
CHANGING
ct_fieldcat = int_fcat[].
IF sy-subrc NE 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
LOOP AT int_fcat.
CASE int_fcat-fieldname.
WHEN 'XBLNR'.
int_fcat-reptext_ddic = 'Custom Label'.
int_fcat-seltext_s = ''Custom Label'.
int_fcat-seltext_m = 'Custom Label'.
int_fcat-seltext_l = ''Custom Label'.
ENCASE.
ENDLOOP.
2011 Nov 16 2:55 PM
Well, Thank you very much.
But I forgot to tell you that I'm in an Enhancement ..
so, I can just Append the Structure (SE11)
and Enter Code as an Enhancement .
2011 Nov 17 3:44 PM
Hi,
Could you provide the Enhancement the one which you are using for appending new field for which you want to change the Label text.
Thanks,
Shailaja Ainala,
2011 Nov 21 11:57 AM
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |