cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Business One - Mandatory field on Outgoing Payment

former_member393589
Discoverer
0 Kudos

Hi Experts,

Would like to make Outgoing Payment field mandatory where DocType is Account.

Detail field name - OcrCode

Kindly provide your valuable suggestion.

Regards,

Nitu

Accepted Solutions (0)

Answers (2)

Answers (2)

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

You have create new SP_Transaction notification for Outgoing payment if cost center is empty. So that, you can block posting of outgoing payment.

Regards,

Nagarajan

former_member393589
Discoverer
0 Kudos

Hi,

Below is the SP_Transaction Notification applied on Incoming Payment it is not working because in my system I have financial year wise numbering series.

So DocNum generated in last year again repeats in this year due to which linking ORCT and RCT4 on DocNum does not survive my purpose.

Using below code, still SAP throws an error "Pls. Enter Region" after entering value in OcrCode.

If @object_type='24' and @transaction_type='A'

BEGIN

If Exists (Select * from [dbo].[ORCT] T0 LEFT JOIN RCT4 T1 On T0.DocNum = T1.DocNum Where

T0.DocEntry = @list_of_cols_val_tab_del and T0.Doctype = 'A' and T1.OcrCode is null )

BEGIN

Select @error = 3202,

@error_message = 'Pls. Enter Region'

End

End

Hope you will understand my challenge.

In case of Outgoing Payment I am not able find the link between OVPM and RCT4.

Regards,

Nitu

jitin_chawla
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

You can assign the Distribution Rule to the G/L Account as default and it will be picked everytime when the G/L Account is taken.

You can check the option of Code in Sp_transactionNotification.

regards,

Jitin

former_member393589
Discoverer
0 Kudos

Hi Jitin,

Thanks for the reply.

Can you elaborate the 2nd line what I need to check in SP_transactionNotification.

In my case I cannot assign default cost center to the G/L Account because during each transaction it will vary.

Regards,

Nitu