cancel
Showing results for 
Search instead for 
Did you mean: 

Need to delete drop down values of activity in travel request portal

Former Member
0 Kudos

Hi,

We need to hide/delete few of the drop down values from activity in travel request creation in portal, i know that if we delete in R/3 it will effect here, as per the client requirement we need values in R/3 system but that few of the values should not appear drop down list .

Regards

Ganesh

Accepted Solutions (0)

Answers (1)

Answers (1)

ramakrishnappa
Active Contributor
0 Kudos

Hi Ganesh,

You can achieve your requirement as below

  • Enhance the travel request WD component and locate the view of your screen area click on enhance button
  • Create a POST exit method on WDDOMODIFYVIEW( ) and now, you can bind the new drop down list to the context attribute of ACTIVITY

Hope this helps you.

Regards,

Rama

Former Member
0 Kudos

Hi rama,

i already tried with wdmodify method and in  pre and post exists with following code, but the new appended values are not showing in driop list  in portal.

DATA drp_info       TYPE REF TO if_wd_context_node_info.

DATA drp_value_set  TYPE wdr_context_attr_value.

DATA drp_value_list TYPE wdr_context_attr_value_list.

DATA index TYPE n.

DO 5 TIMES.

index = sy-index .

CONCATENATE ' Value ' index  INTO drp_value_set-value SEPARATED BY space.

CONCATENATE ' Value ' index  INTO drp_value_set-text SEPARATED BY space.

INSERT drp_value_set INTO TABLE drp_value_list.

ENDDO.

SORT drp_value_list BY value.

DELETE ADJACENT DUPLICATES FROM drp_value_list COMPARING value.

drp_info = wd_context->get_node_info( ).

drp_info = drp_info->get_child_node('GENERAL_DATA').

*drp_info->set_attribute_value_set(

*name = 'T_ACTYPE' value_set = drp_value_list ).



ramakrishnappa
Active Contributor
0 Kudos

Hi Ganesh,

Try the below code in POSTexit of WDDOMODIFYVIEW( ) method of your view


DATA drp_info       TYPE REF TO if_wd_context_node_info.

data   lo_node        type ref to if_wd_context_node.

DATA drp_value_set  TYPE wdr_context_attr_value.

DATA drp_value_list TYPE wdr_context_attr_value_list.

DATA index TYPE n.


DO 5 TIMES.

index = sy-index .

CONCATENATE ' Value ' index  INTO drp_value_set-value SEPARATED BY space.

CONCATENATE ' Value ' index  INTO drp_value_set-text SEPARATED BY space.

INSERT drp_value_set INTO TABLE drp_value_list.

ENDDO.

SORT drp_value_list BY value.

DELETE ADJACENT DUPLICATES FROM drp_value_list COMPARING value.

lo_node  = drp_info->get_child_node('GENERAL_DATA').

drp_info = lo_node->get_node_info(  ).

drp_info->set_attribute_value_set(

name = 'T_ACTYPE'  value_set = drp_value_list ).


Hope this helps you.


Regards,

Rama

Former Member
0 Kudos

Hi rama,

Got below syntax error in your suggested code.

The result type of the functional method cannot be converted into the type of  lo_node
ramakrishnappa
Active Contributor
0 Kudos

Oh, pls correct the below statement

lo_node  = drp_info->get_child_node('GENERAL_DATA').


With

lo_node  = wd_context->get_child_node('GENERAL_DATA').


Former Member
0 Kudos

hi rama,

Tried your code in post exit but values are not populating.

ramakrishnappa
Active Contributor
0 Kudos

Hi Ganesh,

Actually, the post exit logic should work, unless there is any configurations overriding it.

It seems that some configuration is overriding after the execution of POST exit. I believe there is configurations settings to be done for drown list of TRAVEL request component in SPRO. Please ask your functional consultant to help you in this case.

Regards,

Rama

Former Member
0 Kudos

Hi rama

The below mentioned code is worked for me , this i was written before only but by mistake i given wrong attibute name ( instead of plan activity type , given activity ) , Plan acititype for travel request and actity type for expense report creation. now issue is resolved , thanks

DATA drp_info       TYPE REF TO if_wd_context_node_info.

DATA drp_value_set  TYPE wdr_context_attr_value.

DATA drp_value_list TYPE wdr_context_attr_value_list.

DATA index TYPE n.

DO 5 TIMES.

index = sy-index .

CONCATENATE ' Value ' index  INTO drp_value_set-value SEPARATED BY space.

CONCATENATE ' Value ' index  INTO drp_value_set-text SEPARATED BY space.

INSERT drp_value_set INTO TABLE drp_value_list.

ENDDO.

SORT drp_value_list BY value.

DELETE ADJACENT DUPLICATES FROM drp_value_list COMPARING value.

drp_info = wd_context->get_node_info( ).

drp_info = drp_info->get_child_node('GENERAL_DATA').

*drp_info->set_attribute_value_set(

*name = 'T_ACTYPE' value_set = drp_value_list ).