No restart capability during mapping failures in ABAP mapping
I am doing ABAP mapping and would like to fail the ABAP mapping (during certain application scenarios) in such a way that message cannot be resent? Is this possible during the mapping.
Hi Krish,
My few cents.
You can resend only the asynchronous scenarios.If you resend you need to develop the logic that in the resend the exception will not generate.
From my point of view, if you want to throw a controlled exception you should do via UDF like this blog explains Throwing Smart Exceptions in XI Graphical Mapping
If you work with ABAP mapping you have setting more difficulties if in the future your PI go to be upgraded to PI java only version stack.
Hope this helps.
Regards.
Similar Messages
-
XI 7.0 ABAP-Mapping in Design Builder (Interface Mapping)
Hi,
in XI 3.0 there was the possibility to specify a ABAP-Mapping-Class in the Interface Mapping. In XI 7.0 the
entry ABAP-Mapping is somehow missing in the drop-down-Box, there is a Message-Mapping, JAVA-Mapping and XSLT-Mapping but no ABAP-Mapping :-(.
Did this move somewhere else or are ABAP-Mapping's not possible anymore ??
Best Regards,
Frank MarxFrank,
You need to activate ABAP and XSLT mapping.
Check this blog for the same,
/people/ravikumar.allampallam/blog/2005/02/10/different-types-of-mapping-in-xi
Regards,
Bhavesh -
Java Mapping, XSLT Mapping, ABAP Mapping
Hi Experts,
Could any one explain what is the main features of the following Mapping. How to pick the mapping?
Java Mapping - When to use and what is the advantage.
ABAP Mapping - When to use and what is the advantage.
XSLT Mapping - When to use and what is the advantage.
Graphical Mapping - When to use and what is the advantage.
cheers,
SuneeThere are 4 types of mapping in XI
1. Graphical Mapping
2. XSLT Mapping
3. JAVA Mapping
4. ABAP Mapping
When to use Message mapping
1 When the logic for your mapping is simple and straight forward, you can use
Advantages of message mapping
1)Easy to use.
2) has GUI drag and drop.
3) used for simple mapping cases
4) it does not involve any complex logic
Disadvantages of message mapping
1)has limitation in terms of complex hierarchy
When to use Java mapping
1) Java mapping are used when graphical mapping cannot help you.
Advantages of Java Mapping
1)you can use Java APIs and Classes in it.
2) file look up or a DB lookup is possible
3) DOM is easier to use with lots of classes to help you create nodes and elements.
Disadvantages of Java mapping
1)SAX parser is not easy to develop
2)DOM parser is intensive
3) Java knowledge is required
4) bit complexer
XSLT Mapping - When to use
1)When the required output is other than XML like Text, Html or XHTML (html displayed as XML )
2)When default namespace coming from graphical mapping is not required or is to be changed as per requirements.
3)When data is to be filtered based on certain fields (considering File as source)
4)When data is to be sorted based on certain field (considering File as source)
5)When data is to be grouped based on certain field (considering File as source)
Advantages of using XSLT mapping
1)XSLT program itself defines its own target structure.
2)XSLT programs can be imported into SAP XI. Message mapping step can be avoided. One can directly go for interface mapping once message interfaces are created and mapping is imported.
3)XSLT provides use of number of standard XPath functions that can replaces graphical mapping involving user defined java functions easily.
4)File content conversion at receiver side can be avoided in case of text or html output.
5)Multiple occurrences of node within tree (source XML) can be handled easily.
6)XSLT can be used in combination with graphical mapping.
7)Multi-mapping is also possible using xslt.
8)XSLT can be used with ABAP and JAVA Extensions
Disadvantages of using XSLT mapping
1)Resultant XML payload can not be viewed in SXMB_MONI if not in XML format (for service packs < SP14).
2)Interface mapping testing does not show proper error description. So errors in XSLT programs are difficult to trace in XI but can be easily identified outside XI using browser.
3)XSLT mapping requires more memory than mapping classes generated in Java.
4)XSLT program become lengthier as source structure fields grows in numbers.
5)XSLT program sometimes become complex to meet desired functionality.
6)Some XSL functions are dependent on version of browser.
Advantages of Abap Mapping
1) A person comfortable with OOABAP can go for ABAP mapping instead.
Disadvantages of Abap Mapping
1) Abap knowledge is required
2) bit compexer
For further info on each of the mapping, refer to these links,
Graphical Mapping,
http://help.sap.com/saphelp_nw04/helpdata/en/6d/aadd3e6ecb1f39e10000000a114084/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm
XSLT Mapping
http://help.sap.com/saphelp_nw04/helpdata/en/73/f61eea1741453eb8f794e150067930/content.htm
http://www.w3.org/TR/xslt20/
Java Mapping
http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/content.htm
DOM parser API
http://java.sun.com/j2se/1.4.2/docs/api/org/w3c/dom/package-frame.html
Check this blog on Mapping:
/people/ravikumar.allampallam/blog/2005/02/10/different-types-of-mapping-in-xi
Also, check this thread for more info,
Different types of Mapping in XI -
Hello to all,
I'm trying to create a ABAP based mapping without xslt, as xslt-mapping is running in a timeout.
Is there a way to execute XPATH expressions on a document?
The method "get_elements_by_name" isn't helpfull, as I need to specify a certain path within the xml-document.
Thanks for your suggestions.
Best regards,
ChristianI dont think it will be possible untill you include XSLT mapping in to ABAP mapping as you would need a compiler for XPATH expressions.
-
Performance in XI / PI ABAP mapping class
Hi,
I have to do some ABAP mapping for XI / PI scenarios. First of all number of messages is huge, messages can be very large,
so my question is where to pay special attention because of performance. Is there some blog on net with suggestions? I saw and read lot of ABAP mapping blogs, but I have never found one where is it performance explained.
br
marioHi there.
The performace problem of the ABAP Mappings in XI/PI is not related to the code itself. When coding, just keep in mind alll you have said: "messages are huge, and lot's of messages". This way, you should keep the code as sharp as possible within the class methods you will use.
Now, the real problem in ABAP mapping is ther ABAP mapping itself. Don't forget that PI usually (and ideally) processes the message mappins (or java mappings) in the java stack. If you are creating an ABAP mapping, you are telling PI to send the work to the integration server (ABAP stack), and then retrive the result from it.
If you can, use message mapping or java mapping for best performance. If you cannot, use ABAP mapping but having all this in mind. Hope this helped.
Regards,
Valter Oliveira. -
ABAP Mapping Programm error Urgent
I am getting mapping error in ABAP Mapping programm. plz help me how to solve
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!--
Request Message Mapping
-->
- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
<SAP:Category>Application</SAP:Category>
<SAP:Code area="MAPPING">APPLICATION_PROGRAM_ERROR</SAP:Code>
<SAP:P1>Z_HBS_PAYROLL_MAPPING</SAP:P1>
<SAP:P2>SAP-ABAP</SAP:P2>
<SAP:P3>UNCAUGHT_EXCEPTION</SAP:P3>
<SAP:P4>Program Z_HBS_PAYROLL_MAPPING=========CP Include Z_HBS_PAYROLL_MAPPING=========CM001 Line 1</SAP:P4>
<SAP:AdditionalText />
<SAP:ApplicationFaultMessage namespace="" />
<SAP:Stack>Error in mapping program Z_HBS_PAYROLL_MAPPING (type SAP-ABAP, kernel error ID UNCAUGHT_EXCEPTION) An exception with the type CX_SY_REF_IS_INITIAL occurred, but was neither handled locally, nor declared in a RAISING clause Dereferencing of the NULL reference</SAP:Stack>
<SAP:Retry>M</SAP:Retry>
</SAP:Error>Hi,
I think this exception you need to catch it in the ABAP..
This may help u- http://help.sap.com/saphelp_47x200/helpdata/en/55/bff20efe8c11d4b54a006094b9456f/content.htm
just cross verify with this guide-
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e3ead790-0201-0010-64bb-9e4d67a466b4
Regards,
moorthy -
How can I test an ABAP mapping where the input file is a flat file (fieldfixed length file)?
Kindly give me the detailed steps for doing so.Hi Biswa,
One of the many disadvantages of using ABAP mapping.
U cannot test in ESR. Unlike Graphical mapping, there will not be any Msg Mapping object in ABAP mapping. Only an operation mapping is there.
The only way to test the interface is End-To-End. I.E. Process the scenario frm picking the file from Application server location and checking the data posted in backend system correctly.
One more way, u can test the mapping program in the ABAP stack by passing on the file as input.
Cheers,
Souvik -
Reg: Test an ABAP mapping
Hi All,
When i go to test at interface mapping level there is no possiblity to test ABAP mapping. Is there any way to test ABAP mapping without executing scenario.
Thanks,
Satish.This is a link very useful for ABAP Mapping :
http://help.sap.com/saphelp_nw04/helpdata/en/86/8280ba12d511d5991b00508b6b8b11/frameset.htm
You should define a simple scenario. Sender Service, Receiver Service and Interface Mapping using your ABAP Mapping
You can test your ABAP Mapping using the transaction,
SXI_MAPPING_TEST
Check my weblog as to how to use the transaction for testing,
/people/sameer.shadab/blog/2005/09/29/testing-abap-mapping
Check this thread:
https://www.sdn.sap.com/sdn/collaboration.sdn?contenttype=url&content=https%3A//forums.sdn.sap.com/thread.jspa%3FforumID%3D44%26threadID%3D34468%26messageID%3D326456%23326456
Note:please reward points if solution found helpfull
Regards
Chandrakanth.k -
Message Mapping of type ABAP Class not being shown
Hi all,
I have been trying to follow the given blog:
/people/ravikumar.allampallam/blog/2005/02/10/different-types-of-mapping-in-xi
Even after doing the changes mentioned in the blog, i do not see the ABAP Class in the list of Message Mapping types.
Do i need to do anyother configuration. Pls guide.
Regards
NeetuHi Neetu,
You will have to enable your ABAP mapping first.
Do the following steps, pay carefull attention to the values you enter,
In
IntegrationBuilder ->IntegrationBuilder.Repository -> com.sap.aii.repository.mapping.additionaltypes
enter the value of
R3_ABAP|Abapclass;R3_XSLT|XSL (ABAP Engine)
If the above doesnt work, try Abap-class instead of Abapclass in the above line.
And then follow the remaining steps, make sure that the above value is correct. Your ABAP mapping should appear in your Integration Repository.'
I suggest you go through these links:
https://websmp101.sap-ag.de/~sapdownload/011000358700003082332004E/HowToABAPMapping.pdf
/people/ravikumar.allampallam/blog/2005/02/10/different-types-of-mapping-in-xi
ABAP Mapping Vs Java Mapping.
Refer to following SDN Demo which explains the need and how to do the ABAP mapping.
https://www.sdn.sap.com/irj/sdn/docs?rid=/webcontent/uuid/110ff05d-0501-0010-a19d-958247c9f798#jdi [original link is broken]
This document will help you to create ABAP Mapping.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/3.0/how%20to%20use%20abap-mapping%20in%20xi%203.0.pdf
Regards,
Abhy -
I am using Abap mapping and a value mapping is already maintained in j2ee stack.i want to use the same value mapping in my abap mapping.Does any body have idea how to do this .
Thanks in advance,
AnandHi,
referring to the sap-help it says under restrictions for ABAP Mappings:
"Access to the value mapping table is not supported for mapping programs developed using the ABAP Workbench."
Regards,
Andi -
ABAP Mapping: No MESSAGE_OUT during runtime. test OK
Hi everybody,
I got a ABAP-Mapping.
During runtime I get noch MESSAGE_OUT (empty!)
But when I test the ABAP-Mapping, everything is fine!
Any ideas?
Regards Mario
Edited by: Mario Müller on Sep 11, 2008 9:09 AMThanks,
found it.
Regards Mario -
Word couldn't send mail because of MAPI failure, Unspecified error.
This issue is crossposted in Microsoft Answers Word and OUTLOOK. I am posting here in hopes that someone at Mircrosoft may have a solution or at least elevate the issue to someone who does.
http://answers.microsoft.com/en-us/office/forum/officeversion_other-word/word-could-not-send-mail-because-of-mapi-failure/f62678fe-ef1d-42b5-8cfe-1e43d6a1d609
http://answers.microsoft.com/en-us/office/forum/office_2013_release-outlook/word-couldnt-send-mail-due-to-mapi-failure/1f03cf74-9258-411b-9e2b-e41cb5006d71
I dabble with VBA and write and maintain several amateur Word Add-Ins. Accordingly, I have Word 2003, 2007, 2010 and 2013 installed on my PC. They get along fine. However, I am unable to "Share" or "Send" an open Word
document as an E-mail attachment in any version! In each case Word returns an error mesage "Word couldn't send mail because of a MAPI failure, Unspecified error (the same issue occurs with Excel and Powerpoint except the error dialog is a bit different.)
Using Word 2003, I (CAN) "Send to (Mail recipient for review)" in which case OUTLOOK is opened with the document as an attachment. I can also "Send to Mail Recipient" from Windows Explorer, in which case the Word file is attached to
an OUTLOOK message, and I can create an instance of OUTLOOK and send mail from Word using VBA.
I have repaired all Office versions. I have removed the registry keys for all office versions and repaired all versions again. I have run "fixmapi" until I am blue in the face. I have renamed the MAPI32.DLL files and ran sfc \scannow
to ensure that the MAPI32.DLL file is not corrupt. In view of these actions and in view of what I can do, something tells me that the MAPI files are fine.
So what is this "Unspecified error?" This problem is rife on the internet and most of the "canned" solutions have been marked "Answered" by some MS support engineer. These "canned" solutions might have
fixed the issue at one point, but they don't work now. At least not for me.
Thanks.
Greg Maxey Please visit my website at: http://gregmaxey.mvps.org/word_tips.htmHello Greg,
I noted that there are 2 knowledge articles that describe scenarios where you may encounter this error.
KB 291152 You receive a "Word couldn't send mail because of MAPI failure" error message when you try to send a Word document as an e-mail attachment in Word 2002
http://support.microsoft.com/kb/291152/EN-US
KB 929362 You cannot send a file by clicking Send in a different program when Outlook 2007 is running as administrator
http://support.microsoft.com/kb/929362/EN-US
Please let me know the following:
1. What version of Outlook are you using?
2. Do you have Outlook open when you attempt the File > Share > Email as attachment from Word? If not, does the error occur if you open Outlook, open Word and then try to send the email?
3. If you close/reopen Word and then try the send again, do you get the same error?
4. Are you running either Outlook or Word in an elevated mode?
5. What happens if you start both Outlook and Word as "Run As Administrator". You may have to right-click each applications' .exe file to be able to choose the "Run As Administrator" option.
6. Do you get the same error when using File > Share > Email as attachment using Excel?
7. In Internet Explorer, open the Internet Options. On the General tab within the browsing history, delete your temporary Internet files and website files
8. Does the issue occur in selective startup mode?
Steps to setup selective startup mode:
Click on the Windows Start button, in the Search box type msconfig and then hit enter. This should open up the System Configuration Utility. Make the following adjustments within each tab.
Services Tab:
- Check the option 'Hide All Microsoft Services'
- Click on button 'Disable All'
Startup Tab:
- Click the button 'Disable All'
- Go back through the list and enable any Microsoft items
Click Ok. It will say “You must restart your computer for some of the changes
made by System Configuration to take effect”. Hit the ‘Restart’ button.
When the PC reboots try to run your test again.
To return back to a normal boot launch msconfig again and choose 'normal startup' on the general tab, click Ok and then reboot the PC.
Regards,
Dennis -
Activating ABAP Mapping in Integration Repository?
Hello Everyone,
I am trying to activate the ABAP Mappings. I have followed the guide "how to use ABAP mapping in XI 3.0".
But ABAP Mapping Type didn't appear in the List
I have also cross-checked with this blog
/people/ravikumar.allampallam/blog/2005/02/10/different-types-of-mapping-in-xi
I have tried a number of options(Probably all possible options):
1. SLD Cache Refresh
2. Refresh Properties from Administration console of XI
3. Full Cache Refresh
4. Restart of Integration Repository
5. Restart of J2EE instance from SMICM
6. Restart of Entire XI Server
7. All types of Refreshes from Administrator Console
Also SLDCHECK works fine
I find the property in the 'All Properties' Menu of the of the Administrator console of XI , but it is not reflected in the drop downlist!!
Any Other possible options or solutions.
XI is on SP 16.. Does that have anything to do ??
Thanking you in advance
Satishhi
of course michal
I have already mentioned that I have followed the steps of the guide.
and I do a lot of home work by myself before asking a question
any more ideas.
thank u
satish -
Hallo,
during ABAP Mapping I have the following problem:
I want to return a message to XI Java stack in the following format:
<?xml version="1.0"?><ns0:MT_FILE_PAXAR_INB xmlns:ns0="http://logimoda.com/ns_paxar">
<Recordset>
[... child tags which values are retrieved from fields of each record of an internal table]
</Recordset>
</ns0:MT_FILE_PAXAR_INB>
I want n <Recordset>, one for each record of the internal table "t_etichette", which is populated by:
CALL FUNCTION 'ZXI_ETICHETTE_COMPOSIZIONE_PEZ'
Now, i'm not able to append n sibling <Recordset>, only one is appended to parent <ns0:MT_FILE_PAXAR_INB>.
I guess the solution is ixml_document_fragment or using someway an iteration, but I don't know how...
Any suggestion?
Thanks all in advance:)
PS below my current source code:
METHOD if_mapping~execute .
1.0 Def. Data Types - Start **********************************
DATA:
wa_t_richieste TYPE zppst_input_etichette_pezzo,
t_richieste TYPE TABLE OF zppst_input_etichette_pezzo,
wa_t_etichette TYPE zppst_output_etichette_pezzo,
t_etichette TYPE TABLE OF zppst_output_etichette_pezzo,
wa_t_logelab TYPE zppst_esito_etichette_pezzo,
t_logelab TYPE TABLE OF zppst_esito_etichette_pezzo.
1.1 Def. Data Types - End **********************************
initialize iXML
TYPE-POOLS: ixml.
CLASS cl_ixml DEFINITION LOAD.
create main factory
DATA: ixmlfactory TYPE REF TO if_ixml.
ixmlfactory = cl_ixml=>create( ).
create stream factory
DATA: streamfactory TYPE REF TO if_ixml_stream_factory.
streamfactory = ixmlfactory->create_stream_factory( ).
create input stream
DATA: istream TYPE REF TO if_ixml_istream.
istream = streamfactory->create_istream_xstring( source ).
DATA: val_nodo TYPE string,
nome_nodo TYPE string,
nome_el TYPE string
DATA: ta_data TYPE STANDARD TABLE OF ztabxml,
wa_data TYPE ztabxml.
parse input document =================================================
initialize input document
DATA: idocument TYPE REF TO if_ixml_document.
idocument = ixmlfactory->create_document( ).
parse input document
DATA: iparser TYPE REF TO if_ixml_parser.
iparser = ixmlfactory->create_parser( stream_factory = streamfactory
istream = istream
document = idocument ).
iparser->parse( ).
DATA: element TYPE REF TO if_ixml_element.
DATA: articolo TYPE REF TO if_ixml_element.
DATA: collo TYPE REF TO if_ixml_element.
DATA: l_trace TYPE string.
DATA: child TYPE REF TO if_ixml_node.
DATA: nr_art TYPE REF TO if_ixml_node_collection.
DATA: dest TYPE rfcdest,
wa_cust TYPE zxi_cust,
mandt TYPE sy-mandt.
SELECT SINGLE * FROM zxi_cust INTO wa_cust
WHERE parname1 = 'RFC_DEST'
AND parname2 = 'R/3'.
dest = wa_cust-parvalue1.
mandt = dest+7(3).
1.2 Mapping XML -> items ************************************
CLEAR nome_nodo.
CLEAR child.
CLEAR ciclo.
element = idocument->find_from_path_ns(
path =
'/RIGA'
default_uri = '' ).
nome_el = element->get_name( ).
ciclo = 'true'.
WHILE ciclo = 'true'.
Mandante
MOVE mandt TO wa_t_richieste-mandt.
IF nome_el = 'RIGA'.
child = element->get_first_child( ).
WHILE child IS BOUND.
nome_nodo = child->get_name( ).
val_nodo = child->get_value( ).
CASE nome_nodo.
WHEN 'COD_MSGEXPORT'.
Identificativo da Logimoda
MOVE val_nodo TO wa_t_richieste-zcodeidoc.
WHEN 'C0001'.
Commessa
MOVE val_nodo TO wa_t_richieste-j_3acomord.
ENDCASE.
child = child->get_next( ).
ENDWHILE.
APPEND wa_t_richieste TO t_richieste.
CLEAR: wa_t_richieste.
element ?= element->get_next( ).
IF NOT element IS BOUND.
EXIT.
ENDIF.
nome_el = element->get_name( ).
ELSE.
ciclo = 'false'.
ENDIF.
ENDWHILE.
1.3 call RFC ************************************************
DATA: return TYPE sy-subrc.
DATA: t_return TYPE TABLE OF bapiret2.
DATA: st_return TYPE bapiret2.
DATA: mess_exc TYPE string.
DATA: t_error_text TYPE string.
CLEAR: return.
CLEAR: t_return.
REFRESH: t_return.
CALL FUNCTION 'ZXI_ETICHETTE_COMPOSIZIONE_PEZ'
DESTINATION
dest
EXPORTING
TO DO: Y or N ??
fl_alv = ' '
TABLES
t_richieste = t_richieste
t_etichette = t_etichette
t_logelab = t_logelab
EXCEPTIONS
no_richieste = 1
no_etichette = 2
no_plant = 3
OTHERS = 4.
IF ( ( sy-subrc <> 0 ) AND
( dest <> 'MZ1CLNT400' )
DATA subrc TYPE sy-subrc.
CASE subrc.
WHEN 1.
LOOP AT t_logelab INTO st_logelab WHERE type EQ 'E'.
CONCATENATE 'ABAP MAPPING ERROR: '
'NO_RICHIESTE'
INTO mess_exc.
trace->trace( level = '1'
message = mess_exc ).
RAISE EXCEPTION TYPE cx_mapping_fault
EXPORTING error_code = '90'
error_text = 'NO_RICHIESTE'.
ENDLOOP.
WHEN 2.
WHEN 3.
WHEN OTHERS.
ENDCASE.
ENDIF.
1.4 build up output document *****************************************
DATA: ret_value TYPE i.
DATA: uri TYPE string.
uri = 'http://logimoda.com/ns_paxar'.
create output document
DATA: odocument TYPE REF TO if_ixml_document.
odocument = ixmlfactory->create_document( ).
Test - Start ***********
DATA: root_ns TYPE REF TO if_ixml_namespace_decl.
root_ns = odocument->create_namespace_decl(
name = 'ns0'
prefix = 'ns0'
uri = uri ).
ret_value = odocument->set_namespace_prefix(
prefix = 'ns0'
ret_value = odocument->set_namespace_uri(
uri = 'ns0'
root = odocument->create_element_ns(
name = 'ns0'
prefix = 'ns0'
uri = 'http://logimoda.com/ns_paxar'
Test - End ***********
create root XML tag
DATA: root TYPE REF TO if_ixml_element.
root = odocument->create_simple_element_ns(
name = 'MT_FILE_PAXAR_INB'
prefix = 'ns0'
uri = uri
value = temp
parent = odocument ).
DATA: ns_xml_attr TYPE REF TO if_ixml_attribute.
ns_xml_attr = odocument->create_attribute_ns(
name = 'ns0'
prefix = 'xmlns'
uri = 'http://logimoda.com/ns_paxar'
ret_value = ns_xml_attr->set_value( uri ).
ret_value = root->set_attribute_node_ns(
new_attr = ns_xml_attr
create recordset tag (<= see ref. in FTP Comm. Channel)
DATA: recordset TYPE REF TO if_ixml_element.
recordset = odocument->create_simple_element(
name = 'Recordset'
value = temp
parent = root ).
Test - Start ***********
DATA: doc_fragm TYPE REF TO if_ixml_document_fragment.
doc_fragm = odocument->create_document_fragment( ).
create recordset tag (<= see ref. in FTP Comm. Channel)
recordset = odocument->create_simple_element(
name = 'Recordset'
value = temp
parent = doc_fragm ).
DATA: ref_child TYPE REF TO if_ixml_node.
ret_value = root->insert_child(
new_child = doc_fragm
ref_child = ref_child
DATA: recordset_array TYPE REF TO if_ixml_node_collection.
recordset_array->append_item(recordset_el).
Test - End ***********
XI Inbound Message: MT_FILE_PAXAR_INB
DATA: zcodeidoc TYPE REF TO if_ixml_element.
DATA: j_3acomord TYPE REF TO if_ixml_element.
DATA: werks TYPE REF TO if_ixml_element.
DATA: trilog_yseason TYPE REF TO if_ixml_element.
DATA: temp TYPE string.
LOOP AT t_etichette INTO wa_t_etichette.
HERE IS THE PROBLEM, HOW TO DO IT ?
ret_value = root->insert_child(
new_child = recordset
ref_child = recordset
CLEAR temp.
MOVE wa_t_etichette-zcodeidoc TO temp.
zcodeidoc = odocument->create_simple_element(
name = 'ZCODEIDOC'
value = temp
parent = recordset ).
CLEAR temp.
MOVE wa_t_etichette-j_3acomord TO temp.
j_3acomord = odocument->create_simple_element(
name = 'j_3acomord'
value = temp
parent = recordset ).
CLEAR temp.
MOVE wa_t_etichette-werks TO temp.
werks = odocument->create_simple_element(
name = 'WERKS'
value = temp
parent = recordset ).
CLEAR temp.
MOVE wa_t_etichette-trilog_yseason TO temp.
trilog_yseason = odocument->create_simple_element(
name = 'trilog_yseason'
value = temp
parent = recordset ).
CLEAR wa_t_etichette.
ENDLOOP.
render document ======================================================
create output stream
DATA: ostream TYPE REF TO if_ixml_ostream.
ostream = streamfactory->create_ostream_xstring( result ).
create renderer
DATA: renderer TYPE REF TO if_ixml_renderer.
DATA irc TYPE i.
renderer = ixmlfactory->create_renderer( ostream = ostream
document = odocument ).
irc = renderer->render( ).
1.4 for debug ********************************************************
Uploading Files and Manipulating their Content
(SAP Library - Business Server Pages)
http://help.sap.com/saphelp_nw2004s/helpdata/en/ba/78d3c747b24546ab1c1499a054d8a5/content.htm
DATA: conv_out TYPE REF TO cl_abap_conv_out_ce.
conv_out = cl_abap_conv_out_ce=>create(
encoding = 'UTF-8'
endian = 'L' ).
conversion string => xstring *********************************
conv->convert( EXPORTING data = out
IMPORTING buffer = result ).
conversion xstring => string *********************************
DATA: outxml TYPE string.
DATA: conv_in TYPE REF TO cl_abap_conv_in_ce.
conv_in = cl_abap_conv_in_ce=>create( input = result ).
conv_in->read( IMPORTING data = outxml ).
store file txt on PC for test purpose - Start ********
DATA: dataset_str_xml TYPE string,
debug_allowed(1) TYPE c,
l_xml_size TYPE i.
dataset_str_xml = '/usr/sap/XIT/ZXI_PARAX_TEST_XML.xml'.
OPEN DATASET dataset_str_xml FOR OUTPUT
IN TEXT MODE ENCODING DEFAULT.
TRANSFER outxml TO dataset_str_xml.
CLOSE DATASET dataset_str_xml.
store file txt on PC for test purpose - End ********
ENDMETHOD.create recordset tag (<= see ref. in FTP Comm. Channel)
recordset = odocument->create_simple_element(
name = 'Recordset'
value = temp
parent = doc_fragm ).
this object must be created inside your loop... -
Abap mapping - pb on SAP example?
Hi,
I try to use an Abap mapping for flow "IDoc -> XI -> structured file". For that I have modified the 1st example of SAP (by changing line: "direct = 1").
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-how-to-guides/how to convert between idoc and xml in xi 3.0.pdf
But when I send an IDoc from R/3, I have this error in Message Monitoring: <i>"Error in mapping program YCL_AM_DE00109 (type R3_ABAP, kernel error ID UNCAUGHT_EXCEPTION)"</i>.
In fact, it seems that problem is when I get data from field "TABNAM":
* Control data: segment EDI_DC40
data: el_element type ref to if_ixml_element.
el_element = idocument->find_from_name( 'TABNAM' ).
ls_edidc-tabnam = el_element->get_value( ). "<<<
1. Is there the good example for such a flow?
2. Anybody have an idea to solve that?
Regards.
MickaelHello,
@Stefan: I need this lookup e.g. for outbound processes for some conversions / setting dynamic parameters depending on the RCVPRN inside an IDoc. That means I have a unique key (RCVPRN_<messageType>) and some (4-6) additional information (e.g. mail subject, FTP filename,...) to this key whch I would like to access during mapping runtime. Vice versa, for inbound scenarios, inside a EDI -> IDoc mapping, I need at least a simple "FixValues" translation from some kind of EDI partner id into the corresponding SAP customer number.
@all: So from my experience value mapping does not realy fit this "translation" needs? There are some disadvantages, for example if both input values "A" and "B" should be translated into "1", this is not possible, as the keys have to be unique in both directions.
By the way, I have now also implemented the RFC lookup in my mapping as alternative to the JDBC lookup. To me there are at first sight some pros and cons:
- Pro: You just need a "simple" RFC user within the RFC channel. You do not need to use the PI system user / pw which owns the Z table.
- Con: If you select more than one field from the table, the RFC lookup function return all fields of the db entry just separated by a delimiter, which is why you need to implement some "parsing" of the fields in a UDF (minor disadvantage).
Still interesting discussion!
Thanks,
Christoph
Maybe you are looking for
-
I've made a gallery in adobe bridge. Is there any way to put it into my iWeb website?
-
How to make authorization to different planning level on one planning area?
now the situation is one planning area call one global company, under that we create several planning level for serveral sub-company. The authorization should that one sub-comp. only can display, change his planning level, and can not display any oth
-
My flat panel does not switch on ?
Was disconnected during 12 days while on holidays. No activity of any type when the power was plugged again. All external connections have been removed from the Mac, as recommended. No effect. Tried to zap the Pram. No effect either. Read somewhere t
-
Error message Cannot find mozilla run time
When trying to access Firefox on my PC get message Cannot Find Mozilla Run Time. OS Windows XP
-
Hi Friends Integration between FI and SRM system.I know that goods receipt and invoice is sent to backend system.What are the other accounting documents created in backend system. Regards Vinny novice