cancel
Showing results for 
Search instead for 
Did you mean: 

What object to use to update Serial Number Details

former_member933888
Active Participant
0 Kudos
94

Hi Experts,

What object to use to update Serial Number Details?

Thanks in Advance.

nd

Accepted Solutions (0)

Answers (1)

Answers (1)

pedro_magueija
Active Contributor
0 Kudos

Hi Andy,

I think you should use the SerialNumbers object that you can get from the Document_Lines object.

Good luck.

Best regards,

Pedro Magueija

former_member933888
Active Participant
0 Kudos

Hi Pedro,

Tried. It doesn't work.

Dim ix As Integer

For ix = 0 To oGRPO.Lines.Count - 1

oGRPO.Lines.SetCurrentLine(ix)

     

Dim ib As Integer 

Dim oSerial As SAPbobsCOM.SerialNumbers

For ib = 0 To oGRPO.Lines.SerialNumbers.Count - 1

                oSerial = oGRPO.Lines.SerialNumbers

                oSerial.SetCurrentLine(ib)

                oSerial.BatchID = "SAP Pe"

                oSerial.UserFields.Fields.Item("U_CSUS_ASSETTAG").Value= "U_CSUS_ASSETTAG"

Next

Next

oGRPO.Update()

pedro_magueija
Active Contributor
0 Kudos

Hi Andy,

Do you get an error or does it simply not save the data?

Best regards,

Pedro Magueija

former_member933888
Active Participant
0 Kudos

Hi Pedro,

No error. It does not update the serial numbers information field.

Thanks.

pedro_magueija
Active Contributor
0 Kudos

Hi Andy,

Actually what I wanted to know was the return code of the oGRPO.Update().

Can you please try something like:

retVal as integer = oGRPO.Update()

if(retVal <> 0) then

  oApplication.messagebox(oCompany.GetLastErrorDescription())

end if

Good luck.

Best regards,

Pedro Magueija

former_member933888
Active Participant
0 Kudos

Hi Pedro,

value returned is 0

nd.Q

pedro_magueija
Active Contributor
0 Kudos

Hi Andy,

Apparently the object used for the management is not available to us (10000045). And since the above method does not work, maybe you should post a ticket with SAP.

Good luck,

Best regards,

Pedro Magueija