Skip to Content
0
Former Member
Apr 29, 2010 at 07:20 AM

ItemGroupCode is not the same

36 Views

Hi everybody,

I have a simple scnerio. B1 to B1 Item synchronisation. Now I found out that the ItemGroupCode isn't necessarily the same in the receiver system. Seems that one can only type the name of the group, the code is generated. So simply passing the code from sender to receiver doesn't work.

So I gues KeyExpansion is the way to try. But I'm stuck here.

[B1i - KeyExpansion no payload in b1i.message |b1i---keyexpansion-no-payload-in-b1imessage]

I've got the same problem. The SA part of my B1.2007_ITM object won't appear in the message.

	<KeyExpansionRule side="S">
		<TargetObjectType ObjectNameSpace="xmlns=&apos;urn:sap-com:document:sap:rfc:functions&apos;" 
ObjectTypeId="B1.2007_ITM" RequestGenerationRuleLink="/sim.com.sap.b1i.datasync.001/biu.Z.B1ITM2B1ITM/B1GetItmGroupCode.xsl">
			<ObjectKeyList>
				<ObjectKey FieldName="ItmsGrpCode" SelectionPath="//BOM/BO/Items/row/ItmsGrpCode"></ObjectKey>
			</ObjectKeyList>
		</TargetObjectType>
	</KeyExpansionRule>

I need to use SQL since the only link between the ItemGroupCodes is theyr name. Here in my test example I use VERY simple SQL statement, so don't worry.

	<xsl:output method="xml" encoding="UTF-8" indent="yes"></xsl:output>
	<xsl:template match="/">
		<xsl:variable name="QueryPOSqlStatement">
			Select	102 As ItmsGrpCode From OITB
		</xsl:variable>
		<Envelope xmlns="">
			<Header>
				<Action>execsql</Action>
			</Header>
			<Body>
				<BOM>
					<BO>
						<QueryStatement>
							<xsl:value-of select="$QueryPOSqlStatement"></xsl:value-of>
						</QueryStatement>
					</BO>
				</BOM>
			</Body>
		</Envelope>
	</xsl:template>
</xsl:stylesheet>

In the graphical scenario designer the keyexpansion part is shining green. But still no message.

Well I hope you guys can help me, like usual. Thanks.