Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

table entries

Former Member
0 Likes
601

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

4 REPLIES 4
Read only

Former Member
0 Likes
572

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

Read only

Former Member
0 Likes
572

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

Read only

0 Likes
572

hi ravi,

i tried as you said but its not working, and its going to dump.

please help how to do

Read only

Former Member
0 Likes
572

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