ABAP Summary of the eight, alv,table tree and some other controls

Source: Internet
Author: User
Today, to summarize some of the commonly used controls in ABAP, to remove some of the previously written, as well as Alv_grid, Alv_tree, Table_tree, and so on.     Many of the controls now used are written with classes, and their use, in a little bit, is no different from the classes in Java, a trick that remembers common writing and then changes according to different controls. Ideally, each control summarizes a generic template, which can save time in the implementation. Lao Bai's blog has many examples of this, I will not write here.     At the same time, you can also through Se38->environment->reuse library/examples to look at the examples provided by SAP, many of which can be reused, the structure and parameters to see the line.     Next, talk about some of the features of these controls and the general use of the process. Just write ABAP friends will often use the ' reuse_alv_grid_display ' this function, a very useful function, do not need to draw a screen, do not need to define events, a simplified and beautiful output tool.     But this function still has a lot of interesting features, such as sorting statistics, coloring single or single row, and so on. To use all of the features of Alv_grid, you need to draw custom control on screen, and then make the relevant definitions in your program. It's basically OO's set of things *--Global data definitions for ALV

*---ALV Grid instance reference
DATA Gr_alvgrid TYPE REF to Cl_gui_alv_grid.
*---Name of the custom control added on the screen
DATA gc_custom_control_name TYPE scrfname VALUE ' Cc_alv '.
*---Custom container instance reference
DATA Gr_ccontainer TYPE REF to Cl_gui_custom_container.
*---Field catalog table
DATA gt_fieldcat TYPE Lvc_t_fcat.
*---Layout structure
data gs_layout type lvc_s_layo . The initialization of the       control is performed in PbO, while Pai is a command-related operation.     If there is an event trigger, write time will be troublesome, to set a special handling of the event class, but also in PBO when the registration to the required control, set a good trigger conditions, before use. Practical applications, but also through a lot of debugging to see whether the effect can meet the requirements. and Alv_grid as a function of editing, there are some flaws, such as the selection function, so the actual use, the appropriate choice.     Alv_tree's writing and ALV similar, but in the form of tree, the use of the situation is not much.     Table_tree I have not used in the actual project, but also as a knowledge of the reserve, the general wording and Alv_grid almost, just a node of the concept and some related parameters and functions. See some information, write a few more procedures, I think you will experience a little bit deeper.

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.