Application Development and Automation 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: 
Read only

about alv

Former Member
0 Likes
1,041

we r using the parameter it_fieldcat in reuse alv grid display to pass the field catalog information in the form of internal table .

then why we should use reuse alv fieldcatalog merge

pls tell

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,011

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

  • EXPORTING

  • I_PROGRAM_NAME =

  • I_INTERNAL_TABNAME =

  • I_STRUCTURE_NAME =

  • I_CLIENT_NEVER_DISPLAY = 'X'

  • I_INCLNAME =

  • I_BYPASSING_BUFFER =

  • I_BUFFER_ACTIVE =

CHANGING

ct_fieldcat = it_outtab

  • EXCEPTIONS

  • INCONSISTENT_INTERFACE = 1

  • PROGRAM_ERROR = 2

  • OTHERS = 3

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

in this, we are passing the headers (field names) to the fieldcat which is used for o/p.

so, after the execution of this FM, the table it_fieldcat is filled with the headers corresponding to the field names of o/p internal table.

regards

Praveen

we r using the parameter it_fieldcat in reuse alv grid display to pass the field catalog information in the form of internal table .

then why we should use reuse alv fieldcatalog merge

pls tell

9 REPLIES 9
Read only

Former Member
0 Likes
1,011

Hey,

Fieldcatalog merge is used when u dont want to build the fieldcat table by coding, but u want to refer it to the structure of a table or an internal table. Thus the field catalog will be built automatically but this FM which can be altered manually by us for the display.

Reward points if useful!!

Cheers,

Sam

Read only

Former Member
0 Likes
1,012

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

  • EXPORTING

  • I_PROGRAM_NAME =

  • I_INTERNAL_TABNAME =

  • I_STRUCTURE_NAME =

  • I_CLIENT_NEVER_DISPLAY = 'X'

  • I_INCLNAME =

  • I_BYPASSING_BUFFER =

  • I_BUFFER_ACTIVE =

CHANGING

ct_fieldcat = it_outtab

  • EXCEPTIONS

  • INCONSISTENT_INTERFACE = 1

  • PROGRAM_ERROR = 2

  • OTHERS = 3

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

in this, we are passing the headers (field names) to the fieldcat which is used for o/p.

so, after the execution of this FM, the table it_fieldcat is filled with the headers corresponding to the field names of o/p internal table.

regards

Praveen

Read only

Former Member
0 Likes
1,011

Sunil,

B. REUSE_ALV_FIELDCATALOG_MERGE : This function module is used to populate a fieldcatalog which is essential to display the data in ALV. If the output data is from a single dictionary table and all the columns are selected, then we need not exclusively create the field catalog. Its enough to mention the table name as a parameter(I_structure name) in the REUSE_ALV_LIST_DISPLAY. But in other cases we need to create it.

The Important Parameters are :

I. Export :

i. I_program_name : report id

ii. I_internal_tabname : the internal output table

iii. I_inclname : include or the report name where all the dynamic forms are handled.

II Changing

ct_fieldcat : an internal table with the type SLIS_T_FIELDCAT_ALV which is

declared in the type pool SLIS.

Don't forget to reward if useful

Read only

sourabhshah
Product and Topic Expert
Product and Topic Expert
0 Likes
1,011

hi,

alv fieldcatalog merge quickly creates a fieldcatalog without much of coding.If you need to modify it you just have to modify the internal table.

Regards,

Sourabh

Read only

Former Member
0 Likes
1,011

Hi..,

If u fill the FIELDCAT internal table and passing it to the fm REUSE_ALV_GRID_DISPLAY then no need to use the MERGE function module..

This MERGE fm is used to generate the fieldcat table without actually coding it !!

Plz do remember to close the thread, when your problem is solved !!

reward all helpful answers,

sai ramesh

Read only

Former Member
0 Likes
1,011

Hi

alv_fieldcatalog_merge is used to generate the field catalog into the internal table when the fieldcatalog in of DDIC strucure. And we have to give this internal table to it_fieldcat parameter in reuse_alv_grid_display.

So alv_fieldcatalog_merge is only to generate the field catalog into the internal table.

Read only

Former Member
0 Likes
1,011

Hi......

<b>reuse alv fieldcatalog merge</b> is the function module which prepares the field catalog (it_fieldcat) that can be given to the FM <b>(reuse alv grid display)</b>

instead of preparing the field catalog manually you can use this function module..

the function module reuse_alv_fieldcatalog_merge is used to create a field catalog. it will take a dictionary structure name as import and it will return the field catalog for that structure as output in changing parameter

Let me know if you have any doubt...

Reward points if useful......

Suresh......

Read only

Former Member
0 Likes
1,011

Hi Sunil,

Use alv fieldcatalog merge FM when you want to display all the fields of a dictionary table. If you want to display some specific field depending on some condition and selection build it_fieldcat manually.

Use which is applicable to your requirment.

Reward is helpful,

Regards,

Tanmay

Read only

Former Member
0 Likes
1,011

Hi,

reuse_fieldctalog_merge is for avoiding the manual coding for creating field catalog.

field catalog creation is for creating the structure in the output screen to display the output intenal table.if we are creating the fieldact manually we have give the colum position,field name,column output length,wheter it is editable or not,col text and so on.if we are using this FM itwill incement col position automatically for each field,with some default values it will create the output structure.

rgds,

bharat.