How to add select-Options screen to screen

Source: Internet
Author: User

1. Define select-Options screen and event processing in a unit
Data: number (4) Type N value '20140901 '.
Selection-screen begin of screen 1100 as subscreen.
Selection-screen begin of block block_0 with frame title text-000.
Selection-screen begin of line.
Selection-screen Comment 1 (8) Text-002.
Selection-screen position pos_low.
Parameters: p_date1 type DATs default sy-datum obligatory.
Selection-screen comment pos_high (8) Text-003.
Parameters: p_date2 type DATs default sy-datum obligatory.
Selection-screen end of line.
Select-options s_pq for zjw_bs_jg-zjgid_c no intervals.
Select-options s_psz for zjw_bs_jg-zjgid_c no intervals.
Select-options s_tjid for zjw_xq_swtj-zswtjid_c.
Parameters: p_con radiobutton group SC2.
Parameters: p_fy radiobutton group SC2 default 'x '.
Parameters: p_blank radiobutton group SC2.
Selection-screen end of block block_0.
Selection-screen end of screen 1100.
At selection-screen on value-request for s_psz-low.
Perform help_psz using 'low' 1100 '.

2. Define screen 100
Add a sub-screen on screen 100Sub_screen

3. Define screen 100 BPO
Process before output.
Module show_logonscreen. "Call the logon screen
Module grid_list_init. "screen Initialization
Module status_0100.
Call subscreen sub_screen including sy-repid number.

4. Define screen 100 Pai
Process after input.
Module exec_exit_100 at exit-command.
Module exec_before_100.
Call subscreen sub_screen.
5 module definition

Module status_0100 output.
* Set the status of each function in the toolbar Based on the operation status and set
* The functions in the current operation status that need to be blocked are put into the inner table.
Perform before_set_100status.
* Call the toolbar and disable the functions contained in the internal table.
Set PF-STATUS '200' excluding excl_func.
Set titlebar '123 '.
Endmodule. "status_0100 output
6 selection screen event

At selection-screen on value-request for s_psz-low.
Perform help_psz using 'low' 1100 '.
*&--------------------------------------------------------------------*
* & Form value_help_vkbur_low
*&--------------------------------------------------------------------*
* The brand selection box is displayed based on the internal table data.
At selection-screen on value-request for s_pq-low.
* Area
Refresh it_pq.
Clear it_pq.
Select zjgid_c zjgname_c into Table it_pq
From z1__bs_jg
Where zjglx_ I = 5.
Call function 'f4if _ int_table_value_request'
Exporting
Retfield = 'zjgid _ C'
Dynpprog = sy-repid
Dynpnr = '000000'
Dynprofield = 'P _ PQ '"screen Field
Value_org = 'S'
Tables
Value_tab = it_pq.

At selection-screen on value-request for s_drpsz-low.
Perform help_1200psz using '000000' S _ DRPSZ-LOW '.

At selection-screen on value-request for s_dcpsz-low.
Perform help_1200psz using '000000' S _ DCPSZ-LOW '.

At selection-screen.
If sy-dynnr = 1100.
If OK _code = 'cacl '.
If p_date1> p_date2.
Message e040. "message exited when the start date is greater than the end date
Exit.
Endif.
Endif.
Elseif sy-dynnr = 1200.
If OK _code = 'sear '.
If p_dates> p_datee.
Message e040. "message exited when the start date is greater than the end date
Exit.
Endif.
Endif.
Endif.

At selection-screen output.
If sy-dynnr = 1200.
Loop at screen.
Case screen-name.
When's _ DRPSZ-LOW 'or
'% _ S_drpsz _ % _ app _ %-valu_push' or
'S _ DCPSZ-LOW 'or
'% _ S_dcpsz _ % _ app _ %-valu_push' or
'P _ dates' or
'P _ datee '.
Case status_mtn.
When 'A' or 'u '.
Screen-input = '0 '.
When others.
Screen-input = '1 '.
Endcase.
Modify screen.
Endcase.
Endloop.
Endif.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.