on 08-28-2008 6:12 AM
Friends,
I am trying to insert values into ztable in an event handler method in a WDA application.
This is the code. ZDATA1 is a ztable with two fields: MANDT and ZKTOKD of data element char01.
-
types: begin of zs,
zktokd type char01,
end of zs.
data: zitab type table of zs,
zstruct like line of zitab.
zstruct-zktokd = 's'.
append zstruct to zitab.
INSERT zdata1 FROM TABLE zitab.
-
I am getting the error: "The Work area "ZITAB" is not long enough...
Please let me know what is missing.
Thanks and Regards.
This question is not directly related to Web Dynpro ABAP. There is a general ABAP forum for questions such as this. In the future please choose the correct forum for your questions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The error is here
types: begin of zs,
zktokd type char01,
end of zs.
data: zitab type table of zs ,
zstruct like line of zitab.
"passed the Internal table name which is wrong
Correct one
data:
zitab type table of zs,
zstruct like line of ZS. " Here we have to give the type you have declared above.
" Zstruct acts like a workarea.
Regards
Lekha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>types: begin of zs,
>zktokd type char01,
>end of zs.
>data: zitab type table of zs,
>zstruct like line of zitab.
>zstruct-zktokd = 's'.
>append zstruct to zitab.
>INSERT zdata1 FROM TABLE zitab.
this is noway related to web dynpro abap, remove types declaration
data: zitab type standard table of zdata1.
data: zstruct type zdata1.
zstruct-zktokd = 's'.
append zstruct to zitab.
insert zdata1 from table zitab.
Abhi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.