sap中角色怎么调用

sap中角色怎么调用,第1张

SAP中的角色一般在开发机中建立,不能自动生成请求号,需要basis手动生成请求号后进行传输。

步骤如下:

1,PFCG;

2,实用程序---------批量传输;

3,输入角色;

4,选择执行

5,输入请求号;

6,SE10释放请求号;

7,STMS中进行传输。

*-----------------------------------------------------------------------

* Program ID:ZTEST904

* Program Name :ZTEST904

*-----------------------------------------------------------------------

* CREATED DATE :2004/09/04

* CREATED BY:LG

* DESCRIPTION :这个程序是学习如何通过程序来调用

*已经做好的SCRIPT画面来生成报表的。

*-----------------------------------------------------------------------

* MODIFICATION :

* DATE MODIFIED MODIFIED BY TRANSPORT REQUESTDESCRIPTION

* 2004/09/18 LG VERSION:01/01学习

*-----------------------------------------------------------------------

REPORT ZTEST904 .

*定义需要使用的表

***********************************************

TABLES: MSEG,

MARA,

MKPF.

*定义一个内部表(带表头)

***********************************************

DATA: BEGIN OF ITAB OCCURS 0,

A LIKE MSEG-MBLNR,

B LIKE MSEG-ZEILE,

END OF ITAB.

* 插入一些使用的数据。

***********************************************

DO 30 TIMES.

ITAB-A = '测试数据'.

ITAB-B = SY-INDEX.

APPEND ITAB.

ENDDO.

* 显示画面数据,显示上面的打印按钮。用户点击打印

* 然后调用打印的SCRIPT。显示答应的数据。

***********************************************

* INITIALIZATION

***********************************************

INITIALIZATION.

* AT SELECTION-SCREEN.

***********************************************

AT SELECTION-SCREEN.

* START-OF-SELECTION

***********************************************

START-OF-SELECTION.

SET PF-STATUS 'ZTEST_904'.

PERFORM PRINT_ITAB TABLES ITAB.

* AT USER-COMMAND.

***********************************************

AT USER-COMMAND.

CASE SY-UCOMM.

WHEN 'USER_PRINT'.

WRITE:/ 'BUTTON CLIKCKED'.

PERFORM OPEN_FORM.

PERFORM START_FORM.

DO 50 TIMES.

PERFORM WRITE_FORM USING '' 'MAIN' 'SET'.

ENDDO.

PERFORM END_FORM.

PERFORM CLOSE_FORM.

ENDCASE.

* TOP-OF-PAGE.

***********************************************

TOP-OF-PAGE.

* END-OF-PAGE.

***********************************************

END-OF-PAGE.

*&----------------------------------------------------------------------

*&FORM : PRINT_ITAB

*&----------------------------------------------------------------------

* <处理概要>

*-----------------------------------------------------------------------

* <种别(入出力) <参数名><类型><调用类型参照,值>>

*-----------------------------------------------------------------------

* FORM PRINT_ITAB TABLES JTAB LIKE ITAB[].

FORM PRINT_ITAB TABLES JTAB STRUCTURE ITAB.

LOOP AT JTAB.

WRITE:/ JTAB-A , 10 JTAB-B.

ENDLOOP.

ENDFORM.

FORM PRINT_PAGE.

ENDFORM.

FORM OPEN_FORM.

CALL FUNCTION 'OPEN_FORM'

EXPORTING

* APPLICATION = 'TX'

* ARCHIVE_INDEX =

* ARCHIVE_PARAMS=

DEVICE= 'PRINTER'

* DIALOG= 'X'

FORM = 'ZTEST904'

LANGUAGE = SY-LANGU

* OPTIONS =

* MAIL_SENDER =

* MAIL_RECIPIENT=

* MAIL_APPL_OBJECT =

* RAW_DATA_INTERFACE= '*'

* IMPORTING

* LANGUAGE =

* NEW_ARCHIVE_PARAMS=

* RESULT=

EXCEPTIONS

CANCELED = 1

DEVICE= 2

FORM = 3

OPTIONS = 4

UNCLOSED = 5

MAIL_OPTIONS = 6

ARCHIVE_ERROR = 7

INVALID_FAX_NUMBER= 8

MORE_PARAMS_NEEDED_IN_BATCH = 9

SPOOL_ERROR = 10

OTHERS= 11

.

IF SY-SUBRC <>0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDFORM.

FORM CLOSE_FORM.

CALL FUNCTION 'CLOSE_FORM'

* IMPORTING

*RESULT =

*RDI_RESULT =

* TABLES

*OTFDATA=

EXCEPTIONS

UNOPENED = 1

BAD_PAGEFORMAT_FOR_PRINT = 2

SEND_ERROR = 3

SPOOL_ERROR= 4

OTHERS = 5

.

IF SY-SUBRC <>0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDFORM.

FORM START_FORM.

CALL FUNCTION 'START_FORM'

EXPORTING

*ARCHIVE_INDEX =

FORM = 'ZTEST904'

*LANGUAGE = ' '

STARTPAGE = 'FRIST'

*PROGRAM= ''

*MAIL_APPL_OBJECT =

* IMPORTING

*LANGUAGE =

EXCEPTIONS

FORM = 1

FORMAT = 2

UNENDED= 3

UNOPENED = 4

UNUSED = 5

SPOOL_ERROR= 6

OTHERS = 7

.

IF SY-SUBRC <>0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDFORM.

FORM END_FORM.

CALL FUNCTION 'END_FORM'

* IMPORTING

*RESULT =

EXCEPTIONS

UNOPENED = 1

BAD_PAGEFORMAT_FOR_PRINT = 2

SPOOL_ERROR= 3

OTHERS = 4

.

IF SY-SUBRC <>0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDFORM.

FORM WRITE_FORM USING ELE WIN FUNC.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

ELEMENT= ELE

FUNCTION = FUNC

*TYPE = 'BODY'

WINDOW = WIN

* IMPORTING

*PENDING_LINES =

EXCEPTIONS

ELEMENT= 1

FUNCTION = 2

TYPE = 3

UNOPENED = 4

UNSTARTED = 5

WINDOW = 6

BAD_PAGEFORMAT_FOR_PRINT = 7

SPOOL_ERROR= 8

OTHERS = 9

.

IF SY-SUBRC <>0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDFORM.

sap没有可用的程序用于文档处理方法如下。

1、把项目文档信息放入到SAP程序的文档里。

2、把项目文档放在某个服务器上,程序里放链接去调用。

3、SAP,为SystemApplicationsandProducts的简称,是SAP公司的产品——企业管理解决方案的软件名称。


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/11708775.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-18
下一篇 2023-05-18

发表评论

登录后才能评论

评论列表(0条)

保存