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: 

Hierarchial ALV

Former Member
0 Kudos
93

Hi Experts,

I have the following requirement.

I want to display same number of fields both at the header level and Item level in an hierarchial ALV .

Both header level and Item level table will have the same number of fields and same type of fields.

I am passing the fieldcatelog with the same number of fields for header table and item table.

I am also having the data in header table and item table. But, It is displaying only header table table data.

It is not displaying Item table data at all.

Can anybody on this?

Thanks in advance,

Sreenivas Reddy.

4 REPLIES 4

SimoneMilesi
Active Contributor
0 Kudos
65

Are you using Objects or FM?

Can you post the piece of code that you use for display the ALV?

Former Member
0 Kudos
65

Hi,

Look at the demo programs

BCALV_TEST_HIERSEQ_LIST

There may be some problem in the key info.

Sujay

Former Member
0 Kudos
65

Hi Sreenivas,

In hierarchial ALV function module, there is import structure 'IS_KEYINFO', we need to pass the names of the key fields which are common in both header table and item table to this structure as given below :

FORM set_keyinfo_1 CHANGING xs_keyinfo TYPE slis_keyinfo_alv.

CLEAR xs_keyinfo.

xs_keyinfo-header01 = 'BANKL'.

xs_keyinfo-item01 = 'BANKL'.

xs_keyinfo-header02 = 'BANKN'.

xs_keyinfo-item02 = 'BANKN'.

xs_keyinfo-header03 = 'BUKRS'.

xs_keyinfo-item03 = 'BUKRS'.

ENDFORM.

But if this key fields values of header internal table is different from the corresponding key fields values of item internal table, then only header data will be displayed and corresponding item data won't be displayed.

Eg. if header- bukrs = 8000 and it's corresponding item-bukrs = 8990 then only header data will be displayed.

Regards,

Pranjali

Former Member
0 Kudos
65

Answered