`
jgtang82
  • 浏览: 401964 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

Report Selection Screen 常见操作备注

    博客分类:
  • ABAP
 
阅读更多

1. 对select-options的显示作约束

在Report的Initialization event中调用FM: SELECT_OPTIONS_RESTRICT (该Function的Help文档中有较仔细的用法说明和示例程序)

 

2. 动态获取屏幕的值的FMs

DYNP_VALUES_READ  :  Parameter

DYNPRO_FIELD_GET 

RS_REFRESH_FROM_SELECTOPTIONS : Select-Options
e.g:

<!---->  FORM GET_DYN_VALUE  USING    P_NAME
                    CHANGING P_VALUE.
  DATA: LT_DYN_VALUES TYPE TABLE OF DYNPREAD,
        WA_DYN_FIELD LIKE LINE OF LT_DYN_VALUES.

  TRANSLATE P_NAME TO UPPER CASE.
  WA_DYN_FIELD-FIELDNAME = P_NAME.
  APPEND WA_DYN_FIELD TO LT_DYN_VALUES.

  CALL FUNCTION 'DYNP_VALUES_READ'
    EXPORTING
      DYNAME             = SY-REPID
      DYNUMB             = SY-DYNNR
      TRANSLATE_TO_UPPER = 'X'
    TABLES
      DYNPFIELDS         = LT_DYN_VALUES.

  READ TABLE LT_DYN_VALUES INDEX 1 INTO WA_DYN_FIELD.
  P_VALUE = WA_DYN_FIELD-FIELDVALUE.
ENDFORM.                    " get_dyn_value

 

3. AT SELECTION-SCREEN OUTPUT时修改Screen上的element显示相关属性

LOOP AT screen.

    screen-active = 0/1.

    MODIFY SCREEN.

ENDLOOP.

 

4. 隐藏标准选择屏幕的执行按钮

REPORT ZTXXX.
DATA it_exclude TYPE TABLE OF sy-ucomm.
PARAMETER p_1 TYPE lifnr.

AT SELECTION-SCREEN OUTPUT.
  APPEND 'ONLI' TO it_exclude.
  CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
    EXPORTING
      p_status  = sy-pfkey
    TABLES
      p_exclude = it_exclude.

5. Interact with radiobutton/ checkbox on selection screen

SAP demo program: DEMO_SEL_SCREEN_USER_COMMAND

 

6. Search Help

7. 在subscreen中调用selection screen (1000)

...

 

zt: http://www.saptechies.com/selection-screen/

Selection Screen Contents
1. Using select options to select records
2. Select options with more than one default value or range
3. Making a frame around groups of fields on the selection screen.
4. making a checkbox
5. Making a radiobutton group
6. How to add an option programmatically after the user has finished the selection screen
7. Selection screen events
8. Making an option invisible
9. Selection screen - Parameters on a single line
10. Setting the title text of a selection screen dynamically
11. Using a custom toolbar in a selection screen
12. Skip line on selection screen
13. Using a matchcode

1. Using select options to select records

SELECT-OPTIONS: S_CPUDT FOR BKPF-CPUDT DEFAULT SY-DATUM,
S_USNAM FOR BKPF-USNAM.


SELECT * FROM BKPF
WHERE CPUDT IN S_CPUDT AND
USNAM IN S_USNAM.

2. Select options with more than one default value or range

If you want to use more than one default value or default range, you add the values to the internal table selection table.

Note: You don't have to declare the table, it is created automatically. The table has the same name as the select variable ( In the example below s_hkont ).

SELECT-OPTIONS: S_HKONT FOR ZTSAPSPEC-HKONT.

INITIALIZATION.
MOVE: 'I' to s_hkont-sign,
'BT' TO S_HKONT-OPTION,
'87111100' TO S_HKONT-LOW,
'87111124' TO S_HKONT-HIGH.
APPEND S_HKONT.
MOVE: 'I' to s_hkont-sign,
'EQ' TO S_HKONT-OPTION,

'87111300' TO S_HKONT-LOW,
APPEND S_HKONT.



3. Making a frame around groups of fields on the selection screen.

SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME TITLE TEXT-001.

SELECT-OPTIONS: S_CPUDT FOR BKPF-CPUDT OBLIGATORY
DEFAULT SY-DATUM.
SELECTION-SCREEN END OF BLOCK 1.

You can add further blocks (block2.......)


4. making a checkbox

parameters: x_afstem as checkbox default 'X'.


5. Making a radiobutton group

PARAMETERS: RADIOBUTTON GROUP ,
RADIOBUTTON GROUP .

Example:

PARAMETERS: BUTTON1 RADIOBUTTON GROUP RAPT,

BUTTON2 RADIOBUTTON GROUP RAPT.


In the program you test for the radiobuttons like this:

if button1 = 'X' then.
< Here comes some code>
elseif button2 = 'X' then.
< Here comes some code>
endif.



5. How to add an option after the user has finished the selection screen

Use the at selection-screen event to add options as showed above in example 2.


7. Selection screen events

Initialization Before processing the selection screen

at selection-screen output Before the contents of selections screen is displayed

at selection-screen on p/s Processed after the user has specified the Parameter p
or Select option s

at selection-screen After the user has specified all selection criteria

8. Making an option invisible

If you don't want the user to be able to see the option you want to add, define it as No-DISPLAY.

SELECT-OPTIONS: S_HKONT FOR ZTSAPSPEC-HKONT NO-DISPLAY,
S_BUKRS FOR ZTSAPSPEC-BUKRS,


9. Selection screen - Parameters on a single line


SELECTION-SCREEN BEGIN OF LINE.
* The system does not output selection texts for parameters.
* Set your own
SELECTION-SCREEN COMMENT 1(15) text-001.
* Parameters

PARAMETERS: p1(3) TYPE c,
p2(5) TYPE c.
SELECTION-SCREEN COMMENT 55(10) p_wmunit.

SELECTION-SCREEN END OF LINE.

INITIALIZATION.
MOVE 'Unit' TO p_wmunit.


10. Setting the title text of a selection screen dynamically

Define GUI titles for the report. In this example the GUI titles COLLILABEL
and PALLETLABEL has been defined. In the INITIALIZATION event, dynamically
set which GUI title to show with the SET TITELBAR statement.


INITIALIZATION.
IF p_colli = 'X'.
SET TITLEBAR 'COLLILABEL'.
ELSEIF p_pallet = 'X'.
SET TITLEBAR 'PALLETLABEL'.
ENDIF.

11. Using a custom toolbar in a selection screen

When you use your own custom toolbar in a selection screen, the flow of the
report changes. Below is an example of how to use the events in such a
report.

Important! To be abel to submit your report, the submit button on the custom

toolbar of the selection screen must be named
'ONLI' (= Execute) or 'PRIN' (= Execute and Print).



INITIALIZATION.
* Your custom toolbar for the selection screen
SET PF-STATUS '0002'.

AT SELECTION-SCREEN.
* Handle sy-ucomm from your custom toolbar on the selection screen. Note
that it is not necessary explicitly to handle 'ONLI' or 'PRIN'
CASE sy-ucomm.
WHEN 'GETDATA'.
WHEN 'EXIT'.
LEAVE PROGRAM.
ENDCASE.


START-OF-SELECTION.
..... retreieve data for the ereport.....


END-OF-SELECTION.
* PF status for the report
SET PF-STATUS '0001'.

..... write report ......

Henrik Frank

12. Skip line on selection screen

Selection-screen skip 1.

13. Using a matchcode

Parameters:
matnr like mara-matnr matchcode object mat1.

Note: Matchcode objects can be found in SE11

分享到:
评论

相关推荐

    Report_Machine操作手册

    Report Machine 操作手册 Report Machine(RM)是一款功能强大的 Delphi 报表控件包,使用它可以制作出非常复杂的报表。下面将详细介绍 Report Machine 的使用方法和相关知识点。 一、Report Machine 的基本用法 ...

    reportmachine中文操作手册

    常见问题解决方法 1. 如何在一张纸上双面打印报表?可以在打印时选择打奇数页还是打偶数页。 2. 如何在一个页面中打印固定的条数?可以设置 LinesPerPage,另外最后一页记录不够时可以设置 AutoAppendBlank=True 来...

    3_Screen_Report

    标题中的“3_Screen_Report”指的是关于移动设备(Mobile)、电视(TV)和个人电脑(PC)三类屏幕的综合报告。这份报告很可能是针对现代多屏幕环境下的用户体验、市场趋势和技术发展进行深入分析的文档。在描述中,...

    BI@Report+v3.3用户操作手册

    总的来说,这些文档覆盖了BI@Report v3.3的全面操作,无论你是初次接触还是经验丰富的用户,都能从中找到所需的信息,提升报表开发和数据分析的能力。通过深入学习和实践,可以充分挖掘BI@Report的潜力,为企业决策...

    New Report New Report New Report

    New Report New Report New Report New Report

    data view_report screen(数据可视化大屏,数据报表设计器).zip

    在本案例中,"data view_report screen"似乎是一个专为创建这类大屏设计的平台,可能是基于Web的应用,通过它用户可以自定义和设计数据报表。结合标签"vue",我们可以推断这个平台可能使用Vue.js作为前端框架来构建...

    style Report注册码

    通过其强大的功能集,style Report支持多种数据源连接方式以及灵活多变的报表样式定制,满足不同行业领域对数据报告的需求。 #### 1.2 style Report的特点 - **数据源支持广泛**:包括但不限于数据库(MySQL、...

    ReportMachine Delphi 10.2亲测可用

    报告机器(ReportMachine)是一款专为Delphi开发者设计的报表生成工具,其在Delphi 10.2版本中的兼容性和实用性已经得到了实际测试验证。本文将深入探讨ReportMachine与Delphi 10.2的集成,以及如何利用ReportMachine...

    Wonderware HMI REPORT中文手册.pdf

    8. 故障排除与技术支持:手册可能会有一部分内容用于帮助用户在使用HMI REPORT时遇到的常见问题进行故障排除,并提供技术支持的联系方式和方法。 由于提供的文件内容中出现了OCR扫描误差和重复的文字,未能提供实际...

    iFix-Dream Report梦醒报表操作指南.rar

    《iFix-Dream Report梦醒报表操作指南》是一款专门针对iFix系统提供的报表工具,旨在帮助用户更加高效地管理和分析工业自动化系统中的数据。这款工具提供了丰富的报表设计和数据分析功能,使得用户能够根据实际需求...

    reportmachine3 二维码

    在使用ReportMachine3时,开发者可以按照以下步骤操作来添加二维码: 1. **集成Qrcode功能**:由于ReportMachine3已经内置了Qrcode源码,因此不需要下载或导入任何额外的库。在Delphi的项目中,直接调用相关的API或...

    reportMachine报表工具

    在报表工具领域,"reportMachine"与市面上其他常见的报表控件相比,虽然可能在某些方面表现出类似的特性,但其核心优势在于用户友好的界面和直观的操作流程。用户可以通过拖放方式添加和调整报表元素,如表格、图表...

    XtraReport手工分页

    在.NET开发领域,DevExpress是一款广泛使用的控件库,其中XtraReport是其报表系统的核心组件。本篇文章将深入探讨如何在XtraReport中实现手工分页功能,通过代码实例来详细解析这一技术。 手工分页是指在报表设计时...

    Rave Report 7.6.2 BE安装程序

    - **交互式操作**:报表可以设计为交互式,允许用户在查看时进行筛选、排序等操作。 4. **安装与使用** "Rave_7_6_2_BE.exe"是Rave Report 7.6.2 BE的安装程序,下载后双击执行即可开始安装。安装过程中需遵循...

    reportmachine帮助电子书

    《ReportMachine帮助电子书》是针对ReportMachine这款专业报表生成工具的详尽指南,旨在协助用户深入了解该软件的功能和操作方法。ReportMachine是一款强大的数据可视化和报表制作工具,广泛应用于企业数据分析、...

    REPORT PAINTER 教学流程

    通过这个`REPORT PAINTER.ppt`教程,你将掌握REPORT PAINTER的基本操作和高级技巧,从而能够高效地设计出满足业务需求的报表。在实际应用中,不断实践和探索,你将成为REPORT PAINTER的熟练使用者,利用这款工具为你...

    report教案report教案

    【描述】:“report教案report教案report教案” 描述中的重复词汇进一步强化了报告和教案在教学工作中的重要性。这可能意味着这份文档深入探讨了如何将报告的编写技巧与教案设计相结合,以提升教学质量和效果。它...

    SAP ReportPainter 应用指南

    SAP ReportPainter 应用指南 SAP ReportPainter 应用指南是 SAP 系统中的一种报表设计工具,用于创建复杂的报表。它可以帮助用户快速创建报表,并提供了许多有用的功能和参数来控制报表的输出格式。 Report...

    2.2 SAPReportPainter报表编制用户操作手册

    SAP Report Painter报表编制用户操作手册 本文档旨在帮助用户学习和掌握SAP Report Painter报表编制系统操作流程和方法。下面是本手册的详细知识点: 1. 操作说明 * 保存按钮:保存您在数据库中的工作。 * 返回...

    java源码AJ-Report可视化报表工具

    工具支持多种数据源,包括但不限于MySQL、Oracle、SQL Server等常见数据库,以及CSV、Excel等文件数据源。这使得AJ-Report能适应各种项目环境,处理不同来源的数据。 3. **图表种类丰富**: AJ-Report提供了多种...

Global site tag (gtag.js) - Google Analytics