cancel
Showing results for 
Search instead for 
Did you mean: 

XML Data

Former Member
0 Kudos

Hi,

We are using the offline scenario for ADOBE forms integration with ABAP. The data will be in XML format.

The steps I have done.

1) I have converted the XSTRING to string using FM CATT_CONV_XSTRING_TO_STRING.

CALL FUNCTION 'ECATT_CONV_XSTRING_TO_STRING'

EXPORTING

IM_XSTRING = lv_pdf

  • IM_ENCODING = 'UTF-8'

IMPORTING

EX_STRING = lv_string

.

2) And, used the following piece of code:-

  • Remove NEW-LINE character from XML data in STRING format

CLASS cl_abap_char_utilities DEFINITION LOAD.

REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>newline IN lv_string WITH ' '.

  • Make the XML envelope compliant with identity transform

REPLACE '<?xml version="1.0" encoding="UTF-8"?>'

IN lv_string

WITH '<?xml version="1.0" encoding="iso-8859-1"?><asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0"><asx:values>'.

*REPLACE '<xfa:data xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"' in lv_string WITH ''.

REPLACE '</data>'

IN lv_string

WITH '</asx:values></asx:abap>'.

And,

CALL TRANSFORMATION ID

SOURCE XML lv_string

RESULT ITPDF = GIT_PDF.

Now the error I am getting while debugging it is XSLT: No valid XML source

PLease help.

Accepted Solutions (1)

Accepted Solutions (1)

anand_nidamanuru
Active Participant
0 Kudos

Hi Shakti,

you can use the below coding rather than doing direct XML manipulation.

1. Load iXML library

Load definition of iXML library to enable use of methods of class CL_IXML

CLASS cl_ixml DEFINITION LOAD.

2. Create main factory and stream factory

*Creating the main factory for the iXML library

lv_ixml = cl_ixml=>create( ).

*Create a main stream factory.

CALL METHOD lv_ixml->create_stream_factory

RECEIVING

rval = lv_streamfactory.

3. Create a stream

Create a stream based on stream factory object created above and the excel file that was upload in step 1.

CALL METHOD lv_streamfactory->CREATE_ISTREAM_XSTRING

EXPORTING

STRING = lv_xstring "hex string obtained from step 2

RECEIVING

RVAL = lv_istream.

4. Create new XML DOM Object

Create a new XML document in the same main factory object created in step 4.

lv_obj_dom_xml = lv_ixml->create_document( ).

Now you can use the stream object or the dom object, to retrieve the string format and finally apply XSLT to transform to structure data.

Thanks,

Anand

Answers (2)

Answers (2)

OttoGold
Active Contributor
0 Kudos

Hello, the only thing you need to know about reading the data out of the PDF offline form is in this tutorial:

http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/c2567f2b-0b01-0010-b7b5-977cbf80665d&override...

Hope this will guide through the whole Adobe offline solution, Otto

Former Member
0 Kudos

Hi shakti,

go for this link

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/48/a06781fb696bb9e10000000a42189d/frameset.htm

in this you can get how to integrate adobe in wd bap.

may be this can solve your issue