cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP PI/PO Use one as Many Node functionality

0 Likes
6,420

Hi Experts,

Recently we have migrated all the PI 7.3 version links to SAP PO7.5 sp12, and after that noticed that one of the mapping is getting failed, narrowed it down and found that UseOneAsmany display queue is throwing this error

we have not changed anything in the mapping, but somehow it is not liking in latest version, any pointer would be appreciated.

My scenario is CREMAS IDOC to Database mapping.

"Exception:[com.sap.aii.mappingtool.tf7.FunctionException: Too many values in the first queue in function useOneAsMany. It must have the same number of contexts as the second queue] in class com.sap.aii.mappingtool.flib7.NodeFunctions method useOneAsMany[[Ljava.lang.String;@7069be45, [Ljava.lang.String;@130b7475, [Ljava.lang.String;@19776c6a, com.sap.aii.mappingtool.tf7.rt.ResultListImpl@3eccd84c, com.sap.aii.mappingtool.tf7.rt.Context@36ac246]

See error logs for details"

Accepted Solutions (0)

Answers (4)

Answers (4)

0 Likes

Thank you so much guys for your quick inputs. This was working fine in older version of SAP PI, started getting this issue when we migrated the scenario to SAP PO7.5, I have followed SAP note "2434890 - New Feature : Mapping migration switch for XI 7.0 to PI 7.5 upgrade" along with Map with Default node function. please find below mapping snippets and error message. I am also planning to open a OSS Message with SAP. Please let me know if you have any further input based on the error and SAP PO 7.5 upgraded version.

Error Message:

Mapping "urn:finance:VendorMasterDetailsToGLUE:map/IM_IDOCZCREMAS_FI_CREMAS05_ZXCREMAS05_TO_MI_VendorMasterDatabaseRequest_IB_ASYNC" failed to execute: MappingException: Mapping failed in runtimeRuntime Exception when executing application mapping program com/sap/xi/tf/_MM_CREMAS05PP_TO_VendorMaster_DBRequest_; Details: com.sap.aii.mappingtool.tf7.MessageMappingException; Runtime exception when processing target-field mapping /ns0:MT_VendorMasterDatabaseRequest/COMP_CODE[2]/TABLE_NAME/access/BATCHKEY(suppressed field); root message: Exception:[com.sap.aii.mappingtool.tf7.FunctionException: Too few values in the second queue in function useOneAsMany. The number of values for all contexts must be the same as the number of values for the third queue] in class com.sap.aii.mappingtool.flib7.NodeFunctions method useOneAsMany[[Ljava.lang.String;@259387aa, [Ljava.lang.String;@3cbeb40, [Ljava.lang.String;@4309f482, com.sap.aii.mappingtool.tf7.rt.ResultListImpl@41a51f74, com.sap.aii.mappingtool.tf7.rt.Context@78b27e3d], ApplicationRuntimeException: Runtime Exception when executing application mapping program com/sap/xi/tf/_MM_CREMAS05PP_TO_VendorMaster_DBRequest_; Details: com.sap.aii.mappingtool.tf7.MessageMappingException; Runtime exception when processing target-field mapping /ns0:MT_VendorMasterDatabaseRequest/COMP_CODE[2]/TABLE_NAME/access/BATCHKEY(suppressed field); root message: Exception:[com.sap.aii.mappingtool.tf7.FunctionException: Too few values in the second queue in function useOneAsMany. The number of values for all contexts must be the same as the number of values for the third queue] in class com.sap.aii.mappingtool.flib7.NodeFunctions method useOneAsMany[[Ljava.lang.String;@259387aa, [Ljava.lang.String;@3cbeb40, [Ljava.lang.String;@4309f482, com.sap.aii.mappingtool.tf7.rt.ResultListImpl@41a51f74, com.sap.aii.mappingtool.tf7.rt.Context@78b27e3d], MessageMappingException: Runtime exception when processing target-field mapping /ns0:MT_VendorMasterDatabaseRequest/COMP_CODE[2]/TABLE_NAME/access/BATCHKEY(suppressed field)

former_member202642
Participant
0 Likes

Hi Niranjan,

For Use One as Many to work correctly:

1) 1st two input should have same number of context changes.

2) Last two input i.e. 2nd and 3rd one should have same number of values inside the queue.

Please make sure you are following this logic.

Thanks,

Aamir

isuru_fernando24
Explorer
0 Likes

Your first queue is incorrect. It cannot have repeating values or null values. Also, there should be only one value in each context of the first queue.

Cheers!

Isuru

sugata_bagchi2
Active Contributor
0 Likes

Hello Niranjan,

try adding a mapwithdefault after the DOCNUM. This will Handle Empty Context.

As per the error, you have to maintain the input queues according to the node function's requirement.

1st input = value you want to repeat

2nd input = How many times it will repeat

3rd input = how the context change will be applied.

2nd and 3rd input should have the same number of values

Another way is , if you have only one source value to repeat, assign that value to a variable in the map and assign that variable to the target.

Thanks

Sugata