sap abap通过STRANS导出excel(XLST程序)

本文介绍了如何在SAP中利用ABAP通过STRANS工具创建excel模板,构建简单的转换,并进行数据源配置,最终实现Excel导出的功能。
摘要由CSDN通过智能技术生成

创建excel模板

构建strans(简单转换)

在这里插入图片描述
在这里插入图片描述
另存为XML文件
在这里插入图片描述
打开这个xml文件,用浏览器打开 ,得到模板源码
在这里插入图片描述
在这里插入图片描述

新建stans-简单转换 事务码strans
在这里插入图片描述

在这里插入图片描述

<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" xmlns:asx="http://www.sap.com/abapxml" exclude-result-prefixes="asx" version="1.0">
  <xsl:template match="/">
    <xsl:processing-instruction name="mso-application">
      <xsl:text>progid="Excel.Sheet"</xsl:text>
    </xsl:processing-instruction>


  </xsl:template>

</xsl:transform>

在这里插入图片描述

最后,这里需要手工加一下数据来源
在这里插入图片描述

完整的strans

<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" xmlns:asx="http://www.sap.com/abapxml" exclude-result-prefixes="asx" version="1.0">
  <xsl:template match="/">
    <xsl:processing-instruction name="mso-application">
      <xsl:text>progid="Excel.Sheet"</xsl:text>
    </xsl:processing-instruction>
    <Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:html
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值