Skip to Content
0
Former Member
Jan 15, 2008 at 08:49 AM

Help to correct to codes to move data from tables! please help!

22 Views

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.

-


*LOOP AT t WHERE zuonr EQ space.

MOVE-CORRESPONDING t TO t1.

APPEND t1.

ENDLOOP.*

-


The problem is that the data which zuonr = space is moved to t1 successful, but the other data which belong to the same kunnr ( ex: 0000052984) has zuonr valune still remain in the table T.

-


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

-


Question: When no value in ZUONR happen, I need to move all the data belong to the same kunnr to T1.

How can I do that??

Please help.

Thank you

Internal table source code:

-


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.