Steps to convert IDOC to EDI Flat file

I am new to Business Connector. We have a requirement over here to send the iDocs from SAP to BC, convert the iDoc to standard EDI format and FTP or email the same. Till now, I installed the Business Connector successfully, configured necessary things in SAP and BC to send and receive the iDocs. I can see in Business Connector server that iDocs are being received. Now I am need to convert this to EDI flat file.

I am not clear with the service “restorePipelineFromFile”. What is the pre-requisite for using this service?
I have created a routing rule in server using B2B transport. In the BC Developer i have the transport service created. I can see MAP and Transport service: Outbound Process(Dont change the label of this node) in the developer screen. I have transport service and transport params in the pipeline in and pipeline out.

Could anyone please guide me further.

Narasimha,

When the IDOC is sent to BC,did it invoke the service you have created?if so,use pub.sap.idoc:decodeSDATA and pub.sap.idoc:transformFlatToHierarchy services to convert the IDOC into IDATA object.and now map the required fields to the document type which you are converting to(for eg:if you want to generate a 850 EDI, you have this doc structure in the WmEDI package).and then invoke addGroupEnvelope and addICEnvelope to convert it into EDI format.
Go through the SAP BC and EDI documentation.it is clearly described.
hope this helps.

ramesh.

Narasimha,

Please do search in the forums before you post there are lot of threads discussed on this topic,you willl see step by step procedure of IDCO to EDI or EDI to IDOC.It will help you keep moving the work and let this forum know when you struck.

Sections to see:webMethods for EDI Module,ThirdPartyModule…

Also read the doc’s as mentioned above.

HTH,
RMG

Hi,
Thanks for your reply.
Yes i have gone through the previous threads but still am caught up.
I have basically sent the idoc from sap to BC. I have routed the idoc using B2B transport.
I have first created an empty flow service in the developer and then gave the same service in the routing rule. now i have sent an idoc from sap. i can see the status as confirmed in the transaction of the BC server. Now in the developer i can see the service created.
I can see MAP and Transport service: Outbound Process(Dont change the label of this node) in the developer screen. when i try to run the service i am getting the error StackOverflow. There are no input or output parameters.
COuld you please let me know how we can confirm that the idoc has been transported properly to the BC Developer.

If the idoc was routed properly we should see the idoc data in the developer when we run it right. Hence i havent proceeded to the next step of calling the service -transformFlatToHierarchy.
So could you please let me know whether any other steps are missing when i routed the idoc?

Also could anyone provide help on uploading schemas. Where can we get or download the edi850 or edi810 schemas?

Thanks in advance,
MNR.

MNR,

In the flow service add a saveToPipeline step and see whether the IDOC is triggering this service or not.
and regarding the EDI 850 and 810 types, you can install them from the EDI Module Home page by clicking on install TN Document Types and select the appropriate version and the standard.
First you need to get the XSD from the SAP system and create a document type from that XSD.

ramesh.

In SAP BC you cannot install EDI document types,basically its a EDI template technology…so you have to get EDI version (for example 4010.template)file and load this in BC using WmEDI services this will create you schema/document type for 850,810 transaction sets…

Once you in place you can use WmEDI core services like getTemplate,convertToString service to prepare outbound edi documents and convertToValues service to parse inbound edi documents.

HTH,
RMG

Hi
Yes, i have first created an empty flow service with the savetopipeline. now i have created a routing rule (B2B) and gave the same name of the flow service as was created in the developer. now i sent the idoc from sap. the transaction is confirmed.And now i can see in the developer only 2 flows - MAP and Transport service: Outbound Process(Dont change the label of this node) in the developer screen. The savetopipeline is not seen. Could you please let me know if something went wrong and whether i missed some step?

Thanks
MNR

Hi,
COuld you please give me the steps to create a routing rule ( using B2B) for routing the idoc to my BC developer. DO i need to create an empty flow service first in the developer and then give the same name in the routing rule?

Attached, please find some of the screeshots detaling the probelem i have.

send idoc to bc
IDOCtoBC.doc (62.5 k)

Hi,
I have just started working on Business Connectors. My task is to convert an idoc to edi format. I have sent the idoc from sap to bc, creating a routing rule.
I have used the service transformFlatToHierarchy. Now i will have to map my idoc segments with the edi segments ( say EDI850). Could someone let me know how we should map these segments?
Where from can we download edi formats?
Also, after mapping what are the services that are to be used to convert to edi finally.

Thanks & Regards,
Vani

Vani,

Please search this form you will find required basic information of mapping IDOC to EDI using WmEDI module services.

For EDI mapping you need to map individual IDOC segments to EDI 850 segments its either one to one mapping or business rules mapping depends on your business process.

Core EDI services in the WmEDI pacakge are
getTemplate(4010.template)
convertToString(this creates EDI 850 string)
addICEnvelope(adds edi Envelopes for ANSI X12 messages) or
addICEDIFACTEnvelope(add edi Envelopes for EDIFACT messages)

HTH,
RMG

Hi,
Thanks once again.
But could you please let me know where can i get help on the EDI services. For example , if I take convertToString where from can i get more information about this service. What values are to be set for nsRecord, Delimiters etc?

Thanks & Regards,
Vani

Vani,

If you installed WmEDI module then documentation should be in the WmEDI/doc folder in the BC IS filesystem folders.

nsRecord -give the fully qualfied path of the 850 record type (for example:folder.subfolder:record_850)
delimiters-this depends on how your edi partners wants to receive the delimiter types for example (record=~,field*,subfield

HTH,
RMG

Hi,
Thanks for your information RMG.
Now I am able to convert the idoc to string and i have also used the service addICEnvelopeEDIFACT. I can see the idoc converted to edi format.The outDocument of this service has EDI converted data.

Now i need to ftp the same.
Could you please let me know how I could acheive this.

Thanks for your help once again.

Thanks & Regards,
Vani.

Hi,
Thanks. I have resolved the issue . I am able to ftp the document.

I have used the services login,put and logout to do ftp.

Thanks for all the help this forum is providing.

Thanks & Regards,
Vani

Glad it know it worked,hope you are on the right track now…