表格维护器(Table Maintenance Generator)的使用& Table的Maintenance Dialog
1,SE11创建客户表,Unitilies->Table Maintenance Generator:
Authorization Group: %NC%(by default),主要是用于权限
Function Group: 放在指定的FG里,如果没有可以用SE80创建
Maintenance Type: One Step-只需维护一个Screen来直接输入值
Two Step-维护两个Screen用于维护值
Maint.Screen No: 可通过Find Scr.Number(S)自动创建
Recording rountine: 是否维护值后需要创建transport no,具体意义按F1查看。
2, Table Maintenance Generator Dialog ->Environment->Modification
a)Maintenance Screen
可以修改Flow logic 代码
b)User Interface
待补充
c)Events -> New Entries
例如我们选用5(Table maintenance dialog event),当用户用SM30或下面创建的T-code就会触发这个Event:INITAIL_VALUE
双击后面的Editor,可自动创建一个include program或指定已经存在的子程序中,如
*------------------------------
***INCLUDE LZGDDF05 .(子程序名)
*------------------------------
FORM initail_value.
IF NOT zgdemo-bname IS INITIAL.
zgdemo-dscrpt = zgdemo-bname.
...
"相关表维护的初始化值
ENDIF.
ENDFORM. "Initail_Value
最后,激活include子程序, 激活FunctionPool(SAPL + Name of Function Group)
d)Source Code
可以查看表维护生成的所有代码,并可以修改L(Name of FG)F0x,L(Name of FG)TOP
3、创建Tranaction Code[/b]
运行SE93.
Transcation code: T-code & Description
Transaction: SM30, Skip first Screen
Default Values: VIEWNAME Custom Table
UPDATE X
Reference:
http://help.sap.com/saphelp_47x200/helpdata/en/a1/e45217a2f511d1a5630000e82deaaa/frameset.htm
在实际的业务中,某些表是需要与用户直接交互的,例如公司要对员工的语言能力给予一定的补助,但只有英语和韩语是补助的对像,这就需要有一张表来约束语言的类别(英语、韩语),但可能几年之后可能会增加日语为补助对象,这就要求人事部门的管理者可以对这张表进行添加、修改和删除等操作,此时就要用到Maintenance Dialog
T_code:se11进入要制作Maintenance Dialog的表

如上图点击Table Maintenance Generator便可进入下面的介面

输入Authorization Group\Funtion Group点击Find Scr.Number生成Screen Number,再点击Create按钮便可生成Maintenance Dialog了。
生成之后进入T_code:sm30输入表名,便可以查看Maintenance Dialog介面了。
Authorization Group:权限组,用来控制可以使用此表的权限
Function Group:Maintenance Dialog的生成代码的存贮位置(生成Main.Dialog实际上是系统生成了一个Function)
Maintenance Type:维护屏幕(一个屏幕或两个屏幕)
Maint.Screen No.:维护屏幕的Number
Recording Routine:选中Standard Recording Routine时,当在Maintenance Dialog里进行操作时系统会提示Request,选中下面则不会提示Request。
你也可以为Maintenance Dialog创建T_code
T_code:se93
点击创建后选择Trainsaction with parameter

在Transaction中输入sm30,选中Skip initial screen
在Default Values中输入
viewname 
update 
保存后就可以用T_code进入此表的Maintenance Dialog
对View制作Maintenance Dialog步骤和上面一样。
 
                    
                     
                    
                 
                    
                
 
 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号