‎2008 May 01 10:33 AM
i have a final internal table like this
data: BEGIN OF GT_FILE occurs 0,
hienm TYPE rshiedir-hienm,
NODENAME TYPE rsnodename,
IOBJNM TYPE rsiobjnm,
VALUE1 TYPE rsnodename,
TXTSH TYPE rstxtsh,
END OF GT_FILE.
i am getting all the values to gt_file.
i have creted a ztable with same fileds as final internal table.
the problem is
in the final internal table i have 5 values , this 5 values need to get into ztable once i execute.
if i use insert command how to declare work area for the above final internal table.
please help me
‎2008 May 01 10:38 AM
Hi Hemal,
Write the Below Code:
data: BEGIN OF GT_FILE occurs 0,
hienm TYPE rshiedir-hienm,
NODENAME TYPE rsnodename,
IOBJNM TYPE rsiobjnm,
VALUE1 TYPE rsnodename,
TXTSH TYPE rstxtsh,
END OF GT_FILE.
DATA:
wa_file LIKE LINE OF gt_file.
LOOP AT gt_file INTO wa_file.
INSERT Ztable FROM wa_file.
ENDLOOP.Regards,
Sunil
‎2008 May 01 10:39 AM
HI hemal,
Why do you want to declare a work area?
you can just say
insert <name of your ZTABLE> from table GT_FILE.
REgards,
Ravi
‎2008 May 01 10:41 AM
hi ravi,
i tried as you said but its not working, and its going to dump.
please help how to do
‎2008 May 01 10:40 AM
Hi,
data: BEGIN OF GT_FILE occurs 0,
hienm TYPE rshiedir-hienm,
NODENAME TYPE rsnodename,
IOBJNM TYPE rsiobjnm,
VALUE1 TYPE rsnodename,
TXTSH TYPE rstxtsh,
END OF GT_FILE.according to ur code work area and table name are same GT_FILE
LOOP AT gt_file .
INSERT Ztable FROM gt_file.
ENDLOOP.Just try this....
Hope this helps...
Best regards,
raam