on 09-04-2008 4:23 AM
I have a idoc to file to scenario.
Where i have a field called FLAG in the IDOC where i get value Y. It's in the middle of the segments in IDOC.
For eg:
IDOC
segment
EDI_DC40
field1
field2
Segment2
field1
field2
FLAG
segment3
etc...
Now at the reciver side i have created a segment called Segment 10 .Here when ever we get a value from the field FLAG as Y.This segment10 should come twice.Fo convinience,I created 2 segments at receiver.
segment10first,segment10second.
Receiver structure would like
File
recordset
segment10first
segment10second (both of these segments contain 16 fields. with same fields)
segment30
segment40
My question is
When ever we get the fied FLAG as Y....segment10first should be created....or else it should start with the segment10second.
Please note that either cases segment10second would be created.Only cahnge is segment10first should be created when there is filed FLAG coming Y.
how should I map this segment based on condition....
i just put as
FLAG-->exists-->segment10first.
Am i right
Hi Harsha,
just check this out:
If(Flag==constant(y)) then Segment10first map with some constant then it will definitely appear according to your condition.
Regards,
Nutan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Harsha,
Why do you need to create 2 different segments anyway. Create onle 1 segment10 and make it as 0...unbounded. Now in mapping duplicate the segment twice and for the 1st segment provide the condition as follows, for the 1st segment:
segment10-->createIf (FLAG == Y)
2nd segment you can map with a constant.
Regards,
Sanjeev.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can check the value of flag using if function, suppose if the value of flag is 'y' then create node using createif function(which creates the segment10 only if the value of flag is 'y').
FLAG --> if(check the value of flag,It reaturns true if the value of flag is 'y') --> Createif(Creates the node in target if the input value is true) --> Segment10First.
I hope this will help you.
For more help look into help.sap.com
Regards,
Yuga
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.