These two functions are used to input relevant data in the pop-up box. It is very useful in ECC.
The former can obtain a batch of input data, while the latter can only obtain one data. In fact, the latter also calls the former in the function.
Paste someone else's code as an example:
Data: Begin of fields occurs 5.
Include structure sval.
Data: End of fields.
FIELDS-TABNAME = Mara.
FIELDS-FIELDNAME = matnr.
Append fitlds.
FIELDS-TABNAME = vbap.
FIELDS-FIELDNAME = matnr.
Append fitlds.
FIELDS-TABNAME = lips.
FIELDS-FIELDNAME = matnr.
Append fitlds.
Call function 'popup _ get_values'
Exporting
Popup_title = 'text-pr2'
Start_column = start_column
Start_row = 5
Importing
Returncode = returncode
Tables
Fields = Fields
Exceptions
Error_in_fields = 1.
It inputs three fields, but does not limit the field attributes. Paste your own code:
SPAN {
Font-family: "fixedsys ";
Font-size: 12pt;
Color: #000000;
Background: # ffffff;
}
. L1s31 {
Font-style: italic;
Color: #808080;
}
. L1s33 {
Color: #4da619;
}
. L1s52 {
Color: # 0000ff;
}
Data
: L_returncode type
C
.
Data
: Itb_sval type
Table
Of
Sval,
Wa_sval like
Line
Of
Itb_sval.
Wa_sval-tabname = 'ztm _ fybx_netpa'
. "Table Name
Wa_sval-fieldname = 'send _ date'
. "Field name
Wa_sval-FIELD_OBL = 'X'
. "Force Input
Append
Wa_sval
Itb_sval.
Call
Function
'Popup _ get_values'
Exporting
Popup_title = 'Enter the payment submission date'
Importing
Returncode = l_returncode
Tables
Fields
= Itb_sval.
If
Rochelle returncode = 'A'
.
Message
'User canceled'
Type
'S'
.
Return
.
Endif
.
Tabname is the name of the table where the field is located, and fieldname is the name of the field in the table. The short text of the field is displayed automatically on the screen, and the input box is provided according to the input help for verification. The code above indicates that this field needs to be forcibly entered. Effect
If you cancel the input, l_returncode returns 'A'. If you click OK, It is null.