on 04-20-2009 2:38 PM
Hi All,
For Single File to Multiple Idocs scenario i am referring blog --
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
yes in the receiver determination u can check the condition using XPATH
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Put some condition in mapping and use createIf function
target node will get created only if condition matches
Rajesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.