Hi
i want to get all the inspection types for material...
bt my program is displaying only the first inspection type...
it is not taking all inspection types..
i have declared 2- internal tables
in it_final im getting material number and plant
in it_qmat im getting all the inspection types wrt material
now my problem is how can i get the all it_qmat data into it_final?
bcz in it_final it is taking only the first inspection type with material number and plant..
here is my code
form GET_DATA .
SELECT MATNR
WERKS
FROM MARC
INTO CORRESPONDING FIELDS OF TABLE IT_FINAL
WHERE MATNR IN S_MATNR.
IF IT_FINAL[] IS NOT INITIAL.
SELECT ART
MATNR
WERKS
FROM QMAT
INTO CORRESPONDING FIELDS OF TABLE IT_QMAT
FOR ALL ENTRIES IN IT_FINAL
WHERE MATNR = IT_FINAL-MATNR.
ENDIF.
end form.
form process_data.
DATA:V_TABIX TYPE SY-TABIX.
CLEAR: WA_FINAL,
WA_QMAT.
LOOP AT IT_FINAL INTO WA_FINAL.
V_TABIX = SY-TABIX.
READ TABLE IT_QMAT INTO WA_QMAT WITH KEY MATNR = WA_FINAL-MATNR.
IF SY-SUBRC IS INITIAL.
WA_FINAL-ART = WA_QMAT-ART.
MODIFY IT_FINAL FROM WA_FINAL INDEX V_TABIX.
CLEAR WA_FINAL.
CLEAR WA_QMAT.
ENDIF.
ENDLOOP.
end form.