Application Development 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: 

XML to internal Table

Former Member
0 Kudos

Hi All,

I need to move data from XML flat file to internal table. Please help me with this.

Regards,

srik

5 REPLIES 5

former_member194669
Active Contributor
0 Kudos

Please make a search in Blogs section you can find lot of threads related to your query

Former Member
0 Kudos

hey,

Befor posting just search SDN you will be getting your answer ok.

Check out these threads,

Regards,

Midhun abraham

Edited by: Midhun Abraham on Oct 15, 2008 6:32 PM

0 Kudos

Hello

Check this link....i FOUND IT on this forum....very usefull

http://heidoc.net/joomla/content/view/15/1/

bye

Gabriel

Former Member
0 Kudos

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

Former Member
0 Kudos

done