cancel
Showing results for 
Search instead for 
Did you mean: 

Edit - Table Contents

Former Member
0 Kudos

how to edit the contents of the table at output.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

closed

Former Member
0 Kudos

HI,

Please get the table content at runtime by using get_static_attribute.

it return the table content into your internal table. after getting all rows, you can again bind the table to node.

make sure the selection of the node should be 0...n

DATA LO_ND TYPE REF TO IF_WD_CONTEXT_NODE.

LO_ND->GET_STATIC_ATTRIBUTES_TABLE(

IMPORTING

TABLE = ITAB).

LO_ND->BIND_TABLE( ITAB ).

Yogesh

Former Member
0 Kudos

Please ckeck this link

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3133474a-0801-0010-d692-81827814...

check this code

1. get Instance of ALV using Code wizard.

2. Call interface method GET_MODEL of ALV.

3. Write the below code

*ALV Component usage
DATA: l_ref_cmp_usage TYPE REF TO if_wd_component_usage.

l_ref_cmp_usage =   wd_this->wd_cpuse_alv( ).
IF l_ref_cmp_usage->has_active_component( ) IS INITIAL.
  l_ref_cmp_usage->create_component( ).
ENDIF.

*Call Get_model() of Interface Controller to set changes to the output
*table

DATA: l_ref_interfacecontroller TYPE REF TO iwci_salv_wd_table .
l_ref_interfacecontroller =   wd_this->wd_cpifc_alv( ).
  DATA:
    l_value TYPE REF TO cl_salv_wd_config_table.

  l_value = l_ref_interfacecontroller->get_model(
  ).
  
   data:lr_input type ref to CL_SALV_WD_UIE_INPUT_FIELD.

l_column = l_value->IF_SALV_WD_COLUMN_SETTINGS~GET_COLUMN( 'PRICE' ).
CREATE OBJECT lr_input
  EXPORTING
    value_fieldname = 'PRICE'
    .

 l_column->set_cell_editor( value = lr_input ).
*Set the table Editable
l_value->IF_SALV_WD_TABLE_SETTINGS~SET_READ_ONLY( value = abap_false ).

thanks

suman