cancel
Showing results for 
Search instead for 
Did you mean: 

IDOC to FILE

Former Member
0 Kudos

Dear XI experts,

My scenario is IDOC to file

Source :

DA_no

Route_ID

machine number

Target :

DA no

Route ID

Customer ID

Route_Order (sequential number per DA_no/Route_ID)

Description

When reading a new order first get the customer. This will be a new line in the file and the customer number will be set into the filed u2018Customer IDu2019.

Then read the items. For every item create a new line in the file. The machine number will be mapped to the field Customer ID.

The field RouteOrder should get a sequential number. Starting at 001 and updated by 1 for every new line.

Could you please explain me how to achieve this and give me the steps in IR and ID.

Thanks & Regards,

Y.Raj

Accepted Solutions (1)

Accepted Solutions (1)

prasannakrishna_mynam
Contributor
0 Kudos

Hello Kumar,

You need to use the content conversion at receiver communication channel, regarding the auto increment of the Route_Order at target side, you need to use the standard function <index> from Statistic. This will solve your cuto increment issue. Inorder to increment it by one for every new line you should follow this logic in your mapping.

For every new customer your genarating new line, so index should be based on customer context.

FormatByExample(index,customer number ) =>Route_Order.

Regards,

Prasanna..

Former Member
0 Kudos

Here I need to take two source fields and map to FormatbyExample -


>index------>RouteOrder.

Could u pls. tell me the fields which i need to map to the node function FormatbyExample

Answers (3)

Answers (3)

JoelTrinidade
Active Contributor
0 Kudos

hi Yeswanth ,

i dont know whether you are aware that there is a count functionality available in the standard graphical mapping. Make use of that it would be a little R&D on your part but its not that its not achievable.

Regards

joel

madanmohan_agrawal
Contributor
0 Kudos

Hi Yaswant,

Yaswant Says..

Could you please explain me how to achieve this

This can be achived in Message Mapping in IR.

Yaswant Says..

and give me the steps in IR and ID.

The steps are as follows

IR

Create DT, MT, MI(inbound asynchronous) for your third party

Import IDOC

Do MM and IM

ID

RD, ID, Receiver CC, Receiver agreement (sender CC and agreement is not required)

Regards,

Madan Agrawal

former_member192295
Active Contributor
0 Kudos

Hi,

Develop simple logic in mapping window according to your requirement. For increment line item number take one global variable in mapping window, we can increrament easily. Create receiver structure according to your format. This will sort out easily.

Former Member
0 Kudos

I can map with 3 of the fields with my target fields..But, how can i carry with the target side Route_Order as this should get a sequential number. Starting at 001 and updated by 1 for every new line.

Could u please more elaborate on this above and explain me how can i achieve this as if i need to write an UDF please share with me if you have any references on this.

Also let me know if i need to use Content Conversion File at receiver side

Thanks & Regards,

Y.Raj

Edited by: YeswanthRaj Kumar on Apr 14, 2009 7:39 AM

madanmohan_agrawal
Contributor
0 Kudos

how can i carry with the target side Route_Order as this should get a sequential number.

This is simple. Use the standard Function "Index" inside "Satistics". Put an initial value and an increment value in its property.

regards,

Madan Agrawal

former_member192295
Active Contributor
0 Kudos

Hi,

We can increate value easily by using UDF, take one text file and store initial value 001. Each line item transfer increament one and pass to receiver until end of line item. Here each increament compare with any filed like document number. If doc number is same increament value else no need to increament.

Meanwhile at receiver side choose FCC depending on file format. If you need flat file mean choose FCC else no need. I hope now clear

Former Member
0 Kudos

but, i am not familiar with Java code to write UDF.

Could u pls. provide me the any reference reg. this and also i would like to give you the source structure here.

Source :

Header

DA_no

Route_ID

Item

machine number

Regards,

Y.Raj.