cancel
Showing results for 
Search instead for 
Did you mean: 

Define default sale cycle in opportunity

Former Member
0 Kudos

We have 2 active sales cycle in our ORG.

there are 2 sales units each related to one sales cycle

we would like that sales cycle would be automatically set in opportunity according to the owner's organization unit, but could not find a way to do it.

i would save manual update and manual mistakes from sales reps if this field would be read only and updated automatically.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

thanks you. would be checked

spencer_liang
Active Contributor
0 Kudos

Gu Avital,

Here is an answer and solution.

need to know at the beginning

Sales cycle is assigned to transaction type in spro - crm - transactions - define transaction types - select your trans type - Assignment of Business Transaction Categories - bus2000111 Opportunity - Customizing header - Sales Cycle

So sales cycle : transaction type = 1:1 assignment.

Q1: update sales cycle automatically in standard?

A1: This is not provided in standard functionality.

Q2: how can I develop auto update function according to org unit?

A2: this is possible. when you select oppt type for creation, the system processes partner first, org data, then oppt_h. the sales cycle is maintained in oppt_h.

step1: in the partner determination procedure, make sure the employee responsible is assigned with access sequence. This access sequence determines empl resp. form logon user, such as 0004.

step2: implement your implementation of badi CRM_OPPORT_H_BADI - write your logic in CRM_OPPORT_H_MERGE in which you need to read the org unit first, then modify sales cycle in CS_OPPORT_H_BADI. then this sales cycle will be updated in the oppt.

But there are 2 concerns as your business scenario is not clear.

concern1: you want to determine it only once during creating or auto update it dynamically during processing the oppt?

1st, if determine once only, my solution above is good.

2nd, if determine automatically, you need to first decide what triggers the sales cycle auto update. Specifically, the sales cycle shall be update when you change value of which field. Then you need to customize event, you need write your own FM that updates sales cycle and assign this FM to this event.

concern2: where is the org unit from?

if you determine sales cycle only, we can use badi, but where the org unit is from?

1st, if the org unit is the org data or socalled sales area in the oppt, you need to decide how the org data is determined.

here comes the trick part. opport_h is processed only when you select the oppt transaction type. after selcting trans type, you may enter the prospect, it can trigger org determination too , but opport_h is not triggered anymore as input field does not contain opport_h, and thus badi is called.

So, if the org unit you mentioned is the org data determined in opport, you need to make sure org data is determined when you select transaction type, but not after. if this org data is determined from a bp, you need to make sure this bp is determined when you select transaction type automatically but not entered later.

Q3: how to set sales cycle to read-only.

A3: it is set to read-only by standard. If you are to change it on your webui, there should be something with your system, or enhancement.

on webui, run tcode bsp_wd_cmpwb

BT111H_OPPT/Details
BTOPPORTH
SLS_CYCLE

the get_i method for sales cycle is responsible for this func. check if you have enhancement.

my code in standard system below.

METHOD GET_I_SLS_CYCLE.
rv_disabled = 'TRUE'.
ENDMETHOD.

You see it is always set to read_only.

I will plan some time to write a wiki too.

https://wiki.scn.sap.com/wiki/display/CRM/Sales+Cycle+Customizing+and+BADI

hope my answer is good and clear enough for you.

feel free to raise any question .

Spencer

,

Gu Avital,

Here is an answer and solution.

need to know at the beginning

Sales cycle is assigned to transaction type in spro - crm - transactions - define transaction types - select your trans type - Assignment of Business Transaction Categories - bus2000111 Opportunity - Customizing header - Sales Cycle

So sales cycle : transaction type = 1:1 assignment.

Q1: update sales cycle automatically in standard?

A1: This is not provided in standard functionality.

Q2: how can I develop auto update function according to org unit?

A2: this is possible. when you select oppt type for creation, the system processes partner first, org data, then oppt_h. the sales cycle is maintained in oppt_h.

step1: in the partner determination procedure, make sure the employee responsible is assigned with access sequence. This access sequence determines empl resp. form logon user, such as 0004.

step2: implement your implementation of badi CRM_OPPORT_H_BADI - write your logic in CRM_OPPORT_H_MERGE in which you need to read the org unit first, then modify sales cycle in CS_OPPORT_H_BADI. then this sales cycle will be updated in the oppt.

But there are 2 concerns as your business scenario is not clear.

concern1: you want to determine it only once during creating or auto update it dynamically during processing the oppt?

1st, if determine once only, my solution above is good.

2nd, if determine automatically, you need to first decide what triggers the sales cycle auto update. Specifically, the sales cycle shall be update when you change value of which field. Then you need to customize event, you need write your own FM that updates sales cycle and assign this FM to this event.

concern2: where is the org unit from?

if you determine sales cycle only, we can use badi, but where the org unit is from?

1st, if the org unit is the org data or socalled sales area in the oppt, you need to decide how the org data is determined.

here comes the trick part. opport_h is processed only when you select the oppt transaction type. after selcting trans type, you may enter the prospect, it can trigger org determination too , but opport_h is not triggered anymore as input field does not contain opport_h, and thus badi is called.

So, if the org unit you mentioned is the org data determined in opport, you need to make sure org data is determined when you select transaction type, but not after. if this org data is determined from a bp, you need to make sure this bp is determined when you select transaction type automatically but not entered later.

Q3: how to set sales cycle to read-only.

A3: it is set to read-only by standard. If you are to change it on your webui, there should be something with your system, or enhancement.

on webui, run tcode bsp_wd_cmpwb

BT111H_OPPT/Details
BTOPPORTH
SLS_CYCLE

the get_i method for sales cycle is responsible for this func. check if you have enhancement.

my code in standard system below.

METHOD GET_I_SLS_CYCLE.
rv_disabled = 'TRUE'.
ENDMETHOD.

You see it is always set to read_only.

I will plan some time to write a wiki too.

https://wiki.scn.sap.com/wiki/display/CRM/Sales+Cycle+Customizing+and+BADI

hope my answer is good and clear enough for you.

feel free to raise any question .

Spencer

spencer_liang
Active Contributor
0 Kudos

It seems my answer is duplicated.

Spencer