matinal:SAP script

🚀欢迎来到本文🚀
🍉个人简介:matinal,目前职业是IT行业,一个正在慢慢前行的普通人。
🏀系列专栏:涵盖SAP各模块,Python,Excel,人工智能等
💡 其他专栏:一些平时学习的技术,感兴趣的小伙伴可以看看。

🍔公众号:matinal
🎁希望各位→点赞👍 + 收藏⭐️ + 留言📝 ​
⛱️万物从心起,心动则万物动🏄‍♂️


 前言:SAP ABAP 关于SAP系统中如何集成HTTPS的若干功能总结篇,这是第五篇。本篇主要介绍SAP中集成http服务,所以,如果你了解并熟知,请略过本篇。本篇是ChatGPT给出的回答。

🦙(工作遇到傻逼,千万要远离。道路千万条,远离傻逼第一条)


1.sap script 是用来设计单据格式并打印的工具

2.事务码:se71 或者选择 Tools->SAPscript->Form

3.工作流程 program:open_form->start_form->write_form->close_form.

CALL FUNCTION 'OPEN_FORM'
EXPORTING FORM = SPACE               " you can enter a form name here, if you leave the parameter blank,you must call start_form with a valid   formname before "starting any output functions
LANGUAGE = SY-LANGU                     " system language
DEVICE = 'PRINTER'                      
DIALOG = 'X'
OPTIONS = SPACE
APPLICATION = 'TX'
ARCHIVE_INDEX = SPACE
ARCHIVE_PARAMS = SPACE
IMPORTING LANGUAGE =
RESULT =
NEW_ARCHIVE_PARAMS =
EXCEPTIONS CANCELED = DEVICE =
FORM =                 “
OPTIONS =
UNCLOSED =


”DEVICE:    VALUE:  'PRINTER' print output
                            'TELEX' telex output
                            'TELEFAX' telefax output
                             'ABAP' screen output as ABAP list
                             'SCREEN' screen output as ABAP list

"DIALOG":   VALUE:   'X'   display print parameter screen

                                   '  '    display no print parameter screen

                                   default value: 'X'

"OPTIONS": use parameter OPTIONS to set several options for print formatting. the parameter has the structure ITCPO. the user can change some of the defined settings on

the print control screen.   Structure:ITCPO             Default value: space


CALL FUNCTION 'START_FORM' EXPORTING FORM = SPACE
UNOPENED =
LANGUAGE = SPACE
STARTPAGE = SPACE
PROGRAM = SPACE
ARCHIVE_INDEX = SPACE
IMPORTING LANGUAGE =
EXCEPTIONS FORM =
FORMAT =
UNENDED =
UNUSED =

"unopened: The current form function could not be executed, since the form output was no yet initialized using OPEN_FORM

"unused :One of the parameters FORM or LANGUAGE contains only blanks and no form
has been opened yet whose name or language could be used as defaults.


CALL FUNCTION 'WRITE_FORM'
WINDOW = 'MAIN'
TYPE = 'BODY'
IMPORTING PENDING_LINES =
UNOPENED =
EXPORTING ELEMENT = SPACE
FUNCTION = 'SET'
EXCEPTIONS ELEMENT =
FUNCTION =
TYPE =
UNSTARTED =
WINDOW =


ELEMENT
Specify the name of the text element you want to output into the form window specified in the parameter WINDOW. The element must be defined in that form window. If you specify no element, the system uses the default element, if one is defined in the form.
Default value: SPACE
WINDOW
Specify the name of the window into which you want to output the form element specified in the parameter ELEMENT.
Default value: 'MAIN'

TYPE
The system interprets this parameter only for output to the main window.
The parameter determines the area of the main window into which you want to output the element.
Possible values:
'TOP' header area
'BODY' main area
'BOTTOM' footer area
Default value: 'BODY'

CALL FUNCTION 'CLOSE_FORM'
IMPORTING RESULT =
TABLES OTFDATA = ?...
EXCEPTIONS UNOPENED =

4. form

(1).图片上传:RSTXLDMC 或者 Tcode:se78,出现图形管理界面,Store on document sever->graphics general graphics->Bmap grid screens单击导入.
se78 transfer 对应的图片,或者在对应的系统中import 图片,可以在smartforms(running) 或者script form (print testing)中预览.

(2).变量传递:变量的定义和传递在form设计中用“&变量名&”,在程序中只需定义好变量名就可以了,在调用“write_form”函数时会自动传递变量.

(3).查看代码:找到想要查看的window name,比如:main->text->goto>change editor

可以根据Windows 和element确定要显示的块,一般所有的选取数据、数据操作、逻辑判断都在program中进行,少部分的判断在script中添加,或者在program中写好数据处理在form 中使用call.........的形式进行数据处理。字体格式在style中设计

(4).debug:
script       se71 utilies     active debugger            或         RSTXDBUG
smartforms     在对应的function module里进行打断点
(5). 利用事务码:NACE,去追踪form的print program ,同样也可以使用NACE分配给一个标准的打印程序
(6).格式上传和下载:
整体格式上传:RSTXSCRP
图形元素上传:RSTXLDMC
下载格式信息:Utilities->Layout set info
————————————————

 

 怎么样,在了解此篇文章有何感想?


如果本文对大家有所帮助的话,还望各位能给我点赞、收藏并评论一下,感谢各位💕!!! 另如果大家有什么疑问或者建议的话,欢迎评论区留言。更多精彩内容->在这里

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值