Simple Transfermation Program

Have you been requested to generate notification eamils for SAP users and been struggling with the text alignment problems?

Yes, html eamil is a good solution to solve the alignment issue, but how to construct the mail content?

1. We can concatenate literal html tags with sap data in ABAP program to construct the mail

2. We can use general text as template to generate eamil

3. Is there any better solution? Yes, we can use ST program!

http://help.sap.com/saphelp_nw04/helpdata/en/e3/7d4719ca581441b6841f1054ff1326/frameset.htm

 

Example:

1. Create a separate ST program with below notes:
  a) If abap data object was defined with type N, blank place must be filled with 0, otherwise
the simple transformation program will dump with exception XML_CONVERSION_NO_NUMBER.
e.g. DATA: lv_1 TYPE n LENGTH 3. value of lv_1 can be '009' but NOT '9' or '09'.
  b) Before using local variable in ST condition command, we must initialize it with ST command either
assign or clear.
e.g.
<tt:assign to-var="v1" ref="r1"/>
<tt:clear var="v1"/>
  c) Can NOT pass itab with header line to ST program.
2. CALL TRANSFORMATION xxx in general abap program
    SOURCE para1= ls_para1
           para2 = lt_para2[]
    RESULT XML xml_string.

3. Convert xml_string into SOLI itab

4. Send eamil

 

Tutorial: Data exchange between ABAP and XML

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值