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.
-
BSID TABLE:
KUNNR ZUONR
0000052984 no value           0000052984 no value 00052984 2007/06決算
00052984 no value
000052984  2007/07振当
0000052984 MSFT047/07
0000052984 MSFT061/07
-
*what I need to do is that to move all the data belonge to the same 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.*
-
How can I write the loop statement to mention the KUNNR
Please help, thank you!!