cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple receiver key expansions

Former Member
0 Kudos

Hello all,

I've created a B1 2 B1 scenario with 3 key expansion: one in the sender side and two in the receiver side.

Those keyexpansion never work all toghether but works only the one in the sender side and one random in the receiver side.

Generally works only the second receiver keyexpansion that is in the BIUMETA. I've discovered that swapping the KeyExpansionRule Node in the BIUMETA.

Anyone knows something about this strange behavior?

Thank you all in advance.

Accepted Solutions (1)

Accepted Solutions (1)

marcus_schmalz2
Participant
0 Kudos

Hi Luca,

there is a problem if you have the same combination of ObjectType (in fact PublicationObjectType) and SysID as sender key expansion and also as receiver key expansion.

If that is the case you should consider to use a B1 call atom in the BizFlow instead of at least one key expansion.

But it would help for the problem analysis, if you post your BIUMETA content.

Kind regards,

Marcus

Former Member
0 Kudos

This is the BIUMETA:

<?xml version="1.0" encoding="UTF-8"?>
<BIU xmlns:bfa="urn:com.sap.b1i.bizprocessor:bizatoms" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:com.sap.b1i.sim:entity" xsi:schemaLocation="urn:com.sap.b1i.sim:entity ../../com.sap.b1i.system.sld.repository/General.xsd/SemanticIntegrationModel.xsd" SenderSysTypeId="B1.8.8" ReceiverSysTypeId="B1.8.8" SenderCountryCode="*" ReceiverCountryCode="*" SenderMainObjectTypeId="Z.B1.8.8_SalesOrder_CF" ReceiverMainObjectTypeId="Z.B1.8.8_SalesOrder_CF" MainBizflow="Main.bfd" Name="Z.PRG_BIZS_Docs_SalesOrders">
	<KeyExpansionRule side="S">
		<TargetObjectType ObjectNameSpace="" ObjectTypeId="MyContactPerson" RequestGenerationRuleLink="/sim.com.sap.b1i.datasync.001/biu.Z.PRG_BIZS_Contacts_Activity/B1GetCPName.xsl">
			<ObjectKeyList>
				<ObjectKey FieldName="ContactPersonCode" SelectionPath="//BOM/BO/Documents/row/ContactPersonCode"/>
			</ObjectKeyList>
		</TargetObjectType>
	</KeyExpansionRule>

	<KeyExpansionRule side="R">
		<TargetObjectType ObjectNameSpace="" ObjectTypeId="MyRecContPers" RequestGenerationRuleLink="/sim.com.sap.b1i.datasync.001/biu.Z.PRG_BIZS_Contacts_Activity/B1GetRecCPCode.xsl">
			<ObjectKeyList>
				<ObjectKey FieldName="CardCode" SelectionPath="//BOM/BO/Documents/row/CardCode"/>
			</ObjectKeyList>
		</TargetObjectType>
	</KeyExpansionRule>
	
	<KeyExpansionRule side="R">
		<TargetObjectType ObjectNameSpace="" ObjectTypeId="Z.B1.8.8_Quotation_CF" RequestGenerationRuleLink="/sim.com.sap.b1i.datasync.001/biu.Z.PRG_BIZS_Docs_SalesOrders/B1SalesOrderReferenceRequest.xsl">
			<ObjectKeyList>
				<!--<ObjectKey FieldName="BaseEntry" SelectionPath="//BOM/BO/Document_Lines/row/BaseEntry"/>-->
				<ObjectKey FieldName="BaseEntry" SelectionPath="//BOM/BO/Document_Lines/row[BaseEntry!=0]/BaseEntry"/>
			</ObjectKeyList>
		</TargetObjectType>
	</KeyExpansionRule>
</BIU>

bastian_schaefer
Active Contributor
0 Kudos

Hi Luca,

is it by intension to find the receiver key expansion in a different BIU folder (biu.Z.PRG_BIZS_Docs_SalesOrders/B1SalesOrderReferenceRequest)?

Best regards

Bastian

Former Member
0 Kudos

Yes because I want to reuse the xsl.

bastian_schaefer
Active Contributor
0 Kudos

... please duplicate the XSL and copy it into the actual BIU folder you're using.

All used key expansions of one BIU (XSL) should also be available in it's BIU folder.

For using keyexpansions please don't 'jump' between different BIU folders, otherwise if you transport one BIU to another B1i and miss to transport the other BIU, your scenario is not working anymore.

Please avoid any jumps between different BIUs.

Best regards

Bastian

Former Member
0 Kudos

I've duplicated the xsl into the actual BIU folder and i've updated the BIUMETA but nothing changed:

Only the first and the third keyexpansion work.

marcus_schmalz2
Participant
0 Kudos

Hi Luca,

please try this way:

<?xml version="1.0" encoding="UTF-8"?>
<BIU xmlns:bfa="urn:com.sap.b1i.bizprocessor:bizatoms" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:com.sap.b1i.sim:entity" xsi:schemaLocation="urn:com.sap.b1i.sim:entity ../../com.sap.b1i.system.sld.repository/General.xsd/SemanticIntegrationModel.xsd" SenderSysTypeId="B1.8.8" ReceiverSysTypeId="B1.8.8" SenderCountryCode="*" ReceiverCountryCode="*" SenderMainObjectTypeId="Z.B1.8.8_SalesOrder_CF" ReceiverMainObjectTypeId="Z.B1.8.8_SalesOrder_CF" MainBizflow="Main.bfd" Name="Z.PRG_BIZS_Docs_SalesOrders">
	<KeyExpansionRule side="S">
		<TargetObjectType ObjectNameSpace="" ObjectTypeId="MyContactPerson" RequestGenerationRuleLink="/sim.com.sap.b1i.datasync.001/biu.Z.PRG_BIZS_Contacts_Activity/B1GetCPName.xsl">
			<ObjectKeyList>
				<ObjectKey FieldName="ContactPersonCode" SelectionPath="//BOM/BO/Documents/row/ContactPersonCode"/>
			</ObjectKeyList>
		</TargetObjectType>
	</KeyExpansionRule>
 
	<KeyExpansionRule side="R">
		<TargetObjectType ObjectNameSpace="" ObjectTypeId="MyRecContPers" RequestGenerationRuleLink="/sim.com.sap.b1i.datasync.001/biu.Z.PRG_BIZS_Contacts_Activity/B1GetRecCPCode.xsl">
			<ObjectKeyList>
				<ObjectKey FieldName="CardCode" SelectionPath="//BOM/BO/Documents/row/CardCode"/>
			</ObjectKeyList>
		</TargetObjectType>
		<TargetObjectType ObjectNameSpace="" ObjectTypeId="Z.B1.8.8_Quotation_CF" RequestGenerationRuleLink="/sim.com.sap.b1i.datasync.001/biu.Z.PRG_BIZS_Docs_SalesOrders/B1SalesOrderReferenceRequest.xsl">
			<ObjectKeyList>
				<!--<ObjectKey FieldName="BaseEntry" SelectionPath="//BOM/BO/Document_Lines/row/BaseEntry"/>-->
				<ObjectKey FieldName="BaseEntry" SelectionPath="//BOM/BO/Document_Lines/row[BaseEntry!=0]/BaseEntry"/>
			</ObjectKeyList>
		</TargetObjectType>
	</KeyExpansionRule>
</BIU>

Please don't forget to change each RequestGenerationRuleLink in this code according to the new path of the copied xsl-files, as Bastian recommended.

Kind regards,

Marcus

Former Member
0 Kudos

OOh fantastic Marcus the last BIUMETA works well!

Thank you all.

Answers (0)