Skip to Content
0
Former Member
Dec 14, 2006 at 12:24 PM

Internal table related

66 Views

Here the final internal table is not being populated .Can anybody tell me, why?

Thanks in advance.......

LOOP AT it_mara INTO wa_mara.

READ TABLE it_makt INTO wa_makt WITH KEY matnr = wa_mara-matnr

BINARY SEARCH.

IF sy-subrc = 0.

MOVE wa_mara-matnr TO wa_final-matnr.

MOVE wa_mara-matkl TO wa_final-matkl.

MOVE wa_makt-maktx TO wa_final-maktx.

APPEND wa_final TO it_final.

ENDIF.

  • ENDLOOP.

  • LOOP AT it_mara INTO wa_mara.

READ TABLE it_mseg INTO wa_mseg WITH KEY matnr = wa_mara-matnr

BINARY SEARCH.

IF sy-subrc = 0.

MOVE wa_mseg-bwart TO wa_final-bwart.

APPEND wa_final TO it_final.

ENDIF.

ENDLOOP.

SORT it_final BY matnr bwart.

LOOP AT it_final INTO wa_final.

IF wa_final-bwart = '101' OR

wa_final-bwart = '103' OR

wa_final-bwart = '105'.

count_gr = count_gr + 1.

ENDIF.

IF wa_final-bwart = '201' OR

wa_final-bwart = '261' OR

wa_final-bwart = '281' OR

wa_final-bwart = '291' OR

wa_final-bwart = '301' OR

wa_final-bwart = '311' OR

wa_final-bwart = '541'.

count_gi = count_gi + 1.

ENDIF.

ENDLOOP.