Skip to Content
avatar image
Former Member

WEB DYNPRO ABAP - query

HI ALL,

I tried the below code to execute a drop down list in my alv table but i get a error like LO_INTERFACECONTROLLER is unknown can any one help me to solve this issue please.

DATA: LT_VALUESET TYPE TABLE OF WDR_CONTEXT_ATTR_VALUE,

LS_VALUESET TYPE WDR_CONTEXT_ATTR_VALUE.

DATA LV_VALUE TYPE REF TO CL_SALV_WD_CONFIG_TABLE.

LV_VALUE->IF_SALV_WD_TABLE_SETTINGS~SET_DATA_CHECK( IF_SALV_WD_C_TABLE_SETTINGS=>DATA_CHECK_ON_CELL_EVENT ).

DATA: LR_COL TYPE REF TO CL_SALV_WD_COLUMN,

LR_DROPDOWN TYPE REF TO CL_SALV_WD_UIE_DROPDOWN_BY_KEY.

LO_VALUE = LO_INTERFACECONTROLLER->GET_MODEL( ).

LO_VALUE->IF_SALV_WD_TABLE_SETTINGS~SET_READ_ONLY( ABAP_FALSE ).

LR_COLUMN = LO_VALUE->IF_SALV_WD_COLUMN_SETTINGS~GET_COLUMN( ID = 'weightage' ).

CREATE OBJECT LR_DROPDOWN EXPORTING SELECTED_KEY_FIELDNAME = 'weightage'.

LR_COLUMN->SET_CELL_EDITOR( LR_DROPDOWN ).

DATA: LT_VALUESET TYPE TABLE OF WDR_CONTEXT_ATTR_VALUE,

LS_VALUESET TYPE WDR_CONTEXT_ATTR_VALUE,

LR_NODE TYPE REF TO IF_WD_CONTEXT_NODE,

LR_NODEINFO TYPE REF TO IF_WD_CONTEXT_NODE_INFO.

LR_NODE = WD_CONTEXT->GET_CHILD_NODE( 'assesstment' ).

LR_NODEINFO = LR_NODE->GET_NODE_INFO( ).

lo_nd_assesstment = wd_context->get_child_node( name = wd_this->wdctx_assesstment ).

lo_el_assesstment = lo_nd_assesstment->GET_ELEMENT( ).

CALL METHOD lo_nd_assesstment->GET_STATIC_ATTRIBUTES_TABLE IMPORTING TABLE = ls_assesstment.

LS_VALUESET-VALUE = 'FIRST'.

LS_VALUESET-TEXT = 'FIRST'.

APPEND LS_VALUESET TO LT_VALUESET.

LS_VALUESET-VALUE = 'SECOND'.

LS_VALUESET-TEXT = 'SECOND'.

APPEND LS_VALUESET TO LT_VALUESET.

LR_NODEINFO->SET_ATTRIBUTE_VALUE_SET( EXPORTING NAME = 'weightage' VALUE_SET = LT_VALUESET

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Apr 14, 2011 at 03:05 PM

    Hi Vadiv,

    First, assure that you defined a component use to your ALV component (SALV_WD_TABLE component) in current view.

    You have to define LO_INTERFACECONTROLLER.

    try this before the line: LO_VALUE = LO_INTERFACECONTROLLER->GET_MODEL( ).

    DATA: LO_INTERFACECONTROLLER type ref to iwci_salv_wd_table .

    LO_INTERFACECONTROLLER = wd_this->wd_cpifc_YOUR_ALV_COMPONENT_NAME( ).

    Good luck,

    Catalin Butnaru

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 14, 2011 at 03:13 PM

    Hi,

    Just a advice on the way you post here.

    Please give a valid subject and your recent posts are all having subject WEB DYNPRO ABAP - query and which is confusing.

    Also, do not type the whole content in bold letter. It is not readable.

    Please visit the forum rules and spend some time reading that.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 14, 2011 at 03:26 PM
    Add comment
    10|10000 characters needed characters exceeded