Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Problems with convert xml into abap , getting error

Thats my Code and i get the following error when i try to activate it:

"Zeilen├╝berschreitende Literale sind nicht erlaubt." I try to translate it:

"linescross literals are not allowed" . AT the Line i have made in bold!

I used the PDF "Offline Interactive Forms Using ABAP". But it doen`t work. CAN ANYBODY HELP ME PLEASE???

METHOD process_form.

  • Get a reference to the form processing class.

DATA: l_fp TYPE REF TO if_fp,

l_xml_string TYPE string.

l_fp = cl_fp=>get_reference( ).

  • Get a reference to the PDF Object class.

DATA: l_pdfobj TYPE REF TO if_fp_pdf_object.

l_pdfobj = l_fp->create_pdf_object( ).

  • Set the pdf in the PDF Object.

l_pdfobj->set_document( pdfdata = pdf ).

  • Set the PDF Object to extract data the Form data.

l_pdfobj->set_extractdata( ).

  • Execute call to ADS

l_pdfobj->execute( ).

  • Get the PDF Form data.

DATA: pdf_form_data TYPE xstring.

l_pdfobj->get_data( IMPORTING formdata = pdf_form_data ).

  • Convert the xstring form data to string

CALL FUNCTION 'ECATT_CONV_XSTRING_TO_STRING'

EXPORTING

im_xstring = pdf_form_data

IMPORTING

ex_string = l_xml_string.

  • 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

l_xml_string WITH ''.

  • Make the XML envelope compliant with identity transform

REPLACE ''.

*XML-Transformation

DATA: wa_customer TYPE scustom VALUE IS INITIAL.

CALL TRANSFORMATION id

SOURCE XML l_xml_string

RESULT scustom = wa_customer.

ENDMETHOD.

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question