Function view_maintenance_call: View Change Report

Source: Internet
Author: User

Sm30 table View Maintenance Tool

Create se55 first,

In the program, you can use the following function to call sm30.

Call function 'view _ maintenance_call'
Exporting
Action = 'U'
* Pai_number =''
* Generate_maint_tool_if_missing =''
* Show_selection_popup =''
View_name = 'zll _ Test'
* No_warning_for_clientindep =''
* Rfc_destination_for_upgrade =''
* Client_for_upgrade =''
* Variant_for_selection =''
* Complex_selconds_used =''
* Tables
* Dba_sellist =
* Excl_cua_funct =
* Exceptions
* Client_reference = 1
* Foreign_lock = 2
* Invalid_action = 3
* No_clientindependent_auth = 4
* No_database_function = 5
* No_editor_function = 6
* No_show_auth = 7
* No_tvdir_entry = 8
* No_upd_auth = 9
* Only_show_allowed = 10
* System_failure = 11
* Unknown_field_in_dba_sellist = 12
* View_not_found = 13
* Others = 14
.
If SY-SUBRC <> 0.
* Message ID SY-MSGID type SY-MSGTY number SY-MSGNO
* With SY-MSGV1 SY-MSGV2 SY-MSGV3.
Endif.

Function: view_maintenance_call
Function: maintain table views.
The function module callthe extended table maintenance (view maintenance ).
Parameters:
Import: Action S = display u = change T = transport
Transfer_number transfer number (the above action is T)
Show_selection_popup: whether to display the selection screen
View_name view name
No_warning_for_clientindep cross-group warning
Variant_for_selection variant name
Check_ddic_mainflag to check whether it is a maintenance object
Other parameters are temporarily unavailable.

 

 

 

Article from http://blog.csdn.net/pely122/article/details/8125472

Data Table maintenance is a simple maintenance of data functions, if the user to grant permissions, you can only use T-CODE level control.

If a maintenance table contains factories, materials, and materials (simple example ),

Based on the sap id, we need to determine whether this person has modified the data of a specific factory in the whole school.

For example, abap01 users can only modify data of 1000 factories.

Abap02 can only modify data of 2000 factories.

The table is as follows:

In this case, we can use the view_maintenance_call function to implement this function.

First, a program zdev005 is generated, and then view_maintenance_call is called in this program.

Report zdev005.

Data: gt_vimsellist
Type table of vimsellist
With header line.
Data: gv_werks
Type werks_d.

Case SY-UNAME.
When 'abap01 '.
Gv_werks = '123 '.
When 'abap02 '.
Gv_werks = '123 '.
Endcase.

GT_VIMSELLIST-VIEWFIELD = 'werk '.
GT_VIMSELLIST-OPERATOR = 'eq '.
GT_VIMSELLIST-VALUE =
Gv_werks.

Append gt_vimsellist.

Call function 'view _ maintenance_call'
Exporting
Action = 'U'
View_name = 'zdev001t'
Complex_selconds_used = 'X'
Tables
Dba_sellist = gt_vimsellist.

When you log on with abap01:

When you log on with abap02:

 

 

Article from http://blog.csdn.net/chbvb4302/article/details/4376838

A user interaction program needs to be created some time ago. Create a table first, and then call the view_maintenance_call function,

When creating a table using SE11, you must generate an object for the table se54. :

Then, the following code is called in the SE11 program:

Report zmmtest.
"End-of-selection.
Perform zview_maintance using
'Table name '.

*&---------------------------------------------------------------------*
* & Form zview_maintance
*&---------------------------------------------------------------------*
"Maintain the custom view Process
*----------------------------------------------------------------------*
"--> P_view_name text
*----------------------------------------------------------------------*
Form zview_maintance using p_view_name
Like dd02v-tabname.
Call Function
'View _ maintenance_call'
Exporting
Action = 'U'
View_name = p_view_name
Exceptions
Client_reference = 1
Foreign_lock = 2
Invalid_action = 3
No_clientindependent_auth = 4
No_database_function = 5
No_editor_function = 6
No_show_auth = 7
No_tvdir_entry = 8
No_upd_auth = 9
Only_show_allowed = 10
System_failure = 11
Unknown_field_in_dba_sellist = 12
View_not_found = 13
Maintenance_prohibited = 14
Others =
15.
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.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.