cancel
Showing results for 
Search instead for 
Did you mean: 

Need to populate the error message while create a shopping Cart

Former Member
0 Kudos

Hi Gurus,

We are in SRM 7.01.

Currently when you shop for material against an OLA(Contract) in SRM and the Validity End data has been past and/or the Target Value has been exceeded it will still create a Shopping Cart but on approval will only create a Requisition not a Purchase Order.

Please suggest me how to make  a Hard Error Message be created on SRM when a user attempts to shop for material when any of the above two scenarios are invoked.

your help will be greatly appreciated .

Thanks & Regards

Sada

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi,

There are two things here,

1.Do you want to change the call from PR to PO or vice versa? If so there is a badi to do so called BBP_TARGET_OBJTYPE. You can place your logic here on when you want to call the PR and when you want to call the PO.

2.If you want a hardstop then you need to populate a message as Ritesh and Ricardo mentioned using DOC_CHECK_BADI.

Regards,

Naveen

Former Member
0 Kudos

Hi Ritesh,

Thanks for suggesting the BAPI, but when we try to use the above BAPI in the SRM system, We get a syntax  error saying that the structure doesn't exist .Below is the table we need to pass to the backed for fetching  the contract details.

data: ls_header TYPE bapimeoutheader .

Could you please suggest how the BAPI can be called in SRM with sample code..

Thanks,

Sada

Former Member
0 Kudos

Hi Ritesh,

The Contract is in ECC. But we are assigning this contract details in Shopping Cart Source of Supply in that time we need to popup the  error message based on the valid date and value is exceed.

Please suggest me.

Thanks,

Sada

Former Member
0 Kudos

Hi Sada,

So you guys have contracts in backend without replicated them in SRM system. In that case i would recommend you to use BBP_DOC_CHECK_BADI which Ricardo mentioned above and there is Function module in ECC system BAPI_CONTRACT_GETDETAIL which is RFC enabled so when Ordering Shopping cart put logic in this BADI to make RFC call in Backend system with Contract Number to get validity date and value you are looking for.

Hope this will help to solve your problem.

Thank you

Ritesh

0 Kudos

Hi Sada,

for SRM contracts Implement BADI BBP_CTR_STAT to lock an expired contract. We can define when exactly an expired contract or shortly expiring contract can be locked.

Thanks

Rakesh

ricardo_cavedini
Employee
Employee
0 Kudos

Hello,

You could create an implementation in BBP_DOC_CHECK_BADI for BUS2121.

Have a look at note 1570500 for further details.

Regards,

Ricardo

Former Member
0 Kudos

Hello Ricardo,

Thanks for suggesting the BADI, BBP_DOC_CHECK_BADI has been implemented in our system but we don't have the contract GUID to pass to the  FM BBP_PD_CTR_GETDETAIL.Could you please suggest how to get the contract GUID in  BBP_DOC_CHECK_BADI so that we can pass the same to the FM GETDETAIL and fetch all the values related  to the contract.

FYI, we have verified in BBP_PD, there also the contract  GUID is not available.

Thanks for your help and cooperation in this regard.

Thanks

Sada

Former Member
0 Kudos

Hi Sada,

Could you please provide details where you are pulling contracts from? Are you using SRM or ECC contracts?

Thank you

Ritesh