Convert IDOC XML structure to flat file - and now?
Hi,
we are working with input message ORDERS05 and want to convert it to flat file.
So we used the implementation description from "how to convert an IDOC-XML structure to a flat file....".
Looks like this is a standard procedure described here fitting for all IDOCs.
We followed the guide, making XI ready for Abap-Mapping, implemented the Abap class like described, added an interface mapping with source ORDERS05 to a mess.type dummy destination, added with type Abap-class the class implemented from the guide and completed the Int.Dir. implementation.
For comparism purpose we have two systems as receiver, one with a standard flat file with regular graph.mapping in XI, one with the Abap mapping.
Result:
Error description in SXMB_MONI:
Didn´t expect something like that! The IDOC was delivered successfully to the other simple flat file receiver.
Any idea what we made wrong (we are on SP17) or if there is a standard mistake you can do when following the guide?
Best regards
Dirk
Hi,
I've got the same problem. He the solution in my case:
The problem is:
My IDOC has no element <STDMES>, but the method IF_MAPPING~EXECUTE from the 'HOW-TO Guide' does not check this situation:
el_element = idocument->find_from_name('STDMES').
ls_edidc-stdmes = el_element->get_value().
thows the exception.
Solution:
make shure that the field STDMESis set or change the method to:
el_element = idocument->find_from_name('STDMES').
if not el_element is initial.
ls_edidc-stdmes = el_element->get_value().
endif.
Best regards
Dieter
Similar Messages
-
Hello everybody,
On my system SAP, i need to send a IDOC to XI who convert it to a flat file idoc like this :
SAP => IDOC XML => XI => FLAT FILE IDOC.
Can anyone help me on this subject.
ThanksIf you need the file in the idoc structure itself, I would suggest to create the file in R/3 and poll the file from XI.
Otherwise creating a flat file from the IDOC XML using the file-content conversion will be very cumbersome.
I don't find any other way to create the idoc flat file, anyone has a better idea??
But the polling solution will not work online. Still assuming that the file you create in the output side will be polled at some regular interval by some other application, make the polling frequency of the XI sender adapter same as the one of application at the output side should be enough.
If you are doing this as an experiment, I suggest you to create a file-content-conversion
regards,
kk -
IDOC to Flat File and XML ( Need both the Output)
Hi ,
My Scenario is IDOC to File .
I need o/p in 2 format . ie, 1) Flat File 2 ) XML file
I have a plan to go with Interface determination , 2 IM and what shd be the condition ?
or Else 2 Receiver detmination but condition ?
How to slove this ?
Need the Output from Idoc in 2 format ( Flat file and XML file )
Any Blog , Thread ...Tips...etc
Regards,
JudeHi Jude,
Do like this:
1. Create two inbound Service Interface (with the same target Message Type)
2. Create separate Operation mapping with the above service interfaces as target (with the same source service interface)
3. Create Interface Determination and include these two operation mapping (without any condition)
4. Create 2 receiver agreement (with two separate communication channel) for each of the target service Inetrface. In one channel use content conversion and the other one will give you normal XML output
Regards
Suraj -
Creating idoc,downloading them in flat-files,sending them in zipped form
Hi Friends,
Presently I have a requirement regarding creation of WPDBBY idocs, downloading them in flat files and sending the files in zipped form to the user.
1. In the first program bonusbuy records have to be fetched which have been created/changed during the selection period. for every selected bonusbuy record transaction WPMA is executed which will create an WPDBBY Idoc for the Bonusbuy.
2. In the second program the idocs created are taken as input. first all deletion idocs are sorted. A deletion idoc can be recognized because it only has one segment (E1WPBB01) and in this segment the field AENDKENNZ equals DELE. For every idoc a file is created The name of this file is determined via the Logical file from the selection screen, with a sequence number. It is then saved. All files are zipped en send. After processing of the Idocs, the Idoc status is changed to u201818u2019.
If any of you have information about how to do this then pls tell me. I will definitely reward points for your heplful answers. Thanks!
Regards,
AbhishekHi,
For creating zip files and related processing use class cl_abap_zip.
You can check sample code at
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/dynamicTransformationofInternaltabledataintoXMLandCreatingaZIPFile
..very easy to use.
Regards,
Abhijit -
How to read flat file and convert to xml throught OSB
Hi ,
Can somebody help how to read flat file and convert to xml in OSB.
appreciate ur help.
Thanks & Regards ,
Siva K Diviif you're using the oepe with osb plugin (will be installed when you install the osb locally) and then in your osb project > rightmouseclick > new > MFL.
that's it
maybe you're trying to create it within an oepe installation which doesnt have the osb plugin ? -
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? -
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 -
Hi,
Is it possible to read a flat file and create the sale order through IDoc. Can i do this by DOC_INBOUND_FROM_FILE without XI?? What file format should i pass??
Regards,
KitHi ,
you can create Sales order through IDoc. IDOC_INPUT_ORDERS
At a high level, the IDOC processing executes in the following manner:
1. Interpret IDOC header segments and captures organizational, customer master and purchase
order header details. Performs user exits for each segment to process customizations to data
processing.
2. Interprets item level segments and captures item level details like material information. Again,
it performs user exits for each segment.
3. Sums up the order data and determines the posting criterion viz. creating order with reference
etc.
4. Builds up batch data communication sequence (BDC) with respect to the required screen
sequence of posting a sales order.
5. While building up the BDC data, system performs user exit to process customizations to BDC
data.
6. Calls transactions VA01 using the BDC data.
7. If the processing fails, an appropriate workitem is generated for workflow processing.
if you give me brief i can help you out more.
if helpful REWARD points
Thank you .
Regards
Ramana -
How to convert a Form to a Text file and XML file?
Hi:
I want to convert a Form to a Text file and XML file,but I don't know how convert?
Please help!
Oracle Form Builder V10.1.2.0.2
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0
Thanks in advance!..or follow the steps in Mtalink note; Doc ID: Note:196924.1
Forms XML Conversion Feature ( Converting Forms To XML) -
Generating Deeply nested XML from a flat file
Hi All,
I am working on a MQ to IDOC scenario.
I am getting a flat file as input. I need to convert it into XML( so that XI can understand it).
But conversion is into a "Deeply Nested XML from a Flat File" at sender side (JMS Adapter).
Any inputs on this.
Regards,
VikasYou can only convert flat file into xml structure with 3 levels.
If you need to convert flat file into deep nested xml structure, you have to do java mapping or xslt or abap mapping. There is a tool, I think it's called conversion agent by itemfield (bought by SAP), which can do pretty everything with conversion. Never used it though.
Jayson -
Flat-file and the pass-through pipeline
Hi there,
I have a technical questions about the inner workings of BizTalk.
The MSDN says that BizTalk is XML-centric and enything that is going through it and is posted to the MsgBox is converted to XML format.
The question: Is this also true in a scenario including flat-file and a pass-through pipeline ?
Lets say the flat file needs not to be translated, the external organisation will except the flat-file format we are receiving on the receive port. So we use the receive location with the pass-thrugh pipeline (a pipilene without any components in it) and
a send port with a simple filter pointed to the ReceivePort name. No need to convert the file to XML whatsoever, and it would be a waist of time and resources IMHO.
So the question is, will BizTalk (being XML-centric) do the translation anyway ? In what format is the received file being posted and stored in the MsgBoxDb ?
Thanks in advance.
PeterIn a pass-through scenario (with pass-through pipelines) BizTalk will not process the message payload.
More information here: http://msdn.microsoft.com/en-us/library/aa561008.aspx
The pass-through receive pipeline has no components. It is used for simple pass-through scenarios when no message payload processing is necessary. This pipeline is generally used when the source and the destination of the message are known, and the message
requires no validation, encoding, or disassembling. This pipeline is commonly used in conjunction with the pass-through send pipeline.
Glenn Colpaert - MCTS BizTalk Server - Blog : http://blog.codit.eu -
SSIS Compare 2 flat files and create a third flat file
Hey all,
I have two flat files structured as:
Flat File A:
3213,214,14,21421,354,325
Flat File B:
3213,214,14, 55,89, 21421,354,325
I am trying to create an ETL Package that compares Flat File A, to Flat File B, finds an anomaly, in this case
55,89, then outputs the anomalies to Flat File C, separated by commas.
How would I go about doing this? Everything I have looked at shows comparisons between SQL DB's.
Any suggestions?
Thank youHi, I'm looking for a no code solution for my clients. They're happy with drag and drop, but would prefer a no-code solution. Is this possible?
sorry what do you mean by drag and drop? what will client drag and drop? From what interface?
If you can give bigger picture then it would help
In SSIS you've to implement using SSIS tasks only
And in the above case you need to write code in any case be it script task which is in C#,VB .NET or be it execute sql task which is sql.
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page -
Part 2: Flat files and Business Contents: Any issues with this scenario?
I will appreciate some clarification on the some points made in response to my previous post "Flat files and Business Contents: Any issues with this scenario?"
1.
" ...youd better analyze those cubes for data redundancy and presence of data youll never use. " I will appreciate some clarification on the type of analysis you are referring to. Examples will help.
2.
"If you want to combine several found IOs in your custom dataprovider, then again you must know (or figure out) relationships between these IOs." I will appreciate some clarification on the type of relationship you are referring to. Examples will help.
3.
I am a bit confused with "..include into ODS structure ALL fields required for the cube" but you also noted noted that "...except navigational attributes and chars and KFs that are going to be determined in TRs or URs."
If you exclude ALL these, haven't you excluded all the fields you included in the ODS structure?
4.
"Consider carefully the ODS key fields selection. Their combination should not allow data aggregation that you dont need."
I may be missing the point here, I understand that you need to select the fields which will form the unique ID for the records in the ODS under the Key Field (please correct me if I am wrong with the purpose of the Key Field), but I don't understand the discussion of "aggregation" in the context.
Thanks in advanceHallo
I try to give some exaplanation based on the previous answer.
1. Data redundancy - make sure you do not store the same information. does not make sense to have data redundanty across you Data Warehouse. this is also a cost. just sotre the same information one time if you get all what you need.
2. whatwhever you build you dp, which consist of IO, you need to know with kind of relation (1:1 or 1:n - n:n and so on) exist between them. that will help you when you model you infoprovider. For example I would never pit togheter IO (n:m) in the same dimension if you expect an high number of cardinality. Sometime an IO can be an attribute of another one (depend on relation. For example
Business Partner and his Address. Usually you have a relation 1:1, in this case address is an attribute of BParten and store it in the Masterdata instead then DP
3. Sometime when you load from ODS to CUBE, you can fill some IO (which are in the infocube and not in the ODS)through ABAP routine in TR-Start Routine of Update Rule. Does not make sense to include these IO in the ODS as they are NULL or Blank (the deault value). This can happen when for example, you first load in the ODS (Price and Quantity) and then you calculate Sell price later (Price * Quantity). of course it could be doen also in the Bex. Depends on other factors (Performance - Loaidng -Sizing)
4. Make sure that the KEY definition of ODS is accordingly to the data otherwise you will aggregate the data and later maybe if you need the detail you miss it.
for example: customer - product - Distr Chan - Sell Price
if each Customer can buy each product for any Distrution Channel, then when you build your ODS(Customer - Product and Distribution must be KEY) otherwise (if you have only Customer - Product KEY for example) you will lose the details for Distribution Channel.
I hope eveyrhting is clear
Regards
Mike -
Loading different flat files and consolidate in one BEX
I want to know in SAP BW how is the best way to load different flat files and loading them into a Consolitaded Infocubes o DSO to show in a Bex report. This files have the same estructure.
you need to create a datasource with the exact structure of your files... then this datasource will be linked with your cube via transformation.... you need to define the characters, key figures and time character ..
load file to datasource.. then to cube....then it will be available for reporting -
What is the diff b/w flat file and legacy system?
Hi everyone,
when v say v r working on scenario FILE to FILE? which format of file r v usually working on? and what is the diff b/w flat file and legacy system?
thanxHi,
<i>when v say v r working on scenario FILE to FILE? which format of file r v usually working on?</i>
>>>Many a times it will be a Flat file with CSV format,Tab delimited format, fixedlength fields.
<i>what is the diff b/w flat file and legacy system?</i>
>>>We can not differeniate like this..
Flat file may come from any systems, it may be live system or legacy system.
Legacy system- is something like old, or past one. If you talk about SAP , then older versions of SAP can be called as a legacy system.
So it may be a file system, or any system which is old version but it doesnot mean it is not in use,
Regards,
Moorthy
Maybe you are looking for
-
Hi there, my internet is crashing everytime I use my macbook pro/safari it happens roughly every 2 mins, it can happen on any website. I am not technical at all and I am at a total loss of where to start with this. I did a bit of research on the inte
-
Reset password for hp mini 1000 code CNU8520XC7
Please help. Just found my old mini laptop and I get this code CNU8520XC7 on it.
-
How do I stop new tabs from opening on there own?
I'm on Facebook just after logging in more Facebook tabs continue to open without me clicking + in the left hand corner or pressing CTRL and T together
-
After upgrading unable to connect to icloud
After upgrading my iPhone 4S 16GB I could not connect into iCloud? how can I solve that? my whole contacts in that? please someone help me
-
ISE reauthenticaiton in wireless with posture
Hi, There is an issue which the wireless reauthentication in our environment. The posture feature has been used and everyone install the Cisco NAC agent. I found that if someone disconnect the wireless SSID, then reconnect the wireless SSID by authen