Message split ABAP mapping
Hello everybody,
for a special mappging I use ABAP mapping -everything fine.
But I need to split the message with ABAP mapping.
Does anybody know if this is possible ?
In the ABAP-class I use the interface IF_MAPPING. This has as a result parameter the parameter RESULT Type XSTRING (no table).
It only works to add to XMLs in 1 XML string, but my result have to be 2 XML files.
Alternatively would it be an idea to use multi message mapping (graphical first) AND then ABAP-mapping for special mappings?
Thanks a lot,
Florian
Florian,
for multimappings in coded mappings (xslt, java and abap mappings) you'll also create a single stream, but in this case, the stream may have the following format:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
<ns0:Message1>
<b><enter your first message here></b>
</ns0:Message1>
<ns0:Message2>
<b><enter your second message here></b>
</ns0:Message2>
</ns0:Messages>
where <ns0:MessageX> tags refer to each different target message type.
In the case you have a 1:n split, you'll have only 1 message type, but may have several messages within it.
<?xml version="1.0" encoding="UTF-8"?>
<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
<ns0:Message1>
<b><My_message id=1></b>
<b></My_message></b>
<b><My_message id=2></b>
<b></My_message></b>
</ns0:Message1>
</ns0:Messages>
Also, remember that, when you define an interface mapping as multimapping (meaning, you set either source, target or both interfaces to multiple messages, your input stream will also contain the <ns0:Messages> and <ns0:MessageX> tags, so you need to treat them in your mapping program.
Regards,
Henrique.
Similar Messages
-
Help on message split ABAP MAPPING
Hi friends
I need to split a message by abap mapping , I am having problem while creating the tag Messages and Message1.
the mapping is going into error Comparison error during the execution of a simple
it is turned up to be the issue of <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge"><ns0:Message1> not being created correct
I am using this code
CALL METHOD l_document->create_simple_element_ns
EXPORTING
name = 'Messages'
parent = l_document
*u2022PREFIX = ''
*u2022URI = ''
*u2022VALUE = ''
RECEIVING
rval = Messagesnode.
CALL METHOD l_document->create_simple_element_ns
EXPORTING
name = 'Message1'
parent = MESSAGESNODE
*u2022PREFIX = ''
*u2022URI = ''
*u2022VALUE = ''
RECEIVING
rval = Message1node.
any help wil do
ThanksNo answer
Thanks -
Reading attachment in SOAP message with ABAP mapping
I am searching an ABAP code to read attachment in sender SOAP message..
I am using PI 7.3, I can read by java mapping but I get another error after reading the attachment.. So I try to abap mapping..
That's it..
Thanx ..Hello Mark,
1. My Soap Sender Adapter, I checked the Keep Attachment option
2. I am getting the WSDL file from the SOAP Sender Agreement.. it is like http(s)://host:port/XISOAPAdapter/MessageServlet?channel=p:s:c? as you said.
I used the user-defined function, it works when <inc:Include href="cid:test.jpg" xmlns:inc="http://www.w3.org/2004/08/xop/include" /> is deleted in the message.
If the coming message includes <inc:Include href="cid:test.jpg" xmlns:inc="http://www.w3.org/2004/08/xop/include" />,
the <null> error occurs.
Thanx for your reply.. -
ABAP mapping split messages and dynamic filename
Hello,
i have set up a IDOC to file scenario where the IDOC is split into several files, which works fine. In addition to this it is required to set a dynamic filename out of the ABAP mapping for each file. If only one file is created this works already as well but how do you set the dynamic configuration when the messages are split?
Regards,
Andreas
Edited by: Andreas on Feb 26, 2009 9:09 AMyou cannot do dynamic configuration for message splits. The below is from SAP help.
Adapter-Specific Attributes and Multi-Mappings
In multi-mappings, there are multiple message headers with adapter-specific attributes. The mapping API can only access one message header. This has the following consequences depending on whether there are multiple source or target messages:
u25CF 1:n Transformation
If there are multiple target messages, the header for the adapter-specific attributes is copied for each message. This means that you can only create one header for all adapter-specific attributes, and not individual headers.
u25CF n:1 Transformation
This variant is only possible for multi-mappings in integration processes. If there is more than one source message, read-access to the adapter-specific attributes of the various message headers is not possible at runtime.
u25CF m:n Transformation
All afore-mentioned restrictions apply here. Developers can at most write the same adapter-specific attributes for all target messages to the header, without read-access to the attributes of the source messages. m:n transformations are only supported within integration processes.
What i will suggest is to use BPM to have the message split i.e 1:N mapping and then after that have another mapping 1-1 to have the dynamic configuration -
Multi-Message-split with ABAP mapping and adapter specific attributes
Hi all,
With <b>ABAP-Mapping I split 1 message to n messages</b>.
So many files are generated in <b>file-Adapter</b>.
Everything fine.
But now I want the file names different using adapter specific attributes.
It is not possible to use variable substitution and write the file name in payload because of receiver restrictions.
I tried this with following similar coding in ABAP-Mapping:
data: lt_records TYPE MPP_DYNAMIC_TAB.
Loop.
l_file_name = "payload-Inbound"-information
ls_record-namespace = 'http://sap.com/xi/XI/System/File'.
ls_record-name = 'FileName'.
ls_record-value = l_file_name. "l_file_name comes from inbound-payload
append ls_record to lt_records.
Endloop.
CALL METHOD dynamic_configuration->set_all_records
EXPORTING
records = lt_records.
If I start the interface I see in the monitoring the dynamic configuration with many entries for file-name in the the SOAP-Header mapping of the request message (following extract):
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!-- Mapping der Request-Message
-->
- <SAP:DynamicConfiguration xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
<SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileName">BPAADDRESS.XML</SAP:Record>
<SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileName">BPABROKERROLE.XML</SAP:Record>
<SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileName">BPACOMPANYSEGMENT.XML</SAP:Record>
<SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileName">BPACUSTOMERROLE.XML</SAP:Record>
The result is that <b>all files have the same file name</b> (last entry in dynamic configuration).
Is it possible to write the adapter specific configuration in ABAP-mapping <u>for every single result message</u>??
Thank you for your help,
FlorianHi Florian,
I've a different idea...I dont think its a "right solution" but just another work around..it involves a BPM...
In your ABAP mapping..set the dynamic config with as many variables as number of different messages...i.e. use the variables like 'FileName1', 'FileName2'...'FileName6' instead of 'FileName'. But use the same namespace 'http://sap.com/xi/XI/System/File'
Call the above mapping in a BPM and capture the individual messages and set the attribute 'FileName' from the values of 'FileName1' to 'FileName6' accordingly using Message Mapping and then send the message using the 'Send' step.
before you try this, try using the variable names 'FileName1' ...'FileName6' in the receiver adapters...enable the ASMS. <b>I know we need to select which variables from the dynamic config to be used by the adapter by specifically selecting 'FileName', 'Directory' etc...but just give it a try and see if it works..</b>
Or..instead of using a BPM..you can combine Henrique's idea...use Adapter module to set the value for 'FileName' from variables 'FileName1'...'FileName6' accordingly.
hope I'm clear..lemme know if you have any questions..
cheers
praveen -
Message Splitting in ABAP Mapping
Hi Everybody,
I have Implemented ABAP mapping in my Scenario and have used message splitting. That is for each header node of source corresponding number of target nodes should be created.I have a source node under which i have 5 subnodes and when this source node repeats again i need to generate two target nodes with 5 subnodes in each of the target header node.
I have tested the scenario in SXI_MAPPING_TEST by making the following changes in IR and ID.
1. Changed the cardinality to 0 to unbounded in Interface mapping.
2. Have kept the Interface determination type to Enchanced.
I am getting the ERROR" split mapping created no messages" in sxi_mapping_test.
Can anyone help me out on this.Good answers will be rewarded.
Thanks all,
ZabiullaPrabhu,
what needs to rely on Java stack is the adapter, not the mapping.
Mohammed,
make sure you create Messages/MessageX tags (with proper namespace) in your multimapping. Also, expect these tags in your input mapping.
You can get the exact Messages/Message1 tags (with the namespace) in a message mapping with multiple input or output messages. Create it and go to test tab, just to check the tags you should read/create in your abap mapping.
Regards,
Henrique. -
Hi all,
I need a little bit help with message splitting.
I have message structure like below. The Error Node exists in all rows, in first part it is initial (with no value), then come rows with different error messages.
<Message1>
<Row>
<node1>a</node1>
<node2>a</node2>
<Errror/>
</Row>
<Row>
<node1>a</node1>
<node2>a</node2>
<Errror/>
</Row>
<Row>
<node1>a</node1>
<node2>a</node2>
<Errror>text_a</Errror>
</Row>
<Row>
<node1>a</node1>
<node2>a</node2>
<Errror>text_b</Errror>
</Row>
</Message1>
I need to split it into 2 messages so, that in first message will be rows without error, and in the second with.
<Message1>
<Row>
<node1>a</node1>
<node2>a</node2>
</Row>
<Row>
<node1>a</node1>
<node2>a</node2>
</Row>
</Message1>
<Message2>
<Row>
<node1>a</node1>
<node2>a</node2>
<Errror>text_a</Errror>
</Row>
<Row>
<node1>a</node1>
<node2>a</node2>
<Errror>text_b</Errror>
</Row>
</Message2>
Is this feasible with graphical mapping? How can I can make the assignment of the row once to first and
other time to second message? Or do I have to use XSLT/ABAP? (I am not very familiar with java...) Thanks for any suggestions.Hello,
Prateek, Jude,
I think you did not get the point.When I map it just in the simple way it will look like this:
Input rows:
1 - no error
2 - no error
3 - error
4 - error
5 - error
Output
Message1 rows:
1,2,3,4,5
Message2 rows:
1,2,3,4,5
I will have 10 rows in output (I want to have just 5 and in this way M1-1,2; M2-3,4,5).
Udo,
I have tried already this approach. However it does not work as desired.
I have mapped:
Error node -> not -> exists -> if
Input_message_Row -> then
output -> Output_message1_Row
Error node -> exists -> if
Input_message_Row -> then
output -> Output_message2_Row
However the decision is made on the first row, and the first row is mapped also to second message, and that is all. The next rows are not considered at all:
Input:
<ns0:Messages xmlns:ns0=...>
<ns0:Message1>
<ns1:MT...>
<Row>
<test1>11</test1>
<Errror/>
</Row>
<Row>
<test1>111</test1>
<Errror/>
</Row>
<Row>
<test1>111bb</test1>
<Errror/>
</Row>
<Row>
<test1>11a</test1>
<Errror>a</Errror>
</Row>
<Row>
<test1>11axx</test1>
<Errror>axx</Errror>
</Row>
</ns1:MT...>
</ns0:Message1>
</ns0:Messages>
Output:
<ns0:Messages xmlns:ns0=...>
<ns0:Message1>
<ns1:MT...>
<Row>
<test1>11</test1>
</Row>
</ns1:MT...>
</ns0:Message1>
<ns0:Message2>
<ns1:MT2...>
<Row>
<test1>11</test1>
<Errror/>
</Row>
</ns1:MT2...>
</ns0:Message2>
</ns0:Messages> -
1:n Message split and Abap Proxies??
Hello,
Can I not use Message split and Abap Proxy together? My scenario is MDM->File ->XI->Proxy->BI.
I am getting a single file syndicated from MDM and in XI If I use message mapping to do 1:n split in the message mapping, can I use it with Abap Proxies? As per the link below, XI adapter is not present in the list..We are on PI 7.0 SP14. Thank you..
http://help.sap.com/saphelp_nw04/helpdata/en/42/ed364cf8593eebe10000000a1553f7/frameset.htm
Thank you for any suggestion..Hi Thanujja,
If you see the message from Raj, I dont think we can split the messages for the proxy. This is beacause the splitting of messages take place at the Adapter Level only for the adapters on the Java stack.
As suggested by Guru, you can try splitting the messages in the inbound proxy instead of using a BPM, in that way you can acheive good performance.
Thanks,
Srini
Edited by: srinivas kapu on Mar 27, 2008 9:09 AM
Edited by: srinivas kapu on Mar 27, 2008 9:10 AM -
Message Split Comes Before Mapping
Hi,
Can anybody explains the following queries....
1.Why Message Split Comes Before Mapping in Pipeline Steps?
2.What do you mean by Collaborative Profile and Collaborative Agreement?
3.What are Context Path, Context Object and Context Handling?
4.Which adpaters run on j2ee engine and which run on ABAP stack.
5.What is the need of datatype when we are creating the message type
6. and similarly what is the use of Business system when we are creating the corresponding Technical system
Thanks n Advance.,
Stallin>>1.Why Message Split Comes Before Mapping in Pipeline Steps?
Simple. Imagine you have 2 receivers with different mappings. If this has to work correct, XI needs to copy of the source msg for doing the mapping. rite?
>> 2.What do you mean by Collaborative Profile and Collaborative Agreement?
Collaborative profile -->Serivce with out party and service and all the commn channels you create for it.
Collaborative agreement -->Sender & Receiver agreements, that bind your cc with the interface.
>> 3.What are Context Path, Context Object and Context Handling?
Context path- It is Xpath expressions I guess. It is used for specifying conditions in receiver determination and interface determination.
Context Objects -- Used for the same.It reduces the complex Xpath expressions.
>>4.Which adpaters run on j2ee engine and which run on ABAP stack.
All adapters are part of j2ee frame work except IDOC and HTTP adapters. You dont need sender agreements for the 2.
5.What is the need of datatype when we are creating the message type
To get the valid XML structure.
6. and similarly what is the use of Business system when we are creating the corresponding Technical system
Tech systems -->Physical entiteis
Buss Systems --> Logical entities.
Regards,
Jai Shankar
Message was edited by:
Jai Shankar -
Multi-Mapping Message Split 1:n
Hi experts,
I have a few questions regarding a multi-mapping for a 1:n message split. I have a business process which collects IDOCs from a specific IDOC type (ZHINVOIC01).
I have a 1-to-1 Mapping for collecting the IDOCs.
After this 1-to-1 Mapping the IDOC has the following structure:
xdoc has the occurrence 0..unbounded
For every IDOC in the source structure one xdoc in the target structure should be created. My Mapping works very fine, but I have one question. If there are more IDOC-Elements in the source structure, I have more xdoc-Elements in the target structure. But I do not want to have one target-message. the mapping should create one file with the element xdoc for every IDOC element in the source structure.
I want to send a xml-file for each xdoc-element to a ftp-server. is that possible?
Thanks and best regards
Christopher KühnHi Udo,
look at my example above:
for the source structure
<Messages>
<Message1>
<ZHINVOIC01>
<IDOC/>
<IDOC/>
<IDOC/>
</ZHINVOIC01>
</Message1>
</Messages>
I have the following target structure:
<Messages>
<Message1>
<xdoc/>
<xdoc/>
<xdoc/>
<Message1>
<Messages>
now the target structure is only one message, isn't it?
But I want to have for this case 3 Messages each with only one xdoc-element.
I hope that we are not talking at cross-purposes
Thanks and best regards
Christopher -
Multi-Mapping and Message Split using BPM
Hi All,
Could anyone pls let me know clearly how message mapping can be done for this weblog
/people/sudharshan.aravamudan/blog/2005/12/01/illustration-of-multi-mapping-and-message-split-using-bpm-in-sap-exchange-infrastructure
Thanks,
RamHi,
When you are doing Message mapping after adding the Messaget types for source and target messages. You can click on the "" button in the target message and add one more tab. You can go to Message tab as shown in the 5th image and click "" button to add one more message type. Then do the mapping as usual.
<b>Based on the value of the element(name), the node of input(details)should be directed to one of the two message types</b>
Here in this blog it is done based on the Name.
You need to use IFTHENELSE boolean function and do the mapping.
Thanks,
Prakash -
Change Adapter Specific Message Attributes with ABAP Mapping
Hi everyone,
I have an IDOC -> PI -> File scenario and I need the file name to be a combination of several fields of the file so variable substitution is quite complicated. I have been reading about Adapter Specific Message Attributes and since the File name is one of those attributes I think maybe I can use it. The only thing is that I'm using ABAP mapping. Can I set the file name in that way? Has anyone done it?
Thank you for your help.
Regards,
PabloI found it myself:
DATA: l_dyn_record TYPE mpp_dynamic.
l_dyn_record-namespace = 'http://sap.com/xi/XI/System/File'.
l_dyn_record-name = 'FileName'.
l_dyn_record-value = w_nombrearch.
dynamic_configuration->add_record( l_dyn_record ).
Thanks anyway. -
ABAP Mapping - Message shown in Standard Change List Process Log
Hi
I am working with ABAP Mapping program. I had created ABAP class using ABAP workbench. Before this, in exchangeProfile..data was provided for com.sap.aii.repository.mapping.additionaltypes ==>> as " R3_ABAP|Abap-class;R3_XSLT|XSL (ABAP Engine) " and 'Saved'.
In Interface Mapping, after providing the Class Name under 'Mapping Program' and activated. After activation (Standard Change List), it is showing the following messages under 'Processing Log'.
--> Standard Change List - Process Log message
Activation of the change list canceled Check result for Interface Mapping IM_ABAP_MAPPING | http://ABAP_Mapping_SREE: Type R3_ABAP of
program ZSREETEST is invalid because it is not registered in the exchange profile . Check the values for the exchange profile parameter
IntegrationBuilder.Repository.com.sap.aii.repository.mapping.additionaltypes
--> End of Log message
Can some one please guide me in resolving the ABAP mapping issue.
Thanks in advance.
..SreeSree,
The log says that there is ABAP mapping included in your exchange profile. Do the things what michal have told and also check your mapping program whether working fine or not in SXI_MAPPING transaction.
You can see this weblog for reference:
/people/sameer.shadab/blog/2005/09/29/testing-abap-mapping
---Satish -
Mapping-based message splits in PI7.0
We have developed an integration scenario on XI 3.0 that uses mapping-based message splits (1:n transformation without BPM). This is available since SP14 I think.
Now we want to upgrade to PI 7.0: Are mapping-based message splits a standard feature of PI 7.0 or do we need a certain SP as well?Hi,
It should be available with Pi 7.0 with default
And also compare the SP's and do finalization
in 2004 - in 2004s
SP12 & < - SP04
SP13 + 14 - SP05
SP15 - SP06
SP16 - SP07
SP17 - SP08
SP18 - SP09
Xi's Latest SP is SP 21 and PI's is SP 14
Regards
Seshagiri -
ABAP Mapping and Message Mapping
Hello
I want to do the followig mapping
File - > IDOC
field1 ->field_idoc1
field2 ->field_idoc2
field3 ->field_idoc3
field4 -> (based on an dictionary table in the R/3)
For the first 3 fields I will use message-mapping.
For field4 I heard about ABAP Mapping. Select with the value of field4 in an ABAP Table and response the new value to the mapping back.
Would both mappings in one Interface-Mapping work?
Regards
ChristophChristoph, There was an article previously available in articles section, now i dont find the link.
I have given a sample code below. You can find lot of sample JCO code provided along with the JCO library that can be downloaded from service.sap.com.
JCO.Repository mRepository;
JCO.Client mConnection = JCO.createClient(
sapClient,
userName,
password,
language,
hostName,
systemNumber );
// connect to SAP
mConnection.connect();
// create repository
mRepository = new JCO.Repository( "sample", mConnection );
// Create function
JCO.Function function = null;
IFunctionTemplate ft = mRepository.getFunctionTemplate("Z_TEST");
function = ft.getFunction();
// Obtain parameter list for function
JCO.ParameterList input = function.getImportParameterList();
// Pass function parameters
input.setValue( param1_value , "P_PARM1");
input.setValue( param2_value , "P_PARM2");
JCO.ParameterList tabInput = function.getTableParameterList();
JCO.Table inputTable = tabInput.getTable("T_PARM3");
inputTable.appendRow();
inputTable.setValue("test" , "IDOC");
mConnection.execute( function );
String ret = function.getExportParameterList().getString( "P_GEN_NUM" );
mConnection.disconnect();
return ret ;
Regds
Saravana
Maybe you are looking for
-
Sequences in Palnning with mutiple Plan types
Running on Planning 9.3.1, and having the Load Balancing structure. Trying to create a Sequence should run the Business rules, as each HBR should run on different Plan types. Surley I need to Merge the variables of RTPs. Is there any work around way.
-
I had a CD and ripped 18 songs into itunes. They all play fine on this comp. I then burned that playlist onto a blank CD... the first 7 songs are on the CD but then 8-18 are not. When I put the CD in a CD player or DVD or back on this computer, it sa
-
Isn't there remote key concept for Hierarchy lookup Tables?
I don't see the [remote key] field in destination items.? I really don't intend to use this remote Key concept in syndicating back to the source system, but specifically to satisfy this operation need: I have a hierarchy table with two fields and bot
-
I had been using ADE on another computer. Have a new computer. Installed ADE on it an download a library book to my computer. It will not let me download the book to my nook. I get error saying no authoriztion to barrow the book. I need help...
-
Question of avm2overview.pdf
http://www.adobe.com/devnet/actionscript/articles/avm2overview.pdf Page 66. Instruction set of AVM2 , (0xaf) is which code ? "greaterthan" or "greaterequals" ?? hope to reply seriouly thanks