cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Crashes in SBO 2005 SP01 P04

former_member184566
Active Contributor
0 Kudos

Hi Everyone

When i'm in a sales order i'm trying to open the window that would be opened when clicking the "copy from" button at the bottom right to copy from a Sales Quote. It must only be done when the Customer selected has open quotes. Obviosuly you must have the Customer code filled in already. It works up until there. Brings up the window.

But as soon as the user selects which quote you get a windows error and then sap closes instantly.

here is my code and the item event.

Private Sub CheckForSalesQuotes(ByVal FormUID As String)

Dim oEdit As SAPbouiCOM.EditText

Dim RS As SAPbobsCOM.Recordset = Nothing

Try

oEdit = SBO_Application.Forms.Item(FormUID).Items.Item("4").Specific

RS = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)

RS.DoQuery("SELECT T0.DocNum FROM OQUT T0 WHERE T0.DocStatus ='O' and T0.CardCode = '" & oEdit.Value & "'")

If RS.RecordCount > 0 Then

Dim oCombo As SAPbouiCOM.ComboBox

oCombo = SBO_Application.Forms.GetForm("139", 0).Items.Item("10000330").Specific 'Click(SAPbouiCOM.BoCellClickType.ct_Regular)

oCombo.Select("Sales Quotations", SAPbouiCOM.BoSearchKey.psk_ByValue)

'oCombo.Select(0, SAPbouiCOM.BoSearchKey.psk_Index)

End If

Catch ex As Exception

MsgBox(ex.Message)

End Try

End Sub

Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent

If pVal.FormType = 139 And pVal.BeforeAction = False Then

If pVal.ItemUID = "4" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_LOST_FOCUS Then

CheckForSalesQuotes(FormUID)

End If

End If

Any ideas would be great.

Thanks in advance

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Louis,

You don't know what the error is or on wich line it occurs? Did you tray to step into it using the debugger and setting breakpoints?

Good luck,

Rowdy

former_member184566
Active Contributor
0 Kudos

Hi Rowdy

It is not my program that is causing it to crash. My program does everything to open it. Once the window is open my program does nothing more. I have even killed my program after the window is open.

Soon as the user selects something in that window i get that windows error where it asks if you'd like to send it to microsoft. I click "don't send" and then SBO closes down INSTANTLY!

Can you try the code on your side, it must be SBO 2005 SP01, im on Patch 4. Want to see if it does the same thing.

Does anyone know how to open the required window without making SAP Business One CRASH!!!

Anyone from SAP??

Thanks in advance

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Louis

Excuse me:

if you comment the code : the crash Disappear ?

You refer

SBO 2005 SP01 P04

if you Use SBO 2005 SP00 P08 : the crash Disappear ?

Regards

Michele Fiorantino

former_member184566
Active Contributor
0 Kudos

Hi everyone

I have already reported it to SAP. They have confimed that it is a bug on there side and will hopefully be fixing it in November patch.

I have not tested on other patch levels, only SBO 2005 SP01 P04.

Thanks for the replies

Former Member
0 Kudos

Hi Louis,

Can you get Windbg from Microsoft, open it and attach it to the Sap B1 process. Then perform the actions that cause the crash. You will be able to see exactly what the unhandled exception is (that's what is causing that Windows message), and where it is being raised from. Then post the results back here and maybe someone can identify the issue.

I can't say for sure what the problem might be but I though I'd share with this tpoic that I too am having serious crashing issues with SP01 PL04 since I installed it - but for me, it happens when I try to update Business Partner Master Data of any kind (e.g phone number) from within the client. The exception in my case is being raised from within the UIEventManager so I can only assume something is going bad there.

I think that overall the PL04 client is shaky, because I can manipulate BPs and Documents via the SDK no problem.