How to pass pdf data to ABAP itab
Hi,
I have a pdf form that I want to upload in SAP and retrieve the data from the pdf and generate necessary transaction.
I used the example in offline adobe form documentation:
I've encountered 2 problems:
1. error message: XSLT: No valid XML source,
The transformation is not possible since the XML source document cannot
be parsed.
2. when passing Xstring to string, how much data can it store?
if my form has all the information about vendor name, address, etc. on the top of the form, but indeed the data that I want is on the bottom half of the page. How do I retrieve the data in XML?
3. If someone can provide some sample codes, it would be much appreciated.
Here is my code
DATA: lv_xml_data TYPE xstring,
lt_xml_data TYPE STANDARD TABLE OF xstring,
lv_xml_data_string TYPE string.
APPEND lv_xml_data TO lt_xml_data.
go_pdfobj->get_data( IMPORTING formdata = lv_xml_data ).
Convert XML data from XSTRING format to STRING format
CALL FUNCTION 'ECATT_CONV_XSTRING_TO_STRING'
EXPORTING
im_xstring = lv_xml_data
IMPORTING
ex_string = lv_xml_data_string.
Remove NEW-LINE character from XML data in STRING format
REPLACE ALL OCCURENCES OF cl_abap_char_utilities=>newline
IN lv_xml_data_string WITH ''.
replace '<?xml version="1.0" encoding="UTF-8"?><data>'
in lv_xml_data_string with ''.
"Make the XML envelope compliant with identity transform
REPLACE '<?xml version="1.0" encoding="UTF-8"?><data>'
IN lv_xml_data_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 '</data>'
IN lv_xml_data_string
WITH '</asx:values></asx:abap>'.
Apply the identity transform and convert XML into ABAP in one step
DATA: ls_vndbnk TYPE ZVK_VNDBNK VALUE IS INITIAL.
CALL TRANSFORMATION id
SOURCE XML lv_xml_data_string
RESULT z_vndbnk = ls_vndbnk.
Lily,
I observe that you have declared lv_xml_data as TYPE xstring & string and get_data method probably expects data of xstring type.
Have a look at the "Extract the Data" section from following [article.|https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/c2567f2b-0b01-0010-b7b5-977cbf80665d&overridelayout=true]
Chintan
Similar Messages
-
How to pass table data to brf plus application through abap program
Dear All,
i have a question related to BRF Plus management through abap program.
In brf plus application end, Field1,field2,field3 these 3 are importing parameters.
Table1->structure1->field4,field5 this is the table,with in one structure is there and 2 fields.
in my abap program, i am getting values of fields let us take field1,field2,field3,field4,field5.
And my question is
1) How to pass fields to BRF Plus application from abap program.
2)How to pass Table data to BRF Plus application from abap program.
3)How to pass Structure data to BRF Plus application from abap program.
4)How to get the result data from BRF Plus application to my abap program.
And finally , how to run FDT_TEMPLATE_FUNCTION_PROCESS.
How do i get the code automatically when calling the function in brf plus application.
Regards
venkata.Hi Prabhu,
Since it is a Custom Fm i cant see it in my system.
Look if u want to bring data in internal table then there could be two ways::
1) your FM should contain itab in CHANGING option , so that u can have internal table of same type and pass through FM,
2) read values one by one and append to internal table.
Thanks
Rohit G -
How to save the data of ABAP report into a notepad in desktop location???
HI all,
Can any one tell me how to transfer the data of ABAP report into a Notepad.
Actually I have to schedule a ABAP report in background on daily basis and I want to transfer the
whole record into Notepad.
If any program is available for this..please clearify the relevent code for transferring.
Thanks
Rajeevdeclare a character type internal table.
now move your data from it_data ( internal table with data ) into table itab.
since you are running this report in background, you cannot save it to the desktop. Instead give any app server location
data: itab(400) occurs 0 with header line.
field-symbols: <fs1> type any.
data: gv_file type rlgrap-filename default 'TEST.TXT'.
data: gv_filepath type rlgrap-filename default <path>.
LOOP AT it_data.
DO 100 TIMES.
ASSIGN COMPONENT sy-index OF STRUCTURE it_data TO <fs1>.
IF sy-subrc = 0.
CONCATENATE itab <fs1> INTO itab SEPARATED BY ' '.
ELSE.
EXIT.
ENDIF.
ENDDO.
SHIFT itab LEFT DELETING LEADING ' '.
APPEND itab.
CLEAR itab.
ENDLOOP.
concatenate gv_filepath '/' gv_file into gv_file.
OPEN DATASET gv_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc = 0.
LOOP AT itab.
TRANSFER itab TO gv_file.
ENDLOOP.
CLOSE DATASET gv_file.
ENDIF. -
How to pass the data from wa_itab to fieldcatlog?
how to pass the data from wa_itab to fieldcatlog?
Your question doesn't appear to be Web Dynpro ABAP related. Please only post questions in this forum if they are directly Web Dynpro ABAP related. There are several other more general ABAP related forums.
-
How to pass pdf documents through idocs
I wanted to know how to pass pdf document along with a transaction code like sales order or travel expense manager with the help of IDOCs.
Lily,
I observe that you have declared lv_xml_data as TYPE xstring & string and get_data method probably expects data of xstring type.
Have a look at the "Extract the Data" section from following [article.|https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/c2567f2b-0b01-0010-b7b5-977cbf80665d&overridelayout=true]
Chintan -
How to pass table data into below code for alv
hi
i want to pass table data into alvgrid
i dont know how to pass table data.
here instead of passing ABC into internal table
i want to pass table data .
please help me
ialv-test1 = 'ABC'.
form get_data.
ialv-test1 = 'ABC'.
ialv-test2 = 'DEF'.
append ialv.
ialv-test1 = 'GHI'.
ialv-test2 = 'JKL'.
append ialv.
ialv-test1 = '123'.
ialv-test2 = '456'.
append ialv.
endform
thanks in advanced.Have a look at below links. It gives you sample code of alv grid.
http://sap.niraj.tripod.com/id64.html
http://www.sap-img.com/abap/sample-programs-on-alv-grid.htm
Have a look at below links for SAP Help.
http://help.sap.com/saphelp_nw04/helpdata/en/8d/e994374c9cd355e10000009b38f8cf/content.htm
http://help.sap.com/saphelp_erp2004/helpdata/en/12/904f42d5f811d2b469006094192fe3/content.htm
Best Regards,
Vibha
*Please mark all the helpful answers -
How to pass the data from a input table to RFC data service?
Hi,
I am doing a prototype with VC, I'm wondering how VC pass the data from a table view to a backend data service? For example, I have one RFC in the backend system with a tabel type importing parameter, now I want to pass all the data from an input table view to the RFC, I guess it's possible but I don't know how to do it.
I try to create some events between the input table and data service, but seems there is no a system event can export the whole table to the backend data service.
Thanks for your answer.Thanks for your answer, I tried the solution 2, I create "Submit" button, and ser the mapping scope to be "All data rows", it only works when I select at least one row, otherwise the data would not be passed.
Another question is I have serveral imported table parameter, for each table I have one "submit" event, I want these tables to be submitted at the same time, but if I click the submit button in one table toolbar, I can only submit the table data which has a submit button clicked, for other tables, the data is not passed, how can I achieve it?
Thanks. -
Regarding how to pass the data from web dynpro to workflow
hi gurus,
how to pass the data from web dynpro to workflow.
Regards
vijayCheck this [thread|SAP_WAPI_START_WORKFLOW;
-
How to pass the data from web dynpro to workflow.
hi gurus,
how to pass the data from web dynpro to workflow.
Regards
vijayHi
you can use function module
data ls_input_container TYPE swr_cont.
data lt_input_container TYPE TABLE OF swr_cont.
CALL FUNCTION 'SAP_WAPI_START_WORKFLOW'
EXPORTING
task = ptask
IMPORTING
return_code = lv_return_code
new_status = lv_new_status
TABLES
input_container = pinput_container
message_lines = lt_message_lines
message_struct = lt_message_struct.
where you pass the data in imnternal table "pinput_container" as
ls_input_container-element = 'KUNNR'.
ls_input_container-value = ls_skna1-kunnr ."wd_this->lv_kunnr.
APPEND ls_input_container TO lt_input_container .
ls_input_container-element = 'CLUSER'.
ls_input_container-value = lv_cluser.
APPEND ls_input_container TO lt_input_container .
ls_input_container-element = 'BUKRS'.
ls_input_container-value = lv_bukrs. " youe value as per requirement.
APPEND ls_input_container TO lt_input_container .
ls_input_container-element = 'VKORG'.
ls_input_container-value = ls_sknvv-vkorg. " youe value as per requirement
APPEND ls_input_container TO lt_input_container .
ls_input_container-element = 'VTWEG'.
ls_input_container-value = ls_sknvv-vtweg. "youe value as per requirement.
APPEND ls_input_container TO lt_input_container .
ls_input_container-element = 'SPART'.
ls_input_container-value = ls_sknvv-spart. "youe value as per requirement.
APPEND ls_input_container TO lt_input_container .
*Also Forgot to mention where ptask is your workflow ID *
Regards,
Arvind
Edited by: Arvind Patel on May 14, 2010 7:38 AM -
HOW TO PASS THE DATA FROM SELECTION SCREEN TO STANDARD TRANSACTION?
HI,
HOW TO PASS THE DATA FROM SELECTION SCREEN TO STANDARD TRANSACTION?
thanks,
samba.By selection screen, what do you mean? There is no selection screen in WDA as there was in classic dynpro. Do you mean you are using the Select-Options reusable component? Are you wanting to call a standard transaction via ITS - SAPGUI for HTML? Please provide more details to your question.
-
How To formate PDF Data(Binary) to HTML Formate
Hi All,
I am using PDFs in my application. Once the user has submitted his project in formation through pdf, it stores in BAPI. When i tried to retrive the data from back end to display in a view. it shows me all the information is in single line because of PDf binary data. Can any one knows about how to display pdf data in a view (html) with multiple lines.
Thanks
Regards
Ravi.GollaHi Ravi,
See this thread...It might be useful for u..
/people/mark.finnern/blog/2003/09/23/bsp-programming-handling-of-non-html-documents
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/4fd2d690-0201-0010-de83-b4fa0c93e1a9
Urs GS -
How to pass a data set as a filter?
Hello everybody!
Are asking me to do the following:
Select from a Combo Box classifications suppliers and all suppliers to pass on the whole as a result of a query filter.
At this time I was only able to pass the values of the first, someone will have some idea on how to pass a data set as a filter?
The result of my selection, as a way to "Store" and assign it as my input filter query.
thanks for your help.Hi Jan,
thanks for your help, but...
My problem is passing the result of a query directly to another query, to me that this generates a result.
For Example: zquery_1, is the entry qualification of suppliers and I returned a set of suppliers.
The zquery 2, receives as input suppliers that set me back and the materials associated with the suppliers.
To achieve this, I am passing the result of a zquery_1 store and east asginandolo as variable input to zquery_2, my problem is that this just me reading the first of the records.
If the 3 providers zquery_1 me back, how can I pass these 3 andalusia zquery_2 providers without the user having to select them?
greetings
Manuel Sandoval -
How to pass XML data between applications
Hi,
can any one tell me how to pass XML data between applications
Thanks in advance
SudheerSteve,
I tried the code in the http package in the Appendix A section of your book. Each time i try a POST I get a HTTP/1.1 400 Bad Request error from the server. I can successfully do a GET from URLs. I have pretty much copied your code verbatim. Any ideas?
Thanks,
Sunder
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Steven Muench ([email protected]):
See the "Working with XML Messages" section starting on page 242 of my Building Oracle XML Applications. It covers how to Send and Receive XML messages over the web through HTTP GET and HTTP POST as well as specifically Example 6-30 that illustrates how to receive a posted XML message in a servlet and process it.
Hope this helps.<HR></BLOCKQUOTE>
null -
Access the adobe form pdf data in abap or java programs
Hi,
We created an adobe form, with few text boxes, and emailed to user for filing his data into the pdf file.
He filled the text boxes and saved the pdf, and sent back the pdf file by mail.
Now our requirement is:
we need to read the values entered by the user in pdf and update in certain ztables using abap or java.
case 1: using abap
How can abap program read the entries/values in pdf.
is there any doc/blog that shows how to access the adobe form data in abap.
do we need to use/install any software for this.
case 2: using java
Is it possible to read/retrive the adobe form data into java. once the data is into java program, i can utilise the data for several puposes.using ABAP:
check the program: FP_PDF_TEST_03
This program reads the data from Adobe into XML format.
After this you have to read the data from XML format into ABAP(hope you know how to convert XML to ABAP or simply google it).
Thanks,
Chandra -
Problem in passing xstring data from abap to webservice method.
Hi,
I want to upload the document from ABAP to Microsoft SharePoint. So for that i have created the webservice in .net for uploading the document in SharePoint.
Now in Abap i have consumed this service by creating proxy class. The web service has one method as Upload_File which takes byte[] as paramerter, so in wsdl file this parameter get converted into s:base64Binary and in abap it get converted into RAWSTRING.
Now, when i try to upload the file with very small content (less than 54 character mean the rawstring variable which contain the file content has length less than 108 ), file gets uploaded with no problem, but when the file has content more than 54 character, it give error like "SOAP:1.032 SRT: Wrong Content-Type and empty HTTP-Body received"
And also one thing when i have created the proxy class it gives warning that "The XSD type base64Binary does not exactly correspond to the ABAP type RAWSTRING"
What can be the problem? how to pass file content to external web service?
Thanks,
VikramHi Nick,
Yes, when i declare the data type as string in XSD it get converted into xsd:string.
I have already tried using String as parameter in WebService method instead of byte[].
But then in .Net, I need to write some code for converting the string variable ( which content the file content in hexadecimal format) into byte array and for that there is a method provided by .Net framework but when I use it, it write the hexadecimal content in file.
So I have written my own code for converting hexadecimal content which string variable content to byte array.
By doing this, it working fine and all type of file getting uploaded in SharePoint but when I try to open the file only .TXT file get open properly and other type of file give me some error.
Maybe you are looking for
-
Boot Fail after latest BIOS Update on Flex 2-15D
Hi everyone, I have a severe problem (I guess) after the latest BIOS Update. Windows 7 freezes during startup. I own a 64-bit Lenovo FLex 2 15D with AMD A6-6310 and R4, 4GB RAM and a SSHD (8GBSSH). I purchased it without OS and installed Windows 7 -
-
After a search, when I click on the site I want to go to, it will take me to a different site (like an ask or search type of site, seems like the same 3 or 4 always) when I to go back to the search page ( takes 2 or 3 clicks on the back arrow) and tr
-
How to edit Integer numbers in a JList?
I need to edit Integer numbers in a JList when double clicked. Anyone has any example how to do that? It will be always Integer numbers (they are used to calculate future dates based on today date). Appreciate any help
-
Where is iPhone backup in time machine
Had a problem with the upgrade to ios5, it failed to backup the iphone and so couldnt restore recent settings/photos/text etc. I need to restore my iphone 3gs and the available backups in itunes are either yesterday (as new phone) or may2011. I have
-
FlashBuilder 4.5.1 Simulator not Displaying Anything
Hi All, I have a licence version of FlashBuilder 4.5.1, just today I created 2 projects, 1 TabbedViewNavigatorApplication and 1 ViewNavigatorApplication but when I run it, there nothing in the simulator that is displayed. I tried both Android and IOS