• 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

  • 相关阅读:
    .net framework v4.5.2
    sql数据库不允许保存更改和保存失败解决方法
    如何查看笔记本电脑型号
    Premiere 5.0/5 .5菜单详解
    Python编辑器英文菜单的中文翻译及解释
    SqlServer--常用数据查询
    pycharm上方菜单栏不见了如何恢复
    笔记本电脑的f1到f12怎么按
    C#的访问权限
    封装,继承和多态知识点汇总
  • 原文地址:https://www.cnblogs.com/caizjian/p/3164072.html
Copyright © 2020-2023  润新知