cancel
Showing results for 
Search instead for 
Did you mean: 

automatically assign a contract to sc

Former Member
0 Kudos

Hi Experts

We are working in Classical scenario.

While creating a sc, when we click on the source of supply, we get a list 3 contracts.

All the contracts are proposed and none of them is automatically assigned.

Our requirement is that one of the these contracts should automatically get assigned as the source of supply, and when we delete this contract then we should get the list of 3 contracts to choose from.

thanks

gaurav

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi

Include LBBP_SC_APPF83.

Unique SOS gets selected if the number of lines in the internal table it_sos is one.

Thus variable lv_count needs to made equal to 1 after getting its value from counting the SOS from internal table it_sos.

However, key is required to change the object.

former_member183819
Active Contributor
0 Kudos

Hi Gaurav

You can use quota arrangement too if you have more than one contracts for one material.

regards

muthu

Former Member
0 Kudos

Hi,

In Classic scenario as a standard behaviour if there is only one source of supply is there system will pick one from backend source list..

For your requirement to assign automatically any contract as source of supply, using badi

BBP_DOC_CHANGE_BADI can do.. check with technical guy for changes in badi..

Thanks

prasad.s

peter_novoth
Active Contributor
0 Kudos

Hi Gaurav,

by standard the system assigns the source of supply automatically when it is unique. When there are more SOS, they will be proposed in a list view, where the user is able to select the right one. From the perspective of the SOS, the three contracts are equivalent, therefore none of them can be automatically assigned.

So you need to define a logic to decide which contract has to be assigned. Implement the method BBP_SOS_CHECK of the BAdI BBP_SOS_BADI.

Regards,

Peter

Former Member
0 Kudos

Hi Peter

Even we tried to look out the method BBP_SOS_CHECK of the BAdI BBP_SOS_BADI.

However, the problem is that whenever the BADI gets hit, there is no data in the tables of the BADI.

Even if there are 3 contracts which correspond to a particular product, all the tables in the method are blank and contain no relevant data.

Only the search criterion field is populated.

If you could please guide as to how to use the method of the BADI.

Thanx

Gaurav

peter_novoth
Active Contributor
0 Kudos

Hi Gaurav,

sorry, this is the BAdI BBP_SOS_BADI_ICC and not BBP_SOS_CHECK.

Please check the function module BBP_PD_SOS_FIND. Here you can see, that the BAdI is called twice:

- around the line 99:

 *   Call BADI for customer specific search 

- around the line 181:

 *   Call BADI for customer specific checks 

The implementation of the method BBP_SOS_CHECK should have therefore the result in the CT_FOUND_CONTRACT which can be manipulated.

Regards,

Peter

Former Member
0 Kudos

Hi Peter

Do you want us to carry out the implementation of the BAdI BBP_SOS_BADI_ICC and write the code in its method BBP_SOS_CHECK.

If so, then when we try to carry out its implementation, its gives an error message 'BAdI definition BBP_SOS_BADI_ICC is only provided for SAP internal use'.

Please help.

Thanx Gaurav

peter_novoth
Active Contributor
0 Kudos

Hi Gaurav,

sorry, I have only checked only the optimal place in the call structure for the change, but not checked the BAdI content itself.

Regards,

Peter

former_member183819
Active Contributor
0 Kudos

Hi gaurav,

What about source list . you can put a contract anf make one as FIXED Vendor.

regards

Muthu