cancel
Showing results for 
Search instead for 
Did you mean: 

How to call methods in ALV control

Former Member
0 Kudos

Hello experts,

How we can call all the functions related to ALV control in webdynpro methods.....for example methods like table settings, column settings, creating header from where we should call these methods from wizard or pattern

Accepted Solutions (0)

Answers (1)

Answers (1)

ChandraMahajan
Active Contributor
0 Kudos

Hi,

you need to use pattern for calling ALV control methods.

you need to have object of interface IF_SALV_WD_STD_FUNCTIONS (implementing class CL_SALV_WD_CONFIG_TABLE) and then you can use pattern to call the exact method that you want.

Refer http://help.sap.com/saphelp_nw70/helpdata/en/7f/849e6d796d4fe49221609ffcbc357d/content.htm

it is not possible thruogh code wizard. refer http://help.sap.com/saphelp_nw70ehp1/helpdata/en/3b/29933f09a5fb47e10000000a114084/content.htm

Thanks,

Chandra

Former Member
0 Kudos

hi sekhar,

Can you tell with example by taking method get_header

ChandraMahajan
Active Contributor
0 Kudos

As per SAP help for ALV Output header ( http://help.sap.com/saphelp_nw70/helpdata/en/86/641b88c9034eebacb26ba7fbb17981/content.htm ).

Generating, Getting, and Deleting a Header Object

The header of the ALV output is an instance of the class CL_SALV_WD_HEADER. To generate or delete the object, use the methods of the interface class IF_SALV_WD_TABLE_SETTINGS (implementing class CL_SALV_WD_CONFIG_TABLE).

as per this, get_header is the method of interface IF_SALV_WD_TABLE_SETTINGS and returning the object of type refering to cl_salv_wd_header.

i need to have object of class cl_salv_wd_header.

DATA:

lr_table_settings TYPE REF TO if_salv_wd_table_settings,

lr_header TYPE REF TO cl_salv_wd_header.

lr_header TYPE REF TO cl_salv_wd_header.

lr_table_settings ?= l_value. "Assuming that l_value (type ref to cl_salv_wd_config_table )object is created earlier

*Generated by object pattern.

CALL METHOD LR_TABLE_SETTINGS->GET_HEADER

RECEIVING

VALUE = LR_HEADER .

Thanks,

Chandra