ALV with IDA(ALV on HANA)-6

alv-idaUsing PARAMETERS to display specific set of data.

 

 

 

To set the parameters/select options we can use two of the  methods:  CONDITION_FACTORY, SET_SELECT_OPTIONS of IF_SALV_GUI_TABLE_IDA

1

Use the CONDITION_FACTORY method to get the reference of  IF_SALV_IDA_CONDITION_FACTORY

4

Then  use EQUALS methods of the IF_SALV_IDA_CONDITION_FACTORY to set the parameters and which returns the reference of IF_SALV_IDA_CONDITION.

5

13.jpg

Then call the SET_SELECT_OPTIONS method and push back the reference of IF_SALV_IDA_CONDITION.

2

Also IF_SALV_IDA_CONDITION provides logical operation methods.

3

14.jpg


Program: Sets the fixed value for CARRID field as DL & LH with OR condition.

10

Ouput:

11


Program: Parameter user input.


 PARAMETERSp_carrid TYPE sflightcarrid.
DATAlr_salv TYPE REF TO if_salv_gui_table_ida,
             lr_cond_fact TYPE REF TO if_salv_ida_condition_factory,
             lr_cond TYPE REF TO if_salv_ida_condition.
cl_salv_gui_table_ida=>create(
  EXPORTING
    iv_table_name       =  ‘SFLIGHT’
  RECEIVING
    ro_alv_gui_table_ida lr_salv ).
* Instantiate Condition Factory
lr_cond_fact lr_salv->condition_factory).
* Set the parameter value & get condition reference
lr_cond =  lr_cond_fact->equalsname ‘CARRID’ value p_carrid ).

*Set the condition for data retrival
lr_salv->set_select_options(
  EXPORTING
*    it_ranges                     =
    io_condition                  lr_cond ).
* Display ALV
lr_salv->fullscreen)->display).


 

12

Run with different inputs and see the result.

6789


 

Advertisements

2 thoughts on “ALV with IDA(ALV on HANA)-6

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s