REPORT  ZZJX_TEST09.
*&---------------------------------------------------------------------*
TABLES: T001W,T161,T161T,T024. DATA: L_OBJ TYPE REF TO CL_GUI_FRONTEND_SERVICES.
DATA: IT_FILE TYPE FILETABLE WITH HEADER LINE.
DATA: G_RC TYPE I.
DATA: IL_RAW TYPE TRUXS_T_TEXT_DATA. DATA: G_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE, "字段内表
L_LAYOUT TYPE SLIS_LAYOUT_ALV. DATA: BEGIN OF GT_UPLOAD OCCURS ,
DATA1() TYPE C,
DATA2() TYPE C,
END OF GT_UPLOAD.
DATA: BEGIN OF GT_ALV1 OCCURS .
* INCLUDE STRUCTURE ZMMWERKS1.
DATA: STA() TYPE C,
END OF GT_ALV1. DATA: BEGIN OF GT_ALV2 OCCURS .
* INCLUDE STRUCTURE ZMMWERKS2.
DATA: STA() TYPE C,
END OF GT_ALV2.
FIELD-SYMBOLS: <ALV1> LIKE LINE OF GT_ALV1,
<ALV2> LIKE LINE OF GT_ALV2.
DATA: L_FLAG TYPE I VALUE . DATA: BEGIN OF L_SIGN,
FLAG TYPE I VALUE ,
BUTTON TYPE I VALUE ,
END OF L_SIGN. SELECTION-SCREEN BEGIN OF SCREEN AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK S01 WITH FRAME TITLE TEXT-C01.
PARAMETERS: P_RB1 RADIOBUTTON GROUP T1 DEFAULT 'X' USER-COMMAND T1,
P_RB2 RADIOBUTTON GROUP T1 .
SELECTION-SCREEN END OF BLOCK S01.
SELECTION-SCREEN BEGIN OF BLOCK S02 WITH FRAME TITLE TEXT-C02.
SELECT-OPTIONS: S_WERKS FOR T001W-WERKS.
SELECTION-SCREEN END OF BLOCK S02.
SELECTION-SCREEN END OF SCREEN . SELECTION-SCREEN BEGIN OF SCREEN AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK S03 WITH FRAME TITLE TEXT-C01.
PARAMETERS: P_RB3 RADIOBUTTON GROUP T2 DEFAULT 'X' USER-COMMAND T2,
P_RB4 RADIOBUTTON GROUP T2 .
SELECTION-SCREEN END OF BLOCK S03.
SELECTION-SCREEN BEGIN OF BLOCK S04 WITH FRAME TITLE TEXT-C02.
SELECT-OPTIONS: T_WERKS FOR T001W-WERKS,
T_BSART FOR T161-BSART MODIF ID M3,
T_EKGRP FOR T024-EKGRP MODIF ID M4.
SELECTION-SCREEN END OF BLOCK S04.
SELECTION-SCREEN END OF SCREEN . SELECTION-SCREEN BEGIN OF SCREEN AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK S05 WITH FRAME TITLE TEXT-C01.
PARAMETERS: P_RB5 RADIOBUTTON GROUP T3 DEFAULT 'X' USER-COMMAND T3,
P_RB6 RADIOBUTTON GROUP T3 .
SELECTION-SCREEN END OF BLOCK S05.
SELECTION-SCREEN BEGIN OF BLOCK S06 WITH FRAME TITLE TEXT-C02.
PARAMETERS: P_FIL1 TYPE RLGRAP-FILENAME MODIF ID M5,
P_FIL2 TYPE RLGRAP-FILENAME MODIF ID M6.
SELECTION-SCREEN END OF BLOCK S06. SELECTION-SCREEN END OF SCREEN . SELECTION-SCREEN: BEGIN OF TABBED BLOCK MYTAB FOR LINES,
TAB () BUTTON1 USER-COMMAND PUSH1,
TAB () BUTTON2 USER-COMMAND PUSH2,
TAB () BUTTON3 USER-COMMAND PUSH3,
END OF BLOCK MYTAB. INITIALIZATION.
BUTTON1 = TEXT-A01.
BUTTON2 = TEXT-A02.
BUTTON3 = TEXT-A03.
MYTAB-PROG = SY-REPID. IMPORT L_SIGN FROM MEMORY ID 'FLAG'."主要使用内存共享的方式来实现,进入list退出之后保存进去之前的标签
CASE L_SIGN-FLAG.
WHEN .
MYTAB-DYNNR = .
MYTAB-ACTIVETAB = 'PUSH1'.
WHEN .
MYTAB-DYNNR = .
MYTAB-ACTIVETAB = 'PUSH2'.
WHEN .
MYTAB-DYNNR = .
MYTAB-ACTIVETAB = 'PUSH3'.
ENDCASE.
MODIFY SCREEN.
FREE MEMORY ID 'FLAG'. "为控件页签单击事件, 选择不同页签显示不同子屏幕. AT SELECTION-SCREEN.
CASE SY-UCOMM.
WHEN 'PUSH1'.
MYTAB-DYNNR = .
MYTAB-ACTIVETAB = 'PUSH1'.
L_SIGN-FLAG = .
L_SIGN-BUTTON = .
WHEN 'PUSH2'.
MYTAB-DYNNR = .
MYTAB-ACTIVETAB = 'PUSH2'.
L_SIGN-FLAG = .
L_SIGN-BUTTON = .
WHEN 'PUSH3'.
MYTAB-DYNNR = .
MYTAB-ACTIVETAB = 'PUSH3'.
L_SIGN-FLAG = .
L_SIGN-BUTTON = .
ENDCASE.
EXPORT L_SIGN TO MEMORY ID 'FLAG'. AT SELECTION-SCREEN OUTPUT. LOOP AT SCREEN.
CASE SCREEN-GROUP1.
WHEN 'M1'.
IF P_RB1 IS INITIAL.
SCREEN-ACTIVE = ''.
ELSE.
SCREEN-ACTIVE = ''.
ENDIF.
WHEN 'M2'.
IF P_RB2 IS INITIAL.
SCREEN-ACTIVE = ''.
ELSE.
SCREEN-ACTIVE = ''.
ENDIF.
WHEN 'M2'.
IF P_RB3 IS INITIAL.
SCREEN-ACTIVE = ''.
ELSE.
SCREEN-ACTIVE = ''.
ENDIF.
WHEN 'M4'.
IF P_RB4 IS INITIAL.
SCREEN-ACTIVE = ''.
ELSE.
SCREEN-ACTIVE = ''.
ENDIF.
WHEN 'M5'.
IF P_RB5 IS INITIAL.
SCREEN-ACTIVE = ''.
ELSE.
SCREEN-ACTIVE = ''.
ENDIF.
WHEN 'M6'.
IF P_RB6 IS INITIAL.
SCREEN-ACTIVE = ''.
ELSE.
SCREEN-ACTIVE = ''.
ENDIF.
ENDCASE.
MODIFY SCREEN.
ENDLOOP. AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FIL1. "弹出选择文件对话框
CREATE OBJECT L_OBJ.
CLEAR IT_FILE[].
CALL METHOD L_OBJ->FILE_OPEN_DIALOG
EXPORTING
FILE_FILTER = '*.xls;*.xlsx;*.txt'
INITIAL_DIRECTORY = 'C:\data'
CHANGING
FILE_TABLE = IT_FILE[]
RC = G_RC.
READ TABLE IT_FILE INDEX .
P_FIL1 = IT_FILE-FILENAME. AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FIL2. "弹出选择文件对话框
CREATE OBJECT L_OBJ.
CLEAR IT_FILE[].
CALL METHOD L_OBJ->FILE_OPEN_DIALOG
EXPORTING
FILE_FILTER = '*.xls;*.xlsx;*.txt'
INITIAL_DIRECTORY = 'C:\data'
CHANGING
FILE_TABLE = IT_FILE[]
RC = G_RC.
READ TABLE IT_FILE INDEX .
P_FIL2 = IT_FILE-FILENAME. START-OF-SELECTION. END-OF-SELECTION.
WRITE:/ 'hello'.

