Introduce a simple pop-up window function POPUP_GET_VALUES_USER_HELP values can be entered, as the way to create pop-up windows by calling this function, you can see the order number field is entered.
Whether the field can be input, is controlled by the input field function parameter fields in field_attr table
Control properties are as follows:
code show as below:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
*&---------------------------------------------------------------------*
*& Report YTEST_POPUP_WINDOW
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT ytest_popup_window.
DATA:l_ret TYPE c,
git_tab TYPE STANDARD TABLE OF sval WITH HEADER LINE.
CLEAR git_tab.
git
_tab-tabname = 'AFKO'.
git
_tab-fieldname = 'AUFNR'.
git
_tab-fieldtext = '生产订单号'.
git
_tab-field_attr = '02'.
git
_tab-value = '0100000001'.
APPEND git_tab.
CLEAR git_tab.
git
_tab-tabname = 'AFKO'.
git
_tab-fieldname = 'GAMNG'.
git
_tab-fieldtext = '订单数量'.
git
_tab-field_attr = ''.
APPEND git_tab.
CALL FUNCTION 'POPUP_GET_VALUES_USER_HELP'
EXPORTING
* F1_FORMNAME = ' '
* F1_PROGRAMNAME = ' '
* F4_FORMNAME = ' '
* F4_PROGRAMNAME = ' '
* FORMNAME = ' '
popup_title = 'BAIDUSAP.COM'
* PROGRAMNAME = ' '
* START_COLUMN = '5'
* START_ROW = '5'
* NO_CHECK_FOR_FIXED_VALUES = ' '
IMPORTING
returncode = l_ret
TABLES
fields = git_tab
EXCEPTIONS
error_in_fields = 1
OTHERS = 2.
IF sy-subrc <> 0.
* Implement suitable error handling here
ELSE.
READ TABLE git_tab INDEX 2.
IF sy-subrc = 0.
CONDENSE git_tab-value.
WRITE:git_tab-value LEFT-JUSTIFIED.
ENDIF.
ENDIF.
|
test:
Enter the number, click on the green tick.
Then write the number of inputs.
the above.