Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
may_thitsaoo
Contributor

Hi,

I would like to share how to add extension fields in standard Excel Upload template.

Step1 : Create SalesOrder xbo.

Step2 : Create Process Extension Scenario of SalesOrder BO.

I'll create one ext field in Root and one in Item node, so, two PES is also needed to create for Root and Item node.

Check Inbound service (ManageSalesOrderIn) with MaintainBundle operation.

PES_SalesOrder_Root.xs for Root node.

PES_SalesOrder_Items.xs for Item node.

Active and CheckIn PES.

Step 3 : Add PES name in front of the extension field. Save and Activate xbo.

Step 4 : Download Excel Template from browser.

Step 5 : Also download SalesOrder wsdl (MaintainBundle operation).

Step 6 :  Manually change download excel file extension as zip and click OK.

Step 7 : Unzip the file and open to see the contents. Then open xmlMaps.xml with text editor (I'm using Notepad++).

Step 8 : Add the root level extension field.

In this case, the datatype of this ext field is declared as SalesTypeCode (custom code list datatype) in xbo.

So, type should be the same as xbo.

But, this datatype "SalesTypeCode" is custom type so we need to add that also in xml. You can see other standard datatypes are contained about the middle of xml. Just copy some type and edit.

Step 8.1 : Add item level extension field.

You should add this under "Item" contents. Data type is declared as Text types in xbo, so it can be declared as string.

This is used standard type so no need to declare datatype.

Step 9 : Search this codes in your xml.

match="*[contains(local-name(),'__')]

And add the following codes before that.

<xsl:template match="salesTypeTest">

  <xsl:element namespace="http://refsystems.sap.com/YGPXKE9HY_" name="salesTypeTest">

  <xsl:value-of select="."/>

  </xsl:element>

</xsl:template>

<xsl:template match="itemTest">

  <xsl:element namespace="http://refsystems.sap.com/YGPXKE9HY_" name="itemTest">

  <xsl:value-of select="."/>

  </xsl:element>

</xsl:template>

You can find the namespace in wsdl file.

Open wsdl file with text editor and search your ext field name and copy namespace.

Save the xml.

Step 10 : Select these files and create zip.(I used 7zip)

Step 11 : Chane the zip file extension as xlsx.

Open excel file and now you can see your extension fields in excel template xml.

6 Comments
Labels in this area