on 04-09-2008 1:14 PM
Source structure:
+IDOC
++E1EDP01
+++ZSEG (SEGMENT)
++++quantity
+++ZSEG (SEGMENT)
++++quantity
+++ZSEG (SEGMENT)
++++quantity
+++EDP19 (SEGMENT)
++++QUALF(001)
++++IDTNR(mat_name)
+++EDP19 (SEGMENT)
++++QUALF(002)
++++IDTNR(mat_name)
+++EDP19 (SEGMENT)
++++QUALF(003)
++++IDTNR(mat_name)
+++EDP19 (SEGMENT)
++E1EDP01 (II occurance of of EDP01)
+++ZSEG (SEGMENT)
++++quantity
+++ZSEG (SEGMENT)
++++quantity
+++ZSEG (SEGMENT)
++++quantity
+++EDP19 (SEGMENT)
++++QUALF(001)
++++IDTNR(mat_name)
+++EDP19 (SEGMENT)
++++QUALF(002)
++++IDTNR(mat_name)
+++EDP19 (SEGMENT)
++++QUALF(003)
++++IDTNR(mat_name)
+++EDP19 (SEGMENT)
EDP19 can have QUALF values from 001 to 003.
I have to pick up IDTNR value from EDP19 for which QUALF == 002 and send to prt-name
Target structure:
Loc (SEGMENT)(mapping -> if quantity > 0 > createif)
+name
+prt (SEGMENT)(mapped to a constant )
++name (get mat_name from EDP19 for which QUALF == 002 )
++item (SEGMENT)(mapped to a constant )
+++quantity (get quantity for ZSEG )
my target structure will be produced when the quantity is > 0.
in the above case, there are 3 ZSEG and each has one Quantity.
if only one of them is > 0 then it will generate only one target structure.
My requirement is ...
I am facing some problem while populating prt-name (from IDTNR of EDP19 ) for the structure of Zseg whose quantity is > 0
if anyone got same kind of requirement earlier, help me
thanks and regards,
Nikhil.
Hi
Compare (equalsString)
IDTNR(Set context to E1EDP01)
with '002' .
If the above are equal then map (IfWithoutElse)
QUALF(Set context to E1EDP01)
to the target field
prt-name
rgds
Arun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I did the same way now and its not working out
remember that im generating the target structures based on the quantity value (greater than 0 ) and i shud populate the part-name of equal context that they belong to
now with ur advice, it will send all possible values
lets conside the above example
Suppose I have 6 Zsegments
Zsegment (quantity = 0 ) prt-name -> abcd1
Zsegment (quantity = 0 ) prt-name -> abcd1
Zsegment (quantity = 10 ) prt-name -> abcd1
Zsegment (quantity = 0 ) prt-name -> xyz1
Zsegment (quantity = 20 ) prt-name -> xyz1
Zsegment (quantity = 0 ) prt-name -> xyz1
now I will have 2 records as the target structures.
but the abcd1 is there for both
it should be like...
actual o/p:
partname : abcd1
+qty : 10
partname : xyz1
+qty : 20
current o/p :
partname : abcd1
+qty : 10
partname : abcd1
+qty : 20
nikhil.
Hi
Try this
This is my understanding
Input
++E1EDP01
+++ZSEG (SEGMENT)
++++quantity = 100
+++ZSEG (SEGMENT)
++++quantity = 0
+++ZSEG (SEGMENT)
++++quantity = 300
+++EDP19 (SEGMENT)
++++QUALF(001)
++++IDTNR(mat_name) = mat1
+++EDP19 (SEGMENT)
++++QUALF(002)
++++IDTNR(mat_name) = mat2.0
++++QUALF(002)
++++IDTNR(mat_name) = mat2.1
++++QUALF(002)
++++IDTNR(mat_name) = mat2.2
+++EDP19 (SEGMENT)
++++QUALF(003)
++++IDTNR(mat_name) = mat3
Mapping
Loc (SEGMENT)(mapping -> if quantity(Set context to E1EDP01) > 0 > createif)
+name
+prt (SEGMENT)(mapped to a constant )
++name ( [If Quantity(Set context to E1EDP01) > 0 ] and [Compare (equalsString) [ QUALF(Set context to E1EDP01) with '002']]
If both are TRUE then map (IfWithoutElse)
IDTNR(Set context to E1EDP01) )
++item (SEGMENT)(mapped to a constant )
+++quantity (get quantity for ZSEG(Set context to E1EDP01) map only non zeros)
Output
Loc
+name
+prt
++name = mat2.0
++item
+++quantity = 100
Loc
+name
+prt
++name = mat2.2
++item
+++quantity = 300
Correct me if i am wrong.
Also the mapping will fail if the no of (non-zero qunatity) and QUALF=002(IDTNR) occurence are not equal in one E1EDP01 segment.
rgds,
Arun
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.