cancel
Showing results for 
Search instead for 
Did you mean: 

Route of the operator.... while creating mapping for idoc to file

Former Member
0 Kudos

Hi,

Scenario is IDOC to File but certain rules are there while creating a mapping in XI.

This is the description for my scenario :

Within XI this Idoc message needs to be translated into 2 text files:

1 file for the route of the operator

- Read the idoc data.

- When reading a new order first get the customer. This will be a new line in the file.

The customer number will be set into the filed u2018CustomerIDu2019.

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

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

Could you please guide me how can i implement this above scenario.

Regards,

Y.Raj

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Within XI this Idoc message needs to be translated into 2 text files:

this can be done using multimapping i.e. defining your target messages at mapping tabs in your message mapping.

When reading a new order first get the customer. This will be a new line in the file.

The customer number will be set into the filed u2018CustomerIDu2019.

If there is some condition for identifying new order then you should put condition based on input field.

if customer no doesnot exists in order then RFC lookup can fetch customerno

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

for this declare varaible in global section and use the same or some builtin function can be used for the same.

Rajesh

Former Member
0 Kudos

could you please more elaborate about this and let me know can i do this using Graphical mapping.

For your information for each order i have a customer number..so i don't need to put any condition over here.

RouteOrder should get a sequential number starting at 001.

So, i guess i need to define a keyfield over here.

Please explain me the scenario ....as how can i implement this.

Regards,

Y.Raj.

Former Member
0 Kudos

hi,

"outeOrder should get a sequential number starting at 001."

For this , define a global variable first. Define an UDF, initalize global variaable to 001. just put a statement x=x+1 and return the result. Automatically, it will be executed for each instance and its value will be increased for each instance. Map this UDF to your RouteOrder.

Regards,

Reyaz

Former Member
0 Kudos

Thanks for your valuable replies..

for your information here my scenario is IDOC to 1file (not multimapping)

Could you please give me a more elaborative for this scenario where i need to exactly write UDF and pls. provide me the IR and ID steps to follow.

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.

Pls. provide me the solution as how can i implement this.

Regards,

Y.Raj

Answers (1)

Answers (1)

Former Member
0 Kudos

/people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible

go through above blog for multi mapping

If my understanding is correct One file should have order nos and second file should contain line item details

if not post details about src and target strucutures

Rajesh