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 FIELDCATALOG

Former Member
0 Kudos

Hi,

I'm doing a alv list, but the headers of the columns don´t have some names that i want. I want to change some of them. Is there anyway? can i change the alv fieldcatalog to do that? and how?

Thanks,

Ricardo

13 REPLIES 13

Former Member
0 Kudos

Set COLTEXT in the Field Catalog to your desired text.

0 Kudos

As mentioned above... in code...

g_t_fieldcat-coltext = 'Your Column Header Text Here'.

Former Member
0 Kudos

Hi Ricardo,

You can do this way while building the field catalog.

g_t_fieldcat-seltext_s = 'R Rate'.

g_t_fieldcat-seltext_m = 'Recov Rate'.

g_t_fieldcat-seltext_l = 'Recovery Rate'.

Hope this helps.

Regards,

Vivek

PS: Award points if helpful

Former Member
0 Kudos

Check the code at this link==>

http://www.howforge.com/abap-4-example-code-alv-list-by-fm-reuse-alv-list-display

Cheers,

TM.

Please mark points if helpful.

Former Member
0 Kudos

hi ricardo,

WA_FIELDCAT-FIELDNAME = 'VBELN'.

WA_FIELDCAT-SELTEXT_L = 'BILLING DOC'.

WA_FIELDCAT-TABNAME = 'IT_VBRP'.

WA_FIELDCAT-COL_POS = 1.

APPEND WA_FIELDCAT TO IT_FIELDCAT1.

CLEAR WA_FIELDCAT.

Former Member
0 Kudos

hi,

the below code is to build field catalog manually without calling the function module 'REUSE_ALV_FIELDCATALOG_MERGE'.

this way you have to take care of all the attributes of each field.

FORM BUILD_FIELDCAT .

IT_FIELDCAT-COL_POS = '1'.

IT_FIELDCAT-FIELDNAME = 'REC_TYPE'. <--your 1st field

IT_FIELDCAT-KEY = 'X'.

IT_FIELDCAT-OUTPUTLEN = '15'.

IT_FIELDCAT-SELTEXT_L = 'Record type'.<--TEXT to display

APPEND IT_FIELDCAT.

CLEAR IT_FIELDCAT.

IT_FIELDCAT-COL_POS = '2'.

IT_FIELDCAT-FIELDNAME = 'LOCATION'.

IT_FIELDCAT-KEY = 'X'.

IT_FIELDCAT-OUTPUTLEN = '13'.

IT_FIELDCAT-SELTEXT_L = 'Location'(008).

APPEND IT_FIELDCAT.

CLEAR IT_FIELDCAT.

IT_FIELDCAT-COL_POS = '3'.

IT_FIELDCAT-FIELDNAME = 'PRODUCT'.

IT_FIELDCAT-KEY = 'X'.

IT_FIELDCAT-OUTPUTLEN = '18'.

IT_FIELDCAT-SELTEXT_L = 'Product'(009).

APPEND IT_FIELDCAT.

CLEAR IT_FIELDCAT.

ENDFORM. " BUILD_FIELDCAT

revert, if you need any further info.

Regards,

Srikanth

Former Member
0 Kudos

hi,

i'm using this code to change the lines of the alv fieldcatalog but is not working, it gives me a dump message,can you help me?

alvfc_ln-col_pos = '24'.

alvfc_ln-fieldname = 'SUM02'.

alvfc_ln-seltext_l = 'Saída Planeada'.

alvfc_ln-seltext_m = 'Saída Planeada'.

alvfc_ln-seltext_s = 'Saida Pla.'.

alvfc_ln-reptext_ddic = 'Saída Pla.'.

modify alvfc from alvfc_ln.

alvfc_ln-col_pos = '25'.

alvfc_ln-fieldname = 'SUM03'.

alvfc_ln-seltext_l = 'Saída Fixa'.

alvfc_ln-seltext_m = 'Saída Fixa'.

alvfc_ln-seltext_s = 'Saida Fixa'.

alvfc_ln-reptext_ddic = 'Saída Fixa'.

MODIFY alvfc FROM alvfc_ln.

alvfc_ln-col_pos = '26'.

alvfc_ln-fieldname = 'SUM04'.

alvfc_ln-seltext_l = 'Entrada Planeada'.

alvfc_ln-seltext_m = 'Entrada Planeada'.

alvfc_ln-seltext_s = 'Ent.Planeada'.

alvfc_ln-reptext_ddic = 'Ent.Plan'.

MODIFY alvfc FROM alvfc_ln.

alvfc_ln-col_pos = '27'.

alvfc_ln-fieldname = 'SUM05'.

alvfc_ln-seltext_l = 'Entrada Fixa'.

alvfc_ln-seltext_m = 'Entrada Fixa'.

alvfc_ln-seltext_s = 'Ent.Fixa'.

alvfc_ln-reptext_ddic = 'Ent.Fixa'.

MODIFY alvfc FROM alvfc_ln.

alvfc_ln-col_pos = '30'.

alvfc_ln-fieldname = 'DT_RU'.

alvfc_ln-seltext_l = 'Data ruptura'.

alvfc_ln-seltext_m = 'Data ruptura'.

alvfc_ln-seltext_s = 'Dt. ruptura'.

alvfc_ln-reptext_ddic = 'Dt. ruptura'.

MODIFY alvfc FROM alvfc_ln.

0 Kudos

What is the dump message? Did you mean to append alvfc_ln to alvfc? Are they of the same type?

Former Member
0 Kudos

Ricardo,

Has your issue been resolved? If so, please reward points and close the thread.

If not, please provide more details.

Former Member
0 Kudos

Hi,

Use, gt_fieldcat-seltext_l = 'Bill of Material'.

Regs,

Venkat Ramanan

Former Member
0 Kudos

How can i acess the alv fieldcatalog structure created by FM REUSE_ALV_FIELDCATALOG_MERGE? i tried "loop" but it's not a internal table. how can i acess to change some fields of it?

0 Kudos

Hi Ricardo,

the Function Module REUSE_ALV_FIELDCATALOG_MERGE must be executed with the CHANGING parameter CT_FIELDCAT = 'Your Fieldcat Table'<b>[]</b>. Do not forget to include the square brackets as this is an internal table. After that you can loop on table 'Your Fieldcat Table' and modify any of the fields; the structure of 'Your Fieldcat Table' is as SLIS_T_FIELDCAT_ALV.

Hope this helps.

Gabriele

0 Kudos

Hi,

declare the work area...

DATA: X_FIELDCAT TYPE SLIS_FIELDCAT_ALV,

IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.

once you get the fieldcat into it_fieldcat.

the loop it like this..

loop at it_fieldcat into x_fieldcat.
if x_fieldcat-fieldname = 'ABCDEF'.
x_fieldcat-seltext_l = 'Test label'.
endif.
..
....
..
modify it_fieldcat from x_fieldcat index sy-tabix.
endloop.

Regards

vijay