F8进去的时候是这样的,出来的时候还是停留在标签3处。

2018.03.30 abap屏幕标签保存之前执行过的状态的更多相关文章

  1. EZ 2018 03 30 NOIP2018 模拟赛(六)

    链接:http://211.140.156.254:2333/contest/67 转眼间上次加回来的Rating又掉完了. 这次不知为何特别水,T1想了一段时间没想出来弃了,导致后面心态炸了. T2 ...

  2. 2018/03/30 每日一个Linux命令 之 创建用户/密码

    感悟: 感觉每天学习下指令真的很不错,虽然感觉也没啥东西,但是真的用到了,马上就能想起来个大概,忘了详细的用法,就回来看看自己的博客. 话说今天GitHub上有个人 star 了我的项目,很开心,嘎嘎 ...

  3. ABAP屏幕基础

    Select语句的使用 关键字into后可以加 structure(结构体), internal table(内表) 和 fieldlist(字段列表) Authority 权限 程序员可以根据权限对 ...

  4. 20172319 2018.03.27-04.05 《Java程序设计》第4周学习总结

    20172319 2018.03.27-04.05 <Java程序设计>第4周学习总结 教材学习内容总结 第四章 编写类 类与对象的回顾:对象是有状态的,状态由对象的属性值确定.属性由类中 ...

  5. 【VSCode】Windows下VSCode编译调试c/c++【更新 2018.03.27】

    --------– 2018.03.27 更新--------- 便携版已更新,点此获取便携版 已知BUG:中文目录无法正常调试 用于cpptools 0.15.0插件的配置文件更新 新的launch ...

  6. 怎样录制屏幕并将结果保存为Gif

    怎样录制屏幕 并将结果保存为GIF 大前天写文章,需要把PPT的翻转页面截成动态图.我一开始就想到保存文件肯定是GIF.但是如何生成呢?素材又从哪里来?以前自己感兴趣做过把一组连拍的图片做成动态图,再 ...

  7. ABAP屏幕设计

    转自 http://www.cnblogs.com/aBaoRong/archive/2012/06/05/2536591.html abap 屏幕控制 ******************** 屏幕 ...

  8. 2018.12.30【NOIP提高组】模拟赛C组总结

    2018.12.30[NOIP提高组]模拟赛C组总结 今天成功回归开始做比赛 感觉十分良(zhōng)好(chà). 统计数字(count.pas/c/cpp) 字符串的展开(expand.pas/c ...

  9. 2018.8.30 nowcoder oi赛制测试1

    2018.8.30 nowcoder oi赛制测试1 普及组难度,发现了一些问题 A 题目大意:求斐波那契数列\(f(k-1)f(k+1)-f(k)^2\),范围极大 打表可得规律 其实是卡西尼恒等式 ...

随机推荐

  1. windows2008R2下安装sqlserver2008R2时,点setup.exe应用程序无法打开错误代码0xc0150004

    windows2008R2下安装sqlserver2008R2时,点setup.exe应用程序无法打开错误代码0xc0150004 问题截图: 网上查的答案都是需要安装.net framework 3 ...

  2. java http httpclient

    HttpClient post get 洗衣店 微信扫码支付

  3. 实体类相同属性间赋值与如何判断实体类中是否所有的字段都为null

    1,实体类相同属性间赋值 /// <summary> /// 将实体2的值动态赋值给实体1(名称一样的属性进行赋值) /// </summary> /// <param ...

  4. WPF 多个选项卡TabControl 页面分离

    此项目源码下载地址:https://github.com/lizhiqiang0204/TabControl-page-separation 每个页面的按键处理事件直接对应该页面下的cs文件 Main ...

  5. 【HDU1011】Starship Troopers

    题目大意:给定一棵 N 个节点的无根树,每个节点有一个重量和一个价值,现给出一些单位,每个单位可以接受 20 个重量单位,求如何分配这些单位,使得获得的价值最大. 题解:dp 好题qwq..真的毒瘤. ...

  6. Markdown小结

    Markdown标题 以# (#号加空格)开头的行会被视为标题,根据#的数量分为一到六级标题 # 一级标题 ## 二级标题 … ###### 六级标题 Markdown 水平线 一行由三个以上连续的减 ...

  7. python之路day15--内置函数

    函数分为自定义函数和内置函数 python内置函数分类: 5.5.1 强制转换 int() / str() / bool() / list() / tuple() / dict() / set() 5 ...

  8. Python 3标准库第一天讲解总结

    一.很多知识自己没有理解透: 二.课件准备不足: 三.第一次讲解有点紧张: 四.口才也不是很好,很多有断片的情况: 五.SB式的坚持:

  9. 网络吞吐量(network)

    题目 分析 过一遍spfa,把从点1到其他每一个点的最短路求出来, 接着递归把所有最短路径上的路径保留,其他的删掉. 对于保留的路径作为网络流的边,流量为无穷大,对于每个点拆点两个点之间的流量为吞吐量 ...

  10. 【leetcode】Valid Palindrome II

    很久没有做题了,今天写个简单难度的练练手感. Given a non-empty string s, you may delete at most one character. Judge wheth ...