2010 Sep 13 10:39 AM
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.
2010 Sep 13 10:41 AM
Are you using Objects or FM?
Can you post the piece of code that you use for display the ALV?
2010 Sep 13 10:51 AM
Hi,
Look at the demo programs
BCALV_TEST_HIERSEQ_LIST
There may be some problem in the key info.
Sujay
2010 Sep 13 1:51 PM
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
2010 Sep 14 2:52 PM