Several functions called by ALV

Source: Internet
Author: User

ALV calls are mainly implemented by the following standard functions. Input and Output Parameters of all functions must be capitalized. Otherwise, the system will abort an exception. The related functions are as follows:

1) reuse_alv_fiendcatalog_merge: Return fieldcat field structure information based on the internal table structure. The common input and output parameters are as follows:
Exporting item:
1. I _program_name: program name.
2. I _internal_tabname: name of the inner table, which must be the custom structure name of the output inner table.
3. I _structure_name: directly refer to the transparent table name or structure name defined in the data dictionary.
The I _internal_tabname or I _structure_name parameter is required for function definition.
Changing item:
Ct_fieldcat: export table data in fieldcat.

2) reuse_alv_grid_display/reuse_alv_list_display: Output ALV Report, which is defined as grid mode or list mode. The syntax structure of the two functions is the same. The common input and output parameters are as follows:
export entry:
1. I _callback_program: program name.
2. is_layout: Name Defined by the program.
3. I _grid_title: defines the title name of ALV.
4. it_fieldcat: defines fieldcat data.
5. it_events: defines the ALV output event.
6. I _callback_pf_status_set: defines the trigger toolbar, usually a subroutine.
7. I _callback_user_command: the corresponding value is generally the subprogram name, which triggers the defined subprogram (such as the double-click event of a table field) during the ALV operation ).
tables (define the data in the input table):
1. t_outtab: enter the data in the table to be displayed.

3) layout is a structure. Its main field definitions and attributes are as follows:
1. Edit: sets whether ALV is editable.
2. colwidth_optimize: Set the width of the ALV field to the optimum value, and automatically match according to the actual width of the output content.
3. no_vline: the output ALV table does not display the vertical format.
4. no_uline_hs: the output ALV table does not display a horizontal grid.
5. info_fieldname: Set the color attribute.
6. key_hotspot: Set the keyword segment hotspot.
7. no_colname: whether to display the field name.
8. Zebra: displays the ALV table in the zebra crossing striped mode to make the display more elegant.
9. box_fieldname: sets whether the select button field is displayed in the ALV table.
10. info_fieldname: used to set the color of each row in the ALV output report. The parameter is the field name of the output table, note that using this attribute requires defining a field with the same name as the field defined by this parameter in the internal table at the same time, for example:
LAYOUT-INFO_FIELDNAME = 'color '.
if the name of the table in the data output is lt_out, you must add a field "color" to the table and copy each row in the table. The color parameter range is c000 ~ C999, for example:
LT_OUT-COLOR = 'c012'.

4) Description of main attributes of fieldcat
1.key: set the defined field to the key value.
2. icon: display the defined fields as icons.
3. checkbox: display the defined fields in the form of checkbox.
4. Just: defines the field alignment mode (r) Right, (l) left, and (c) center.
5. izero: display the fields in the "0" format.
6. no_sign: Set the field definition symbol to not display.
7. no_zero: defines whether the field is displayed.
8. Emphasize: Set the color of the field.
9. do_sum: summarizes fields.
10. seltext_l/M/S: Set the length, medium, and short of the field name.
11. ddictxt: Set the field display string.
12. hotspot: Set whether the field has a hotspot (the hotspot field is underlined ).
13. no_out: Hide unnecessary fields (no_out = 'X ').

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.