cancel
Showing results for 
Search instead for 
Did you mean: 

Message Splitting (Lorge message to 1) -- Graphical Mapping

Former Member
0 Kudos

Dear All , Please help me out.

Source message format --

<MainMessage>

____<Top1>

________<Message1>

____________<b> <index>3</index></b>

________ </Message1>

____</Top1>

____<Top2>

________ <Idoc>

____________ <Contant>Idoc 1</Contant>

________ </Idoc>

________ <Idoc>

____________ <Contant>Idoc 2</Contant>

________ </Idoc>

________ <b> <Idoc>

____________ <Contant>Idoc 3</Contant>

________ </Idoc></b>

________ <Idoc>

____________ <Contant>Idoc 4</Contant>

________ </Idoc>

________ <Idoc>

____________ <Contant>Idoc 5</Contant>

________ </Idoc>

____</Top2>

</MainMessage>

Target message

<b><Top2>

_____ <Idoc>

____________ <Contant>Idoc 3</Contant>

_____ </Idoc>

<Top2></b>

How can I get this by Graphical mapping

Regards

Danab

Message was edited by: Danab Tom

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Actually my scenario is

I am fetching the records from SQL .. and I am sending to the R/3 (RFC)

But the thing is "I am getting the so-many records from SQL. So when I am trying to calling the RFC, it is failling (because couldn't pass that much records to RFC). So I need to Split the In coming in to 100 by 100 and I need to send R/3

<Table>

__<row>

_____<Filed1> </Field1>

_____<Filed2> </Field2>

__</row>

__<row>

_____<Filed1> </Field1>

_____<Filed2> </Field2>

__</row>

__<row>

_____<Filed1> </Field1>

_____<Filed2> </Field2>

__</row>

</Table>

Please Sorry for Previous Query

Regards

Danab

Former Member
0 Kudos

Hi Danab,

I have the complete solution in graphical mapping for ur first query. If you need that please respond back. i will post that.

For ur second query u can use "count" function in statistics category and check using an "if" function for 100.

And also go thro this blog, this might be helpful

/people/claus.wallacher/blog/2006/06/29/message-splitting-using-the-graphical-mapping-tool

regards,

P.Venkat

Former Member
0 Kudos

Thanks a Lot Venket.

Please send me the Solution for Firs Query also

Regards

Danab

Former Member
0 Kudos

Hi Danab,

Here is the solution.

Idoc ---- Index(statistic function) -------- equalsA -------- 
	index ------------------------------			ifWithoutElse --------- removeContexts -------- Idoc
						constant------



Idoc ---- Index(statistic function) -------- equalsA -------- 
	index ------------------------------			ifWithoutElse --------- removeContexts ----- constant
					constant(Context Top2)------

Regards,

P.Venkat

Message was edited by: Venkataramanan

Former Member
0 Kudos

Danab,

Wouldn't it be easier to only fetch 100 rows from the SQL Server at a time?

Regards,

Koen

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

You dont need to go for UDF also. You can do this using "Index" function in statistic category.

Check it with the value in the node using "if" and map it.

I hope this helps. If u have any clarifications revert back.

regards,

P.Venkat

Former Member
0 Kudos

Hi Danab,

Its not gonna be '3' always right?:)

so, if you want to make this generic, then you will have to use either a udf and/or node functions.

Regards,

Sushumna

Former Member
0 Kudos

Hi,

Map <STop2> to <TargetTop2>

<Idoc>

____________ <Contant>Idoc 3</Contant>

________ </Idoc>

to

<Idoc>

____________ <Contant>Idoc 3</Contant>

_____ </Idoc>

<SContant> to <TContant>

directly, and it should work.

Regards,

Smitha.

Former Member
0 Kudos

Dear Smitha,

I need to choose the Idoc segment according to the value of <b>Index</b> field

____<Top1>

________<Message1>

<b>____________ <index>2</index></b>

________ </Message1>

____</Top1>

If the value of <b>____________ <index>4</index></b> then need the IDoc 4

<b>________ <Idoc>

____________ <Contant>Idoc 4</Contant>

________ </Idoc></b>

former_member206604
Active Contributor
0 Kudos

Hi,

Map

<STop2> ---> <TTop2>

<SIdoc>  ---> [Check if <Constant> value = 'Idoc 3'  then] ---> <TIdoc>
<SConstant>  ---> [Check if <Constant> value = 'Idoc 3'  then] ---> <TConstant>

Try this and let me know.

Thanks,

Prakash

Former Member
0 Kudos

Hi,

Sorry didnt get your query right, the last time.

You could solve this by writing a simple UDF.

Take the index value and constant nodes as input to the UDF. Check what the value of index is, and map the corresponding Contant value to the target.

UDF inputs:<index> <contant>

UDF inputs--UDF-<TargetContant>

Regards,

Smitha

former_member206604
Active Contributor
0 Kudos

Hi,

Sorry even I didnt get your query

Smitha is right.. it will work for sure. Write a UDF.

Thanks,

Prakash