I have requirement to change already existing mapping which is up and running in Prod.
AS-IS mapping is; it creates one file based on the one input file. (one-one)
Required change is: create multple files based on the value(date) of one feild. (one-many)
now it should create me three files:
file1 with date 032412
file2 with date 032512
file3 with date 032612
when I change the occurence of the target structure; it addes Messages as the main node and Messages1 as subnode on both source and target.. n everything messesup
help is appricated.
>>it addes Messages as the main node and Messages1 as subnode on both source and target
this is how the multimapping works
whats your exact problem??
in case you want to create dynamic file name then go for variable substitution...
actually my problem here is; i dont want a change in source structure, because that is a standard structure from bank..
how do i change just the target structure occurence to 'n' without being affecting the source; otherwise my interface wont accept the input value..
When you make any changes in root node, mapping for all elements inside it goes and you have to re map them. However, You can use Correct Structural inconsistencies functionality to get them re - map quickly as they were before.
Refer this blog on how to use this feature
Hope this helps,
If you did not made any changes to input structure, then your file should be accepted. Could you verify the file if the structure is correct ? Can you post the error you are getting that will help us to give correct suggestion.
Also, check if your nodes contexts got misplaced as you used correct structural inconsistencies feature and your mapping failing because of it.
I think you have used Signature change feature for changing the occurrence, So for this if you want to do unit test in Test tab, fit your test XML message between
<?xml version="1.0" encoding="UTF-8"?>
Your test XML
Else you can do End to End testing, here PI will take care of <Message> and <Message1>.
hope this helps,
When you test your message mapping(multi mapping) source structure will have addition elements in Messae mapping test tab, but when you run interface end to end it handles automatically. so you no need to wory about it. Make sure that you have created mapping logic correctly and You source staructure should capble of accepting mutiple records in one payload.
here comes the problem.
when i did end to end testing, i got the below error and it is with handling Messages of multi occurence.
Execution of mapping "http://xyz/JPM_TO_MRI_PaymentData" failed. Reason: MappingException: Mapping failed, ApplicationRuntimeException: Runtime Exception when executing application mapping program com/sap/xi/tf/_JPM_TO_MRI_PaymentData_22_; Details: com.sap.aii.mappingtool.tf7.IllegalInstanceException; Cannot create target element /ns0:Messages. Values missing in queue context. Target XSD requires a value for this element, but the target-field mapping does not create one. Check whether the XML instance is valid for the source XSD, and whether the target-field mapping fulfils the requirement of the target XSD, IllegalInstanceException: Cannot create target element /ns0:Messages. Values missing in queue context. Target XSD requires a value for this element, but the target-field mapping does not create one. Check whether the XML instance is valid for the source XSD, and whether the target-field mapping fulfils the requirement of the target XSD
my operation mapping contains below 4 message(graphical) mapping
JPM_TO_MRI_PaymentData1 : which is 1-1
JPM_TO_MRI_PaymentData2 : which is 1-1
JPM_TO_MRI_PaymentData22 : which is 1-n here is the problem
JPM_TO_MRI_PaymentData3 : which is n-m
solution to this is highly appriciated.
i have passed the above error at mapping..
now i have error writing to target file:
below is the log from RWB
Apr 4, 2012 11:26:14 AM Information Write to file "/interfac/JPMC_PaymentData_20120404-112614-271.txt" as text (encoding ISO646-US) size 244 bytes.
Apr 4, 2012 11:26:14 AM Information Start converting XML document content to plain text
Apr 4, 2012 11:26:14 AM Error File processing failed with java.lang.Exception: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure 'ns0:Message1' found in document', probably configuration error in file adapter (XML parser error)'
After your target structure (and mapping and so on) changed, you need to adjust the File Content Conversion parameters of the receiver file Communication Channel to the new structure. See here for detailed description of the attributes: http://help.sap.com/saphelp_nwpi71/helpdata/en/44/686e687f2a6d12e10000000a1553f6/content.htm
Let us know if you still need some help with some particular conversion attribute.
Hope this helps,