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

structure problem cant appendbetween two diff struc .

Former Member
0 Likes
455

Dear GURUS PLZ help me

thanks in advance

error in this line

APPEND LINES OF i_ekko TO i_data_file.

error

"I_DATA_FILE" and "I_EKKO" are not mutually convertible. In Unicode

programs, "I_DATA_FILE" must have the same structure layout as

"I_EKKO", independent of the length of a Unicode character.

i cant make i_data_file like i_ekko becoz i hav to append other table also in i_data_file

sturcture of i_data_file

DATA : BEGIN OF i_data_file OCCURS 0,

record(1000),

END OF i_data_file.

sturcture of i_ekko

wa_ht type x .

DATA : BEGIN OF i_ekko OCCURS 0,

rtype(04) TYPE c, "Record type

tab1 TYPE wa_ht,

ebeln(10) TYPE c, "Purchasing document number

tab2 TYPE wa_ht,

bsart(04) TYPE c, "Purchasing document type

tab3 TYPE wa_ht,

lifnr(10) TYPE c, "Vendor

tab4 TYPE wa_ht,

bedat(08) TYPE c, "Purchasing document date

tab5 TYPE wa_ht,

ekorg(04) TYPE c, "Purchasing organization

tab6 TYPE wa_ht,

ekgrp(03) TYPE c, "Purchasing group

tab7 TYPE wa_ht,

bukrs(04) TYPE c, "Company code

tab8 TYPE wa_ht,

zterm(04) TYPE c, "Payment terms

tab9 TYPE wa_ht,

zbd1t(03) TYPE c, "Cash discount days 1

tab10 TYPE wa_ht,

zbd1p(06) TYPE c, "Cash discount percentage 1

tab11 TYPE wa_ht,

zbd2t(03) TYPE c, "Cash discount days 2

tab12 TYPE wa_ht,

zbd2p(06) TYPE c, "Cash discount percentage 2

tab13 TYPE wa_ht,

zbd3t(03) TYPE c, "Cash discount days 3

tab14 TYPE wa_ht,

inco1(03) TYPE c, "Incoterms part 1

tab15 TYPE wa_ht,

inco2(28) TYPE c, "Incoterms part 2

tab16 TYPE wa_ht,

waers(05) TYPE c, "Currency

tab17 TYPE wa_ht,

wkurs(12) TYPE c, "Exchange rate

tab18 TYPE wa_ht,

kufix(01) TYPE c, "Fixing of exchange rate

tab19 TYPE wa_ht,

verkf(30) TYPE c, "Responsible salesperson

4 REPLIES 4
Read only

Former Member
0 Likes
428

Try unchecking the unicode active checks in the program attributes and check if gives the same error

Read only

Former Member
0 Likes
428

If the above remedy does not work , try this :

data : wa_data LIKE LINE OF i_data_file.

LOOP at i_ekko INTO wa_ekko.

MOVE wa_ekko TO wa_data_file.

APPEND wa_data_file TO i_data_file.

ENDLOOP.

Hope this helps.

Read only

Former Member
0 Likes
428

Hi Anit,

Try this code in ur program.

data : wa_data like line of i_data_file,

wa_ekko like i_ekko.

Loop at i_ekko into wa_ekko.

move wa_ekko to wa_data_file.

append wa_data_file to i_data_file.

endloop.

Reward points if helpful.

Regards,

Hemant

Hope this helps.

Read only

Former Member
0 Likes
428

Hi Anit,

Try this code in ur program.

data : wa_ekko like i_ekko,

wa_data like line of i_data_file.

Loop at i_ekko into wa_ekko.

move wa_ekko to wa_data_file.

append wa_data_file to i_data_file.

endloop.

Reward points if helpful.

Regards,

Hemant

Hope this helps.