zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    hdu2302(枚举,大数取模)
    hdu2108(判断凸多边形)
    Codeforces Round #324 (Div. 2) C (二分)
    hdu1798(圆的位置关系)
    hdu1722(gcd)
    alias命令(使用命令别名)
    关于Linux环境变量
    poj1988(并查集)
    Linux基本命令
    Pandas数据规整
  • 原文地址:https://www.cnblogs.com/caizjian/p/3164072.html
Copyright © 2011-2022 走看看