IDOC ffschema

Hi,
I am trying to do an Inbound ANSI X12 850 to IDOC mapping. I have got all the steps till getting the IDOC data. Now I need to write the IDOC to a flat-file. I am trying to use the flatfile.convertToString service. this service requires a flatfile schema for IDOC ORDERS01. Where can I get it from ? From the web, I am able to download xml schema for ORDERS01, but what I want is a flatfile schema. I do not want the output to go directly to SAP. I need the output IDOC in a flatfile for further processing.

Please help me.

Hi,
you could create a schema from the ORDERS01 xml schema and use this for the flatfile.convertToString service.

HTH

Hi,

you have to use pub.sap.idoc:transformHierarchyToFlat SAP Adapter Service instead of flatfile:convertToString.

Input to the transformHierarchyToFlat should be the IDOC (ORDERS01)(record to be created from the DTD downloaded from SAP site)
Output will be (in case the version is greater than 4.0)
IDOC_CONTROL_REC_40
IDOC_DATA_REC_40

HTH.

Hi newwmuser,

How did you solve this issue, I have to do exactly the same process. So far I build the ORDERS01 flat file schema from scratch. There is any way to use the ORDERS01 schema(generated with DTD from SAP) and convert it into flat file schema ?? The transformHierarchyToFlat is good to send the output to SAP using SAP adapter.

Hello all,

we never worked with the SAP adapter but we still needed to generate IDOCs. We used Fixed Length output for this.
Configuring the operation took a long time (ALOT of fields in an IDOC) but after that it worked great!

Greets,

Matthias,

Could you explain more in detail the configuring operation ?? (did you create an IDOC fixed length flat file schema from scratch ?), are you able to share an example IDOC FF schema ?? As you know is very time consuming and I looking to find the simple way to build automatically an IDOC Flat File schema or dictionary.

Thanks,

Try this thread.
You can do this thru we60

http://www.wmusers.com/wmusers/messages/117/1411.shtml

Javier,

Yes, we created an IDOC fixed length flat file schema from scratch. We received the record lay-outs for the IDOCs we needed to send (these came from the SAP documentation I think). Using this we could create a fixed length operation.

An IDOC contains different kinds of records and each record has its own lay-out. This is perfect for an Fixed Length (hierarchical) operation!
Entering all the fields can be alot of work tho…

The first 63 characters can be tricky if you need them. They contain line-numbers,segment numbers,… and these can be hard to fill in correctly. (We did this using custom java code BUT this HAD to be entered at the part where XPI mapped all output)

What file would you like to see an example of? The .adl file? Or the information we used to create the operation?

Thanks to everyone for your answers, so far I found the right service to generate the Flat File Schema. I was able to create the FF schema with this service: “wm.b2b.edi:createIDOCtemplate” , so I save a lot time to build this FF schema from scratch…

This is different from DTD Schema using WE60

In our case we need to handle both scenarios, send/receive to backend system using SAP Adapter or generate a simple Flat File to feed other applications.

Special thanks to Matthias.

Flat File schema
FFschema.doc (24.1 k)