Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

alv field catalog

Former Member
0 Kudos

hello all,

if i give ref_tabname and ref_fieldname in the field catalog, then it is taking by default data element, and not considering my text object.

when i remove the ref_tabname and ref_fieldname the texts in my text objects are coming fine.

but my doubt is if dont give ref_tabname and ref_fieldname is there any problem.?

i am calling reuse_alv_grid_display function module.

Thank you

best regards

Amrender Reddy B

5 REPLIES 5

Former Member
0 Kudos

Hi,

Declare like this ( mandatory)

FS_FIELDCAT-FIELDNAME = 'FKART'

FS_FIELDCAT-REF_TABNAME = 'VBRK'.

FS_FIELDCAT-REF_FIELDNAME = 'FKAR'T.

FS_FIELDCAT-LOWERCASE = 'X'.

FS_FIELDCAT-COL_POS = C_COUNTER.

FS_FIELDCAT-KEY ='X'

FS_FIELDCAT-REPTEXT_DDIC = TEXT-006.

APPEND FS_FIELDCAT TO INT_FIELDCAT.

Here the field name in FS_FIELDCAT-FIELDNAME is the field name which u decalred in an internal table of ur program.

Regards,

Rohan.

Former Member
0 Kudos

HI,

g_fieldcat-tabname = 'I_INA2011'.

g_fieldcat-fieldname = 'PERNR'.

g_fieldcat-coltext = 'Personnel Number'(002). "Personnel Number

APPEND g_fieldcat TO i_fieldcat.

Tablename and fiedname are enough....Ref_fieldname and ref_tablenames are not required...

this will used in only when you are displaying the qunatity and currency fields..

Former Member
0 Kudos

Hi,

I don't think reference table and field are required (unless you want some specific characteristic of domain to be available to your field in ALV).

Regards,

Mohaiyuddin

Former Member
0 Kudos

Hi,

All these are not needed only

WA_FIELDCAT-FIELDNAME = 'ERNAM'.

is enough with other fields like COL_POS,REPTEXT,COLTEXT and any other specific you want you can include but TABNAME is not needed.

Regards,

Neha

Former Member
0 Kudos

there is addtional point you should remember while writing filed catelogue.

When you give the refrence filed and refence tabname , it automatically takes properties from the central data dictionry.

It is very importent in terms of getting Summations and Subtotals in the ALV. Also

it affects the UOM Conversions .

for example:

If reference field and refence tab name are not mentioned in ALV then 'ST' will appear ST and NOt PC.

Also it is importent for Automatic SAP Conversions.

So it depends on your requireemnt to exclude or include the Refence filed and reference tabname.

Regards,

Santosh sarda