cancel
Showing results for 
Search instead for 
Did you mean: 

Error Message generated in SRM not gettind displayed in Portal

Former Member
0 Kudos

Dear Experts,

I am creating a contract from Rfx in SRM for which i have implemented the BADI BBP_CTR_BE_CREATE.

In BADI I am restricting the Contract to be created if a contract is allready created for the Rfx Response. If a contract exists it should display the error message with the existing contract number.

   MESSAGE ID 'ZSRM' TYPE 'E' NUMBER '030' WITH zcontractno.

Here ZSRM is the message class and zcontract number is the existing contract number.

Contract check is working fine. However the message is not getting displayed in Poral it just gives a red signal.

When i debigged for the message i am getting an error saying " Message XXX cannot be processed in plugin mode http".


Kindly let me know how this can be resolved. We are in SRM 7.0 SAPKIBKV09

Thanks

Punit

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

You can handle this in multiple ways:

1. You can hide/disable the Create contract button if a contract already exists by creating a metadata entry in table /SAPSRM/V_MDA_HC for button CREATE_CONTRACT, mode = DISPLAY, Objectype = BUS2202.

You have to create a dynamic class/method to check contract existence.

If a contract already exists for the RFX, Update Contract button is displayed by Standard. So the user is aware that there is a pre-existing contract for this RFX/BID.

2. If you still want to show the error that contract exists on clicking Create Contract, you can create a pre-exit for

class /SAPSRM/CL_PDO_BO_QTE method /SAPSRM/IF_PDO_BO_QTE~ACTION_CREATE_CONTRACT

Here you can check for existence of contract and add your message to object CO_MESSAGE_HANDLER and use a RETURN so that standard method is not executed.

This message will be shown on BID/Quote UI.

Let me know if this helps.

Former Member
0 Kudos

Hi Sushil,

Thanks you so much for your valuable inputs.

I will check and let you know.

Regards

Punit

Former Member
0 Kudos

Hi Sushil,

I have written a pre-exit for this method.

Now to check the existence of contract i need to the GUID for the rfx response in context which in turn will be used to fetch QUOT details.

Now the only importing parameter i can see for this pre-exit is

  !IV_PROCESS_TYPE_CONTRACT type CRMT_PROCESS_TYPE_DB

How can i fetch the GUID in pre-exit method?

Regards

Punit

Former Member
0 Kudos

Try using variable mv_header_guid .

Former Member
0 Kudos

Hi Sushil,

I tried using MV_HEADER_GUID but it is giving me an error saying "Field "MV_HEADER_GUID" is unknown. It is neither in one of the  specified tables nor defined by a "DATA" statement. "DATA" statement.  "

I saw MV_HEADER_GUID is decalared as protected attribute in super class /SAPSRM/CL_PDO_BASE.

Now since i have created a preexit for a method in class /SAPSRM/CL_PDO_BO_QTE will it not inherit the properties of super class ? Is it treated as a separate class?

I am new to OOPS so please help me in clarifying this doubt.

Regards

Punit

Former Member
0 Kudos

When you created the pre-exit, did you choose Yes on Access to Private and Protected attributes pop-up?

If yes, there should be an object CORE_OBJECT created in the standard code.

you can access

CORE_OBJECT->MV_HEADER_GUID from it.

If this is all confusing, try creating implicit enhancement in the beginning of method  ACTION_CREATE_CONTRACT.

Its not complicated in the implicit enhancement.

Regards,

Sushil.

former_member208244
Active Participant
0 Kudos

Hello,

You implemented a BADI enhance where there is no exporting message table. In SRM BADIs you cannot export messages using this sentences  like on ECC user exits.

Look importing and exporting parameters of your current BADI, also analyse the requisite using BBP_DOC_CHECK_BADI.

Regards

Former Member
0 Kudos

Hi Sebastian,

Thankyou so much for your reply.

I cannot use BBP_DOC_CHECK_BADI for this requirement, as i have to check the allready existing contract in ECC, when a buyer creates a contract from the accepted rfx response. If the contract exists it should thorw an error and terminate and if not contract is created it will proceed to create a contract. At this scenario i need to implement BBP_CTR_BE_CREATE BADI.

Now as you we cannot use a simple message satatement, what else is the alterante to use display the message.

Thanks

Punit

Former Member
0 Kudos

Hi Sebastian,

Thankyou so much for your reply.

I cannot use BBP_DOC_CHECK_BADI for this requirement, as i have to check the allready existing contract in ECC, when a buyer creates a contract from the accepted rfx response. If the contract exists it should thorw an error and terminate and if not contract is created it will proceed to create a contract. At this scenario i need to implement BBP_CTR_BE_CREATE BADI.

Now as you we cannot use a simple message satatement, what else is the alterante to use display the message.

Thanks

Punit

0 Kudos

Hi Punit,

Best way is, if your condition satisfy to display error message then send error flag information through memory ID (e.g.  V_ERROR_HTTP) in BADI  BBP_CTR_BE_CREATE BADI.

In BBP_DOC_CHECK_BADI read memory ID value of V_ERROR_HTTP and if 'X' then display error message.

Regards,

Raj

Former Member
0 Kudos

Hi Raj,

Thanks a lot for your feedback and sorry for getting back to you so late.

I can set the error flag in BADI  BBP_CTR_BE_CREATE BADI but the problem here is:

This error message has to be displayed before a contract is created hence i am not sure for which doc type this BBP_DOC_CHECK badi will be implemented. Because I had put a break point in DOC_CHECK badi for rfx response(BUS2202) but on clicking "create_contract" button it never stops there.

waiting for your feedback.

Regards

Punit