cancel
Showing results for 
Search instead for 
Did you mean: 

Making Approval / Rejection note Mandatory while Rejecting a Shopping Cart

Former Member
0 Kudos

Hi Experts,

My requirement is to make Rejection Note Mandatory when a approver rejects a Shopping Cart.

I have created an enhancement in CHANGE_DOCUMENT method of /SAPSRM/CL_PDO_BO_SC_ADV class.

Inside the enhancement i have checked if there is a line item in longtext with text_id = 'NOTM'.

Now the problem is, when a approver rejects for the first time without entering comment, it works fine.

But when requester again modifies SC and re-orders it, internal table longtext still holds previous rejection comment. Therefore, the error message is not coming this time.

Suggest me how can i fix this please.

Regards,

Parthi

Accepted Solutions (1)

Accepted Solutions (1)

former_member228602
Contributor
0 Kudos

Hello Parthi,

     When the approval note is stored the text is stored along with date and time. Something like

TEST#( MANAGER 30.01.2015 12:58:21 CET ). I would say you can extract date and time and if the time is lesser than a threshold from now then you can raise the error. This should fix your case.

Thanks and Regards,

Veera

Former Member
0 Kudos

Hi Veera,

Thanks for the reply. Actually I have tried that method only but the customers are not sure about the threshold time.

I have checked whether name, date, hour and minute matches with system variables but still if it is entered at 11:59:59 pm, all the values including the date changes.

So, Is there any other better way to find it? like is there any table that creates a record every time comment is entered ?

Regards,

Parthi

former_member228602
Contributor
0 Kudos

Hello Parthi,

          I am thinking if we have another approach. Because the long text are not stored in SRM specific tables but SAP generic tables. And we don't associate a time stamp unlike attachments where we store in SRM specific tables.

Thanks and Regards,

Veera

Answers (0)