cancel
Showing results for 
Search instead for 
Did you mean: 

generate output values based on contexts

Former Member
0 Kudos

Queue 1 :

contextchange

mat_name1

contextchange

mat_name2

contextchange

mat_name3

contextchange

mat_name4

contextchange

Queue 2: ( output from Boolean AND)

contextchange

true

contextchange

true

true

contextchange

true

true

true

contextchange

false

true

contextchange

Based on the 2 Queues, I shud get the following output :

contextchange

mat_name1

contextchange ( based on 2 true values of the queue 2)

mat_name2

mat_name2

contextchange ( based on 3 true values of Queue 2)

mat_name3

mat_name3

mat_name3

contextchange ( based on 1 true value of Queue 2)

mat_name4 (because false ignore II ocurance)

how do I achieve this?

regards,

nikhil.

***each useful reply will be awarded***

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Try to have the bothe fields (q1,q2) at the same context level. If not use the function useOneAsMany on the field1.

Regards

Ratan

Former Member
0 Kudos

Hi,

refer this weblog:

http://help.sap.com/saphelp_nw04/helpdata/en/ef/df564b6aa24fc9ab0d685460747de5/frameset.htm

/people/william.li/blog/2006/03/21/minimize-memory-usage-during-message-mapping-when-replicating-an-element

chirag

Former Member
0 Kudos

Ratan,

Im trying to have multiple values of a Queue to repeat

can I do it with UseOneAsMany?

nikhil.

Former Member
0 Kudos

Hi,

contextchange

true

contextchange

true

true

contextchange

true

true

true

contextchange

false

true

contextchange

remove false from the above context. then ur output will be

contextchange

true

contextchange

true

true

contextchange

true

true

true

contextchange

true

contextchange

now u can use UseoneAsmany.

chirag

Former Member
0 Kudos

yeah thats wat I was thinking

but how do I take off only false value from queue?

Nikhil.

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

hi,

see this

thanks

Former Member
0 Kudos

i wrote the following code :

for(int i = 0; i < input.length; i++)

{

if(input<i>.equals("true")) //add true to output

{

result.addValue(input<i>);

}

}

but its removing the contexts in the target output.

But I need to retain context changes in order to get the desired output

regards,

nikhil.

Former Member
0 Kudos

I fixed it

thanks all

Answers (1)

Answers (1)

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

hi

try use this function FormatByExample

also see this links

http://help.sap.com/saphelp_nw04/helpdata/en/67/7ca04267deb111e10000000a155106/frameset.htm

/people/sundararamaprasad.subbaraman/blog/2006/02/21/real-example-for-formatbyexample

Hope it helps you

Edited by: Rodrigo Pertierra on Apr 10, 2008 12:04 PM

Former Member
0 Kudos

error message :

Function formatByExample: Queues have not equal number of values.

Nikhil.