Search
Search

# Error in ALV

Hi to all

i have created an ALV for excise department and i have sorted it by material group using material master data. When i execute the report,it doesnt split up by material group.Help me in solving this problem.I have attached the coding below.

SELECT J_1IEXCHDR~RDOC

FROM J_1IEXCHDR

INTO CORRESPONDING FIELDS OF TABLE EXCISEDOCNO

WHERE

J_1IEXCHDR~TRNTYP = 'DLFC' AND

J_1IEXCHDR~SRGRP IN SRGRP AND

J_1IEXCHDR~EXDAT IN EXDAT AND

J_1IEXCHDR~EXNUM IN EXNUM.

LOOP AT EXCISEDOCNO.

VBELN-SIGN ='I'.

VBELN-OPTION = 'EQ'.

VBELN-LOW = EXCISEDOCNO-RDOC.

APPEND VBELN.

ENDLOOP.

LOOP AT EXCISEDOCNO.

IF J_1IEXCHDR-TRNTYP = 'CEIV' .

DELETE EXCISEDOCNO.

MODIFY EXCISEDOCNO.

ENDIF.

ENDLOOP.

*LOOP AT ITAB.

*ENDLOOP.

SELECT VBRKVBELN VBRKKNUMV VBRKFKDAT VBRKWAERK

VBRKKURRF VBRKKUNAG VBRK~FKART

VBRPPOSNR VBRPNETWR VBRPFKIMG VBRPMATNR

VBRPVGBEL VBRPWERKS VBRPARKTX VBRPLGORT "VBRP~MATKL

INTO CORRESPONDING FIELDS OF TABLE ITAB

FROM VBRK

INNER JOIN VBRP

ON VBRKVBELN = VBRPVBELN

WHERE VBRK~VBELN IN VBELN

AND VBRK~FKART IN FKART

AND VBRK~FKDAT IN FKDAT

• AND VBRP~MATKL IN MATKL

AND VBRP~WERKS IN WERKS

AND VBRP~LGORT IN LGORT

AND VBRK~FKSTO NE 'X' .

SELECT MARA~MATKL INTO CORRESPONDING FIELDS OF ITAB

FROM MARA

WHERE MATNR = VBRP-MATNR

AND MARA~MATKL IN MATKL.

MODIFY ITAB.

ENDSELECT.