IDOC Mapping with field determination
Hi All.
My requirement for this PI Mapping has the following. A root node (E1IDPU1) has a document name and document number. This also has a child node (E1EDP02) that can occur 5 times and in it a qualifier and belnr that occurs once in each instance.
We need to map either the qualifier from the child to the target field if the qualifier is "071" in any of the instances or if it doesn't then take the document number from the root. Problem i have is how do get this number if the process is done once, checking all the fields.
I have the mapping complete with an IF-THEN-ELSE clause that checks the constants for these but it will only evaluate the qualifier fine taking the belnr, my ELSE doesn't take the document number in the event qualifier does not exist.
Do help, it will be appreciated.
Darren.
Hi Darren,
I believe you are only passing one value to the target node. That may explain why you are having the error:
You can try using this mapping:
QUALF ----> replaceString --> removeContext --> sortByKey:numerical ascending -----------------------------------> \
Constant:071 --> / / / \
Constant:71000000 --> / / \
BELNR ----> removeConext ------------------------------> / \
QUALF ----> replaceString --> removeContext --> sort:numerical ascending --> collapseContext --> equalsS: 71000000 --> ifThenElse --> TargetField
Constant:071 --> / / /
Constant:71000000 --> / /
DOCNUMMR --------------------------------------------------------------------------------------------------------> /
The replaceString with constant 71000000 is there to ensure that 071 gets the highest number when the sorting function is called.
Hope this helps,
Edited by: Mark Dihiansan on Feb 9, 2010 9:39 AM
Similar Messages
-
Is there any standard ptogram/tcode to download idoc contents with fields.
Hello All,
Is there any standard ptogram/tcode to download idoc contents with fields?
Thanks,
Devaraj.Hi Patil,
I dont think there is standard program or t-code.
But u can down load the IDOC with field contents by following way
Goto t-code WE62- give the basic idoc name- press display button then it shows all filed contents with description.
Now select 'SYSTEM' LISTSAVE--LOCAL FILE from menu bar .
Here select the file type ie spread sheet,html, etc and give the file name and directory where u need to place it.
<b>Rewards with points if helpful.</b>
Regards,
Vijay. -
Inbound Invoice IDOC mapping Required fields
Hi All,
Please let me know what need to be mapped for the @begin , @segment , TABNAM , SNDPOR, SNDPRT etc like this elements in the IDOC structure.
In my scenarion i get Invoices in XML file so that i can pick that and process it into SAP R/3 by doing correct mapping with the inbound IDOC and post the same into R/3 . Please provide the sample mapping for processing Invoice IDOC.
Regards,
ReddyNanda,
@ Control records
>>>
You have two option. One is to fill the control records inside the mapping or else let XI fill it automatically.
In case you are filling the control records in the mapping, then you will have to enable the option to take those values in the IDOC receiver adapter.
See option (Apply Control Record Values from Payload) - http://help.sap.com/saphelp_nw04/helpdata/en/96/791c42375d5033e10000000a155106/content.htm
Control values - http://help.sap.com/saphelp_nw04/helpdata/en/13/95244269625633e10000000a155106/content.htm
@ Begin, Segment etc
>>
you can map any constant value to the same. -
Help!! - File to Idoc Mapping with Nested structure
Scenario:
I have an inbound file that has three nested records.
eg. A00, B00 and C00. C00 is nested structure of B00 and B00 nested structure of A00. All these structure can repeat N number of times in a file.
How do I map this to IDoc structure that have one segment each for the three structures in the file and nested in the same way.
Question: How is the parent child relationship established?
Suppose I have a file
A00 1234 Sam 29
B00 london LE3 XYZ
B00 US 123456
C00 2 XYZ
A00 5678 Joe 22
B00 US 23456
If I make a nested structure and then say in the file conversion properties that A00 go to segA and then B00 go to segB, but then when I come back to A00, how do I move the data to the A00?
Thanks in Advance
RgdsFrom what you have layed out, you can create a data type with 3 children, all 1..unbounded cardinality, each containing their own elements. You say they are nested, but the example you gave isn't nested... it's just A's followed by B's followed by C's. If that is the case, you can then use a data type w/ 3 subelements (A, B & C) and each of those is actually a container with the real attributes of that line in your file. (I can email you a schema quickly if you need it)
If you are saying they can occur like this:
A00 1234 Sam 29
B00 london LE3 XYZ
B00 US 123456
C00 2 XYZ
B00 US 23456
C00 2 XYZ
THEN they are nested - ie B's & C's repeat under any A. Then you must create segment B as a subelement of segment A instead of on the same level, then bury C under B. (I find this easiest w/ a text tool rather than inside XI, as I can cut/paste segments where I want them to belong...)
Good luck with setting up content conversion on that file adapter... We have done this a few times, and it can be quite interesting.
If you have trouble with the schema, you can post your email & I can give you a quick example.
Message was edited by: Amanda Derringer -
Hi,
is it possible to map edi document to IDOC with MII?
Thanks.Currently there is example available.
In the thread [can MII read edifact|Re: can MII read edifact?; Jeremy mentioned an idea which may be interesting for you. Have a look at the following Wikipedia article about [XML/EDIFACT|http://en.wikipedia.org/wiki/XML/EDIFACT]. Use case 1 proposes to use a converter build a XML file from the original Edifact message. Then you can process that XML with MII.
Maybe this helps.
Michael -
Mapping of field with MinOccurs 0 in SAP XI 2.0 SP5
Hi,
Our Scenario is
File -> Adapter -> XI -> Idoc Adapter -> SAP
We are trying to push IDoc and the mapping tool is giving an error. I am providing the error that I am getting.
The snippet of the XSD for the IDoc is given below:
<xsd:element name="E1FIKPF" minOccurs="1" maxOccurs="1" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:annotation>
<xsd:documentation>FI Document Header (BKPF)</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="BUKRS" minOccurs="0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:annotation>
<xsd:documentation>Name of global company code</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="6" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="BELNR" minOccurs="0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:annotation>
<xsd:documentation>Accounting Document Number</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="10" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="GJAHR" minOccurs="0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:annotation>
<xsd:documentation>Fiscal Year</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:pattern value="\d+" />
<xsd:maxLength value="4" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="BLART" minOccurs="0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:annotation>
<xsd:documentation>Document type</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="2" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="BLDAT" minOccurs="0" type="date" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:annotation>
<xsd:documentation>Document Date in Document</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="BUDAT" minOccurs="0" type="date" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:annotation>
<xsd:documentation>Posting Date in the Document</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="MONAT" minOccurs="0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:annotation>
<xsd:documentation>Fiscal Period</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:pattern value="\d+" />
<xsd:maxLength value="2" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
In this snippet as can be seen the minOccurs for the BUKRS field is 0. But if I do not map the field its giving me following error.
/usr/java131/bin/javac -encoding UTF8 -classpath .:./system-lib/boot.jar:./system-lib/jaas.jar -extdirs ./additional-lib:./services/deploy/work/applications/ExchangeRepository -d /tmp/9_53_35_27_7_2004 /tmp/9_53_35_27_7_2004/com/sap/xi/tf/_MsgMapGcentre2Fidcc2_.java
/tmp/9_53_35_27_7_2004/com/sap/xi/tf/_MsgMapGcentre2Fidcc2_.java:303: ';' expected
a117.gotoNextContext();tmpValAtr = a117.getValue();if (!tmpValAtr.equals(SUPPRESS)) handler.addAttribute("SEGMENT", tmpValAtr);a117.gotoNextValue();if (!__deflt)a115.gotoNextValue();No mapping for value/FIDCCP02/IDOC/E1FIKPF/BUKRS
^
/tmp/9_53_35_27_7_2004/com/sap/xi/tf/_MsgMapGcentre2Fidcc2_.java:303: cannot resolve symbol
symbol : class No
location: class com.sap.xi.tf._MsgMapGcentre2Fidcc2_
a117.gotoNextContext();tmpValAtr = a117.getValue();if (!tmpValAtr.equals(SUPPRESS)) handler.addAttribute("SEGMENT", tmpValAtr);a117.gotoNextValue();if (!__deflt)a115.gotoNextValue();No mapping for value/FIDCCP02/IDOC/E1FIKPF/BUKRS
^
2 errors
Compilation error
Any one having any guesses on why this error is coming. I know this error would vanish if we map the field by an Empty Constant. But then it would start giving error for the next field until all the non mandatory fields are mapped.
If however I go ahead and map all the fields then the output structure generates all the segments the maxOccurs times. i.e. if a segment is occuring 999 times then that segment is repeated that many time in the output whereas I never needed that segment in the output.
Can any one suggest as to why this is happening. Am I doing some thing wrong or this is a problem with Mapping Editor in XI 2.0 SP5.
AshishHello Ashish,
this is a bug in the mapping tool. You have to apply the note 730081. It says:
Symptom
After you import XI20 Support Package 04 or Support Package 05, you can
no longer change and regenerate the message mapping (graphic mapping
tools).
The following error is displayed during activation or generation: No
Mapping for value.......
Other terms
Graphic mapping tools, SAPINTSER05, no mapping vor value
Reason and Prerequisites
This problem is caused by a translation error.
Solution
The translation error has been corrected.
As of patch level 1, the correction is provided in the SAPINTSER05_1.sca
archive of the INTEGRATION Services 2.0 software component and, as of
patch level 2 for Support Package 5, it is provided in the
SAPINTBUI05_2.sca archive of the INTEGRATION BUILDER 2.0 software
component. The archives are available on the SAP Service Marketplace at:
http://service.sap.com/patches
SAP EXCHANGEINFRASTRUCTURE/SAP EXCHANGEINFRASTRUCTURE 2.0
Binary Patches/INTEGRATION SERVICES 2.0/OSINDEP and
..... /INTEGRATION BUILDER 2.0/OSINDEP
Import the archives using SDM.
The mapping must be recompiled after deployment.
Regards Franz -
Hi,
Target field is : Bank Address 1:
Source mapping: it is a Idoc with the following requirements
IF E1IDB02 BA-FIIKWAER = CNY and LEN(E1IDB02 BB-FIIBKNAM)<=11
then MID(E1IDB02 BB-FIIBKNAM,2,10)
IF E1IDB02 BA-FIIKWAER = CNY and LEN(E1IDB02 BB-FIIBKNAM)>11
then MID(E1IDB02 BB-FIIBKNAM,12,11)
IF E1IDB02 BA-FIIKWAER <> CNY and LEN(E1IDB02 BB-FIIBKNAM)<=35
then MID(E1IDB02 BB-STRAS,1,35)
IF E1IDB02 BA-FIIKWAER <> CNY and LEN(E1IDB02 BB-FIIBKNAM)>35
then MID(E1IDB02 BB-FIIBKNAM,36,35)
E1IDB02 -- is a segment name with occurence 1..1
BA and BB are the qualifiers
FIIBKNAM is the field name.
I am unable to map this as the condition has to be given with two qualifiers at a time.
Can some one help me out on this. Can we define the UDF where we can store this information as temporary variable. If UDF can be defined, please let me know with the details.
Regards,
ManojHI,
Yes, but you have to write your own UDF ,
but i can give example use this to solve your problem.
IF E1IDB02 BA-FIIKWAER = CNY
then MID(E1EDKA1 BE-NAME1,12,11)
1)
input E1EDKA1 BE-NAME1,E1IDB02 BA-FIIKWAER
if (E1IDB02 BA-FIIKWAER = CNY) {
return substring(E1EDKA1 BE-NAME1,12,11);
2)
input E1EDKA1 BE-NAME1,E1IDB02 BA-FIIKWAER
IF (E1IDB02 BA-FIIKWAER <> CNY ) && ( (E1EDKA1 BE-NAME1).length<=35)
return substring(E1EDKA1 BE-STRAS,1,35);
3)
IF (E1IDB02 BA-FIIKWAER <> CNY) && ((E1EDKA1 BE-NAME1).length>35)
return substring(E1EDKA1 BE-NAME1,36,35);
Before map this first map with same level of empty constant and concat it, if it is empty,later map with substring.
Regards
Chilla -
I am trying to map the fields in R3 system with the infoobjects in BW.
I am mapping the fields with in R3 with the infoobjects in BW.
Can any please let me know the relavent mapping infoobjects and the procedure to find for the following fields.
Description Type Length
Purchase Order VARCHAR2 10
PO Line Number NUMBER 10
Line Item Description VARCHAR2 60
Order Quantity
Unit of Measure VARCHAR2 3
Performance Start Date DATE 7
Performance End Date DATE 7
Order Date DATE 7
PO Line Extended Amount NUMBER 14
PO Line Total Amount NUMBER 14
Project VARCHAR2 30
Account ID VARCHAR2 15
Cost Amount NUMBER 14
Prime Contract ID VARCHAR2 20
Requisition ID VARCHAR2 10
Vendor ID VARCHAR2 12
Vendor Name VARCHAR2 25
Entry Date/Time DATE 7
Address Descriptive Code VARCHAR2 10
Address Line 1 VARCHAR2 40
City Name VARCHAR2 25
Mail State VARCHAR2 15
Postal Code VARCHAR2 10
Country Code VARCHAR2 8
Phone Number VARCHAR2 25
Fax Number ID VARCHAR2 25
Other Phone Number ID VARCHAR2 25Hi,
You can find the fields and related infoobject for the datasource as follows
Step1
log on to the BW system
Step2
Go to SE11 ---> give the table name as RSOSFIELDMAP and execute
Step3
give the data source name for OLTPSOURCE field and execute
Step4
you will find the mapping between fields and relevent infoobjects
Hope this helps
Santosh -
Message Mapping, filling field with 0 (zeros) on left
I need to fill a field with values that has variable lenght adding 0 (zeros) on the left, how can I do it ?
I'm using the LENGHT in message mapping, with value returned by LENGHT I use FIXVALUES to map the quantity of 0 (zeros) that I need to add in the field.
Somebody can help me with this problem ?
Thank's.Hi Regis,
You can use the Arithmetic:FormatNum built-in function for this.
If you want to left-pad the number with zeros so that the length is always 10, then specify 10 zeros for the format, 0000000000.
This function takes formats based on java.text.DecimalFormat so you can see all of the possibilities at:
java.sun.com/j2se/1.4.2/docs/api/java/text/DecimalFormat.html
Thanks,
Jesse -
We are having characteristics keyfigures in SAP BW.We have to identify these fields in R/3 i.e. source fields and source tables.But we are unable to match some keyfigures and characteristics in R/3.What approach we have do.Mean if we are unable to find some characteristics and keyfigures in R/3 what we have to do and how to we mapping?what extraction we have to take?what approach we have to do
Hi Sam and Ramesh,
These reports are coming to Portal via Bw only.
And we dont have access other client (X client) BW systems and they are not giving design document also.They are giving only R/3 sytem copy and we are able to see reports in web based portal.Based on Portal reports we identified Characteristics and Keyfigures.And some characteristics and keyfigures we are mapped with R/3 source fields and Source tables.And these are not standard reports and all are custom report.And there is no use of businee content.Based on these information we have to develop reports from scratch mean from starting i.e. identifying KFs and char's and mapping fields with R/3 here I have doubt we are unable to map some fields with R/3 what we have to do?what approach we have to take.How we identify datasource.what extractor method we have to follow.
Please give ur suggestions.What we have to approach -
hii
How i can get the in single table Idoc number with BELNR feild data .
I need get the data like this in single transaction code . can some body help in this ??
Thankshii
I have approximately 10,000 IDOCs .. Its not possible to open individually the and get the field data for IDOCS.
So how i can acheive this in single shot or there is any table ..
Thanks -
File to multiple IDOCs scenario with the same receiver system
Hi guys,
I have to design and implement the following scenario:
I will receive one file with many lines (Records) with data for materials, quantities, operations etc..
Based on the values of some fields of each line, I will have to create an IDOC for each material.
For example:
if operation type = "INSERT", and Labor = 001 then create 3 Idocs of type MBGMCR with movement types=101, 261,311 that have to be posted one after the other to the same receiver system.
else if operation type = "INSERT", and Labor <> 001 then create an Idoc MBGMCR with movement type=311 and plant = 1001.
else if operation type = "Delete", and Labor = 001 the created 3 Idocs MBGMCR with movement type=312, 262 1002 and post them serially to the same receiver system.
else if operation type = "Delete", and Labor <> 001 the created 1 Idoc MBGMCR with movement type=312.
All IDOCS are posted to the same SAP R/3 system. We do not care about the sequence, except for the cases where 3 IDOCS are created.
I am trying to think of a good design in performance terms.
It is obvious that I will need BPM for sure.
I am thinking of creating a mapping program that will produce 4 message types for the different cases from the initial file and then create a different message mapping for each case from the message type to the IDOC.
I am asking you if I have to include everything (mappings) in BPM with a "fork" step?
Or shall I produce only the 4 message types and then post them to R/3 and execute the mappings in R/3?
Best Regards
Evaggeloshi,
>>I am thinking of creating a mapping program that will produce 4 message types for the different cases from the initial file and then create a different message mapping for each case from the message type to the IDOC.
To me this seems to be the right solution.
here u will create different message mappings and write them sequentially in interface determination. the multi mapping will then be utilised in transformation step in BPM.
thus if this is the only requirement there is no need of using a fork step.
[reward if helpful]
regards,
latika. -
IDOC Mapping ; Error CX_XMS_SYSERR_MAPPING
After we transfered an IDoc 1:1, w/o mapping, successfully from one to another SAP system, we added a mapping like follows:
1. created a message mapping per drag&drop from imported objects - IDocs, using a 1:1 mapping (no field changes, just for testing purposes)
2. created an interface mapping using that message mapping.
3. after activating in repository, we added that interface mapping in interface determination in configured inbound-interfaces.
After starting a test data transfer we received the error message
"CX_XMS_SYSERR_MAPPING Programm: CL_XMS_MAIN===================CP, Include CL_XMS_MAIN===================CM00A, line: 535"
And an odd error id with strange crosses in the overview.
Did we forget something? Any hint is welcome.@Sridhar: Thanks for the hint, but unfortunately it did not change anything. Do you think it has something to do with cached information?
@Bill: Yes, we test it in the IB Repository using the mapping tool. The mapping is very simpel each field from the source IDoc is mapped to the same field in the target IDoc.
Maybe the problem ist because of the different SAP releases (we send from an 4.6C to an 4.7) ? -
Automatic (EDI) vendor posting fails - can I update the IDOC mapping?
Hi -- I am testing a new intercompany sales process and having trouble with returns. The INVOIC01 IDOC for the vendor posting (document type VC - Vendor Credit FI) is failing because text is required on the line item (field SGTXT on BSEG). So it appears that the IDOC doesn't have this text field mapped.
If I can identify a field in the existing IDOC to use for the text, is there a way that I can add that mapping? For example, let's say I want to populate the BSEG text with field BELNR on segment E1EDP01, is there a way to specify in the INVOIC01 idoc that this field should be plugged into BSEG-SGTXT? I don't have EDI experience, so this is all new to me!
Thanks
AllisonHi Allison,
Since it's just for testing, just change the Text field on FI field status group become optional entry. It will solve your problem rather than modifying the standard IDOC
Regards,
Gumanti -
Hi all,
i'm getting an error from SXMB_MONI in a scenario File to Idoc.
I have done the mapping from source file and Idoc CREMAS03, when i try to test from Integration Repository it's all ok, but when the scenario is executed i find this error in Idoc Adapter :
<SAP:P1>MSGGUID EF7E2140A08811DDBE1202004C4F4F50: Tag #TEXT found instead of tag IDOC BEGIN=</SAP:P1>
The field BEGIN in idoc structure is filled with constant value 1, than i dont understand the error.
This is the xml source file :
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:Vendor xmlns:ns0="urn:tbit40:workshop:group01:legacy">
- <Address>
<Country>IT</Country>
<Zip>001</Zip>
<City>ROMA</City>
<Street>SATTA</Street>
</Address>
<Currency>USD</Currency>
<SearchTerm>TEST</SearchTerm>
<LastName>GUIDA</LastName>
<VendorNumber>44332</VendorNumber>
</ns0:Vendor>
Any help is really appreciated.
Thanks.Hi all and thanks for your answer.
My problem is that for what i can see all Idoc attribute (like the attribute BEGIN) are mapped with constant value.
In taget source i can see : BEGIN = Constant([value=1])
What i dont understand is why when i execute the scenario it ends with this message :
<SAP:P1>MSGGUID EF7E2140A08811DDBE1202004C4F4F50: Tag #TEXT found instead of tag IDOC BEGIN=</SAP:P1>
It seem to me that the tag BEGIN is not filled with value, i also tried to copy the source xml file directly from SXMB_MONI (from payload) and test it in Integration Repository mapping section, but here is all ok and the test end succesfully.
Maybe you are looking for
-
I have a table of calculated values in Numbers, and I want to disallow negative numbers in the entire table. Any numbers that would be negative I would like changed to/displayed as zeroes, that way future calculations that may be based on this cell u
-
Hi, I need to make a database designer type application. Where there are floating list boxes that can be moved around. Each of the list boxes will represent a tables and you can drag relationships between the list boxes which will create a line map
-
Undocumented error (errornumber 52)
Hello, I am making a SOAP call to InDesign Server. The return message states that an error occurred. It only gives me a number (52). There is no further explanation in the message. This error is also not listed in the errors documentation (SDK -> doc
-
Problem with notebook HP Pavilion dv4 - 2173nr
Good morning, I have a HP Pavilion dv4-2173nr notebook for 4 years, recently he started off alone and try to turn it back the following error message Wireless Module not found (701) appears. What does it mean and what can I do to find the problem? H
-
Parallel loading in DSO but with sequential start
i have three source DSO A,B,C which is getting loaded to target D. i want the three loading A->D,B->D,C->D to happen in parallel but want A->D to start first then B->D and then C->D. Kindly let me know how to do this in process chain.