cancel
Showing results for 
Search instead for 
Did you mean: 

Next Record

Former Member
0 Kudos

Hi

We are doing a file to idoc scenario. The idoc has two fields which requires data from the next record to be filled in them.

Is there a standard way of doing it?

Regards

Sourabh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

What is Next Record ? Give an example.

For quick ans try to be more spicific while explaining your problem.

Former Member
0 Kudos

Still not solved

Former Member
0 Kudos

Can I put data from two different recordsets to a single idoc, for example

In your Source file you have a field called "Status"

In your Target file you have fields called "Status" and "Status of Next Record"

Now the problem is how can I do the mapping for the "Status of Next Record" for which i have to pick data from the "Status" field of the next recordset and not the current one.

Former Member
0 Kudos

I think you can create a UDF 'nextStatus', which takes all values of a context in a variable 'status' and the following code:

for(int i = 0; i < status.length; i++){
	if(i < status.length-1)
		result.addValue(status[i+1]);
	else
		result.addValue("");
}

This will return the status of the next element. Insert this in your mapping as follows:

[STATUS] -> [UDF nextStatus] -> SplitByValue -> [NEXTSTATUS]

Make sure all values of the input 'STATUS' are in one context (use removeContext if required).

Kind regards,

Koen

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Please explain your scenario with an example. I could not get your problem.

Regards,

Shweta.