cancel
Showing results for 
Search instead for 
Did you mean: 

SRM 7.0 Get data from item selected in SC.

Former Member
0 Kudos

Hello Experts,

We have a requiremtn to filter list of vendor in search help by company code into ths SC. In SRM 5.0 to do it we get the data from item select with field symbol.

     

<fs_gs_select_i> TYPE bbps_sc_selected_item.

l_gs_select_i(100TYPE c VALUE '(SAPLBBP_SC_UI_ITS)gs_select_i',

     

Now, in SRM 7.0 this solution doesn't work.

Any idea to do it now?

Many thanks,

David.

Accepted Solutions (1)

Accepted Solutions (1)

konstantin_anikeev
Active Contributor
0 Kudos

Hi David,

you can try following.

  DATA lo_task TYPE REF TO /sapsrm/if_cll_task_container.   DATA lo_bom TYPE REF TO /sapsrm/if_cll_bom_sc.   DATA lo_sc TYPE REF TO /sapsrm/if_pdo_bo_sc_adv.   DATA lv_guid TYPE bbp_guid.   DATA lt_item TYPE bbpt_pd_sc_item_d.   FIELD-SYMBOLS: <fs_item>  TYPE bbp_pds_sc_item_d.   lo_task = /sapsrm/cl_ch_wd_taskcont_fact=>get_task_container_instance( ). " Task Container   lo_bom = lo_task->get_bom_sc( ). " Get reference to SC Mapper   lv_guid = lo_bom->/sapsrm/if_cll_bo_mapper~get_bo_guid( ). " Get SC GUID   lo_sc = /sapsrm/cl_pdo_factory_sc_adv=>get_buffered_instance( lv_guid ). " Get SC Instance   IF lo_sc IS BOUND.     lv_guid = lo_bom->/sapsrm/if_cll_item_admin~get_lead_selection( ). " Get selected Item     lo_sc->/sapsrm/if_pdo_bo_sc~get_item_detail(  EXPORTING iv_item_guid  = lv_guid                                                   IMPORTING et_item       = lt_item ). " Get item details     READ TABLE lt_item ASSIGNING <fs_item>  INDEX 1.     IF <fs_item>  IS ASSIGNED.       " Here is your code       UNASSIGN <fs_item>.     ENDIF.   ENDIF.

Best Regards

Konstantin

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi David,

I would ask you question, How were you getting vendor and its company codes? Per standard SRM set up Vendor company code data and company code information do not flow into SRM via BBPGETVD or BBPUPDVD. You replicate Vendor general data and vendor purchase organization data? Did you have some custom BADI modification where you are bringing vendor and which company code its created in SRM system?  Or you were validating at time of Vendor search with backend?

Thank you

Ritesh