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: 

REGARDING ALV BLOCK DISPLAY AND GRID DISPLAY

Former Member
0 Kudos

HI FRIENDS,

I HAVE A TROUBLE IN DISPLAYNG TWO TABLES TOGETHER IN THE GRID DISPLAY, BUT I CAN DISPLAY USING BLOCKS. I DONT WANT TO USE JOIN STATEMENT IN THE SELECT QUERY.

HELP WITH BY DISPLAYING THE RESPECTIVE CODES FOR THAT.

THANK U IN ADVANCE

4 REPLIES 4

former_member188685
Active Contributor
0 Kudos

If you want to use the Block list

then you need 3 Function modules.

1. Block list initialization

(This will be called once)

REUSE_ALV_BLOCK_LIST_INIT

2. Block List Append

REUSE_ALV_BLOCK_LIST_APPEND

(This will be called n times, if you have n tables)

3. Block list Display

(this will be called once)

REUSE_ALV_BLOCK_LIST_DISPLAY

Check BALVBT01 program

Regards

Vijay

former_member223537
Active Contributor
0 Kudos

Hi,

Append the data of 2nd table into 1st table & then pass the 1st table to ALV Grid FM.

Else.

Use two containers on a screen & pass table to each container.

Best regards,

Prashant

Former Member
0 Kudos

hi,

type-pools : slis,icon.

data : gd_repid like sy-repid.

data : d_fieldcat type slis_t_fieldcat_alv,

d_fieldcat_wa type slis_fieldcat_alv.

data : begin of itab_mara occurs 0,

matnr like mara-matnr,

ernam like mara-ernam,

end of itab_mara.

data : begin of itab_marc occurs 0,

matnr like marc-matnr,

werks like marc-werks,

end of itab_marc.

data : begin of itab_final occurs 0,

matnr like mara-matnr,

ernam like mara-ernam,

werks like marc-werks,

end of itab_final.

gd_repid = sy-repid.

loop at itab_emp.

itab_final-matnr = itab_emp-matnr.

itab_final-ernam = itab_emp-ernam.

append itab_emp.

clear itab_emp.

endloop.

d_fieldcat_wa-fieldname = 'MATNR'.

d_fieldcat_wa-seltext_l = 'material number'.

d_fieldcat_wa-col_pos = 1.

append d_fieldcat_wa to d_fieldcat.

clear d_fieldcat_wa.

d_fieldcat_wa-fieldname = 'ERNAM'.

d_fieldcat_wa-seltext_l = 'created by'.

d_fieldcat_wa-col_pos = 2.

append d_fieldcat_wa to d_fieldcat.

clear d_fieldcat_wa.

d_fieldcat_wa-fieldname = 'WERKS'.

d_fieldcat_wa-seltext_l = 'plant number'.

d_fieldcat_wa-col_pos = 1.

append d_fieldcat_wa to d_fieldcat.

clear d_fieldcat_wa.

call function module 'REUSE_ALV_GRID_DISPLAY'.

Reward with points if helpful.

0 Kudos

thank u

help me more