‎2006 Oct 26 11:29 PM
Fellows, i got the following problem.
I've been developing a model pool, wich have a transparent table called 'x'. i've declared in the data area the 'x' table as :
<b>TYPES : BEGIN OF TY_U.
INCLUDE STRUCTURE 'x'
TYPES : END OF TY_U.
DATA: TI_U TYPE STANDARD TABLE OF TY_U WITH HEADER LINE.
DATA : WA_U LIKE LINE OF TI_U.</b>
Then i have a runtime that fills the work area correctly, but when the program stops at :
<b>CLEAR wa_u.
LOOP AT ti_u INTO wa_u.
UPDATE 'x' FROM wa_u.
ENDLOOP.</b>
<b>returns '4', it didn't make the commit</b>. i've declared all the fields of table 'x' as a key fields, as a reference for the lifeguards of this problem. Could anybody help me please. let me say that i've already try to unmark the fields as a key fields, it returns the same error : Nothing, allways '4'.
Message was edited by: Steve Cook
Message was edited by: Steve Cook
‎2006 Oct 26 11:40 PM
Hi,
Instead of declaring a type and creating a table..use the transparent table directly..
1)
Example.
DATA: TI_U TYPE STANDARD TABLE OF X WITH HEADER LINE.
DATA: WA_U TYPE X.
2)
Check if there is data in the table for key..
3)
Instead of updating each row..Do it one statement..
UPDATE X FROM TABLE TI_U.
Thanks,
Naren
‎2006 Oct 27 12:13 AM
Fellow, it returns the same, i've declared the table in many different ways, and it returns the same. 4 didn't save anything. I don't understand. i'm gonna show you the structure.
MANDT X X MANDT CLNT 3
RSNUM X X RSNUM NUMC 10
KOSTL X X KOSTL CHAR 10
ZGLIB X X WEMPF CHAR 12
ZLIB1 X X ZLIB CHAR 1
ZLIB2 X X ZLIB CHAR 1
ZLIB3 X X ZLIB CHAR 1
ZSTAT X X ZSTA CHAR 1
ZLIDT X X BLDAT DATS 8
ZLIUD X X PSODT DATS 8
The table it's type 'A' and allows modifications and inserts.
I really appreciate your help.
Regards.
‎2006 Oct 27 12:13 AM
Hi,
Did you check if there is any data in the table with the key combination..
Thanks,
Naren
Message was edited by: Narendran Muthukumaran
‎2006 Oct 27 12:15 AM
Hi,
Did you check if there is any data in the table with the key combination..
Thanks,
Naren
‎2006 Oct 27 12:21 AM
When i ran it the firs time, the fields lib2 and lib3 were empty. but then i fill them just for see the behavior and returns the same. I've unmarked those fields lib1 lib2 and lib3 as a key fields too, but i got the same answer. Tnks for your assistance.
‎2006 Oct 27 12:32 AM
THE ONLY THING THAT i CAN THINK OF IS THAT MAYBE THE RECORD YOU'RE TRYING TO 'UPDATE' DOES NOT YET EXUST.
If that is the case use the MODIFY statement insted. That will insert or update as appropriate.