Skip to Content
Technical Articles

SAP Business By Design Output Management – part 2

This blog post is the second part of the SAP Business ByDesign Output Management series and  covers Output Management Business Configuration as well as XML output formatting details.

1.     Business Configuration/Scoping

Several questions and scope elements need to be setup in the SAP Business ByDesign Business Configuration/Scoping to take full advantage of the Output Management capabilities.

Activate External System

To be able to use the different output channels as part of the Output Management feature you need to explicitly enable them in your project scope. Without enabling them you might not see them as possible options in the Output Channel selection view.
In the following screen you see the Questions for Process-Integrated Input and Output Management where we can scope the E-mail, External System Based Communication…

Business Collaboration

You need to select the business documents that you want to send or receive electronically to or from your business partners as part of your project scope.

For each type of document, you can enable the question for communication section “Do you want to transmit XYZ documents to your customers electronically using Electronic Data Exchange?”

Enable Web Service Messages monitoring

If you want to use the Web Service Messaging Monitoring view as proposed in the section How to check your Output Channel configuration section of my precedent blog post, you need to activate the Web Service Message Monitoring group part of the Questions for Process-Integrated Input and Output Management.

2.     XML format

Let’s check the format of the XML sent to our External System.

XML default format

You can download the specific form template xml and xsd schema for each document type in the work center Application and User Management -> Form Template Maintenance. This will be the default XML format sent to your External System.

eInvoicing XML

For Invoice Documents you can maintain an XSLT file for XML transformation. You can make use of the transformations in the output channel definition. When you release a customer invoice document an additional output is provided following the transformed XML format.
Check the help center for details on How to Maintain Transformation ID in Output Management to Support Electronic Invoicing.

How to build the XSLT transformation

In order to build your specific XSLT file, you can download the Application and User Management -> Form Template Maintenance templates proposed previously.

Here you can find a Customer Invoice transformation example:

<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
	<xsl:output encoding="UTF-8" indent="yes" method="xml" />
	<xsl:strip-space elements="*" />
	<xsl:template match="/">
		<b1i-xs1:Invoice xmlns:b1i-xs1="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" xmlns:n0="http://sap.com/xi/SAPGlobal20/Global" xmlns:prx="urn:sap.com:proxy:Q2Q:/1SAI/TAS369B8FA8185C943E30C3:711:2008/09/23">
			<cbc:ID>
				<xsl:value-of select="/n0:FormInvoiceRequest/CustomerInvoice/ID" />
			</cbc:ID>
			<cbc:DueDate>
				<xsl:value-of select="/n0:FormInvoiceRequest/CustomerInvoice/Date" />
			</cbc:DueDate>
			<cac:PayeeParty>
				<cac:PartyIdentification>
					<cbc:ID>
						<xsl:value-of select="/n0:FormInvoiceRequest/CustomerInvoice/BuyerParty/InternalID" />
					</cbc:ID>
				</cac:PartyIdentification>
				<cac:PartyName>
					<cbc:Name>
						<xsl:value-of select="/n0:FormInvoiceRequest/CustomerInvoice/BuyerParty/FormattedName" />
					</cbc:Name>
				</cac:PartyName>
			</cac:PayeeParty>
			<cac:LegalMonetaryTotal>
				<cbc:LineExtensionAmount currencyCode="USD">
					<xsl:value-of select="/n0:FormInvoiceRequest/CustomerInvoice/PriceAndTax/NetAmount" />
				</cbc:LineExtensionAmount>
				<cbc:TaxExclusiveAmount currencyCode="USD">
					<xsl:value-of select="/n0:FormInvoiceRequest/CustomerInvoice/PriceAndTax/TaxAmount" />
				</cbc:TaxExclusiveAmount>
				<cbc:TaxInclusiveAmount currencyCode="USD">
					<xsl:value-of select="/n0:FormInvoiceRequest/CustomerInvoice/PriceAndTax/GrossAmount" />
				</cbc:TaxInclusiveAmount>
			</cac:LegalMonetaryTotal>
			<cac:InvoiceLine>
				<xsl:for-each select="/n0:FormInvoiceRequest/CustomerInvoice/Item">
					<cac:Item>
						<cbc:ID>
							<xsl:value-of select="ID" />
						</cbc:ID>
						<cbc:Description>
							<xsl:value-of select="Description" />
						</cbc:Description>
					</cac:Item>
				</xsl:for-each>
			</cac:InvoiceLine>
		</b1i-xs1:Invoice>
	</xsl:template>
</xsl:transform>

How to maintain the XSLT transformations in ByDesign

To maintain the XSLT file for XML transformation search for Common Master Data Configuration in the Business Configuration Overview work center. Some extra details are shared in the What’s New in Cross-Area Topics – Electronic Invoicing help documentation.

How to assign the transformation to your Output Channel

When you configure your Output Channel either at Document Instance, Business Partner or Output channel level an optional Transformation parameter asks for a Transformation configuration. By pointing to the desired transformation, the output xml will be formed based on the selected transformation.

How will the transformed output XML be accessible

Depending on the output channel selected the transformed XML will be provided differently:

Output History

Transformed XML (As per the transformation defined for the document earlier) can be accessed in the Output History tab via the View Data XML button.

Printer

Transformed XML can be saved locally via Cloud Print Manager tool.

E-Mail

Transformed XML gets sent along with form PDF via email.

External System XML

Transformed XML gets sent as part of <OutputDataXML> content tag to an end point URL.

Here we can see an XML example generated by applying the XSLT configured in the previous sections:

I hope this blog will help you configure Output Management on your environment.
Don’t hesitate to provide feedback and share some business use cases implemented with this feature, you can reach me here or in Twitter @TrinidadMGea.

Thank you for reading 😉

Be the first to leave a comment
You must be Logged on to comment or reply to a post.