cancel
Showing results for 
Search instead for 
Did you mean: 

Context node dynamically and Map to alv

Former Member
0 Kudos

Hi,

I've this problem: I must create all attribute of my node at run-time and then create alv.

I use the method:

DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.

DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .

lo_cmp_usage = wd_this->wd_cpuse_alv( ).

IF lo_cmp_usage->has_active_component( ) IS INITIAL.

lo_cmp_usage->create_component( ).

ENDIF.

Pass context node to ALV

lo_interfacecontroller = wd_this->wd_cpifc_alv( ).

lo_interfacecontroller->set_data( node_lenght ). " node_lenght is my dynamic node

But I receive this message error:

Invalid operand type for the MOVE-CORRESPONDING statement.

Method: IF_WD_CONTEXT_NODE~GET_STATIC_ATTRIBUTES_TABLE of program CL_WDR_CONTEXT_NODE_VAL=======CP

Method: GET_REF_TO_TABLE of program CL_SALV_WD_DATA_TABLE=========CP

Method: EXECUTE of program CL_SALV_BS_SERVICE_MNGR_TABLE=CP

Method: EXECUTE of program CL_SALV_WD_SERVICE_MANAGER====CP

Method: APPLY_SERVICES of program CL_SALV_BS_RESULT_DATA_TABLE==CP

Method: REFRESH of program CL_SALV_BS_RESULT_DATA_TABLE==CP

Method: IF_SALV_WD_COMP_TABLE_DATA~MAP_FROM_SOURCE_DATA of program CL_SALV_WD_C_TABLE_V_TABLE====CP

Method: IF_SALV_WD_COMP_TABLE_DATA~MAP_FROM_SOURCE of program CL_SALV_WD_C_TABLE_V_TABLE====CP

Method: IF_SALV_WD_COMP_TABLE_DATA~UPDATE of program CL_SALV_WD_C_TABLE_V_TABLE====CP

Method: IF_SALV_WD_VIEW~MODIFY of program CL_SALV_WD_C_TABLE_V_TABLE====CP

What can I do??? My node doesn't has static attributes....

Thanks,

Federica.

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member402443
Contributor
0 Kudos

Hi Federica,

Check this link[Using ALV with a Dynamic Context Node|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/4c70444a-0801-0010-7688-9e4bd844b783] regarding the dynamic context node and map to alv.

Hopes this will helps you.

Regard

Manoj Kumar

Former Member
0 Kudos

Hi,refer to example WDR_TEST_DYN_ALV_USAGE

sagarmehta
Product and Topic Expert
Product and Topic Expert
0 Kudos

>

> Hi,refer to example WDR_TEST_DYN_ALV_USAGE

Thanks this was of gr8 help!!

Regards,

Sagar.

Former Member
0 Kudos

hi federica......

this message occurs because you are passing a value of different data type or strucutre somewhere into your alv.

---regards,

alex b justin

Former Member
0 Kudos

Hi Alex,

thanks for your replay.

I think the problem is the dynamic node: if I add to my node some statics attributes and other dynamics attributes I can see my alv with only statics attributes with corresponding value, other dynamics attributes are blank.

Have you any idea???

Regards,

Federica

Former Member
0 Kudos

hi federica.............

it is because... it is not etting bound to the proper node or thevalue is getting over written in some part of the coding. jjust debug and see whether the values are stored in the attribute.

---regards,

alex b justin