cancel
Showing results for 
Search instead for 
Did you mean: 

File to Multiple Idocs scenario. Pls help

Former Member
0 Kudos

Hi All,

For Single File to Multiple Idocs scenario i am referring blog --

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/877c0d53-0801-0010-3bb0-e38...

Suppose my source file is

AAA, BBB,CCC

111,222,333

ZZZ,ZZZ,ZZZ

I want to make 2 IDOCS for the first 2 records (AAA, BBB,CCC and 111,222,333)

and do not want to make IDOC for the 3rd record -- how to achive this.

Regards

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi,

If the condition is like, for 'AAA' and '111', IDocs to be generated, then do as follows.

If IDOCs are of same type.

1. Value

-


> Equals -


> createIf -


> IDOC

Constant('AAA')

2. Value

-


> Equals -


> createIf -


> IDOC

Constant('111')

3. Value

-


> Equals -


> not -


> createIf -


> IDOC

Constant('ZZZ')

If 2 IDocs are of differnet types,

create different mapping programs with same logic.

If 2 IDocs are to be generated based on the record no in the file rather than the first field value, i think you can go for Global container.

Refer these,

[http://help.sap.com/saphelp_nw04/helpdata/en/ee/bf9640dc522f28e10000000a1550b0/frameset.htm]

[http://help.sap.com/saphelp_nw04/helpdata/EN/49/1ebc6111ea2f45a9946c702b685299/content.htm ]

[http://help.sap.com/saphelp_erp2004/helpdata/en/75/8e0f8f3b0c2e4ea5f8d8f9faa9461a/frameset.htm]

thanks.

Edited by: P.Ravi Varma on Apr 22, 2009 10:27 AM

Former Member
0 Kudos

Hi,

using UDF u can achieve as given below

<h5> UDF code </h5>


if(input.equals("AAA"))
return "true";
else if(input.equals("111"))
return "true";
else
return "false";

In the message Mapping do like this


sourcefield---UDF---equalS------ifWithoutElse-----targetIdoc
                          /                                 /
  constant(true)                         sourcefield

Here sorce fieldoccurence is 1 to unbounded

pass constant to the equalS function and source field to the target Idoc in the "then" part of function ifWithoutElse

Hope this fullfill ur requirement

Thank You.

Former Member
0 Kudos

yes in the receiver determination u can check the condition using XPATH

Former Member
0 Kudos

to select perticular record use if condition under Boolean function.

and to create Multiple Idocs, you may have to make IDOCT TYPE maxoccurance as unbounded to do this: download XSD of IDOC and change the MAX Occurance and re-upload using external defination

Former Member
0 Kudos

change the occurence of Idoc to 1.. unbounded (go to messages tab in the message mapping and in the target message type change the occurence)

with some condition create the idoc( In the display Q u should get only two values in one context then only it will create the idoc 2 times)

if u eloborate more on ur req I can say what condition to be used

Former Member
0 Kudos

Put some condition in mapping and use createIf function

target node will get created only if condition matches

Rajesh

Former Member
0 Kudos

Hi All,

If I got you correct

In Message mapping I will use createIf function

so If value is AAA -- IDOC created

or If value is BBB -- IDOC created

If value is ZZZ -- IDOC not created

Am I corrcet.

If I do not put condition in Message Mapping Can I use condition in Receiver Determination

using XPath. Is that also correct?

Regards

Former Member
0 Kudos

Hi,

Receiver Determination will identify the appropriate receiver for the configured scenario.So the Conditions has to be set @ Message Mapping level.

Thanks,

Kiran

jyothi_anagani
Active Contributor
0 Kudos

Hi,

Take idoc occurence is 0...unbounded in messages tab in Message Mapping and map like this


value------------>equals------->not---->create if----->idoc
constant(ZZZ)/
 

Thanks.