2013 Sep 28 7:10 AM
Hi Experts,
For ALVs, we need to prepare field catalog first.At the time of preparing field catalog,we give text to be displayed as column text.There are several ways of doing that.
My question is if i want to display it from data element field label,i can use
1) by using fieldcat-ref_field = <data element of field in data dictionary> and fieldcat-ref_table = <name of table>
2)by using fieldcat-rollname = <data element of field in data dictionary>. (if field name is not from any table)
In above two solutions, which one should i use?Also, is there any other way of doing it?
Hi Experts,
For ALVs, we need to prepare field catalog first.At the time of preparing field catalog,we give text to be displayed as column text.There are several ways of doing that.
My question is if i want to display it from data element field label,i can use
1) by using fieldcat-ref_field = <data element of field in data dictionary> and fieldcat-ref_table = <name of table>
2)by using fieldcat-rollname = <data element of field in data dictionary>. (if field name is not from any table)
In above two solutions, which one should i use?Also, is there any other way of doing it?
2013 Sep 28 7:41 AM
Hi,
1) Generally when use OOPS ALV method with set_table_for_first_display ,then use your first option.
The structure from dictionary type LVC_S_FCAT.
you have to declare like
it_fcat TYPE lvc_t_fcat, "Field catalogue
it_layout TYPE lvc_s_layo. "Layout
http://wiki.scn.sap.com/wiki/display/ABAP/Making+ALV+to+react+to+Change+data+automatically
like this.
2) when use REUSE_ALV_FIELDCATALOG_MERGE,Then use roll name option & press F1 for more info .
Thanks & hope it little clear.
Gourav.
2013 Sep 28 7:48 AM
Hi
I you want to use the labels from dictionary, you should use:
fieldcat-ref_field = <name of field based on data element>
fieldcat-ref_table = <name of table>
The ROLLNAME is to link F1 help so you shouldn't use it
But you need to consider REF_FIELD/REF_TABLE show the ALV field structurated as the dictionary field you have set, so if you want to get only the label, you should fill:
seltext_l (long field label)
seltext_m (medium field label)
seltext_s (short field label)
Max
2013 Sep 28 9:42 AM
Hi Abdul,
Both Methods will be able to display text as Per your needs
Second one will provide u access to F1 help on that particular Fields too.
Regards
Arpit Gupta
2013 Sep 29 6:54 AM
Hi Abdul,
You just have to give reference table and reference field name. It will automatically display the field label.
http://help.sap.com/saphelp_erp60_sp/helpdata/en/8e/5dc9c1e10111d2b47e006094192fe3/content.htm
2013 Sep 29 11:18 AM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |