10-15-2008 5:04 PM
Hi All,
I need to move data from XML flat file to internal table. Please help me with this.
Regards,
srik
10-15-2008 5:15 PM
Please make a search in Blogs section you can find lot of threads related to your query
a®
10-15-2008 5:29 PM
10-15-2008 5:35 PM
Hello
Check this link....i FOUND IT on this forum....very usefull
http://heidoc.net/joomla/content/view/15/1/
bye
Gabriel
10-20-2008 2:38 PM
Hi,
Try this.
*******************************
TYPE-POOLS: TRUXS.
DATA: d_filename LIKE IBIPPARMS-PATH,
it_type TYPE truxs_t_text_data.
Data: begin of it_new occurs 0,
knttp type eban-knttp,
txz01 type eban-txz01,
menge type eban-menge,
meins type eban-meins,
lfdat type eban-lfdat,
matkl type eban-matkl,
werks type eban-werks,
lgort type eban-lgort,
ekgrp type eban-ekgrp,
bednr type eban-bednr,
flief type eban-flief,
ekorg type eban-ekorg,
preis type eban-preis,
waers type eban-waers,
peinh type eban-peinh,
sakto type ebkn-sakto,
ps_psp_pnr type ebkn-PS_PSP_PNR,
end of it_new.
START-OF-SELECTION.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
field_name = 'd_filename'
IMPORTING
file_name = d_filename.
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
I_FIELD_SEPERATOR = 'X'
I_LINE_HEADER =
i_tab_raw_data = it_type
i_filename = d_filename
tables
i_tab_converted_data = it_new[].
EXCEPTIONS
CONVERSION_FAILED = 1
OTHERS = 2
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP at it_new.
write 😕 it_new-menge.
ENDLOOP.
******************************
Regards,
Syed
11-05-2008 3:30 PM