on 07-20-2015 9:07 AM
Hi friends,
I have One source filed Serial and One Target field SERIAL.
We will get production order details as an xml file from the sender system. PRDOrd is One segment in the xml file and the Serial filed in the PRDOrd Segment. If two PRDOrd segments are in the xml file and both have Serial fields that are not blank then each one would create a new segment ITEM_Create. we have another segment SerialNumber in that filed i have One filed say ITM this would be 0001 for the first segment ITEM_Create segment created and would be 0002 for the second segment ITEM_Create segment created.
The filed ITM references the # of ITEM_Create so that the Idoc knows which segment the Serial is relevant for **.
How can i achieve this, is it possible using Graphical Mapping or UDF.
Please help on this friends. In case of UDF please provide the UDF.
Regards,
Teja
Hi,
You can acheive this using Graphical Mapping.Please Go through Node Functions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vishnu,
Thanks for your reply.
I have One segment Component under PRDOrd segment.
Component segment is repeating under PRDOrd segment.
ITM to increment by one for every new segment passing the rule.
For this is can i go for UDF or Graphical
If graphical please help me.
Thanks in advance,
Regards,
Teja.
Hi Vishnu,
Thanks for your reply.
I need to create new idoc and new ITEM_CREATE segment in the idoc for each component segment of XML only when MIGO,SCRAP or AddMigo are not blank and if blank then no additional Item_create segment required and OrderId Target field in the segment created will be from ORD under PRDOrd segment.
Please help on this
Thanks in Advance.
Regards,
Teja.
Hi Vishnu,
I am facing some problem while doing testing in Message Mapping.
In the Source structure I have CONTROL Records Under Control records I have Production Order Segment under Production Order I have Component Segment.
I need to
Create new IDOC and new ITEM_CREATE segment in the IDOC for each Component segment of XML only when MIGO, Scrap, or Add Migo are not blank
I have created one duplicate sub tree of component segment. but the idoc is not generated. is it possible in PI level testing to create the Idoc for every component segment or while we go for End to End testing will it succeed.
Please let me know if any mapping logic that the idoc should generate for every component segment of xml file.
Thanks in Advance.
Regards,
Kamal.
Hi Vishnu,
from sender system I am getting one xml file. In that xml file may be we have two component segments. for every new component segment in xml file i need to create one new idoc.
I am doing testing in Test Tab of Message Mapping. When i am going to create two component the idoc is not created.
I am getting the above error.
Please help on this.
Regards,
Kamal.
Hi Vishnu,
Thanks for your reply. I am really very happy. but the Item_create segment is not created.
These are the conditions to create ITEM_Create segment.
1. I have One source filed Serial and One Target field SERIAL.
We will get production order details as an xml file from the sender system. PRDOrd is One segment in the xml file and the Serial filed in the PRDOrd Segment. If two PRDOrd segments are in the xml file and both have Serial fields that are not blank then each one would create a new segment ITEM_Create. we have another segment SerialNumber in that filed i have One filed say ITM this would be 0001 for the first segment ITEM_Create segment created and would be 0002 for the second segment ITEM_Create segment created.
2.Create new IDOC and new ITEM_CREATE segment in the IDOC for each Component segment of XML only when MIGO, Scrap, or Add Migo are not blank and if blank then no additional ITEM_CREATE segment required and ORDERID in the segment created will be from <ORD> above and GM_CODE = 03
3. example if two PRDOrd segments are in the xml file and both have Serial fields that are not blank then each one would create a new ITEM_CREATE segment and the MATDOC_ITM would be 0001 for the first segment created and would be 0002 for the second ITEM_CREATE segment created. This field MATDOC_ITM references the # of the ITEM_CREATE so that the IDOC knows which segment the serial is relevant for**
Based on these 3 conditions i need to map to target segment ITEM_Create.
I have tried the logics which you have provided before but the Target segment is not crating So please check Once and provide the Mapping Logic
Please provide the Mapping logic.
Thanks in Advance,
Regards,
Kamal
Hi Vishnu,
Thanks for your reply.
The UDF is working fine and i didn't develop the logic for those two conditions. I am expecting from you and our buddies.
ITEM_Create segment should be create based on 3 conditons.
1. ITEM_Create segment should be created for each component segment in xml file Only when MIGO, SCRAP or AddMigo values should be not null.
2. If two production Order segments in XML file in that there is one Serial field.
For every Serial field One ITEM_CREATE segment should be created.
Thanks in Advance,
Regards,
Kamal
Hi kamal,
I echo with sahithi. Just add the below udf code to the existing udf and give Serial as one of the input besides the existing ones. Use remove context to the source Serial field and then give as input to the udf.
for(int i=0;i<Serial.length;i++)
if((Serial[i]!=""))
result.addValue("");
Regards
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.