Hi Harsha,
Here is what was done by our developers. We are using classic scenario.
1.) Create Enhancement Implementation Z_SRM_SEI_LIMIT_TAX_CODE.
2.) Create a post-exit for method /SAPSRM/IF_CLL_MAPPER~REFRESH
in class /SAPSRM/CL_CH_WD_DODM_SC_I_BD. This class is responsible
for displaying Shopping Cart item data.
3.) Tax codes (in dropdown) need to be filtered based on company code’s country. SRM does not maintain country specific tax data. So an RFC
needs to be created in ECC 6.0 and will be called by SRM.
4.) Create an RFC enabled FM named Z_SRM_GET_TAXCODES_BY_BUKRS in ECC.
5.) Within the FM call BAPI_COMPANYCODE_GETDETAIL for reading Company code's country.
6.) Get the tax procedure value from table T005 based on country.
7.) Select all tax codes form table T007A based on tax procedure.
8.) This RFC will be called within the post-exit of method /SAPSRM/IF_CLL_MAPPER~REFRESH of class /SAPSRM/CL_CH_WD_DODM_SC_I_BD.
9.) After calling the RFC, table ET_TAX_CODES will be filled with
company code specific tax codes. Now delete the records form
MT_TAXCODES which are not available in ET_TAX_CODES.
Version 5.0A
In SRD, with transport SRDK900505 extended the structure to take Tax Text and REMOVED tax code filter logic using tax codes in SRM. Current and valid tax codes will come from R/3.
Version 5.0A
extended logic to get Tax codes from table T007S (text table for T007A) and adding Tax Type ‘V’ to where clause of T007A.
Version 5.0B
Added code back to consider tax codes available in SRM. Loop thru SRM codes, check for equivalent tax code in ECC to get text.
Version 6.0:
1.) Post-Exit of method /SAPSRM/IF_CLL_MAPPER~REFRESH of class /SAPSRM/CL_CH_WD_DODM_SC_I_BD needs to be modified.
2.) Check if shopping cart item data lead selection is initial. If so return.
This will avoid the dump which occurs when deleting a line item from
Shopping cart.
core_object->mv_item_guid = core_object->mo_parent_bo_mapper->items_get_lead_selection( ).
IF core_object->mv_item_guid IS INITIAL. " this may occur when (last) item was deleted
RETURN.
ENDIF.
Thanks,
Jeff