IDOC to Flat DT mapping
I have an IDOC with segment that repeats 0..99 and I need the first and second set of data from one IDOC to map to two seperate fields in my inbound MT. Is there a function for this?
Thanks
Skip Ford
You can try to use Index function.
It will give you the Index of the Node of IDOC.
If it is = 1 then map it to first node of your Target DT.
If it is = 2 then map it to second node of your Target DT.
Hope this helps you.
Thanks,
Hetal
Similar Messages
-
Idoc to flat file mapping using XSLT
Hi,
i am using XSLT mapping. my requirement is mapping between idoc and flat file(xml to text). as i do not want to use FCC, i have opted for xslt mapping. please let me know any article which would be helpful for this.
regards,
MeenakshiHi Meenakshi,
Two things:
1. Achieving this functionality using XSLT is very difficult.
2. Secondly you may not be able to find a direct document to convert IDoc-XML to flat file using XSLT in sdn. Try google.
I found one link like that may be you can get some idea from there
http://www.stylusstudio.com/SSDN/default.asp?action=9&read=6453&fid=48
Also if you have a XSLT editor like XMLSPY or stylus studio then creating your specific XSLT will b much more simpler
Regards
Suraj -
ORDERS05 IDOC to flat file - mapping question
I have a requirement to convert an ORDERS05 IDOC to a "flat" structure for one of our vendors.
When the IDOC has the following data, the mapping works well
Input
=====
ORDERS05
- E1EDP01
POSEX 00010
- E1EDPT1
-E1EDPT2
TDLINE line 1 text
- E1EDP01
POSEX 00020
- E1EDPT1
-E1EDPT2
TDLINE line 2 text
Output
======
GWC
- GWC08-RECORD
GWC08-SEQNO 0010
GWC08-TXT line 1 text
- GWC08-RECORD
GWC08-SEQNO 0020
GWC08-TXT line 2 text
However when the IDOC has the following data
ORDERS05
- E1EDP01
POSEX 00010
- E1EDP01
POSEX 00020
- E1EDPT1
-E1EDPT2
TDLINE line 2 text
the mapping yields wrong results as below
GWC
- GWC08-RECORD
GWC08-SEQNO 0010
GWC08-TXT line 2 text
The vendor has a requirement that the GWC08-RECORD should only be sent if TDLINE exists in the IDOC - so that part works. However, Text on Line 2 is being associated with Line 1.
If I am not mistaken, this has to do with the Input queues for POSEX and that for TDLINE having differing number of entries. However, I have no idea how to go about fixing this
Appreciate any help on this
thanks
anilHi,
This is possible without UDF:
Please see mapping below:
For the node GWC08-RECORD
TDLINE --> removeContext --> GWC08-RECORD
For the node GWC08-SEQNO
TDLINE (set context to E1EDP01) --> exists --> ifWithoutElse --> removeContext --> SplitByValue:EachValue --> GWC08-SEQNO
POSEX ------------------------------------------>/
For the node GWC08-TXT
TDLINE (set context to E1EDP01) --> exists --> ifWithoutElse --> removeContext --> SplitByValue:EachValue --> GWC08-SEQNO
TDLINE (set context to E1EDP01)----------------->/
Hope this helps,
Regards -
IDoc to Flat file scenario - abap mapping
Hi All,
I have to do some IDOC to Flat file scenarios. In Order to generate the file in required format I will have to add all segments(Nodes) of Idoc in FCC receiver. We also have other option of doing it through ABAP Mapping which I found in one blog.
Now my question is : Is it better way of doing it through FCC or ABAP Mapping?
Ofcourse from development point of view ABAP Mapping looks easier as FCC is very time consuming task.
Is there and performance issues in either of the approach?
Thanks and Regards,
AtulHi VJ and Harald,
Thanks for your replies.
I am not having PI7.1 however the given blog was very informative.
I will try using file port approach as suggested.
Thanks and Regards,
Atul -
Doubts in SAP(Idoc)-XI-Flat file scenario
Dear All,
I am sending Delivery Idoc from R/3 and I am able to view the Idoc in XI in transaction IDX5. Also i m able to see the XML structure with the data of the idoc in SXMB_MONI.
Now as per my scenario I have to download this to a flat file from XI.
My question is, should I have to do the creation of Data types, message types, mapping interface & interface mapping in IR or should I directly do the designing in the ID.
waiting for your reply.
Warm regards,
N.JainHi,
DT, MT, MI : you will create these things for receiver flat file only.
First create
In Integration Repository :
1. Import structure of IDOC in your scenario, In imported objects  IDOCs
a. In Interface Objects
1. Create Data type for your flat file
2. Create Message Type
3. Create Message Interface (inbound Asy.)
b. In Mapping Objects
1. Message Mapping : IDOC to Message Type of Flat File.
2. Create Interface Mapping : IDOC to Flat file by using Message Mapping which you have created.
Make activate all these things.
In Integration Directory :
1. Create Communication channel for File Receiver.
2. Sender Communication channel is not required.
3. Create Receiver Agreement.
4. Sender Agreement is not required.
5. Interface Determination
6. Receiver Determination
At sender side you will take your IDoc and at receiver side you will take your flat file.
It can help you,
Regards,
Sandeep Kaushik -
R/3 46C(IDOC) -- XI -- Flat file scenario
Hi
Is there anyone who could give me information on a R/3 46C(IDOC) --> XI --> Flat file scenario?
Many thanks!
br
GöranHi Manish
We are using a standard IDOC called PROACT.PROACT01
(We are using transaction sa38(Report RSMIPROACT) in R/3 to send our IDOC.)
First we create the technical and business systems in SLD
Second we transfer these to the repository.(I think the only thing you need to do is to update the SLD cache to get them there - Design : Integration builder --> Environment --> clear SLD cache)
Then we just use the configuration wizard(Configuration : Integration builder --> Tools --> configuration wizard) to map everything together - defining sender and receiver etc(You get the configuration wizard tool by patching XI to patch level 4 or 5).
I assume that you have made all the configurations accordingly to the XI configuration guide which you can download from the service marketplace.
This is just a hint but maybe it can give you a start.
br
Göran -
Idoc to flat file using Integration process does not show up at all
Hello All,
I created a scenario IDOC to Flat File using Integration Process and one without IntegrationProcess. I am able to execute the one without Integration Process easily.
However when I send the IDOC from SAP then the Integration Process scenario just does not work.
I Checked SXMB_MONI There is no entry for the Integration Process.I can see entry for other without Integration Process.
SXI_CACHE : I can see my Integration Process active
SWEQADM : I have activated the Event Queue and Background job
SWF_XI_ADM_BPE : ALL BPE is showing green status.
All syntax check on IP are fine.
There is no Basis Help for me so there could be some additional basis steps which need to be configured. Has anyone faced such an issue with Integration Process?
Regards
PrashantaHope this might help you. when u configure an IDoc as Sender with BPM this is how you proceed.
<b>1<b>. let us split the scenario into two</b>.</b>
a. <b>Sender to BPM</b> ( Integration Process).
b. <b>BPM to Receiver</b>.
<b>2. First let us configure the first Sender to BPM.</b>
a. Sender Agreement( <b>Not required</b> ).
b. Receiver Agreement( <b>NOT Required</b>).
c. Receiver Determination( Sender Service, Outbound Interface, Receiver Service(<b>Integration Process</b>).
d. Interface Determination( Inbound Interface(Sender Abstract Interface), Message Mapping(NOT Required if your using transformation stepin Integration Process)).
<b>3. Now let us configure the Second BPM to Receiver.</b>
a. Sender Agreement( <b>NOT Required</b>)
b. Receiver Agreement( Sender Service(<b>Integration process</b>), Receiver Abstarct Interface,Receiver service, Inbound Interface).
c. Receiver Determination( Sender Service(Integration Process), Receiver Abstarct Interface,Receiver Service).
d. Interface Determination( Inbound Interface, Message Mapping(<b>NOT Required</b>)).
So Finally we have <b>One Receiver Agreement</b>, <b>Two Receiver Determinations</b>, <b>Two Interface Determinations</b>.
Please let me know if you have any more queries.
Regards
Gopi -
IDOC to flat file and vice versa
Dear community,
we should send IDOCs to flat files and read plain files and map them to IDOCs.
Is there any comfortable way to do this without doing a huge content conversion for
IDOCs? Exist a SAP standard for such process?
We receive the IDOC as normal IDOC. Would it be more easy to save the IDOCs
directly as flat file on ERP file system??
System PI 7.11
IDOCS: WHSCON, WHSORD and WMMBXY
Regards
Chris
Edited by: Christian Riekenberg on Feb 1, 2012 2:41 PMHey folks!
We have a PI 7.31 SPS5 Java-only installation here and are using the module IDOCFlatToXmlConvertor. For single IDocs with one line for the EDC_DC40 header and the others for the IDoc payload the conversion works. But when we want to process multiple IDocs from the same type within one file, we see this error in the log:
Module Exception 'com.sap.aii.af.idoc.exception.IDOCModuleException: No data segments for DOCNUM = ' found, cause: <null>
Are there any requirements how the multiple IDocs have to be structured within the file?
Best regards
Heinrich
Update:
I found out that the module wants each record to contain the corresponding DOCNUM to find the matching records. The non-SAP sender system normally does not set this value. Is there a way to "convince" the module to convert the IDocs nevertheless? -
Conversion of multiple xml idocs to flat file
Hi,
I did ABAP mapping to convert xml idoc to flat file by using the reference how to do abap mapping in xi3.0.pdf
It is working for only one idoc at a time.
If I have multiple idocs in a single xml file, the above code is not working.
Please let me know what cchange to be done to work out for this.
Hope am clear.
Regards,
Anil.Look For the Occurances of target Field node...It should be 1 to unbounded
-
IDOC to Flat file and Flat file to IDOC
Hello Experts,
I have the following requirement in my current project:
Third Party Sender sends the data in the in the below XML format via HTTP:
<?xml version="1.0"?>
<fxEnvelope>
<header>
<message>
<exchangeID></exchangeID>
<messageID></messageID>
<subject></subject>
<payloadType>IDOC</payloadType>
</message>
<from>
<orgID></orgID>
<locationID></locationID>
<messageID></messageID>
</from>
<to>
<orgID></orgID>
<locationID></locationID>
</to>
</header>
<body>
<Opaque>
<DataType></DataType>
<DataStream></DataStream>
</Opaque>
</body>
</fxEnvelope>
In the above XML, the Tag <DataStream> is a string which contains the IDOC flat file.
Now, the scenario is HTTP to IDOC, where the sender sends the above XML payload and PI needs to convert <DataStream> to IDOC XML and pass it on to the receiver R/3.
But the challange i am facing is converting this <DataStream> tag which contains the IDOC flat file to IDOC XML using a Mapping program.Since both adapters are running on ABAP stack i can not go for Adapter Modules available(We are using PI 7.10).
Looking for some guidance on the same.
Thanks in advance.
Cheers,
Manasa.There are 2 options for you
In either case, you might need a java mapping to convert the DataStream into String. Use a file adpater to write this string to IDOC-File.
1) Option1: Write the content of DataStream into IDOC-Flatfile.(java mapping) Pick it from PI to convert IDOC-flat file inot IDOC-XML (using std features of PI) & send it to ECC.
2) Option2: Write the Content of DataStream to IDOC-Flatfile (accessible to ECC system). Configure WE21 to pick the file from a file port.
If the datastream was IDOC-XML, then it would have been simpler, it will be a direct communcation from PI to ECC (using java mapping & IDOC adapter).
Regards,
Siva Maranani -
How to convert iDocs in flat format to Xml
Hi,
I'm getting iDocs in my .NET application using the SAP .NET Connector.
But SAP Connector I receive the iDocs in flat format that is very difficult to read, it would be much easier if I had them in xml format. Do you know an easy way for transforming them to Xml or diretly receive them in Xml format?
I'm a C# developer, so the best solution for me would be to have a small sample showing how to do it.
I have seen some documents about the IDoc Adapter, how can it be used? Should it be used together with the SAP .NET Connector or it is a separate way of working?
Maybe my questions are very basic but I come from the SAP Business One word that is completely different from the ERP world.
Thanks in advance
Trinidad.Hello,
SAP Provides a standard report / program that converts the idoc flatfile into Idoc XML.
The report is : rseinb00
Just make sure that the Idoc Flat file is formatted in the right way,
1. Linefeed after every segment,
2. Idoc Control Record matches the logical system name of the business system defined in XI.
3. Port in the idoc control record exists.
If this is going to be a end to end interface flow, using this in a ABAP Mapping and then feeding this as the input to your graphical mapping might be a solution.
Regards,
Bhavesh -
Creating JCo IDoc from flat file structure
Hi,
I need to send an IDoc into SAP using JCo.
The input to my program is a string containing lines representing a flat file idoc, e.g.
Line 1="EDI_DC40 2 ORDERS04.."
Line 2="E1EDK01 00000100000001 USD..."
Line 3="E1EDK14 0000030000000...."
Is there a simple way to use JCo to create & send the IDoc?
i.e.
1) If I use JCo and RFC IDOC_INBOUND_ASYNCHRONOUS, what would be all the steps/calls to SAP (create TID, call IDOC_INBOUND_ASYNCHRONOUS, confirm TID..?)
And can IDOC_INBOUND_ASYNCHRONOUS be called using the flat file structures (without having to map to all the JCo ParameterList fields)? Since the flat file structures are in the format required by the RFC, just in one long string.
Line 1=>IDOC_CONTROL_REC_40
Lines 2..n=>IDOC_DATA_REC_40
2) Similarly, if I were to use JCo plus the JCO IDoc library, is there a way to pass the flat file structures without having to do all the mapping to segment fields?
3) Other options..?
I want to use ALE to SAP, not files, even though the input is in the flat file structure.Your reply gives a link to the general JCo documentation.
It doesn't give ideas on how to call an RFC or IDoc from JCO without mapping each and every field from a flat file structure.
I'm looking for a way to do something like this:
Function IDOC_INBOUND_ASYNCHRONOUS has table parameters
IDOC_CONTROL_REC_40 STRUCTURE EDI_DC40
IDOC_DATA_REC_40 STRUCTURE EDI_DD40
Since I have the flat file representation of the IDoc, the first line should overlay exactly onto the EDI_DC40 structure. And the subsequent lines should overlay onto EDI_DD40. (all fields in this RFC are strings)
However JCO and JCO IDoc library seem very strongly typed, so it looks like I would have to map each field from the flat file structure to a field in the JCO Function or JCO IDoc object.
This could be done in a generic way using the function/idoc metadata, however there would still be some overhead.
Is there a way to get round this, and build the function/idoc treating its parameters as one long string? -
How to convert IDOC to flat file in XI
Hello SDNers
I have a scenario IDOC --> XI --> Flat file. My question is how to conver IDOC to flat file. At least there are two ways to do that:
1) Define a flat structure in PI that reflects the IDOC structure, then using content conversion to convert the flat structure to flat file in hte receiver communication channel.
2) There is a [document |https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/46759682-0401-0010-1791-bd1972bc0b8a] talking about using a generic ABAP mapping to map any IDOC to flat file.
For the option 1, I don't want that way, because I would need to define a flat structure in PI for each IDOC which is too much effort. (I would have dozens of IDOC scenarios)
The second one is very attractive. However the document is not complete to follow. Basically it does not explain how the inbound flat structure looks like. I guess the generic ABAP mapping is used to map any IDOC_XML structure to a flat structure, then in the file receiver communication channel to convert the flat structure to flat file format. But the document does not mention how the flat structure looks like. Has somebody tried this scenario? If yes, can you please let me know the steps to do in ESR (IR) and ID? Basically what structure the IDOC_XML should be mapped to using the generic ABAP mapping class?
Or somebody has other ideas on how to convert IDOC to flat file?
Thank you so much
Eric> 1) You are saying that for Java mapping and abap mapping, the target data type (messag type) is just a dummy one, the real (XML) message the receiver will recieve is the one (stream) produced by the java or abap mapping. Is that correct?
Definitely yes!
>
> 2) For the abap mapping option, I would define a dummy target data type. Do I need to do any content conversion in the receiver adapter (communication channel)?
None wat so ever.The output of your Java Mapping will be the Native Idoc Format.
>
> 3) I tried with a dummy target data type as mentioned in my second post, can you see any clue in the error message what is wrong?
Dats one thing I cant help much. Just make sure that the ABAP report is valid and take the help of a ABAP'er to debug what is going wrong. Not much of a ABAP guy, can read ABAP code, but cant write one myself
Try to test the program standalone to see how it works. Maybe take some Idoc XML file as input and then dump the output to a .txt file and so on.
Regards
Bhavesh
PS : All this is from what I have read of this guide. I have not convert Idoc XML to Native Idoc but have used this guide to convert Native Idoc to Idoc XML . -
Data Extraction or IDOC to flat file
hi,
I have a project to create a flat file from SAP, for an external legacy system. There are 3 requirement.
What approach should I take. Simple data extraction OR Idoc to flat file.
There are 4 requirements:
1. first time extract all data.
2. on subsequent run, extract only changed & new records
3. if in SAP table, a record is deleted, then marked deleted in flat file.
What approach should I take if I use data extraction.
Thanks.I read your question, my first thought would be to look at where the data is going?
What are the data requirements of the legacy system. IDOCs can speed up the development related to pushing the data out from SAP. Using ALE and change pointers you can automatically pass out the delta with a limited amount of development.
However, the receiving system then needs to parse the IDOC data. depending on the IDOC you are working with this can be a challenge especially if the legacy developer doesn't get IDOCs.
Sometimes its easier to collect and write the data from SAP using "simple data extraction". The data is more readily organized into a format the receiving system is expecting.
You can also pass the idoc to a middleware maping application if one is available and do the SAP to legacy mapping there.
Cheers -
How To Convert IDOC to FLAT File ?
Dear Expert,
My requirement is to convert the IDOC to FLAT File using XI. How can i do this. I have gone thru the Guide How to convert IDOC to Flat file using ABAP mapping but it does not talk about what are all the stpes i need to do in IR & ID.
I am ready to use ABAP mapping since i am an ABAPER.
Is it recommended to use ABAP mapping since we expect daily 500 IDOCs to be converted to a flat file & transfer this flat file to some FTP location.
Can anybody tell me the stpes how to do this in XI. The steps i am expecting like how to define the Data Type / Message type / Mapping etc & how to configure the channel ?
The Flat file i want to convert should look like the way IDOC file gets created in FILE FTP port in SAP.
Regards,
UmeshI think there is some confusion... Let me explian my problem once again.
I want to convert the Shipment IDOC as it is the moment the shipment documents gets created in R/3. I dont want to collect many IDOCs & make as single file. For each IDOC it should create a Flat File.
Secondly if i have to MAP the whole IDOC the graphical mapping is too difficult.
So instead of that can i use ABAP/XSLT/JAVA whichever is easy. ?
Since i am ABAPER i can use ABAP mapping.
The Output file should look like as below.
EDI_DC40 9000000000011785526620 3012 OILSHI01 OILSH1 SAPP01 LS SAPCLNT900 A000000018LS WBIMQSI 20071031161506 20071031161506
E2OILSH001 90000000000117855260000010000000250 1011537344 1101 1 300X1 TRKGMKG 0202KG KG X ZTLF X XX 000 BLX X X60002200710310000002007103100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 E2OILSA 9000000000011785526000002000001031011537344000001SP 0000201496000000000000000000 00 00 V E2OILSA 9000000000011785526000003000001031011537344000002SP 0000201496000000000000000000 00 00 S
E2OILSV 900000000001178552600000400000103MH04CG6052 LPBW50D62401033 000020149601KG KGM 35200.00000 17200.00000 18000.00000 0.000 0.000 0.000 DLLPGB220071031000000 00000000000000000000000000000000000 0000XX 6000AAAA0.00000 0.00000 17200.00000 35200.00000 18000.00000 MH04CG6052 new bulk tender approved rs LPG Bulk Lorry - WR Refinery TPP BABA TRANSLINES kg kg 0.000 0.00 0.00 E2OILSC 9000000000011785526000005000004041 001 18000.000000 18000.000000 35200.000000 0.000000 0.000000 KG E2OILSQ001 9000000000011785526000006000005050011 MH04CG6052MH04CG60521J 05041089055000 00000118000.0000000 KG 18000.000000 18000.000000 6000V04 18000.000 KGM18000.000 KGM00000000 V 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0001 E2OILS2 9000000000011785526000007000004040001000001000200020000.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 XX0000000000000000000000000000 XX0504108905J5000 PUNE LPG BOTTLING PLANT START 0001 1END 0001 10.000000 0.000000 0.000000 0.000000 0.000000 0.000000
Pl. Help me its Urgent.
Regards,
Umesh
Maybe you are looking for
-
i put a sd card from my droid into my lumia the pics and video load but i can not find the files that are on the card. when i plug the phone to a pc everything on the card shows up what am i doing wrong Solved! Go to Solution.
-
How can I make a DVD from videos I downloaded from internet? I made a DVD and my DVD players can't read it. I remember there was a warning about burning data or something. Thank you,
-
Hi all, I'm trying to understand which is the start event after a down payment request creation (F-47 or FBA6 tx). SWEL doesn't show anything and I don't know why. Can you help me? Thanks in advance. Kind regards, Angelo
-
Hi, I need VB script which to checks the perticular user in AD and if it exists;that user needs to be removed from the member of perticular group Ex:- Lets say I have a user 783562 , I need to search this user in AD to verify user exists or not. If n
-
Business Intelligence and Manufacturing
We are currently working on a project to identify how Business intelligence technologies can help manufacturing operations. In other words how can companies make use of their manufacturing data to make better operational decisions. Have any of you wo