dialog开发

dialog开发
屏幕编程:ok_code在程序里用sy-ucomm接受

调用其他事物代码:
call transaction ‘SE38’.


1:50

 


选择屏幕之屏幕按钮:

selection-screen begin of block b1

with frame
title text-001.指定框架的名称
selection-screen pushbutton /5(30) pus1 user-command ab1. ”/5是留出的空格,(30)是长度,pus1是按钮名称接受描述的,user-command指定功能码的,ab1是ok_code,在下面判断的时候需要大写
selection-screen skip."在屏幕上跳转行的不然紧里的很紧
selection-screen pushbutton /5(30) pus2 user-command ab2.

selection-screen end of block b1.

initialization.

pus1 = '单击此处跳转到SE38'. 为变量赋值的text
pus2 = '单击此处跳转到客制TCODE'


at selection-screen.
if sy-ucomm = 'ab1'.
call transaction 'se38'.
endif.

if sy-ucomm = 'ab'.
submit z_selectscreen_01_demo using selection 1000
with p_matnr = pus1.

 

 

 

 

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


selection-screen begin of block b1
with frame
title text-01.
parameters: p_insert radiobutton group z user-command r default 'X',
p_delete radiobutton group z,
p_modify radiobutton group z,
p_disp radiobutton group z.

selection-screen skip.
selection-screen begin of block b2
with frame
title text-002.
selection-screen skip.

select-options: s_werks for t001w-werks modif id ab.

selection-screen end of block b2.
selection-screen end of block b1.

at selection-screen output.

loop at screen. " 系统内表
if p_insert = 'X'.
if screen-name CS 'S_WERKS'. "CS是判断字段screen-name有没有包含字符
串S_WERKS,如果包含就继续执行,如果不包含就不执行
screen-active = '0'.
endif.
if screen-group1 = 'AB'.

endif.
endif.
modify screen.
endloop.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

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

module user_command_0109 input.
ok_code = sy-ucomm.
case ok_code.
when 'show'.
set parameter id 'mat' field '4456'. "往sap输入框中赋值,这里的mat
就是内存的意思

sap内存还可以直接到字段所在的表里取找,点击进到该字段 看属性就可以看
到内存标识了 parameter ID

posted @ 2013-06-30 22:55  学习笔记NO.1  阅读(442)  评论(0编辑  收藏  举报