on 10-16-2007 11:15 AM
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.
Hi Kevin,
I had the same strange error in my coding
Method xxx.
(...)
DATA L_variable(80) TYPE C value 'blablabla'.
(...)
ENDMETHOD.
I also don't know the reason for this error, but after deleting the line, copying another (working) data decleration and modifying, it worked!
Best Regards,
Andreas
Edited by: Andreas Leis on Dec 19, 2007 11:48 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kevin,
You cannot write a string in you coding that over several lines.
Here you got the problem:
WITH '<?xml version="1.0" encoding="iso-8859-1"?><asx:abap xmlns
:asx="http://www.sap.com/abapxml" version="1.0"><asx:values>'.
If you cannot write this text on one single line, you should use CONCATENATE to create a longer text into a variable and then use this variable. Something like this:
data: var1 type string.
CONCATENATE '<?xml version="1.0" encoding="iso-8859-1"?><asx:abap xmlns'
':asx="http://www.sap.com/abapxml" version="1.0"><asx:values>'
INTO var1.
...
WITH var.
hope this helps you go further.
regards
Sven
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.