HI,
There is a internal table t and t1. I used loop to move the data which zuonr has no value from t to t1.
*what I need to do is that to move all the data belonge to the same kna1-kunnr whenever zuonr = space happend. *.
The problem is that the data which zuonr = space is moved to t1 successful, but the other data which belong to the same kunnr has zuonr valune still remain.
-Question_ : How to move all the data belong to the same kunnr whenever zuonr = space happend.
-
DATA: BEGIN OF t OCCURS 0,
bukrs LIKE knb1-bukrs,
zuonr Like bsid-zuonr, "sort key "CR01
belnr LIKE bsid-belnr,
kunnr LIKE kna1-kunnr,
bldat LIKE bsid-bldat,
budat LIKE bsid-budat,
netdt LIKE bsega-netdt,
waers LIKE bsid-waers,
wrbtr LIKE bsid-wrbtr,
shkzg LIKE bsid-shkzg,
xblnr LIKE bsid-xblnr, "WD041005a
sgtxt LIKE bsid-sgtxt,
dmbtr LIKE bsid-dmbtr,
END OF t.
DATA : t1 LIKE STANDARD TABLE OF t WITH HEADER LINE.
-
*LOOP AT t WHERE zuonr EQ space.
MOVE-CORRESPONDING t TO t1.
APPEND t1.
ENDLOOP.*
-
Please help, thank you!!