Split the Target Structure.
Hi,
I have Header and Detail in my Target Structure, in the output I have to create 2 separate files, one for Header and one for Detail.I dont want to go for BPM, is there any solution for this with out using BPM?
Thanks & Regards,
Pragathi.
Hi Pragathi
Assuming you mean you have Header and Detail in the source structure and would like to create 2 messages on the target side, you have 2 options (Since you mentioned you dont want to use BPM)
1. Create 2 sets of messages interface and related objects for the target structure and split the flow into 2, which will map the header to one message and the item to the other.
2. Use multimap and map the header to message1 and item to message2. This will be a better option as the interface will use one map for creating the target message and you can pass the message onto 2 comm channels that will create the file.
Hope this help.
Regards
Prav
Similar Messages
-
How to create multiple segments on the target structure of an IDOC
Hi All
I am working on the Shipment Confirmation Interface( Message Type SHPCON ) which is FILE to IDOC Scenario. I have a segment called E1EDL18 which occurs only once on the target side of the idoc. Now I have to created multiple E1EDl18 segments for the Qualifiers ORI, PGI and PCK. I treid to send a constant ORI,PGI,PCK and then used an user defined function which splits the constant at COMMA and then I am assigning to the target field QUALF. In the display queue for QUALF I see three values with context but still only one E1EDL!* segment is created. Please let me know how to create multiple E1EDl18 segments for three qualifiers.
Thanks
NagaIn message Mapping, just right click on the segment and click on duplicate subtree. now it will create you another segment with same name and fields in it..
you can hard code the Qual, or you can map the required source field into it. -
Remove empty nodes in the target structure
Hi,
My scenario is IDoc-XI-JDBC.
For one IDoc I need to update data in 4 tables. But if idoc contains ATWRT node then it should update 4 tables if not only first two tables.
For the statement 3 and 4, i have done the following mapping.
[ATWRT][collapseContexts]-[exists]--[if then][statement3]
but in the target sturcture I am getting blank node as following:
<statement3/>.
And because of this blank statement JDBC Adapter is throwing an error.
Can anyone help me how to remove this blank node from target structure.Jwalith,
I hope you must have kept the Statement node occurrence as 0..xxxx(1 or n), if that's the case you don't need to check anything. Just map the ATWRT directly to Statement 3 and Statement 4.
By the way what's the occurence of ATWRT node ? I gave the above suggestion, keeping in mind that ATWRT node occurrence is 0..1.
If the occurrence of ATWRT is not 0..Unbounded, then you can also use the below simple UDF.
ATWRT >UDF>Statement3
ATWRT >UDF>Statement4
UDF - Advanced(Queue), with one Parameter (
if( ATWRT.length >0)
result.addValue("");
else
result.addSuppress();
Thanks,
raj. -
LSMW - Problem while assigning the quantity field to the target structure
Hi,
Here I am getting the warning while I am maintaing the field mapping and conversion rules . Here I am doing this through the Batch input Recording.
That is , while I am assigning the source field to the target structre field .
" <b>WARNING : Source field is longer than target field</b> "
plz help me to remove that warning.
Thank youin lsmw use char field instead quantity of same length(in stucture defined in lsmw).
-
Adding extra namespace in the target structure
Input file (currently generating from existing message mapping)
<?xml version="1.0" encoding="UTF-8"?>\
<pData xmlns:xsi="namespace1">
<Name>name</Name>
<ListChange>
<status>Active</status>
</ListChange>
</pData>
Required File
<?xml version="1.0" encoding="UTF-8"?>\
<pData xmlns:xsi="namespace1" xmlns="namespace2">
<Name>name</Name>
<ListChange>
<status>Active</status>
</ListChange>
</pData>
To add the extra namespace (xmlns="namespace2") used following ways.
1. Using XML Anonymiser bean module
Still the no change in the output (only accepting one namespace at a time 1/2)
2. Using XSLT Mapping as 1st row in interface mapping
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" encoding="UTF-8"/>
<xsl:template match="/pData">
<pData xmlns:xsi="namespace1" xmlns="namespace2">
<xsl:copy-of select="/pData/Name"/>
<xsl:copy-of select="/pData/ListChange/status"/>
</pData>
</xsl:template>
</xsl:stylesheet>
We are getting the following error
com.sap.aii.utilxi.misc.api.BaseRuntimeException; Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XMLParser: No data allowed here: (hex) 54, 65, 73(:main:, row:8851, col:24)
Any inputs are welcome.>
Jayashri Rade wrote:
> Input file (currently generating from existing message mapping)
>
> ********************************************************
> <?xml version="1.0" encoding="UTF-8"?>\
>
> <pData xmlns:xsi="namespace1">
>
> <Name>name</Name>
> <ListChange>
> <status>Active</status>
> </ListChange>
>
> </pData>
> ********************************************************
> Required File
> ********************************************************
>
> <?xml version="1.0" encoding="UTF-8"?>\
>
> <pData xmlns:xsi="namespace1" xmlns="namespace2">
>
> <Name>name</Name>
> <ListChange>
> <status>Active</status>
> </ListChange>
>
> </pData>
> ********************************************************
>
> To add the extra namespace (xmlns="namespace2") used following ways.
> 1. Using XML Anonymiser bean module
> Still the no change in the output (only accepting one namespace at a time 1/2)
the bean is to remove namespaces.. not to add
> 2. Using XSLT Mapping as 1st row in interface mapping
> ********************************************************
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> <xsl:output method="xml" encoding="UTF-8"/>
>
> <xsl:template match="/pData">
>
> <pData xmlns:xsi="namespace1" xmlns="namespace2">
> <xsl:copy-of select="/pData/Name"/>
> <xsl:copy-of select="/pData/ListChange/status"/>
>
> </pData>
>
> </xsl:template>
> </xsl:stylesheet>
> ********************************************************
> We are getting the following error
> com.sap.aii.utilxi.misc.api.BaseRuntimeException; Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XMLParser: No data allowed here: (hex) 54, 65, 73(:main:, row:8851, col:24)
>
> Any inputs are welcome.
the code looks fine. but i prefer a simple java mapping with a string operation to replace the tag <pData xmlns:xsi="namespace1"> to <pData xmlns:xsi="namespace1" xmlns="namespace2">. it will be simple string handling plus you will not lose any performance by using a XSLT parser invoked. -
Error in File content conversion in the target
hi
I'm doing a content conversion at target.
my target structure while sending is like:
<MT>
<Header>
<a>
</Header>
<BODY>
<b>
</BODY>
<filename_output>
<filename>
</MT>
however in the target i have to ignore the last 2 fields: <filename_output> and <filename>.
I'm able to do it.
The problem is coming that in the target structure,when we open in Textpad, 2 trailing empty lines are there at the end.
we need to remove these lines.
Any idea how to do it?Hi Alok,
Try with parameters given in this blog:
/people/sravya.talanki2/blog/2005/08/11/solution-to-the-problem-encountered-using-variable-substitution-with-xi-sp12
If didnot work try: FileName.endSeperator = '0' as given in this thread: Re: Blank Lines While writing files
else give .endSeparator as two backspaces (if you have two new lines). The ascii code is '0xBS'. see this code:
http://www.december.com/html/spec/ascii.html
---Satish -
Message Mapping - NewLine generation in the target field
Hi ,
This is a File to SOAP scenario, where text file is picked by XI and posted to target using webservice in the xml format.In the message mapping, I am supposed perform a logic where 3 fields in the source structured are to be concatenated and sent to the target structure. This fields at the target structure are to be displayed with a newline character.
So if I am sending : abc, 123 and xyz as input and the output should be in one field as follows :
<ns3:OutputField xmlns:ns3=abc
123
xyz</ns3:StreetAddressLine>
I have used this "
" as the seperator in the concat function, hoping this would produce a new line but was hopeless.
Any ideas are appreicated.
Thanks,
RagHi Raghav,
XML will never show new line or space characters.
Try to open the message in notepad or wordpad and then check if you can see the new line character.
-Supriya. -
Multiple STATEMENT nodes in target structure for JDBC adapter
Hi All,
I have a file to JDBC scenario . At the receiver side we need to update two tables simultaneously .
So in the target structure for JDBC , is it possible to have two STATEMENT nodes , so that 2 tables can be updated simultaneously.
Please help.
Thanks & Regards,
Loveena.Hi,
U can do tht..please see below link..
http://help.sap.com/saphelp_nw04/Helpdata/EN/bc/bb79d6061007419a081e58cbeaaf28/frameset.htm
Regards,
Manisha -
** Is it possible to move back and generate the target node in Message Map
Hi,
We are doing EDI to IDoc scenario. In our scenario the source XML comes like
XML Instance
G_SPOC (Node) 0..unbounded
D_670 (Field)
S_SDQ (Node)
D_67
D_380
D_67_2
D_380_2
G_SPOC
D_670
S_CTP
D_212
G_SPOC
D_670
S_SDQ
D_67
D_380
D_67_2
D_380_2
Target Strcutre
E1EDP01 0..unbounded
For this instance we have to create E1EDP01 node for how much times D_67,D_67_2..... will come.
By using 'CreateIf' function we check the existance of D_67,D_67_2 ... and create the target structure E1EDP01. This is working fine if S_SDQ node will come in source XML. Basically D_67,D_67_2 represents Store Nos and D_380,D_380_2 represents Qty.
In the customer given EDI file, Price change also comes for Line items. It may comes in the file middle also. When Price Change come, the node S_SDQ will not come in G_SPOC but where as S_CTP will come. This contains Price Change in the field D_212.
The indicator whether QD (Qty Discount), QI (Qty Increase), PC (Price change), AI (Additonal Increase) is stored in the fild D_670.
In our logic in mapping, we create E1EDP01 based on the existance of D_67,D_67_2... . But, for PC (Price Change) we created special node E1EDP01 at the end (after all D_67,D_67_2 ) by checking the condition whether D_670 = 'PC'. This is also working fine when 'PC' comes in last G_POC of source XML. But, when it will come in middle of G_SPOC, mapping is only executed for first 3 GPOC (for Example, QD,QI,PC) and it ignored the last one AI. (Because this is generated based on D_67 under S_SDQ again).
The problem is we think that the system does not go back and execute the mapping for AI based on D_67.
It executes mapping only in order.
So, How will we solve this problem, friends? The requirements is we have to do this thru Graphical Mapping only.
We tried sever possibilites, but not worked out.
Kindly help me friends to solve this issue.
Thanking you.
Kind Regards,
Jeg PFriends,
Any help to solve the above issue ? -
Target file name as field in target structure
Hi SDNers,
I have a requirement where I need to populate a field in target structure with the target file name, this will be a counter.
So if the interface is run 2 times already the third file should have name XXXXXXX_03 and also this needs to be mapped to a field in the target structure.
Any ideas on how to achieve this?
(Pls Note: I am aware of ASMA and variable substitution)
Regards,
Gautam PurohitHello Gautam!
File adapter - How to pass File name and path at runtime
This SDN topic probably covers the requirement you mentioned!
BR,
Lucas -
How to change target structure order
Hi Guys,
I am having the problem for changing the target structure order,
I am dealing the fixed length files using the sender file adopter I am getting the order what ever I want. example below mention.
created the data type message type and every thing my own and also used sender file adopter with file content conversion.
Source
STRU1
STRU2
STRU3
STRU1
Where as I got the XSD from the vendor for the target and used external definition. When I am doing the message mapping I am getting different order.
I want the target as below mention
Target
STRU1
STRU2
STRU3
STRU1
But I am getting as :
Target
STRU1
STRU1
STRU2
STRU3.
Can you guys please help to get order what ever I want....
Thank
BabuSarvesh,
Those are like STRU1, STRU2 STRU3 structures not fields, every structure has n number fileds.
When I configure my sender file adopter I got the order what ever i need, but when I am doing message mapping structure level mapping like
STRU1 -
> STRU1
STRU2 -
> STRU2
STRU3 -
> STRU3
Since STRU1 has 2 occurrences in source first and last.
when I did above mapping the STRU1 is comming 2 times as a first, Which I do not want.
I hope you understand ..
can you please help me how to get order in target..
Thanks
Babu -
LSMW- Error :No target structure could be found.
Hi All,
In LSMW I'm using Business Object BUS1001006 and Method SAVEDATA.
Which is working fine in Development system and Testing system. But the problem is in the production system.
At the 4th step (Maintain Structure Relation )in LSMW I'm getting an error ' No target structure could be found. '.
It would be thankful if any one could suggest me how can we solve this problem?
Thanking you,
Sureshok....fine....seems lke i found ur problem .
For using a bapi , u need to create ale message type ( tcode bdbg ) . Aftercreating message for this BAPI, the server will generate a new ALE idoc message type, and function inbound and outbound to handle this kind of idoc.
Next, you can configure the LSMW for BAPI ,(if you don't do the first step, the BO can't been choosen in the LSMW).
Then you choose the business object and method appropriately. The target structure of this LSMW scenario is the IDOC type of you create for this BAPI.
Remaining steps are like in normal lsmw .
You have to maintain settings for inbound processing of idoc in each server seperately . Check wt u have done in dev\test server for inbound processing . Repeat the same in production server . -
Target structure while creating amapping template
Hi,
I have a message mapping in which target structure is a External definition. When i try to create template based on mapping, i am having this message
Selected target element must be assigned a data type or a complex type.
Seems like i have to change the target structure as mapping templates can be defined only by using Complex type in external Definition.
Should i change the External definition structure , if so what needs to be changed?
Edited by: kalyan golla on Apr 11, 2011 5:56 AMHI Kalyan,
How to create Mapping Template for External Definitions
Change root tag in graphical mapping
Article on Mapping template:
http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/50171256-1ee2-2a10-3f84-ddecf098f724
Thanks,
Bhupesh -
UDF for Splitting the nodes based on the field length
HI All,
Target records Record1 to Record4 must be created based on the length of the source field length i.e, if the source field length is only 90 then only 3 records must be created.maximum length of the source field is 120.The source and the target structure are as shown
Source Target
Record Record(30)
Field(120) -------------> Field1(10)
Field2(10)
Field3(10)
After mapping:-
Source -----------> Target
Record Record1(0 to30)
Field(120) -------------> Field1(0 to 10)
Field2(10 to 20)
Field3(20 to 30)
Record2(30 to 60)
-------------> Field1(30 to 40)
Field2(40 to 50)
Field3(50 to 60)
Record3(60 to 90)
-------------> Field1(60 to 70)
Field2(70 to 80)
Field3( 80 to 90)
Record3(90 to 120)
-------------> Field1(90 to 100)
Field2(100 to 110)
Field3(110 to 120)
Can any one provide me the code to get this done.
Thanks ,
VikramYou need no UDF. You can use the substring function, but you should check the length of the string to prevent mapping errors due to the substring function.
-
How to update the R/3 tables with the target message??
Hi All:
I have one scenerio, that I am getting the data from Flat File and Mapping
it to the target structure. Now from that target message I need to update
few tables in R/3.Could any one give me a hint how I can achive it.
It is possible with proxy??
Thanks in advance.
regards,
Farooq.Also when ever I send the e-mail you peoples are able to read it..but
I am unable to recieve the others mail in my mail box(Regarding the new blogs, forums etc). Can any one help
me on this
Maybe you are looking for
-
Iphoto 6 and leopard and words for month's missing
I have found a strange problem in iphoto 6 and I am unable to fix it with a reinstall from the factory disks. For some reason all the month references in iphoto i.e. January, February, etc show up as letters J, F, etc. Any suggestions? pictures http:
-
when i connect an s-video to RCA cable from the mac to the TV, it won't boot. If i let the system boot, then connect the cable, All i get on the TV are some white lines accross a black screen. Is there something I am doing wrong? Do i need a cable fr
-
IBooks bookmarks syncing incorrectly between devices
I have a book I am reading on iBooks on my MacBook Pro with Mavericks, my iPhone 5s with iOS 7, and my iPod touch 4g, which has iOS 6. I have each device set up to sync bookmarks and collections between devices, but the bookmarks keep syncing incorre
-
Hi there, I'm about to take over a legacy project written in PL/SQL. It's not a very large project but some of the functions are very large, i.e. the kind of functions that would make make Godzilla look like a cute and tiny reptile. I've worked with
-
LSMW and IDoc Inbound processing?
Hi, I am having a query in data bulk upload.COuld any one help me out. Regards, John.