Skip to Content
0
Former Member
Nov 15, 2006 at 07:13 AM

Move-corresponding

26 Views

HI guys,

I have created a dynamic internal table using CALL METHOD cl_alv_table_create=>create_dynamic_table and assigning to <FS>.

At the end of nested select statement , move-corresponding table to <itab> is used. It is giving me syntac error telling that <itab> does not have header line.

I am attaching my code. please help.

CALL METHOD cl_alv_table_create=>create_dynamic_table

EXPORTING

it_fieldcatalog = it_fcat

IMPORTING

ep_table = it_content.

IF sy-subrc = 0.

ASSIGN it_content->* TO <i_tab>.

  • ASSIGN it_content->* TO <n_tab>.

ELSE.

WRITE: 'Error creating internal table'.

STOP.

ENDIF.

  • CREATE DATA new_line LIKE LINE OF <i_tab>.

  • Assign

SELECT * FROM jhaea CLIENT SPECIFIED

WHERE mandt = sy-mandt

AND e_termin IN s_termin

AND (where_jhaea-where_tab).

CHECK sy-subrc = 0.

SELECT SINGLE * FROM jhak CLIENT SPECIFIED

WHERE mandt = sy-mandt

AND avm_nr = jhaea-avm_nr

AND vkorg IN p_vkorg

AND (where_jhak-where_tab).

CHECK sy-subrc = 0.

MOVE-CORRESPONDING jhak TO new_line.

MOVE-CORRESPONDING jhaea TO <itab>.

APPEND <itab>.