cancel
Showing results for 
Search instead for 
Did you mean: 

Add method returns: Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT)

Former Member
0 Kudos

Dear all,

I have a problem updating my addon from 2005B to 2007B with PL09.

Code Blocku2026.

vIssue = (Documents)AppConfig.diCompany.GetBusinessObject(BoObjectTypes.oInventoryGenExit);

vIssue.DocDate = PostDate;

vIssue.Comments = InvNo;

vIssue.Series = 51;

vIssue.Lines.ItemCode = u201CItemCodeu201D;

vIssue.Lines.Price = 120;

vIssue.Lines.Quantity = 10;

vIssue.Lines.WarehouseCode = u201C01u201D;

<condition. for batch items only>

{

vIssue.Lines.BatchNumbers.BatchNumber = u201CXYZu201D;

vIssue.Lines.BatchNumbers.SetCurrentLine(0);

vIssue.Lines.BatchNumbers.Quantity = 10;

}

RetVal = vIssue.Add(); // return(-1) an exception The server threw an exception (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))

This error is only happning with batch item. For other items which are not maintained by batch working fine. And the same code was running fine in 2005B.

Also surprisingly if I create a new batch item in 2007B and get its stock by GRPO or Goods Receipt the same code is working fine.

Tried almost everithing to solve this issue but nothing worked.

1. Deleted <SM_OBS_DLL> folder.

2. Reinstalled SAP 2007 with PL 09. And followed other solusion from SDK forum.

But nothing seems to work for this. Had a horrible week past.

It seems it is happning only with items areated in 2005B.

Is there any trick???

Please help......

Accepted Solutions (1)

Accepted Solutions (1)

edy_simon
Active Contributor
0 Kudos

Hi Mrinal,

I faced the same error when adding an AP Invoice based on PO.

After much research, i found that when the Line value in fields SubCatNum and CodeBars is NULL,

it will threw the exception. If i changed these fields value to Empty String (""), the documents added successfully.

this problem was also happening only on items created from previous SBO.

In my case it was created in 2004, and upgraded to 2007.

Maybe you can try


vIssue.Lines.BarCode = "";
vIssue.Lines.SupplierCatNum = "";

Regards

Edy

Former Member
0 Kudos

Hi Edy

I thought your solution will help me to have a nice weekend, but sorry it didn't

In my case BarCode & SupplierCatNum is comming ("") itself still I wrote the given code also I tried with their value null, but nothing affects the results

can you suggest anything else please....

Regards

Mrinal

Former Member
0 Kudos

Hi,

Plz upgrade to PL 10 and check.

Hope it helps,

Vasu Natari.

Former Member
0 Kudos

Hey Vasu,

Your advise did the trick finally.

the problem is sorted out after installing PL 10.

I think the mystery is as follows :

while updating from 2005B to 2007B LocationCode(LocCode) is being introduced in every transaction detail table,with PL 09 which is not updated properly, i.e. its leaving null data in some tables, may be that was causing the problem for me, or may be the reason of many problems faced by others.

Still I am not sure if this is the actual fact or not.

Experts please put your comment on this.

Finally I will have a nice weekend....

-mrinal

Former Member
0 Kudos

Hi,

Gud to know that its solved. Actually i had a similar problem after wasting some 2 days i upgraded and solved the issue.

Vasu Natari.

Trinidad
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

If you have this kind of problem you can also checks the propositions on SAP Notes 1235603 and 1147169.

Hope it helps

Trinidad.

Answers (3)

Answers (3)

edy_simon
Active Contributor
0 Kudos

Hi Mrinal,

Just an Idea...

Maybe you should examine in your batch table, looking for differences between your batch created in SBO 2005 and batch created in SBO 2007.

Try looking through SQL Server management studio. Because using Query Generator you cannot see Null value.

See if there are fields that are null in old version but has some value in 2007 created batch.

Regards

Edy

Former Member
0 Kudos

I tried that earlier, but found no such difference.

mrinal

Former Member
0 Kudos

Hi Mrinal ,

Generally, the solution of deleting the SM_OBS_DLL and reinstalling the DI API resolves this issue nine times out of ten. I would suggest logging a message with support so it can be properly debugged.

Regards,

Niall

Former Member
0 Kudos

Most surprisingly it is working perfect for a newly created item in 2007B, also any old item that was created in 2005 B but not a batch item the code is working.

The crunch is only for a old batch Item.

Deleting SM_OBS_DLL and reinstalling DI API did not help this time too

-mrinal

Former Member
0 Kudos

Hello Mrinal,

Take a look in the sql database - stored procedures - transaction notification if there's some code between the two -


lines...

This could causes the error.

Else contact SAP Support and upload your database for checking or do a webex.

HTH.

Regards Teun

mk1909_sap
Active Participant
0 Kudos

Hello dude,

i was also facing the same issue. pls check this solution will help for you or not.

https://www.linkedin.com/feed/update/urn:li:activity:7166391771059482624

Best Regards,

Mahendrakumar D.P.