XML File-- XI-- SAP ECC Scenario
Hi guys,
We have the following scenario in XI XML File>XI>SAP ECC, and we need to call a BAPI at R/3 side. Which do you think is the best way to implement this, either calling the BAPI directly from XI or using an Inbound Server Proxy ?
Thank you.
Hi,
Addition to the above ensure that the BAPI Commit is called ....
or expose the BAPI as the RFC so that the commit and rollback operations can take place in the RFC itself...
Keep the above options during the design..n implementation...
Recommended is RFC call rather than proxy when standards are available n volume of the data is less..
HTH
Rajesh
Similar Messages
-
Scenario: XML File to SAP BI ystem
Hi Friends,
I have scenario to send xml file to SAP BI system through PI 7.0
Can anybody show step by step guide for (_Xml file to SAP BI 7.0 system Scenario_ ).
How to find possible message types in SAP BI 7.0 system if i use idoc adapter to connect BI 7.0 system.
Karthik.kHere is the guide for BI integration
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40574601-ec97-2910-3cba-a0fdc10f4dce
Thanx
Aamir
Pl:Search SDN before posting the questions. -
Pls Help me with steps to add data from xml file to SAP B1 through B1iSN.
Pls Help me with steps to add data from xml file to SAP B1 through B1iSN. I am getting stuck in xsl transformation. not able to understand where the mapping code needs to be added.
Pls explain me the steps for adding data from xml to B1 quotation step by step.
thanks and regards
PriyaHi,
Have you checked this: https://sap.na.pgiconnect.com/p45508295/?launcher=false&fcsContent=true&pbMode=normal ?
Thanks,
Gordon -
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 -
Dynamic title for Chart created by an xml-file in SAP ChartDesigner
Hello everybody.
I created an xml-file with SAP ChartDesigner for using it in my abap program. I import this file as a MIME-Object.
Everything works fine, i declared my charts and all my values.
But now I need a dynamic title on the top.
And know that I can give a title in my xml. But it's not dynamic.
I looked into the xml file and the path for the title is:
SAPChartCustomizing
Elements
ChartElements
Title
and then Caption.
p_ixml_doc = g_ixml->create_document( ).
l_encoding = g_ixml->create_encoding( byte_order = if_ixml_encoding=>co_little_endian character_set = 'utf-8' ).
p_ixml_doc->set_encoding( l_encoding ).
l_chartdata = p_ixml_doc->create_simple_element( name = 'SAPChartCustomizing' parent = p_ixml_doc ).
l_elements = p_ixml_doc->create_simple_element( name = 'Elements' parent = l_chartdata ).
l_chartelements = p_ixml_doc->create_simple_element( name = 'ChartElements' parent = l_elements ).
l_title = p_ixml_doc->create_simple_element( name = 'Title' parent = l_chartelements ).
l_element = p_ixml_doc->create_simple_element( name = 'Caption' parent = l_title ).
l_element->if_ixml_node~set_value( 'QRK-Mittelwert' ).
In my opinion, it's the right path :/
My other values i declare like this.
l_series = p_ixml_doc->create_simple_element( name = 'Series' parent = l_chartdata ).
l_series->set_attribute( name = 'label' value = 'TO' ).
l_series->set_attribute( name = 'customizing' value = 'Series1' ).
loop at gt_mw into gs_mw.
lv_tabix = sy-tabix.
l_point = p_ixml_doc->create_simple_element( name = 'Point' parent = l_series ).
l_element = p_ixml_doc->create_simple_element( name = 'Value' parent = l_point ).
l_element->set_attribute( name = 'type' value = 'x' ).
l_element->if_ixml_node~set_value( lv_tabix ).
l_element = p_ixml_doc->create_simple_element( name = 'Value' parent = l_point ).
l_element->set_attribute( name = 'type' value = 'y' ).
l_element->if_ixml_node~set_value( '35.00' ).
endloop.
It works...and i already checked this solution for my title, but it didn't work.
I call the xml file with the method cl_wb_mime_repository:
CALL METHOD cl_wb_mime_repository=>load_mime
EXPORTING
io = lv_io
IMPORTING
bin_data = lt_xmlr
CHANGING
language = sy-langu
EXCEPTIONS
no_io = 1
illegal_io_type = 2
not_found = 3
error_occured = 4
OTHERS = 5.
CHECK sy-subrc = 0.
*-- Convert raw to xstring
CREATE OBJECT lo_conv.
LOOP AT lt_xmlr INTO ls_xmlr.
CALL METHOD lo_conv->convert
EXPORTING
inbuff = ls_xmlr
outbufflg = 25000
IMPORTING
outbuff = lv_xstr.
CONCATENATE p_xml lv_xstr INTO p_xml IN BYTE MODE.
Maybe somebody can help me.
Thanks a lot.I got it!
This thread helped me.
[http://forums.sdn.sap.com/thread.jspa?threadID=1343796|http://forums.sdn.sap.com/thread.jspa?threadID=1343796] -
Dear friends
For converting XML file to SAP, I used TEXT_CONVERT_XML_TO_SAP function module. In this I have some doubt. Pls clarify this.
1. I am getting run time error with type h.
2 I_FIELD_SEPERATOR = ';'
I_LINE_HEADER =
I_TAB_RAW_DATA =
I_FILENAME =
I_TOTALSIZE =
for the above parameter what are the value has to passed.
Thanks.Hi,
Take a look in this code:
*& Report z_xit_xml_check
REPORT z_xit_xml_check.
TYPE-POOLS: ixml.
DATA: BEGIN OF t_cabec OCCURS 0.
INCLUDE STRUCTURE zmmt2010.
DATA END OF t_cabec.
DATA: BEGIN OF t_item OCCURS 0.
INCLUDE STRUCTURE zmmt2011.
DATA END OF t_item.
DATA: BEGIN OF t_itemt OCCURS 0.
INCLUDE STRUCTURE zmmt2012.
DATA END OF t_itemt.
TYPES: BEGIN OF t_xml_line,
data(256) TYPE x,
END OF t_xml_line.
DATA check_item(1).
DATA check_itemt(1).
DATA: l_ixml TYPE REF TO if_ixml,
l_streamfactory TYPE REF TO if_ixml_stream_factory,
l_parser TYPE REF TO if_ixml_parser,
l_istream TYPE REF TO if_ixml_istream,
l_document TYPE REF TO if_ixml_document,
l_node TYPE REF TO if_ixml_node,
l_xmldata TYPE string.
DATA: l_elem TYPE REF TO if_ixml_element,
l_root_node TYPE REF TO if_ixml_node,
l_next_node TYPE REF TO if_ixml_node,
l_name TYPE string,
l_iterator TYPE REF TO if_ixml_node_iterator.
DATA: l_xml_table TYPE TABLE OF t_xml_line,
l_xml_line TYPE t_xml_line,
l_xml_table_size TYPE i.
DATA: l_filename TYPE string.
PARAMETERS: pa_file TYPE char1024 DEFAULT 'c:\xml.xml'.
START-OF-SELECTION.
PERFORM busca_xml.
PERFORM carrega_tabela.
*& Form get_xml_table
FORM get_xml_table CHANGING l_xml_table_size TYPE i
l_xml_table TYPE STANDARD TABLE.
Local variable declaration
DATA: l_len TYPE i,
l_len2 TYPE i,
l_tab TYPE tsfixml,
l_content TYPE string,
l_str1 TYPE string,
c_conv TYPE REF TO cl_abap_conv_in_ce,
l_itab TYPE TABLE OF string.
l_filename = pa_file.
upload a file from the client's workstation
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = l_filename
filetype = 'BIN'
IMPORTING
filelength = l_xml_table_size
CHANGING
data_tab = l_xml_table
EXCEPTIONS
OTHERS = 19.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. "get_xml_table
*& Form process_dom
FORM process_dom USING document TYPE REF TO if_ixml_document.
DATA: node TYPE REF TO if_ixml_node,
iterator TYPE REF TO if_ixml_node_iterator,
nodemap TYPE REF TO if_ixml_named_node_map,
attr TYPE REF TO if_ixml_node,
name TYPE string,
prefix TYPE string,
value TYPE string,
indent TYPE i,
count TYPE i,
index TYPE i.
DATA v_codcat TYPE zmmt2011-codcat.
DATA v_master_for TYPE zmmt2011-master_for.
node ?= document.
CHECK NOT node IS INITIAL.
IF node IS INITIAL. EXIT. ENDIF.
create a node iterator
iterator = node->create_iterator( ).
get current node
node = iterator->get_next( ).
loop over all nodes
WHILE NOT node IS INITIAL.
indent = node->get_height( ) * 2.
indent = indent + 20.
CASE node->get_type( ).
WHEN if_ixml_node=>co_node_element.
element node
name = node->get_name( ).
TRANSLATE name TO LOWER CASE.
IF name = 'iten'.
MOVE 'I' TO check_item.
ENDIF.
IF name = 'cabec'.
MOVE 'C' TO check_item.
ENDIF.
IF name = 'iten_texto'.
MOVE 'T' TO check_item.
ENDIF.
nodemap = node->get_attributes( ).
IF NOT nodemap IS INITIAL.
attributes
count = nodemap->get_length( ).
DO count TIMES.
index = sy-index - 1.
attr = nodemap->get_item( index ).
name = attr->get_name( ).
prefix = attr->get_namespace_prefix( ).
value = attr->get_value( ).
ENDDO.
ENDIF.
WHEN if_ixml_node=>co_node_text OR
if_ixml_node=>co_node_cdata_section.
text node
value = node->get_value( ).
IF check_item = 'C'.
TRANSLATE name TO LOWER CASE.
CASE name.
WHEN 'lifnr'. MOVE value TO t_cabec-lifnr.
WHEN 'codcat'.
MOVE value TO t_cabec-codcat.
MOVE value TO v_codcat.
WHEN 'bukrs'. MOVE value TO t_cabec-bukrs.
WHEN 'zterm'. MOVE value TO t_cabec-zterm.
WHEN 'waers'. MOVE value TO t_cabec-waers.
WHEN 'inco1'. MOVE value TO t_cabec-inco1.
WHEN 'inco2'. MOVE value TO t_cabec-inco2.
WHEN 'telf1'. MOVE value TO t_cabec-telf1.
WHEN 'verkf'. MOVE value TO t_cabec-verkf.
WHEN 'datav'.
MOVE value TO t_cabec-datav.
APPEND t_cabec.
ENDCASE.
ENDIF.
IF check_item = 'I'.
TRANSLATE name TO LOWER CASE.
CASE name.
WHEN 'master_for'.
MOVE value TO t_item-master_for.
MOVE value TO v_master_for.
WHEN 'werks'. MOVE value TO t_item-werks.
WHEN 'versao'. MOVE value TO t_item-versao.
WHEN 'matkl'. MOVE value TO t_item-matkl.
WHEN 'j_1bindus3'. MOVE value TO t_item-j_1bindus3.
WHEN 'j_1bmatuse'. MOVE value TO t_item-j_1bmatuse.
WHEN 'j_1bmatorg'. MOVE value TO t_item-j_1bmatorg.
WHEN 'j_1bnbmco1'. MOVE value TO t_item-j_1bnbmco1.
WHEN 'bsgru'. MOVE value TO t_item-bsgru.
WHEN 'ekgrp'. MOVE value TO t_item-ekgrp.
WHEN 'txz01'. MOVE value TO t_item-txz01.
WHEN 'epstp'. MOVE value TO t_item-epstp.
WHEN 'netpr'. MOVE value TO t_item-netpr.
WHEN 'peinh'. MOVE value TO t_item-peinh.
WHEN 'meins'. MOVE value TO t_item-meins.
WHEN 'plifz'. MOVE value TO t_item-plifz.
WHEN 'mwskz'. MOVE value TO t_item-mwskz.
WHEN 'steuc'.
MOVE value TO t_item-steuc.
MOVE v_codcat TO t_item-codcat.
APPEND t_item.
ENDCASE.
ENDIF.
IF check_item = 'T'.
TRANSLATE name TO LOWER CASE.
CASE name.
WHEN 'linha'. MOVE value TO t_itemt-linha.
WHEN 'txlng'. MOVE value TO t_itemt-txlng.
MOVE v_master_for TO t_itemt-master_for.
MOVE v_codcat TO t_itemt-codcat.
append t_itemt.
ENDCASE.
ENDIF.
ENDCASE.
advance to next node
node = iterator->get_next( ).
ENDWHILE.
ENDFORM. "process_dom
*& Form Busca_XML
text
--> p1 text
<-- p2 text
FORM busca_xml .
DATA: lc_mess(70) TYPE c,lv_tab.
TYPES: BEGIN OF ty_zvmsgorgtr.
INCLUDE STRUCTURE zmmt2011.
TYPES END OF ty_zvmsgorgtr.
Creating the main iXML factory
l_ixml = cl_ixml=>create( ).
Creating a stream factory
l_streamfactory = l_ixml->create_stream_factory( ).
PERFORM get_xml_table CHANGING l_xml_table_size l_xml_table.
wrap the table containing the file into a stream
l_istream = l_streamfactory->create_istream_itable( table =
l_xml_table size = l_xml_table_size ).
Creating a document
l_document = l_ixml->create_document( ).
Create a Parser
l_parser = l_ixml->create_parser( stream_factory = l_streamfactory
istream = l_istream
document = l_document ).
Parse the stream
IF l_parser->parse( ) NE 0.
IF l_parser->num_errors( ) NE 0.
DATA: parseerror TYPE REF TO if_ixml_parse_error,
str TYPE string,
i TYPE i,
count TYPE i,
index TYPE i.
count = l_parser->num_errors( ).
WRITE: count, ' parse errors have occured:'.
index = 0.
WHILE index < count.
parseerror = l_parser->get_error( index = index ).
i = parseerror->get_line( ).
WRITE: 'line: ', i.
i = parseerror->get_column( ).
WRITE: 'column: ', i.
str = parseerror->get_reason( ).
WRITE: str.
index = index + 1.
ENDWHILE.
ENDIF.
ENDIF.
ENDFORM. " Busca_XML
*& Form Carrega_Tabela
text
--> p1 text
<-- p2 text
FORM carrega_tabela .
Process the document
IF l_parser->is_dom_generating( ) EQ 'X'.
PERFORM process_dom USING l_document.
ENDIF.
ENDFORM. " Carrega_Tabela -
Hi All,
We have a requirement for which we need to post an XML file to SAP.
I have already checked for SAP MDM and BC but they have been ruled out.
Is there any other method of communication? We cannot think of implementing SAP XI/PI.
Our source data is BOM related informaiton from Arena system.
Any inputs would be appreciated.
Regards
NeelavHello,
please look at the following link:
http://help.sap.com/saphelp_nw04/helpdata/en/47/b5413acdb62f70e10000000a114084/frameset.htm
regards
Eric -
Hi,
I have a requirement to load xml file into SAP. Can you please tell me most efficient way to do this? Is there any function available in SAP to load xml file?
Please let me know. I would really appreciate this.
Regards,
SanjeevHI,
This is the link which will give you the Code
http://www.geocities.com/rmtiwari/Resources/MySolutions/Dev/Codes/Report/Z_RMTIWARI_XML_TO_ABAP_46C.html
Use this XML file to Upload the same, this Program will work for your XML file also,
http://www.geocities.com/rmtiwari/Resources/MySolutions/Dev/Codes/Report/input_xml.xml
See the below thread also
Upload XML to internal table and vice versa in SAP 4.6C
look at the below function moduel .. <b>TEXT_CONVERT_XML_TO_SAP</b>
Regards
Sudheer -
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 -
hi all can you please tell any way by which i can read my XML file into SAP and store it into a datavase table in SAP
Try the below link
Re: Converting Flat file XML format data to SAP
may help you
regards
pradeep -
Hi all,
I have a requirement like ,i have one xml file ,now i want to integrate into sap.so plz help which scenario i have to follow.
thanks & regards,
subba reddyHi! ,
You can go for different ways depending upon the source data...
Suppose if it is SO,PO,GR (Sales Order from CRM System) and ( PO and GR from R3 System) means you neeed to prefer IDOC or also you can go for PROXY scenario I mean you can get the SO,PO,GR data by invoking the ABAPproxy.
Suppose if you want to Integrate means sending File to BW system means you can go simply
File To RFC Scenario.
Suppose if you wants to send data via Web Methods or and other Web Applicationto R3 means you can go for
SOAP-->RFC Sync scenario
Suppose if you are generate FICO Details through PAYTEXT IDOC you can go for
File to IDOC
In SAP Technical there are so many scenarios with screenshtos so pelase check the above scenarios there.k
Regards::
Amar Srinivas Eli -
XSD and XML to integrate sap ecc system using PI 7.3
Hi ,
Please tell me
1.how to integrate using PI 7.3 XML and XSD to sap ecc to post cost centre idocs .
2.how to post standard cost centre idocs using PI 7.3 to third party system ,please througn some light on these scenarios>.how to post standard cost centre idocs using PI 7.3 to third party system ,please througn some light on these scenarios
You first need to talk to third party system about their tecnologies handling. If the sender system ecc sends idoc to PI then PI can convert the idoc to xml file or idoc to webservice or so.
Example idoc to file is one possible option. -
XML File to SAP R/3 using SAP XI
Hello Everyone,
I'm hoping someone has done this scenario and can provide a step by step example for me. The scenario I have is as follows:
-- An XML file is placed manually on a UNIX SAP Server
-- SAP XI should, once the file is placed on the server, go to a specific directory, pick the file up, and then send it to an RFC of which I've already mapped.
-- Once the file is placed in the SAP R3 system, then the processing is over and no further processing should take place.
-- This is an inbound message to SAP XI and also to SAP R/3
I was thinking of using a File adapter as a "Sender", and poll every 60 seconds on a directory mentioned above. Once the file is there, then I would call the RFC and then the mapping of the XML would put the data into R/3.
Any help anyone can provide would be most appreciated. Thanks in advance for your help!
Regards,
JohnJohn,
You are looking for File -XI-RFC scenario right, please follow the below weblog
/people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit
If you need more details, reply!!!!
Best regards,
raj. -
How to Import XML file into SAP B1
Dear All,
I have a scenario like,
I am receiving a XML file from a 3rd party application for the daily Creation,Update of Item Master,BP Master, Marketing Documents. I want to import this file into SAP B1 through its approp objects. I understand DTW has limitation in its file types (Semicolo,Tab,Comma,ODBC). How do i do this ? Please guide me.
Thanks,
Thanga Raj KHy folks,
I´m frim Brasil and I've been studying the tool EFM (Eletronic File Manager) to learn more about it!
There I saw that we can extract to XML "any" infomation from the database we want, mainly through the GEP.
However, as I've seen, this Add-On can not import any XML file into SBO, unless for the BFP wich can be imported in conjunction with the BTHF Add-on.
So I ask: how is it possible to import XML data into SBO database? Is it possible to be done through the EFM? or it´s really necessary to write a code specifically to do that?
Besides, I know that de B1iSN fit to this necessity... but when I tried to use it, by the custom "object" for BP, for example, there are some data wich the mapping conteined in this custom "process" that can not be imported... I tried to understand how to map those other fields not imported by the custom but this has been dificult to me as I am a implementation consultant focused in administrative process not on development...
Could you please help me with this subject!
Thanks a lot,
Denis -
Validation of xml files in SAP PI
Hi Gurus,
This is a file to proxy scenario.
I am picking the file in XML format using file adapter and sent to SAP for processing the message.
Suppose I placed the new.xml file in the FTP server, this is picked by the fle adapter and sent to SAP.
But when I placed teh same file in FTP server, the file is also getting picked for the second time.
How can SAP PI validate the data in the files , identify the duplicate files and stop the processing of the messages.
Any help appreciated.
Thanks,
Jay.Hi,
You can have a custom module for file adapter which piks all files and writes file name and hashcode (http://www.java2s.com/Tutorial/CSharp/0600__Security/Generatethehashcodeofthefilescontents.htm) of the file content into a table in PI.
To check files which are already piked with same name simply check for the file name using RFC lookup in mapping.
To check for files which are already processed with same content check for hashcode of the file using RFC lookup in mapping.
Not sure using module is appropriate here, but this may be one of the solution for ur requirement.
Thanks,
Anand
Maybe you are looking for
-
Can I change my iCloud email address once it has been created?
I found I cannot change the email address with the @me.com ending. I think it is associate with the apple ID and I tried to deleted the iCloud account but it seems only "sign out" and when I signed in iCloud with my apple ID everything is back....
-
Relationship between Objects Not Found in PA
Dear all, I have uploaded objects (Org Unit, Job, and Position) and the relationships between objects separately using LSMW. When i checked the update of the relationship between objects in PA30, but the relationship between objects (Org Unit, Job, a
-
How do I call in to a support line?
I have been waiting on and on and on to get a reply on how to reactivate my account with a new credit card. This seems like an easy issue to resolve, one that doesn't require me waiting for a chat forum agent to respond, and then miss it if I leave
-
Seeing the OS 9 desktop in the Classic window
is there a way to view the Mac OS 9 desktop in that classic emulation screen that shows up whenever I launch classic?
-
My iphone is ignoring one of my contact's texts until I reboot.
I didn't receive any messages from one contact for five days despite getting texts from others just fine. Then today when I had to reboot my iphone4s (for unrelated reasons) I received all the texts from the contact in question, each one dating betwe