将线轴转换为文本格式

问题描述 投票:-2回答:1

我想通过电子邮件发送由Smart Form生成的假脱机作为TXT格式的附件。

问题是使用TXT格式的线轴,没有技术内容,只有表格中的字符。

我已经使用函数模块RSPO_RETURN_SPOOLJOB来获取它,但它返回一个这样的技术格式:

//XHPLJIIID    0700 00000+00000+
IN01ES_CA930_DEMO_3  FIRST
OPINCH12  P 144  240 1728020160000010000100001
IN02MAIN
MT0100808400
CP11000000E
FCCOURIER 120  00144 SF001SF001110000144E
UL +0000000000000
ST0201614Dear Customer,
MT0214209000
ST0864060We would like to take this opportunity to confirm the flight
MT0100809360
ST0763253reservations listed below. Thank you for your custom.
...

我想要的东西如下,没有技术的东西:

     Dear Customer,

          We would like to take this opportunity to confirm the flight
     reservations listed below. Thank you for your custom.
     ...

这是我用过的代码:

PARAMETERS spoolnum type TSP01-RQIDENT.
DATA spool_contents type soli_tab.
CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
  exporting
    rqident = spoolnum
  tables
    buffer  = spool_contents
  exceptions
    others  = 1.
abap
1个回答
0
投票

如果参数DESIRED_TYPE未传递或具有值'OTF',并且假脱机的类型为SAPscript / Smart Form,则功能模块将返回您遇到的技术格式。

相反,您应该使用参数DESIRED_TYPE = 'RAW',以便解释所有技术内容,并以您请求的方式将表单作为文本返回,如下所示:

CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
  exporting
    rqident      = spoolnum
    desired_type = 'RAW'
  tables
    buffer       = spool_contents
  exceptions
    others       = 1.
© www.soinside.com 2019 - 2024. All rights reserved.