How to send a XML file from SAP to WEB SERVICE
Hi folks,
i m creating a XML file with purchase order data, while saving the purchase order.now i need to send this XML file to some WEB SERVICE i.e to some perticular address in WEB.
can anyone give the step by step procedure to do this web service configuration? it's really urgent.
points must be awarded.
Thanks & Regards
pabitra
Hi all,
i need to send some purchase order data from SAP to WEB SERVICE. while saving the purchase order, i want to send some data from SAP to WEB SERVICE ( a perticular address in WEB).
i want to see those datas in xml format in WEB.
Now i am using SAP 4.7 version. Is this web service configuration is possible or not?
In SE37, i can not see the CREATE WEB SERVICE option in utilitities--> More utilities menu.is it possible in 4.7???
can anyone give any suggestion ? it's very urgent.
Thnaks
pabitra
Similar Messages
-
Generate XML file from RFC using Web Services
Hi,
I am trying to save an RFC enabled Function Module output to an XML file using ABAP web services.
I could able to create Web Service and release it using WSCONFIG/WSADMIN. I can actually get the output in XML file when i launch the web service home page. But I need this to be done in the ABAP program itself. So If i run the RFC I could able to create,release web service and capture the Generated XML file by SOAP runtime.
Any FM available?
Thanks,
Ram Sanjeevwhich version of WAS you are on .
if you are on WAS6.40 check the following weblog on how to consume webservice using the wsdl file.
/people/thomas.jung3/blog/2004/11/17/bsp-a-developers-journal-part-xiv--consuming-webservices-with-abap
lower version of WAS use class cl_http_client.
if this case you have to manually build the soap message.
/people/durairaj.athavanraja/blog/2004/09/20/consuming-web-service-from-abap
Regards
Raja -
Send xml file from sap to third party url through https
Hi,
I have a requirement to send the xml file from ecc to a 3rd party url through HTTPS. How can we achieve this using ABAP.
Client doesn't have XI enviroment. The client has provided the 3rd party url where the file needs to be uploaded.
Please help ! <removed by moderator>
Thanks in advance.
Regards,
Chitra.K
Edited by: Thomas Zloch on Sep 12, 2011 12:58 PMHi Chitra,
I had similar requirement and here is what I did: -
REPORT Z_HTTP_POST_TEST_AMEY.
DATA: L_URL TYPE STRING ,
L_PARAMS_STRING TYPE STRING ,
L_HTTP_CLIENT TYPE REF TO IF_HTTP_CLIENT ,
L_RESULT TYPE STRING ,
L_STATUS_TEXT TYPE STRING ,
L_HTTP_STATUS_CODE TYPE I ,
L_HTTP_LENGTH TYPE I ,
L_PARAMS_XSTRING TYPE XSTRING ,
L_XSTRING TYPE XSTRING ,
L_IS_XML_TABLE TYPE STANDARD TABLE OF SMUM_XMLTB ,
L_IS_RETURN TYPE STANDARD TABLE OF BAPIRET2 ,
L_OUT_TAB TYPE STANDARD TABLE OF TBL1024
MOVE 'https://<hostname>/xxx/yyy/zzz' TO L_URL.
MOVE '<XML as string>' TO L_PARAMS_STRING.
*STEP-1 : CREATE HTTP CLIENT
CALL METHOD CL_HTTP_CLIENT=>CREATE_BY_URL
EXPORTING
URL = L_URL
IMPORTING
CLIENT = L_HTTP_CLIENT
EXCEPTIONS
ARGUMENT_NOT_FOUND = 1
PLUGIN_NOT_ACTIVE = 2
INTERNAL_ERROR = 3
OTHERS = 4 .
"STEP-2 : AUTHENTICATE HTTP CLIENT
CALL METHOD L_HTTP_CLIENT->AUTHENTICATE
EXPORTING
USERNAME = 'testUser'
PASSWORD = 'testPassword'.
"STEP-3 : SET HTTP HEADERS
CALL METHOD L_HTTP_CLIENT->REQUEST->SET_HEADER_FIELD
EXPORTING NAME = 'Accept'
VALUE = 'text/xml'.
CALL METHOD L_HTTP_CLIENT->REQUEST->SET_HEADER_FIELD
EXPORTING NAME = '~request_method'
VALUE = 'POST' .
CALL METHOD L_HTTP_CLIENT->REQUEST->SET_CONTENT_TYPE
EXPORTING CONTENT_TYPE = 'text/xml' .
"SETTING REQUEST DATA FOR 'POST' METHOD
IF L_PARAMS_STRING IS NOT INITIAL.
CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
EXPORTING
TEXT = L_PARAMS_STRING
IMPORTING
BUFFER = L_PARAMS_XSTRING
EXCEPTIONS
FAILED = 1
OTHERS = 2.
CALL METHOD L_HTTP_CLIENT->REQUEST->SET_DATA
EXPORTING DATA = L_PARAMS_XSTRING .
ENDIF.
"STEP-4 : SEND HTTP REQUEST
CALL METHOD L_HTTP_CLIENT->SEND
EXCEPTIONS
HTTP_COMMUNICATION_FAILURE = 1
HTTP_INVALID_STATE = 2.
"STEP-5 : GET HTTP RESPONSE
CALL METHOD L_HTTP_CLIENT->RECEIVE
EXCEPTIONS
HTTP_COMMUNICATION_FAILURE = 1
HTTP_INVALID_STATE = 2
HTTP_PROCESSING_FAILED = 3.
"STEP-6 : Read HTTP RETURN CODE
CALL METHOD L_HTTP_CLIENT->RESPONSE->GET_STATUS
IMPORTING
CODE = L_HTTP_STATUS_CODE
REASON = L_STATUS_TEXT .
WRITE: / 'HTTP_STATUS_CODE = ',
L_HTTP_STATUS_CODE,
/ 'STATUS_TEXT = ',
L_STATUS_TEXT .
"STEP-7 : READ RESPONSE DATA
CALL METHOD L_HTTP_CLIENT->RESPONSE->GET_CDATA
RECEIVING DATA = L_RESULT .
"STEP-8 : CLOSE CONNECTION
CALL METHOD L_HTTP_CLIENT->CLOSE
EXCEPTIONS
HTTP_INVALID_STATE = 1
OTHERS = 2 .
"STEP-9 : PRINT OUTPUT TO FILE
CLEAR : L_XSTRING, L_OUT_TAB[].
CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
EXPORTING
TEXT = L_RESULT
IMPORTING
BUFFER = L_XSTRING
EXCEPTIONS
FAILED = 1
OTHERS = 2.
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
BUFFER = L_XSTRING
TABLES
BINARY_TAB = L_OUT_TAB .
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = 'C:AMEYHTTP_POST_OUTPUT.xml'
TABLES
DATA_TAB = L_OUT_TAB .
Also, following is the detailed link for use of HTTP_CLIENT class: -
http://help.sap.com/saphelp_nw70ehp1/helpdata/EN/1f/93163f9959a808e10000000a114084/content.htm
Also, in below link, you can ignore XI specific part and observe how its sending XML to external URL:-
(I know it describes call to SAP XI server's URL, but it can be used to call any URL)
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/ae388f45-0901-0010-0f99-a76d785e3ccc
In addition to all above, following configs to be present at ABAP application server: -
1. The hostname used to URL should be present in SAP ABAP application server's 'hosts' file.
2. Security certificate (if available) for URL to be called must be installed in SAP ABAP application server.
Let me know if you achieve any progress with it... -
Uploading an XML file from SAP into third party URL
Hi,
I need to Upload an XML file from sap into Third party URL. Can any body tell me the possible ways in SAP to achieve this task. Also explain me the proceedure.
Thanks in advance.
-NamdevSorry. If they only said HTTP/HTTPS and didn't say explicitly web service, it means they don't want it.
One thing I'm not sure is, do you have an URL at the third-party system that you need to contact, or should you provide one at your SAP system that they will contact?
If it is the first one, to send an HTTP request to a given URL using ABAP, you'll find an example here: [SAP Library: Example Program: Executing an HTTP Request|http://help.sap.com/saphelp_nw70/helpdata/en/1f/93163f9959a808e10000000a114084/frameset.htm]
Sandra -
Hello Anybody, I have a question. Can any of you please suggest me how to make an xml file from the database table with all the records?
Note:- I am having the XSD Schema file and the resulted XML file should be in that XSD format only.The Oracle documentation has a good overview of the options available
Generating XML Data from the Database
Without knowing your version, I just picked 11.2, so you made need to look for that chapter in the documentation for your version to find applicable information.
You can also find some information in XML DB FAQ -
Sending XML file from SAP to Windows Based file server with FTP function
Hi Gurus,
We are using SAP BW 3.0B version.
I need to convert data in ODS to XML format and send this XML file to remote server which is not a SAP application server, it is just a Window Based file server with FTP function..
By writing some ABAP code I have converted ODS data into XML format (which gets saved in my local system)
(Is that I need to put this file in Application Server to send it to the other servers? )
Now the thing is how I can send this file to that Windows Based file server.
plz suggest me.... what can be done......
Thanks in Advance
Madhusudhan
Edited by: Madhusudhan Raju on Dec 3, 2009 4:25 AMI dont think the above code support windows OS. Because I always execute this script via UNIX.
I think you can try this option, go to command prompt, goto the destination path where you have an XML file using cd....
ftp (destination servername), specify the username and password.
afterthat, use the command put and filename.
check whether the file had reached destination successfully or not.
For automation purpose, you can use the following script like
ftp: -s: test.txt (servername)
In test.txt,
UserName
Password
bin
cd /files
put file.xml
bye
Also, you can check in SM69, there will be some SAP external commands to automate the file transfer.
Thanks
Sat
http://support.microsoft.com/?kbid=96269 -
How to create an Xml File From DataBase?
hi all
i have two tables from my database :
VoucherHeader and VoucherItem
VoucherHeader has 4 fields:
VoucherHeaderId
bigint Unchecked
VoucherNum bigint
Unchecked
VoucherDate nvarchar(50)
Unchecked
Comment nvarchar(50)
Unchecked
VoucherItem has 8 fields :
VoucherItem bigint
Unchecked
VoucherHeaderRef
bigint Unchecked
Row bigint
Unchecked
Code1 bigint
Unchecked
Code2 bigint
Unchecked
ItemComment nvarchar(50)
Unchecked
Debit bigint
Unchecked
Credit bigint
Unchecked
and i fill datatable by this codes:
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Me.VoucherItemTableAdapter.Fill(Me.DataSet1.VoucherItem)
Me.VoucherHeaderTableAdapter.Fill(Me.DataSet1.VoucherHeader)
End Sub
now i see this result:
how to send data into an Xml File From DataGridView Header and Item?
please help me
thanks all.
Name of Allah, Most Gracious, Most Merciful and He created the humanOne instruction. But you do it from the dataset, not the DataGridView
Me.DataSet1.WriteXml(FILENAME)
There is a WriteXML method for a DataTable but it gives errors. Since you dataset has two tables save bot into the same xml file.
jdweng -
How do I upload XML files into sap table?
Dear all,
I found some methods that upload xml into SAP,
but there doesnt work under 4.6c.
Can someone tell me how to upload XML files into
sap under 4.6c?
THX!hi,
You can convert XML to abap using transformations. Simple transformations is a proprietary SAP programming language that describes the transformation of ABAP data to XML (serialization) and from XML to ABAP data (deserialization).
goto SE80->workbench->edit object(or other objects)->in object selection chose more tab and then choose the transformation radio button and write a name and click create new.
Here you enter your transformation like
<xsl:transform version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:sap="http://www.sap.com/sapxsl"
>
<xsl:strip-space elements="*"/>
<xsl:template match="/">
<xsl:copy-of select="."/>
</xsl:template>
</xsl:transform>
You can use this transfomation in your program using call transformation. You can find more info on call transformation in help.
Hope this helps.
Regards,
Richa -
How to get Hierarchical XML File from a Database Join Query !
Hi,
How can i get a Hierarchical XML File from a Database Join Query ?
Any join query returns repeated values as below:
BD17:SQL>select d.dname, e.ename, e.sal
2 from dept d
3 natural join
4 emp e
5 /
DNAME ENAME SAL
ACCOUNTING CLARK 2450
ACCOUNTING KING 5000
ACCOUNTING MILLER 1300
RESEARCH SMITH 800
RESEARCH ADAMS 1100
RESEARCH FORD 3000
RESEARCH SCOTT 3000
RESEARCH JONES 2975
SALES ALLEN 1600
SALES BLAKE 2850
SALES MARTIN 1250
SALES JAMES 950
SALES TURNER 1500
SALES WARD 1250
14 rows selected.
We tried use DBMS_XMLQUERY to generate a xml file, but it was unable to get xml in Hierarchical format.
<?xml version="1.0" encoding="ISO-8859-1" ?>
- <ROWSET>
- <ROW num="1">
<DNAME>ACCOUNTING</DNAME>
<ENAME>CLARK</ENAME>
<SAL>2450</SAL>
</ROW>
- <ROW num="2">
<DNAME>ACCOUNTING</DNAME>
<ENAME>KING</ENAME>
<SAL>5000</SAL>
</ROW>
- <ROW num="3">
<DNAME>ACCOUNTING</DNAME>
<ENAME>MILLER</ENAME>
<SAL>1300</SAL>
</ROW>
- <ROW num="4">
<DNAME>RESEARCH</DNAME>
<ENAME>SMITH</ENAME>
<SAL>800</SAL>
</ROW>
- <ROW num="5">
<DNAME>RESEARCH</DNAME>
<ENAME>ADAMS</ENAME>
<SAL>1100</SAL>
</ROW>
- <ROW num="6">
<DNAME>RESEARCH</DNAME>
<ENAME>FORD</ENAME>
<SAL>3000</SAL>
</ROW>
- <ROW num="7">
<DNAME>RESEARCH</DNAME>
<ENAME>SCOTT</ENAME>
<SAL>3000</SAL>
</ROW>
- <ROW num="8">
<DNAME>RESEARCH</DNAME>
<ENAME>JONES</ENAME>
<SAL>2975</SAL>
</ROW>
- <ROW num="9">
<DNAME>SALES</DNAME>
<ENAME>ALLEN</ENAME>
<SAL>1600</SAL>
</ROW>
- <ROW num="10">
<DNAME>SALES</DNAME>
<ENAME>BLAKE</ENAME>
<SAL>2850</SAL>
</ROW>
- <ROW num="11">
<DNAME>SALES</DNAME>
<ENAME>MARTIN</ENAME>
<SAL>1250</SAL>
</ROW>
- <ROW num="12">
<DNAME>SALES</DNAME>
<ENAME>JAMES</ENAME>
<SAL>950</SAL>
</ROW>
- <ROW num="13">
<DNAME>SALES</DNAME>
<ENAME>TURNER</ENAME>
<SAL>1500</SAL>
</ROW>
- <ROW num="14">
<DNAME>SALES</DNAME>
<ENAME>WARD</ENAME>
<SAL>1250</SAL>
</ROW>
</ROWSET>
Thank you for some help.
Nelson AlbertiHi,
I wrote a general ABAP program which can be configured to grab contrent from an URL and post that content as a new PI message into the integration adapter .... from that point on normal PI configuration can be used to route it to anywhere ...
It can be easily scheduled as a background job to grab content on a daily basis etc ...
Regards,
Steven -
How to read a XML file from BLOB column and insert in a table - PL/SQL Only
Hi,
To make data load more simple to end user instead placing file on the server and use SQL-LOADER, I came up with new idea that using oracle ebusiness suite attachment functionality. that loads a XML file from local PC to a database column(table is fnd_attachments, default data type is BLOB over here).
I tried with DBMS_LOB and didnt get around.
Please can anyone tell me how to read the BLOB column using PL/SQL and store the data in a oracle table. Here's the sample XML file and table structure FYI.
<?xml version="1.0" encoding="UTF-8"?>
<dataroot xmlns:od="urn:schemas-microsoft-com:officedata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Corporate_alloc.xsd" generated="2009-07-07T14:17:49">
<Corporate_alloc>
<PKG_CODE>BKCORP</PKG_CODE>
<PKG_NAME>Corporate Edition - Books</PKG_NAME>
<DET_CODE>B9780080543758</DET_CODE>
<DET_NAME>Waves, Tides and Shallow-Water Processes</DET_NAME>
<ALLOCATION_RATIO>0.000041</ALLOCATION_RATIO>
</Corporate_alloc>
<Corporate_alloc>
<PKG_CODE>BKCORP</PKG_CODE>
<PKG_NAME>Corporate Edition - Books</PKG_NAME>
<DET_CODE>B9780080534343</DET_CODE>
<DET_NAME>Hydrostatically Loaded Structures</DET_NAME>
<ALLOCATION_RATIO>0.000127</ALLOCATION_RATIO>
</Corporate_alloc>
</dataroot>
CREATE TABLE TEST_XML
( PKG_CODE VARCHAR2(50),
PKG_NAME VARCHAR2(100),
DET_CODE VARCHAR2(20),
DET_NAME VARCHAR2(500),
ALLOCATION_RATIO NUMBER )
Thanks
EBVIn regards to #3, use the COLUMNS functionality of XMLTable instead of using Extract. Two simple examples are
Re: XML Data - Caliculate fields
Re: Extractvalue function not recognised -
How to export an XML file from oracle database?
plz help me its urgent requirement....could u pls tell me the step by step procedure for following questions...?how to export a data as an XML file from oracle database?
thanks in advance,
Bala.
Edited by: user3523292 on Nov 14, 2008 5:43 AMuser3523292 wrote:
plz help me its urgent requirement....could u pls tell me the step by step procedure for following questions...?how to export a data as an XML file from oracle database?
thanks in advance,
Bala.
Edited by: user3523292 on Nov 14, 2008 5:43 AMThis is a forum of volunteers. There is no "urgent" here. Nevertheless, a google search of 'xml oracle export' quickly lead me to this Oracle site:
otn.oracle.com/sample_code/tech/xml/index.html
I also see lots of hits when I search the documentation library at tahiti.oracle.com for 'xml'. This one in particular may be what you are looking for:
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14252/adx_j_xsu.htm#ADXDK070 -
How to merge portlet.xml file from shared libraries into an EAR application
Hi all
I need some help
I have some applications as shared-libs referenced by weblogic.xml into a EAR application.
To see all portlets from that shared-libs, I'm creating a portlet.xml into the EAR application with all portlets from all shared libs. But is terrible for me. I would like to have it merged automatically without having to create it in the EAR application. Is that possible?
Regards
BrunoIn the documentation, I saw this text:
Overriding Shared J2EE Library Settings in the web.xml File
At runtime, the web.xml files in all the shared J2EE libraries are merged, along with the web.xml
file in your portal web project. The content of your WEB-INF/web.xml file overrides anything in
the shared J2EE libraries, so if you want to change particular settings, you can do it there.
There are many other files for which file contents are merged; these can be overridden in the same
way. These files include not only WEB-INF/web.xml but also WEB-INF/weblogic.xml and any
files mentioned in weblogic-extension.xml from either the users' application or the shared
libraries.
It seems to be possible to customize the weblogic-extension.xml. But I haven't seen how to do that
What do you think about it?
Regards
Bruno -
How to create a xml file from String object in CS4
Hi All,
I want to convert a string object into an XML file using Javascript in Indesign CS4.
I have done the following script. But it does not convert the namespaces for the xml elements with no value in it.
var xml = new XML(string);
The value present in string is "<level_1 xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>"
When it is converted to xml, the value becomes "<level_1 xsi:nil="true"/>"
On processing the above xml object, am getting an error like this "Uncaught JavaScript exception: Unbound namespace prefix."
Kindly help.
Thanks,
AnithaCan you post more of the script?
Are you getting the XML file from disk, or a string? -
How to transfer a (XML) file from EJB to WebDynpro / User ??
Hello!
Actually I'm working on an EJB which is able to generate an XML file by the data I saved before in a JDBC database.
Now I'd like to create a WebDynpro view, from where the user can download this file (after giving the order to generate it) to his local machine.
For the UI element FileDownload I already have inserted the binary type element into the context.
Now I'm looking for the best way to transfer the XML file from the EJB to the view, so that it can be downloaded.
Is it better to transfer it by DOMSource and to create the file in the view or to create the file in the EJB and transfer the binary data to the view?
Or is there another possibility?
Greetings,
RamóIn transaction SM69 external operating system commands can be set up and then these can be executed using function SXPG_CALL_SYSTEM from ABAP or using SM49 transaction.
See documentation in the function module and application help in the SM69 / SM49 transactions.
You could set up commands for copy, move, delete for the relevant directories. Be careful to limit the directories and set security appropriately.
Andrew -
How to read an xml file from headers
Hi ,
I am not getting how to read an xml file sent by client device in header to server.
Thankx.There is a getHeader() in HttpServletRequest interface
String locationURL=request.getHeader("Location");If URL of your file was set in Location attribute of header.
Edited by: ngpgeeta on Dec 19, 2008 8:03 AM
Maybe you are looking for
-
How to change the size of barcode
Hi Gurus, I need to print barcode on my smartform. I have created my own barcode using se73 transaction and assign it to character format in my style. But barcode on print is very small (about 6 cm x 1 cm) I need to have the barcode much bigger(about
-
Imporving the performance of a query
Hi, I have the following query in Oracle: SELECT distinct VECTOR_ID FROM SUMMARY_VECTOR where CASE_NAME like 'BASECASE_112_ECLIPSE100' "SUMMARY_VECTOR" contains approximately 120 million records or tuples. So the total time for this query is about 62
-
Errors while running BPEL and incorrect UPDATE statement
Hi, I installed following software. 1. Oracle Database 10g Release 2 2. SOA Suite 10g Release 3 3. Oracle JDeveloper (10.1.3.4) I developed a BPEL process to lock a userid in PeopleSoft. I have two issues. a) I am getting error as shown below b) its
-
When I try to open my Adobe Illustrator CS6 a message pops up stating: Missing required plugins pdf format.aip please help
-
Zen Touch use without admin rig
hey everyone, I'm a proud owner of a zen touch 20GB and have been very satified with it. I'm a high school student and have been lucky enough to li've in a place where the school provides each student with a high end dell laptop. For the year before