Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A


Hi Freinds,

I am trying to code certain validations required on Purchase order. I have my Supplier's code starting with State Code e.g DELV001, BLR001. Like wise i have my document series the same way BLR1, DEL1. I want to make sure if some one has selected a supplier for say DEL state and if the series if of different state it should not let the user add the po.

I tried coding it but it does not allow to add even if the combination is right. Here is my code.......

Public BPCode As SAPbouiCOM.EditText

Public Series As SAPbouiCOM.ComboBox

If pVal.ItemUID = "1" And pVal.BeforeAction = True And (oForm.Mode = SAPbouiCOM.BoFormMode.fm_ADD_MODE Or oForm.Mode = SAPbouiCOM.BoFormMode.fm_UPDATE_MODE) Then ' Validation

BPCode = oForm.Items.Item("4").Specific

Series = oForm.Items.Item("88").Specific

If (BPCode.Value Like "DEL*" And Series.Value <> "DEL-11-12") Then

BubbleEvent = False

SBO_Application.SetStatusBarMessage("Check Series and Supplier", SAPbouiCOM.BoMessageTime.bmt_Short, True)

Exit Sub

End If

End If

Thank you

Not what you were looking for? View more on this topic or Ask a question