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

reg : Function module

mallikarjun_vaja
Participant
0 Likes
513

hi,

when using FM 'REUSE_ALV_HIERSEQ_LIST_DISPLAY ',

parameter IT_SORT should contain fields on which sorting has to be done....Right??

Actually , my question is ...my output intarnal table contains 21 fileds.

but the field specified in IT_SORT..is not present in the output intarnal table .

I am getting runtime error because fo this?

Can you plz tell me weather the field specified in the IT_SORT.. should be in output internal table or not?

waiting for oyur replies.

regards

Vaja

4 REPLIES 4
Read only

Former Member
0 Likes
496

Hi,

The fields specified in the it_sort should be present in your final internal table as well.

And apart from that for Hierarchial display you need to have both internal table one for header and one for details.

Thanks,

Sriram Ponna.

Read only

0 Likes
496

hi sriram,

thanks for your answer.

Can you plz look at the FM '

CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = ALV_V-REPORT

I_CALLBACK_USER_COMMAND = 'AT_USER_COMMAND'

IS_LAYOUT = LS_LAYOUT

IT_FIELDCAT = LT_FIELDCAT[]

IT_SORT = LT_SORTINFO[]

I_SAVE = 'A'

IS_VARIANT = ALV_V

I_TABNAME_HEADER = C_HEAD

I_TABNAME_ITEM = C_DETAIL

IT_EVENTS = GT_EVENTS

IS_KEYINFO = LS_KEYINFO

TABLES

T_OUTTAB_HEADER = C_CUST

T_OUTTAB_ITEM = T_CUST.

ENDIF.'

header and item tables.

data is passed form one int table to another.

C_CUST[] = T_CUST[].

T_OUTTAB_HEADER = C_CUST

T_OUTTAB_ITEM = T_CUST.

and regarding sorting logic..

  • SORT

LT_SORTINFO-SPOS = '02'.

LT_SORTINFO-FIELDNAME = 'BBASIS'.

LT_SORTINFO-TABNAME = C_DETAIL.

LT_SORTINFO-DOWN = 'X'.

APPEND LT_SORTINFO.

field name 'BBASIS' is not present in the final table.

i have checked all fields in the ITEM table T_CUST.

and HEADER table is declared as

DATA: C_CUST LIKE T_CUST OCCURS 0 WITH HEADER LINE.

Can you plz seggest me this is correct?

regards

vaja

Read only

hymavathi_oruganti
Active Contributor
0 Likes
496

yah it should be obviously.

Read only

Former Member
0 Likes
496

HI,

Yes, the field specified in these it_sort

it_layout

it_eventcat etc. should be present in the final internal table.

Regards,

PRitha.

Reward if useful