cancel
Showing results for 
Search instead for 
Did you mean: 

Existing mapping change from one-one to one-many

Former Member
0 Kudos

Hi,

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)

Example:

032412

032412

032512

032412

032512

032612

032412

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.

Thanks.
Prema Boodi

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Closing this thread.. as i have opened another thread for related query..

Answers (3)

Answers (3)

Former Member
0 Kudos

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)'

former_member184681
Active Contributor
0 Kudos

Hi,

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,
Greg

Former Member
0 Kudos

how do i change fcc parameters; if my mapping changes from 1-1  to 1: n mapping 

is fcc going to be diffrent? if yes, then what should i change to handle n files.. thanks for your help Greg..

Former Member
0 Kudos

Hi Prema,

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

http://scn.sap.com/people/jin.shin/blog/2008/02/15/sap-pi-71-mapping-enhancements-series-correct-str...

Hope this helps,

Ankit

Former Member
0 Kudos

thanks ankit..

i got the mappimg corrected with mapping template; my problem now is; after the change my mapping does not accept the input file; strucure is different.. and i dont want to disturb the input.. just the mapping n the ouput..

Former Member
0 Kudos

Hi Prema,

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.

regards,

Ankit

Former Member
0 Kudos

Ankit,

When I want to unit test; after loading the test instance,  the node is red; it means it doesn't accept the input or the input is wrong.. One of above blog says "remove the elements<Message> and<Message1>"  is this only for unit testing or end to end testing?

Former Member
0 Kudos

Hi Prema,

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"?>

<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">

   <ns0:Message1>

       Your test XML

   </ns0:Message1>

</ns0:Messages>

Else you can do End to End testing, here PI will take care of <Message> and <Message1>.

hope this helps,

Ankit

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi Prema,

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.

Regards,

Raj

Former Member
0 Kudos

All,

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.

Former Member
0 Kudos

>>it addes Messages as the main node and Messages1 as subnode on both source and target

this is how the multimapping works

http://scn.sap.com/people/ranga.rajan2/blog/2010/03/17/multi-mapping-with-a-simple-scenario--fledgli...

whats your exact problem??

in case you want to create dynamic file name then go for variable substitution...

http://wiki.sdn.sap.com/wiki/display/NWTech/One+IDOC+to+Multiple+Files+sending+to+Multiple+folders+o...)

Thanks

Amit Srivastava

Former Member
0 Kudos

thanks amit;

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..

Former Member
0 Kudos

Hi,

Execute your scenario end-to-end using the actual source message (without having Messages and Message1 node) and it will work (PI will handle the mapping accordingly).

Thanks

Amit Srivastava