File to IDOC aggsales mapping doubt Urgnt
Hello,
Im working for a retail client and the requirement is the File to IDOC scenario where Im stuck up in the mapping.
The inbound is a flat file of structure
EDI_DC40
E1WPU01
E1WPU02
E1WPU03
E1WPU04
The target IDOC structure is as follows
WPUUMS01
--IDOC
EDIDC40
E1WPU01
E1WPU02
E1WPU03
E1WPU04
The problem is with the target segment E1WPU03. This E1WPU03 is actually an optional one in the source inbound flatfile.
So the source will be like this
EDI_DC40
E1WPU01
E1WPU02
E1WPU03
E1WPU04
E1WPU02
E1WPU04
E1WPU02
E1WPU03
E1WPU04
So in the target I need to create the 03 segment if and only if it occurs in the source.
I tired these following but didnt work for me.. what happens is The 03 segment which should come in the third 02 segment actually comes int he second one.
any suggestions if this is possible in message mapping or should I go for an xslt
I tried this one.
SourceE1WPU03 >exists> if withoutelse>then "constant'> targetE1WPU03
Thanks
Prasanna
> any suggestions if this is possible in message mapping or should I go for an xslt
No, this is not possible with graphical mapping tool.
You need to have a pre-mapping for this.
I recommend Java mapping with SAX parser.
you can easily change the input structure to:
EDI_DC40
-E1WPU01
--E1WPU02
---E1WPU03
E1WPU04
--E1WPU02
E1WPU04
--E1WPU02
---E1WPU03
E1WPU04
Similar Messages
-
File to IDOC. Mapping doubts...
Hi XI Gurus..
I'm doing a file to IDOC scenario.. I've a filed called Master Number and Sequence number..
First I've to sort the file based on Master number. based on this sorted file I must sort the sequence numbers.
For example:
0011232 01
0011232 00
0011231 01
0011232 01
0011231 00
after first sort
0011232 01
0011232 00
0011232 01
0011231 01
0011231 00
after second sort
0011231 00
0011231 01
0011232 00
0011232 01
0011232 01
Now in mapping I must create one IDOC for every set of Master number. In the IDOC a segment must repeat for every sequence number.. i.e For 0011231 there must 2 sequence segments i.e 00 and 01, and 0011232 also must have 2 sequence segments i.e 00 and 01hi,
please try the following mapping,
for creating the IDOC based on Message Number
message No-->removecontext->sort>spiltbyvalue(for value change)-->collapscontext---->EDIDD(IDOC TAB).
to create the SEGMENT based on the Sequence number please try the following mapping.
Sequence no-->removecontext---->sortbykey(key as messageNo)
>formatbyexample(first queue is message no and second queue is sequence no)---->splitbyvalue(for each value)-->segment(IDOCsegment).
regards,
navneet -
Reg: File to Idoc Hierarchial mapping
Hi Experts,
We have a scenario of flat file to idoc where in we have 4 segments(01 to 04)(with hierarchies) in source file to be mapped to idoc. We have followed Riaz blog http://www.riyaz.net/blog/xipi-convert-flat-file-to-deeply-nested-xml-structures-using-only-graphical-mapping/.on mapping flat file to deeply nested structures .
We have encountered one unique issue in the intermediate level mapping where, when assigning hte id numbers, the instances of one segment are grouped together. This is creating a problem.
Ex: in source str we have nodes in the order
01
02
03
04
02
03
04 and so on..
After the test of intermediate mapping, it shows teh follw sequence:
01
02
02
03
03
04..
The node seq in the target str should have been similar to that of the source.. but here its not so..
if i am using just one instance of 01 till 04 nodes.. the final xml str is created perfect.. Can any please let me know what could be the possible error??
Or please let me know if there is any other simple procedure to finish this.
Thanks in advance, awaiting your reply..
Best Regards,
GiriHi,
Please go through the following links..
http://wiki.sdn.sap.com/wiki/display/XI/SampleJAVAMappingcodeusingPI7.1+API
http://wiki.sdn.sap.com/wiki/display/XI/UsingPI7.1APIforJavamapping
and also,
http://help.sap.com/saphelp_nwpi71/helpdata/en/bd/c91241c738f423e10000000a155106/content.htm
If u get any doubt u can post the problem....
Babu -
File to Idoc : Java Mapping
Hi Experts,
The scenario is file to idoc. In the file i'll be getting name,value pairs. For ex:
Structure is
MT
....Root(1..unbounded)
............Name
............Value
File contains:
Vishal....1
Raj.........2
RFC......10
Rahul.....20
Azhar....15 and so on..
I need to loop through the file. When Name="RFC", I need to make an RFC call with Value as it's input. RFC returns 4 values which will be used for mapping.
Then I need to continue looping through the file. On encountering a particular Name, I need to map corresponding Value to target field.
For this, I should have 2 mappings. One to read the file and the other for mapping. I've never used RFC and Java mapping, Can someone provide me a link or a solution for this?
Thanks,
VishalHi,
You can do this using a UDF.
first let the source message contain first line and last line which you want to eliminate.
change the context of the Value to MT ..
start a for loop in UDF ignoring first & last line like
for(int i = 1; i< input.length() - 1; i++) // here i = 1 & not zero & input length is -1 so that first & last field eliminates
//carry on string operation to separate name & value on delimeter space
String name = input<i>.subString(0,.... to the indexOf space);
//similar for value also....
now you have name & value
check for name == 0052
if(name == 0052)
perform rfc lookup
else -
ATTRIBUTE_IDOC_METADEATA Error: File to IDOC Java Mapping
I have done a Java Mapping from File to Idoc and I get the following error in sxmb_moni:
<SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
<SAP:Category>XIAdapter</SAP:Category>
<SAP:Code area="IDOC_ADAPTER">ATTRIBUTE_IDOC_METADATA</SAP:Code>
<SAP:P1>I::000</SAP:P1>
<SAP:P2 />
<SAP:P3 />
<SAP:P4 />
<SAP:AdditionalText />
<SAP:ApplicationFaultMessage namespace="" />
<SAP:Stack>Fehler: I::000</SAP:Stack>
<SAP:Retry>M</SAP:Retry>
</SAP:Error>
The Idoc structure that I generate in my mapping makes no fullfil of the IDOC tags.
For example:
<IDOC BEGIN="1">
<EDI_DC40 SEGMENT="1">
<TABNAM/>
<MANDT/>
<DOCNUM/>
<DOCREL/>
<STATUS/>
<DIRECT/>
<OUTMOD/>
<EXPRSS/>
<TEST/>
<IDCOTYP/>
<CIMTYP/>
<MESTYP/>
<MESCOD/>
<MESFCT/>
<STD/>
<STDVRS/>
<STDMES/>
<SNDPOR/>
<SNDPRT/>
<SNDPFC/>
<SNDPRN/>
<SNDSAD/>
<SNDLAD/>
<RCVPOR/>
<RCVPRT/>
<RCVPFC/>
<RCVPRN/>
<RCVSAD/>
<RCVLAD/>
<CREDAT/>
<CRETIM/>
<REFINT/>
<REFGRP/>
<REFMES/>
<ARCKEY/>
<SERIAL/>
</EDI_DC40>
Should I complete these values in my mapping program?
Which values should I complete?
Thank You.Antonio,
you can ignore whole EDIDC Segement make disabled in our mapping still it works . but the problem is not with this is our meta data chekc in IDX2 t/c code of XI box.
it has some problem the strcuture you generate and R/3 accepts are not same their is mismatch in structure
Regards
Sreeram.G.Reddy
Message was edited by:
Sreeram Reddy -
File to IDOC: mesage mapping
Hi!
I am implementing File to Idoc scenario.
I use in file a element "createdate". The same one does exist on Idoc side and hase type "xsd:string".
Which type should have the element in data type?
a) xsd:string
b) xsd: date
c) it does no matter
Thank you!Hi!
Thank you!
Could you please explain why the option within message mapping "map the same structure..." is inactive in my case?
Is that a bug?
I am on SAP NetWeaver 7.0 SP 14 .
Thank you! -
File to idoc HRMD_A06 mapping
Hi,
My scnerio is to map file with an idoc. In my file I hav infotype 14 records. With following file structure.
mesgtype
item
pernr
begda
endda
lgart
betrg
I have taken this simple infotype instead of taking complex one's like actions. once I am through with this thn I will consider other infotypes.
Idoc which I am using is very complicated HRMD_A06. There are many mandatory fieldin the idoc.
Now during mapping I have mapped the above fields of file withe corressponding fields of idoc.
And for For the E1PLOG E1PORIG E1PITYP segments I have provided following data :
Plan Version ( 01 )
Object Type (P- Person),
Object ID (mapped with PERNR ),
Operation (I - Insert Mode)
But when I test the mapping I get the following error:
:39:56 Start of test Mapping object MM_FILE2IDOC incomplete. Unable to continue execution
Structure with min!=max without mapping
16:39:56 End of test
Kindly assist me with this scneario, if possible provide me the proper mapping details.
Regards,
LokeshHi,
TABNAM, DIRECT, IDOCTYPE,CIMTYPE, MESTYPE, SNDPRT,SNDPOR, SNDPRN, RCVPRT,RCVPRN,RCVPOR are all mandatory fields.
Map them with constants according to their type.
Thanks,
Sonalisa -
My sender File structure is like this..
MT_Sender
-Recordset 0 to Unbound
--Header 1 to 1
---field1
---field2
---fieldx
--GL_Account 0 to Unbound
---field1
---field2
---fieldx
---Cust_Item 0 to Unbound
field1
field2
fieldx
Curr_Item 0 to Unbound
field1
field2
fieldx
and I am mapping it to Idoc segments..
Here my confusion is for Header segment in Idoc I am mapping Header in my structure ..but it is giving mapping conversion error.
I tried node to node and Recordset to node both are giving error.
Can any one clear it NODE level mapping to IDOC structute.
ACC_document
IDOC
Begin
NODE1
NODE2
NODE3
NODEx
Regards,
Ramesh...Any inputs on it
This info from sxmb_moni
com.sap.aii.utilxi.misc.api.BaseRuntimeException: RuntimeException in Message-Mapping transformation: Cannot produce target element /ACC_DOCUMENT03/IDOC. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd at
com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:406) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:142) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMapp.....
SXMB_MONI payload is
<?xml version="1.0" encoding="utf-8" ?>
- <ns:MT_FI_SENDER xmlns:ns="Http://xyz.com">
- <ns:Recordset xmlns:ns="Http://xyz.com">
- <Header>
<USERNAME>OBTE-MM</USERNAME>
<COMP_CODE>2000</COMP_CODE>
<DOC_DATE>20091015</DOC_DATE>
<PSTNG_DATE>20091015</PSTNG_DATE>
<DOC_TYPE>DR</DOC_TYPE>
<REF_DOC_NO_LONG>7578</REF_DOC_NO_LONG>
</Header>
- <GL_account_item>
<ITEMNO_ACC>0000000001</ITEMNO_ACC>
<GL_ACCOUNT>0003101110</GL_ACCOUNT>
<ACCT_TYPE>S</ACCT_TYPE>
<DOC_TYPE>DR</DOC_TYPE>
<COMP_CODE>2000</COMP_CODE>
<FISC_YEAR>2009</FISC_YEAR>
<PROFIT_CTR>0000002002</PROFIT_CTR>
<DE_CRE_IND>H</DE_CRE_IND>
</GL_account_item>
- <Customer_Item>
<ITEMNO_ACC>0000000002</ITEMNO_ACC>
<CUSTOMER>0000000092</CUSTOMER>
<COMP_CODE>2000</COMP_CODE>
</Customer_Item>
- <GL_Currency_Items>
<ITEMNO_ACC>0000000001</ITEMNO_ACC>
<CURR_TYPE>00</CURR_TYPE>
<CURRENCY>INR</CURRENCY>
<AMT_DOCCUR>6000</AMT_DOCCUR>
</GL_Currency_Items>
</ns:Recordset>
</ns:MT_FI_SENDER>
Regards,
Ramesh.
Edited by: Sreeramoju Ramesh on Oct 15, 2009 1:28 PM -
Flat file to idoc MATMAS05 - mapping
Hi,
I want to create 2 Idocs from one recordset.
Can any one tell me how do I map this Recordset to an Idoc?
Example source and target IDOC structures:
Source:-
<Recordset>
<SA010>
<IDENTS>1234</IDENTS>
<BEZ>Dummytxt</BEZ>
</SA010>
<SA088>
<IDENTS>1234</IDENTS>
<MARC1>010</ MARC1>
<MARC2>020</MARC2>
</SA088>
</Recordset>
Target:-
<MATMAS05>
<IDOC BEGIN="1">
<E1MARAM SEGMENT="1">
<MATNR>1234</MATNR>
<E1MARCM SEGMENT="2">
<WERKS>010</WERKS>
</E1MARCM>
</E1MARAM>
</IDOC>
</MATMAS05>
<MATMAS05>
<IDOC BEGIN="1">
<E1MARAM SEGMENT="1">
<MATNR>1234</MATNR>
<E1MARCM SEGMENT="2">
<WERKS>020</WERKS>
</E1MARCM>
</E1MARAM>
</IDOC>
</MATMAS05>
Thanks and Regards,
ErenHello Varun,
My flat structure:
<Recordset>
<b><SA010></b>
<i><IDENTS>1234</IDENTS>
<BEZ>Dummytxt</BEZ></i>
<b></SA010></b>
<b><SA088></b>
<IDENTS>1234</IDENTS>
<i><MARC1>010<>
<MARC2>020</MARC2></i>
<b></SA088></b>
</Recordset>
The MATNR field is <IDENTS>. I can pick the value from node <SA010> or <SA088>.
Thanks -
Doubt in fields - message mapping (file 2 idoc scenario)
while doing message mapping in file 2 idoc scenario, i could not able find the values for some field names
( i am following this wiki help
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/2007/05/11/fileToIDOC& )
cremas04 idoc
vendorNo LIFNR
vendor name Name1
Pur_org ? ( I could not able locate field with the similar desc in idoc MT side)
Company code ?
Acc_Grp ?
Search term MCOD1
Address ADRNR
City ORT01
Pin_code PSLTZ
could you help me out with this?
Message was edited by: praba
prabahi,
I got the answer. -
File to IDOC Senario (Message Mapping)
Hi Experts,
I am a fresher.
This is " File to IDOC Senario ".
I have Doubt on this: ( In Message Mapping)
Source field : MSG
Length : 1/264
Taget field : E1EDKT2 - TDLINE
Legth : CHAR/70
Mapping Condition :
Note: TDFORMAT = ‘=’ (Long Line), until next line of MSG. When new line occurs in MSG, then use TDFORMAT = ‘/’
How to Make the Mapping for this?
Anyone Can help me to get it Quickly.
give your Suggestions and Show some Example Mappings......Hi ,
Below is the generic sol for your problem .Graphical mappings wont workout for your problem while using sub string .
Input -->Input string
Length -->length of TDLINE
MESSAGE_V1,V2,V3,V4....depends on how many TDLINES you expect .Here I have taken 4 .
public void SplitbyLength(String[] Input, String[] Length, ResultList MESSAGE_V1, ResultList MESSAGE_V2, ResultList MESSAGE_V3, ResultList MESSAGE_V4, Container container) throws StreamTransformationException{
int lengthVal = Integer.parseInt(Length[0]);
int InpLenVal ;
for(int i=0;i<Input.length;i++)
InpLenVal =Input[i].length() ;
if (InpLenVal<=lengthVal)
MESSAGE_V1.addValue(Input[i].substring(0));
MESSAGE_V2.addValue(ResultList.SUPPRESS);
MESSAGE_V3.addValue(ResultList.SUPPRESS);
MESSAGE_V4.addValue(ResultList.SUPPRESS);
else if ((InpLenVal>lengthVal) && (InpLenVal <= (lengthVal*2)))
MESSAGE_V1.addValue(Input[i].substring(0,lengthVal));
MESSAGE_V2.addValue(Input[i].substring(lengthVal,InpLenVal));
MESSAGE_V3.addValue(ResultList.SUPPRESS);
MESSAGE_V4.addValue(ResultList.SUPPRESS);
else if ((InpLenVal>(lengthVal*2)) && (InpLenVal <= (lengthVal*3)))
MESSAGE_V1.addValue(Input[i].substring(0,lengthVal));
MESSAGE_V2.addValue(Input[i].substring(lengthVal,(lengthVal*2)));
MESSAGE_V3.addValue(Input[i].substring((lengthVal*2),InpLenVal));
MESSAGE_V4.addValue(ResultList.SUPPRESS);
else if (Input[i].length()>(lengthVal*3) && (InpLenVal <= (lengthVal*4)))
MESSAGE_V1.addValue(Input[i].substring(0,lengthVal));
MESSAGE_V2.addValue(Input[i].substring(lengthVal,(lengthVal*2)));
MESSAGE_V3.addValue(Input[i].substring((lengthVal*2),(lengthVal*3)));
MESSAGE_V4.addValue(Input[i].substring((lengthVal*3),InpLenVal));
else if (Input[i].length()>(lengthVal*4) )
MESSAGE_V1.addValue(Input[i].substring(0,lengthVal));
MESSAGE_V2.addValue(Input[i].substring(lengthVal,(lengthVal*2)));
MESSAGE_V3.addValue(Input[i].substring((lengthVal*2),(lengthVal*3)));
MESSAGE_V4.addValue(Input[i].substring((lengthVal*3),(lengthVal*4)));
Regards
Venkat -
Doubt on server proxy and file to idoc scenario
Hi,
I could able to solve most of my doubts from this forum, many regards to all who assisted me.Here are some simple doubts plz help me in solving them.
1.In FILE to PROXY scenario is it necessary to create rfc destination on IS and receiver system? becoz in some blogs it is written to create RFC dest only in case of CLIENT PROXY,since we XI adapter to connect receiver syst in case of server proxy?
2.In FILE to IDOC scen at receiver side is it necessary to formalities in SM59,WE21,WE20 or just configure in WE20 to maintain partner profile?
3. In case of single SLD for DEV,CON,PROD while transferring from DEV TO CON using file system how do we move file in EXPORT DIRECTORY TO IMPORT DIRECTORY of cons system?
4.for transporting IR objects we can use TRANSPORT LIST or CHANGE LIST which will be more preferable?
Plz kindly answer to any of questions u know ?
Points will be rewarded for valuable answers.
Regards,
Smitha.> 1.In FILE to PROXY scenario is it necessary
> to create rfc destination on IS and receiver system?
> becoz in some blogs it is written to create RFC dest
> only in case of CLIENT PROXY,since we XI adapter to
> connect receiver syst in case of server proxy?
You need to maintain the setting on your R3 system to connect to XI for the Transaction SPROXY as shown in the blog "How to Activate ABAP Proxies".
Apart from that as you are doing a file to proxy via XI, XI would need to send data to the R3 system . For this, you can either key in the Details of the R3 system in the XI adapter directly or you can maintain a HTTP destination on your XI in SM59 and use this in the XI adaper.
> 2.In FILE to IDOC scen at receiver side is
> it necessary to formalities in SM59,WE21,WE20 or
> just configure in WE20 to maintain partner profile?
Just the partner porfile. SM 59 and We 21 are used for port and RFC destination and as it is XI that is posting the Idoc these steps are not needed on R3
> 3. In case of single SLD for DEV,CON,PROD
> while transferring from DEV TO CON using file system
> how do we move file in EXPORT DIRECTORY TO IMPORT
> DIRECTORY of cons system?
You have to go to the Folder Level / OS level of your XI server, copy the files from the Export DIrectory and move these manually to the import folder of the CONS server. This is for both IR and ID objects.
> 4.for transporting IR objects we can use
> TRANSPORT LIST or CHANGE LIST which will be more
> preferable?
If you perfrom File Transport, the imported objects will be available under the Import Change List and you need to activate this Import Change List.
Regards
Bhavesh -
Pass through scenario in SAP PI with no mapping for File to IDoc and Idoc to file scenarios
Hi Experts,
Can i have step by step process in SAP PI for pass through scenario with no mapping in case of file to Idoc and Idoc to file both cases please.
What objects i can skip.
My PI system is 7.3 dual stack.
I have seen below blogs, still its confusing to me.
When and how to create an scenario in SAP PI without mapping objects.
Pass Through Scenario with no Mapping in PI 7.1
Appreciate your help on this.
Regards,
Mohan.Hi Mohan
In pass thru interface you don't need to create any ESR objects, only ID objects are required.
Just Create a Receiver Determination and Receiver Agreement for your scenario (no need for Interface Det. and Sender Agreement).
Specify the IDOC in the Sender Interface and namespace as urn:sap-com:document:sap:idoc:messages
Or instead of creating objects manually, Run the wizard with Idoc name/namespace in sender/receiver interface
Regards
Osman -
Mapping of Control records in file to idoc scenario
Hi,
In the mapping part of file to idoc scenario is it necessary to provide the exact control record details
or will it pick what ever is mentioned ? Can any one please explain regarding the same?
Many Thanks,
Sharathhi,
in case of apply control records from payload
It is indeed very simple to do it and the feature is available from SP10. I have seen lot of posts on the forum for the same and that is the reason for this blog. We can manipulate the control record in the mapping editor and map the EDI_DC40 segment of Idoc as required. Most of the times we need to map only SNDPRN, RCVPRN, SNDPRT, RCVPRT for posting Idocs with appropriate partner profiles in SAP R/3 destination systems. We can disable the rest of the fields as shown below. We need to manually change the control record of idoc for populating partner profiles in the control records while dealing with non-sap sender system, which will be used by receiver SAP system for posting idocs with appropriate ALE configurations.
check this blog
/people/sravya.talanki2/blog/2005/12/02/manipulating-idoc-control-records-from-payload
regards
chandra -
Hi,
I am mapping a flat file to idoc in xi. If I execute the test data it works fine. But in actual run, it gave me the following mapping error:
com.sap.aii.utilxi.misc.api.BaseRuntimeException thrown during application mapping com/sap/xi/tf/_MM_MT_APPayment_to_FIDCCP02_: Runt
imeException in Message-Mapping transformatio~
Exception of class CX_XMS_SYSERR_MAPPING
Is it due to some mapping error or some basis config issue?
Thanks,
JassiHi Jassi,
This may be a mapping issue, try this:
a)in interface mapping see if grids are formed at source and target after executing the test option,
b)also take the xml of the idoc from sxmb_moni , copy it and paste it at the source of the mapping ( use the src tab now) and execute the mapping, is your file structute formed?
Check the following link:
/people/michal.krawczyk2/blog/2005/09/16/xi-how-to-test-your-mapping-in-real-life-scenarios
Amaresh
Maybe you are looking for
-
Dump in the transaction J2I6 in ECC 6.0
Dear all, I am getting a dump in the transaction J2I6 when i select the radiobutton RG23D and then give the excise group,start date and enddate.When I select the radiobutton Excel Format ,it throws a dump as follows:- Packed field contains incorrect
-
Users created in CUA does not distribute to child systems
Hi I searched this forum and after pulling my hair for 2 days I am asking this question. I created a user in CUA and gave him child system access with the necessary roles. I was under the impression that the user will get replicated / distributed aut
-
I upgraded to iPhone 5 but when I back up the Cloud (both wifi and plug-in), changes to my notes, contacts, etc., that I've made on my iPhone are not updating in the Cloud
-
Client Agent behaviour after device deletion
Hi experts, quick question on client behaviour: I've installed a client successfully and the client has registered as active in ConfigMgr (2012 SP1 CU2). Now someone went ahead and deleted the device from ConfigMgr. On the client, I can still retriev
-
Address already in use: connect
Dear all,I've got always this following exception, if I get three times the method getDimensionTree. This method simply reads one dimension tree in Essbaseand constructs a DataTreeModel (like JTree) with the member names.The source is like a sample c