cancel
Showing results for 
Search instead for 
Did you mean: 

SC line item Product category based approval process like Cost centre based approval process

0 Kudos

Hallow,

In SRM 7.01 SC approval process I am using Process controlled WF with decision type 3.

I know that approval can with Cost centre based and there is method where Cost centres are Mapped with AREA guid.

But here  i have a requirement to create the aprpoval process based on Line items Product category.  is there  Area of responsibility corresponds to a product category.??

I tried to map Line item with AREA Guid the same way  we used to mapped in cost centre based approval process.

After this system not taking the Product category Sum up value  in subject line while sending the WI.

which class i should use from below and how to use it.

/SAPSRM/CL_WF_AREA_ACTIV_GRP

/SAPSRM/CL_WF_AREA_ADHOC

/SAPSRM/CL_WF_AREA_BASE

/SAPSRM/CL_WF_AREA_CONTEXT

/SAPSRM/CL_WF_AREA_COST_CTR

/SAPSRM/CL_WF_AREA_EMPLO_LIST

/SAPSRM/CL_WF_AREA_EMPLOYEE

/SAPSRM/CL_WF_AREA_MANAGER

/SAPSRM/CL_WF_AREA_PURCH_GRP

/SAPSRM/CL_WF_AREA_RL_UNIT

/SAPSRM/CL_WF_AREA_SCRUTINIZER

Cheers.

Indranil

Accepted Solutions (0)

Answers (3)

Answers (3)

laurent_burtaire
Active Contributor
0 Kudos

Hello Indranil,

create your own class based on the standard one /SAPSRM/CL_WF_AREA_COST_CTR.

Then, in order to call your specific implementation, create an implementation for /SAPSRM/BD_WF_AGENTS enhancement spot in order to implement /SAPSRM/BD_WF_RESP_RESOLVER BAdI.

Filter for BAdI implementation will be BUS2121 for DOCUMENT_TYPE and your specific resolver name for RESP_RESOLVER_NAME (create your specific responsability resolver name through IMG: SAP Implementation Guide > SAP Supplier Relationship Management > SRM Server > Cross-Application Basic Settings > Business Workflow > Process-Controlled Workflow > Business Process Configuration > Define Filter Values for BAdI 'Define Agents')

Inside your specific BAdI implementation, create your own /SAPSRM/IF_EX_WF_RESP_RESOLVER~GET_AREA_TO_ITEM_MAP (to create the workflow area type and the leading

object) and /SAPSRM/IF_EX_WF_RESP_RESOLVER~GET_APPROVERS_BY_AREA_GUID (to get the responsability area) methods based on the standard ones.

Regards.

Laurent.

0 Kudos

Laurent, thanks for your reply.

So as per you if i copy the cost centre class in to another Zclass , system will take care  for which product category set  the decision set has been created . and when Approver opens the SC  Portal will  take care ...

In the cost centre based approval we just assignned or system create it's own area guid.

   LO_AREA = /SAPSRM/CL_WF_AREA=>/SAPSRM/IF_WF_AREA~CREATE_INSTANCE(
            IV_AREA_TYPE         = ZCL_WF_AREA_COST_CTR=>GC_AREA_TYPE_COST_CTR
            IV_LEADING_OBJECT_ID = LR_ITEM_TO_CCTR_MAP->COST_CTR_ID
            ).

          LS_AREA_TO_ITEM_MAP-AREA_GUID = LO_AREA->GET_GUID( ).


how Z class supported by SRM to create above functions.

laurent_burtaire
Active Contributor
0 Kudos

Hello Indranil,

i do not understand your code...

Your leading object is the product category and the area type is your specific implementation class.

So your ABAP code should be:


  LO_AREA = /SAPSRM/CL_WF_AREA=>/SAPSRM/IF_WF_AREA~CREATE_INSTANCE(
            IV_AREA_TYPE        = ZCL_WF_AREA_PROD_CAT          

            LV_LEADING_OBJECT_ID = LR_ITEM_TO_PRODCAT_MAP->PROD_CAT_ID
            ).

  LS_AREA_TO_ITEM_MAP-AREA_GUID = LO_AREA->GET_GUID( ).

Regards.

Laurent.

0 Kudos

thankS,

i had pasted Cost based code no worrries.

so next code lines will be about  item mapping  with area

      LS_AREA_TO_ITEM_MAP-ITEM_GUID = LR_ITEM->ITEM_GUID.
          APPEND LS_AREA_TO_ITEM_MAP TO RT_ITEM_TO_AREA_MAP.

so as  per you  after this code system will take care about Product category based approval , the way cost base working. System will create the Sum of product category for decision set  which is needed in WI subject line.

e.g Line 1 -laptop-10 AUD line2--laptop 13 AUD line3-Desktop--5 AUD.

so output will be two decisionsets one for laptop value-23 AUD and another for Desktop value 5Aud.

Along with this, Offline approval mail will send the content have those  product category line items for which Product category this decision set has been created.

so different agent will get different mail with diferent content and diff amount. if different user assigned to SC different product category.

I am working on this from quite long time and  number of times checked , i have implemeted , the way you suggesting but  might ve SAP SRM don't think of  such scenario .

sameer_ahmed6
Explorer
0 Kudos

Hi Indranil,

What you can do is Go to Tcode OOCU_RESP and assign the responsibility for those Product categories and assign those product categories in Org Structure for Purchasing Groups and you can use this "/SAPSRM/CL_WF_AREA_PURCH_GRP" and pick the approver assigned to this position and display this on portal.

Regards

Sameer

konstantin_anikeev
Active Contributor
0 Kudos

Hi Indranil,

please check

Regards

Konstantin

0 Kudos

Thanks Konstantin,

for sharing useful information for basic understanding.

But the thread is not fulfiling my requirement. i try to give the example

in the SC i have 3 line items with Prod cat--1..LAPTOP--$10 2. LAPTOP -$20  3. DESKTOP-$15.

as the meaning of partial document approval type 3.

there should be only two decisionset and   as two diff. prod. category  set in SC.

one for LAPTOP value $30 and other with $15 by assigning the product cat. as Area guid.

the same way Cost centre based approval work.

Creating set of cost centre and that many user decisions.