*&———————————————————————*
*& Report ZMM127_DEPT
*&———————————————————————*
*&
*&———————————————————————*
REPORT zmm127_dept
.
TABLES
: ztdept_txt
, sscrfields
.
.
DATA
:
BEGIN
OF gt_valuetable
OCCURS
0
,
value
(
255
)
,
END
OF gt_valuetable
.
DATA
: gt_zmm127
TYPE
TABLE
OF ztdept_txt
,
gs_zmm127
LIKE
LINE
OF gt_zmm127
.
SELECTION-SCREEN
BEGIN
OF
BLOCK b1
WITH
FRAME
TITLE
TEXT
–
001
.
SELECTION-SCREEN
FUNCTION
KEY
1
.
“可以设置1~5五个功能键
SELECTION-SCREEN
FUNCTION
KEY
2
.
“可以设置1~5五个功能键
SELECT-OPTIONS
: s_type
FOR ztdept_txt
–zdept_type
,
s_brsch
FOR ztdept_txt
–brsch
,
s_txt
FOR ztdept_txt
–zdept_txt
.
SELECTION-SCREEN
END
OF
BLOCK b1
.
START-OF-SELECTION
.
PERFORM frm_view_maintenance
.
END-OF-SELECTION
.
*&———————————————————————*
*& Form FRM_VIEW_MAINTENANCE
*&———————————————————————*
* text
*———————————————————————-*
* –> p1 text
* <– p2 text
*———————————————————————-*
FORM frm_view_maintenance
.
SELECT *
INTO
TABLE gt_zmm127
FROM ztdept_txt
WHERE zdept_type
IN s_type
AND brsch
IN s_brsch
AND zdept_txt
IN s_txt
.
SORT gt_zmm127
BY zseqno
.
gt_valuetable[]
= gt_zmm127
.
CALL
FUNCTION
‘VIEW_MAINTENANCE_GIVEN_DATA’
EXPORTING
action
=
‘U’
* CORR_NUMBER = ‘ ‘
* GENERATE_MAINT_TOOL_IF_MISSING = ‘ ‘
view_name
=
‘ZTDEPT_TXT’
* NO_WARNING_FOR_CLIENTINDEP = ‘ ‘
* RFC_DESTINATION_FOR_UPGRADE = ‘ ‘
client_for_upgrade
=
‘X’
* VARIANT_FOR_SELECTION = ‘ ‘
* COMPLEX_SELCONDS_USED = ‘ ‘
TABLES
data
= gt_valuetable
* DBA_SELLIST =
* EXCL_CUA_FUNCT =
* EXCEPTIONS
* CLIENT_REFERENCE = 1
* FOREIGN_LOCK = 2
* INVALID_ACTION = 3
* NO_CLIENTINDEPENDENT_AUTH = 4
* NO_DATABASE_FUNCTION = 5
* NO_SHOW_AUTH = 6
* NO_TVDIR_ENTRY = 7
* NO_UPD_AUTH = 8
* ONLY_SHOW_ALLOWED = 9
* SYSTEM_FAILURE = 10
* UNKNOWN_FIELD_IN_DBA_SELLIST = 11
* VIEW_NOT_FOUND = 12
* OTHERS = 13
.
IF sy
–subrc <>
0
.
* Implement suitable error handling here
ENDIF
.
ENDFORM
.
原创文章,作者:奋斗,如若转载,请注明出处:https://blog.ytso.com/20098.html