Hi team,
In sales order,ITEM assignemnt block REJECTION_REASON drop value after user selection any value .,it is showing space and value?we want to remove space after user selection any value in drop down?
component - BT115IT_SLSO
view - BT115IT_SLSO/Items
context node - BTADMINI Base Entity BTAdminI
attribute - REJECTIONREASON
after user selecting in drop down value ,we required to show only one value(what ever value is selected in drop down),only valye shoud be display ,remove space .how to do it.in get_v method standard code is below.
METHOD GET_V_REJECTIONREASON.
DATA: lt_ddlb TYPE bsp_wd_dropdown_table,
ls_ddlb LIKE LINE OF lt_ddlb,
lr_iterator TYPE REF TO if_bol_bo_col_iterator,
lr_btadmini TYPE REF TO cl_crm_bol_entity,
lr_coll TYPE REF TO if_bol_entity_col,
lr_current TYPE REF TO if_bol_bo_property_access,
lr_entity TYPE REF TO cl_crm_bol_entity,
lv_rejection TYPE crmt_rejection_code.
TRY.
lr_iterator ?= me->collection_wrapper->get_iterator( ).
lr_btadmini ?= lr_iterator->get_by_index( iv_index ).
ENDTRY.
IF lr_btadmini IS BOUND.
TRY.
lr_coll = lr_btadmini->get_related_entities(
iv_relation_name = 'BTItemSalesSet' )."#EC NOTEXT
lr_current = lr_coll->get_current( ).
lr_entity ?= lr_current.
TRY.
lr_entity->get_property_as_value( EXPORTING iv_attr_name = 'REJECTION'
IMPORTING ev_result = lv_rejection ).
CATCH cx_crm_cic_parameter_error.
ENDTRY.
CATCH cx_sy_ref_is_initial cx_sy_move_cast_error
cx_crm_genil_model_error.
ENDTRY.
* Get values for rejection reason
lt_ddlb = cl_crm_uiu_cust_get=>get_values_for_field( 'REJECT_REASON' ).
IF lv_rejection IS INITIAL.
READ TABLE lt_ddlb TRANSPORTING NO FIELDS WITH KEY key = '00'. "ISA
IF sy-subrc IS INITIAL.
DELETE lt_ddlb INDEX sy-tabix.
ENDIF.
ELSE.
READ TABLE lt_ddlb INTO ls_ddlb WITH KEY key = lv_rejection.
CLEAR lt_ddlb.
APPEND ls_ddlb TO lt_ddlb.
ENDIF.
ENDIF.
INSERT INITIAL LINE INTO TABLE lt_ddlb.
SORT lt_ddlb BY value.
IF gr_ddlb_rejectionreason IS NOT BOUND.
CREATE OBJECT gr_ddlb_rejectionreason EXPORTING iv_source_type = 'T'.
ENDIF.
gr_ddlb_rejectionreason->set_selection_table( it_selection_table = lt_ddlb ).
rv_valuehelp_descriptor = gr_ddlb_rejectionreason.
ENDMETHOD.
Thanks
Kalpana