Popup_get_values and popup_to_get_value

Source: Internet
Author: User

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.

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.