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

copy fields in internal table

Former Member
0 Likes
301

i have internal table itab_Data with below fields.

DATA:

BEGIN OF ITAB_DATA OCCURS 0,

BUKRS LIKE T001-BUKRS,

CCODE LIKE T001-BUKRS,

GSBER LIKE BSEG-GSBER,

LIFNR LIKE BSEG-LIFNR,

HKONT LIKE BSEG-HKONT,

BUDAT LIKE BKPF-BUDAT,

BELNR LIKE BKPF-BELNR,

XREF3 LIKE BSEG-XREF3,

END OF ITAB_DATA.

i want to copy values from bukrs field to Ccode field for each record. can you give some suggestions.

ambichan.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
260

ambi,

shouldn't you have populated it at the same time when BUKRS was populated?

anyway, you could also do it this way:


field-symbols: <fs> type line of itab_data.

loop at itab_data assigning <fs>.
  <fs>-ccode = <fs>-bukrs.
endloop.

ryan.

1 REPLY 1
Read only

Former Member
0 Likes
261

ambi,

shouldn't you have populated it at the same time when BUKRS was populated?

anyway, you could also do it this way:


field-symbols: <fs> type line of itab_data.

loop at itab_data assigning <fs>.
  <fs>-ccode = <fs>-bukrs.
endloop.

ryan.