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: 

How to update internal table from XML?

Former Member
0 Kudos
132

Hi All,

How to update an internal table or table from XML file.

I cannot use XSLT transformation (call transformation) or iXML factory classes (if_ixml )

since I am coding in 4.6C system and both are not present...

Is there any other way to do it?

Thanks in advance for the help.

Thanks and Regards,

Ankit

Message was edited by:

Ankit

9 REPLIES 9

Former Member
0 Kudos
82

Hi

Use GUI_UPLOAD Function module.

In exporting

mention table = internal table.

Reward me if its helpful.

Ravi

0 Kudos
82

Hi Ravi,

I want to load XML data into internal table,

How is this going to help me?

Regards,

Ankit.

former_member194669
Active Contributor
0 Kudos
82

Hi,

Use function module 'TEXT_CONVERT_XML_TO_SAP

aRs

0 Kudos
82

hi Ars,

I have rewarded points for your answers, i think this just might work,

But im finding it difficult to use, do u have any working example of this FM.

Regards

Ankit

former_member194669
Active Contributor

0 Kudos
82

Hi Ars,

I am getting short dump with exception conversion failed.

Here is my code:

Report zzz.

DATA : itab_steps LIKE TABLE OF uacc_step WITH HEADER LINE.

DATA : BEGIN OF itab OCCURS 0,

a(100) TYPE c,

END OF itab.

type-pools: TRUXS.

data: TAB_RAW_DATA TYPE TRUXS_XML_TABLE,

TOT_SIZE TYPE I,

TOT_SIZE1 TYPE I.

data: begin of TAB_CONVERTED_DATA occurs 0,

data1(250) type c,

end of TAB_CONVERTED_DATA.

DATA: xml_out TYPE string .

*

FILENAME1 = 'C:\xx.xml'.

CALL FUNCTION 'TEXT_CONVERT_XML_TO_SAP'

EXPORTING

  • I_FIELD_SEPERATOR = ';'

  • I_LINE_HEADER =

I_TAB_RAW_DATA = tab_raw_data

I_FILENAME = filename1

I_TOTALSIZE = tot_size

TABLES

I_TAB_CONVERTED_DATA = TAB_CONVERTED_DATA

  • 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.

break-point.

0 Kudos
82

declare <b>filename1 TYPE RLGRAP-FILENAME</b>.

0 Kudos
82

sorry, its missing in code, but its already declared.

ferry_lianto
Active Contributor
0 Kudos
82

Hi,

Please check also FM SMUM_XML_PARSE.

Also have a look at Thomas's blog and check out Unit 10.

/people/thomas.jung3/blog/2005/05/15/abap-46c-to-640-delta-training

Regards,

Ferry Lianto