Posts

Showing posts with the label ALV

Sorting in SAP ABAP ALV Report

 Sorting in SAP ABAP ALV Report Using the Sort Table, the user can sort the output and he can expect subtotals in the output result. here, we discuss the importance of the sort table importance and its use in ALV Reports. Sort Criteria, The Table IT_SORT is populated with the sort criteria for the different fields. The caller specifies the essential list's sorting and/or subtotaling in the internal table IT_SORT. This internal table has the following fields: -         spos :  Sort sequence -         fieldname :  Internal output table field name -         tabname : Only relevant for hierarchical-sequential lists. Name of the internal output table. -         up : 'X' = sort in ascending order -         down : 'X' = sort in descending order -         subtot : 'X' = subtotal at group value change -    ...

How to Pass Selection-screen Information in SAP ABAP ALV Report

How to Pass Selection-screen Information in SAP ABAP ALV Report In the previous post, we have discussed How to Define SAP ABAP ALV Report Output list description, SAP ABAP ALV Reports data declaration, Events Table, Selecting the optional Variants and Output Field Characteristics and their importance in the ALV report, from this post, we will learn about Pass Selection-screen Information in SAP ABAP ALV Report. This step is required to get the selection screen information in the report output. The prerequisite is to set the parameter LAYOUT-GET_SELINFOS of the IMPORTING structure. The parameters to be passed in the IS_SEL_HIDE table are: o mode:              'R' = only the entries are given in the internal table IS_SEL_HIDE-T_ENTRIES      Is output in the pop-up. Selection info, which the list tool read in the selection screen (when called by a report with a selection screen), is replaced by the values passed. 'S' = ...

How to Define SAP ABAP ALV Report Output list description

Image
How to Define SAP ABAP ALV Report Output list description In the previous Post ,we have discussed about SAP ABAP ALV Reports data declaration ,Events Table ,Selecting the optional Variants and Output Field Characteristics and their importance in ALV report ,from this post ,we will learn about ALV Report Output list description which defines the list output that is ALV layout which user want to display on the real time screen. A layout is build for the report output list description USING the internal table declared above (I_LAYOUT). Output list description structure.      The parameters are described under the following heads: -          Display options -          Exceptions -          Totals -          Interaction -          Detail screen -          Display variants (only for hierarchical-sequential ...

How to Create Events Table in SAP ABAP ALV Report

How to Create Events Table in SAP ABAP ALV Report In the Previous Posts , we have learnt declaring data types ,selecting optional variants and ALV Report output characteristics ,here we will learn what is events table and its importance and it parameters detailed descriptions.  A list of possible events is populated into an event table (I_EVENTS) when this table is passed from the function module REUSE_ALV_EVENT_NAMES_GET. The return table from this function module contains all the possible events. The function module contains following import and export parameters. IMPORTING PARAMETERS: I_LIST_TYPE This parameter has possible values from 0-4. The parameter I_LIST_TYPE is of TYPE SLIS_LIST_TYPE and is DEFAULT 0 .  EXPORTING PARAMETERS:  I_EVENTS table. This table is of TYPE SLIS_T_EVENT and returns to the program the name of all the possible events. The table structure contains the fields:                 I_EVE...

Defining Output Fields Characteristics of ALV Report in SAP ABAP

Defining Output Fields Characteristics of ALV Report in SAP ABAP  In the Previous Post ,we have learnt,ALV Reports Data Declaration,Selecting Optional Variants and now here ,we will learn output fields descriptions which defines the description of fields that resulted in the ALV output. DEFININING OUTPUT CHARACTERISTICS: PREPARING DISPLAY FIELDS CATALOG A field catalog is prepared using the internal table (I_FIELDCAT) of type SLIS_T_FIELDCAT_ALV. Field catalog containing descriptions of the list output fields (usually a subset of the internal output table fields).  A field catalog is required for every ALV list output to add desired functionality (i.e. Key, Hotspot, Specific headings, Justify, Col. position etc) to certain fields of the output. If not mentioned specifically, then the defaults are taken. The possible values and defaults are listed below. The field catalog for the output table is built-up in the caller's coding. The build-up can be completely o...

SAP ABAP ALV Reports Selecting the Optional variants

SAP ABAP ALV Reports Selecting the Optional variants In the previous Post ,we have discussed on Data Declarations in ALV Reports ,in this post ,i will discuss on selecting variants which are optional depends on your requirement. The variants in the list display can be both user-specific and general. The user can pro-grammatically set the initial (default) variant for list display.  The default variant can be found using the function module 'REUSE_ALV_VARIANT_DEFAULT_GET'. Example Program on Selecting the variants in ALV Report CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET' EXPORTING i_save               = variant save condition (A=all, U = user-specific) CHANGING cs_variant          = internal table containing the program name (and the default variant---optional) EXCEPTIONS not_found = 2. The user can also choose from the list of existing variants using the function module  'REUS...

SAP ABAP ALV Reports Data Declaration Steps

SAP ABAP ALV Reports Data Declaration Steps As an ABAP consultant, while learning ALV reports, you should be start with data declaration steps, after learning this first step, you can start creating simple ALV report, here we will learn, how to declare data in ALV reports code. Step 1: DATA DECLARATION Example: Step 2: Selecting the variants(Optional) Step 3: (Defining Output Characteristics) Step 4: (Build up events table) Step 5: (Report Output list description) Step 6: (Pass Selection-screen Information) Step 7: (Deciding Sort Criteria) Step 8: (Final Step) Example: Step 1: ALV Report DATA DECLARATION Sap standard type pools:  SLIS, KKBLO.  Sap standard tables types taken from the type pools are:  SLIS_LAYOUT_ALV, SLIS_T_FIELDCAT_ALV SLIS_T_LISTHEADER, SLIS_T_EVENT, SLIS_SELFIELD.  Internal tables to be used in the program declared based on the above table types DATA:   I_LAYOUT  ...

Use of field symbols in SAP ABAP programming, using field symbols in SAP ABAP

Use of field symbols in SAP ABAP programming, using field symbols in SAP ABAP  the declaration operator FIELD-SYMBOL declares a field symbol <fs> to which a memory area is assigned in the current operand position. The declared field symbol is visible statically in the program from FIELD-SYMBOL (<fs>) and is valid in the current context. The declaration is made when the program is compiled, regardless of whether the statement is actually executed. The syntax for declaring a field symbol. FIELD-SYMBOLS: <FIELD_SYMBOL> TYPE MARA-MATNR. "here MARA-MATNR is a variable type FIELD-SYMBOLS: <FIELD_SYMBOL> TYPE  MARA. "here MARA is a structure FIELD-SYMBOLS: <FIELD_SYMBOL> TYPE REF TO DATA . "here DATA is a reference type  ASSIGNING and ASSIGN are the keywords that are used to assign a value to the field symbol. Example of using field symbol as a work area In the below example we are going to use the field symbol as a work area. REPORT ZS...