Skip to Content
0
Former Member
Dec 20, 2007 at 11:11 AM

Feildcatalog in ALV

142 Views

1.Why do we need REUSE_ALV_FIELDCATALOG_MERGE?

I have done a sample program which travel from first list to second list.Simple steps are:

w_program = sy-repid

1.collect data from mara and put into internal table 1.

2.Displayed report using REUSE_ALV_GRID_DISPLAY passing PICK command,callback program=w_program.

3.Get selected row using Form Pick command.....

4.Update the internal table 2,with data from makt.

5.call function REUSE_ALV_FIELDCATALOG_MERGE getting T_FIELDCAT value.

w_program = sy-repid

6.Dispaly report using REUSE_ALV_GRID_DISPLAY passing internal table 2,callbackprogram=w_program.

a)I dont understand the usage of REUSE_ALV_FIELDCATALOG_MERGE.Can anyone tell me usage of that?

b)I think Sy-repid fetches current report id.Please tell me the role of "w_program=sy-repid" in the above program.

C)I tried 3 stages report.Mara->Makt->Mard.The flow was REUSE_ALV_GRID_DISPLAY->REUSE_ALV_FIELDCATALOG_MERGE->REUSE_ALV_GRID_DISPLAY->REUSE_ALV_FIELDCATALOG->REUSE_ALV_GRID_DISPLAY

but error occured,So I removed 2nd FM(fieldcatalog)

REUSE_ALV_GRID_DISPLAY->REUSE_ALV_GRID_DISPLAY->REUSE_ALV_FIELDCATALOG->REUSE_ALV_GRID_DISPLAY

Its working now?Any suggestions