cancel
Showing results for 
Search instead for 
Did you mean: 

.Net 2.0-VB: No data returned from PurchaseOrder.GetDetail

Former Member
0 Kudos

New Project in VB.NET using SAP .NET Connector

SAP .Net Connector 2.0

.NET IDE 2003 (7.1.3088)

.NET Framework 1.1 (1.1.4322 sp1)

(1) Created new proxy component

(2) Drag/Drop BOR:PurchaseOrder to proxy design screen

(3) Set Map_Exceptions to True

Set Show_Type to True

Set BAPIReturn.Exclude to False

(4) Change DATE attributes to SAPDATE in three objects

(5) Successful Build of Solution

(6) During debug run dialogue window: "Method PurchaseOrder.Change cannot be reflected"

(7) Terminated run and deleted Change method from proxy design screen.

(8) Successful Build

(9) same as 6) for PurchaseOrder.CreateFromData1.

did same as 7) & 😎

Note that PurchaseOrder.CreateFromData did not cause a problem

(10) Run successful.

Called GetDetail method with flags set to '1' (also tried other values) and PONumber set to valid PONumber.

Method returned without raising exception.

Returned a populated BAPIReturn element but no data from PO was returned.

Verified that data for PO existed in SAP.

Any suggestions would be appreciated. Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Alan,

Changes are your PO number is not the full length of the PO number field. SAP internally will automatically pad 0's onto the front of the number. But when the RFC / BAPI is called from an external source that source has to pad the 0's on the front.

Short answer try you program again padding zero's onto the front of the PO number is 10 digits long.

Jack

Former Member
0 Kudos

Thanks, Jack. That solves the bigest issue.

Still don't know what the source of the problem with the 2 update methods is.

Alan

reiner_hille-doering
Active Contributor
0 Kudos

Have you installed the patch from OSS note 506603 ? If not, do so and then right-click the .sapwsdl file and select "Run Custom Tool" to refresh the generated source code.

Former Member
0 Kudos

Yes, I have SAP.Connector.Design.dll version 2.0.0.22 as the only version on the computer.

Thanks. Alan

reiner_hille-doering
Active Contributor
0 Kudos

Ah, I see what the problem is:

The fact that BAPIRETURNTable is missing is a bug. Your trick to turn off "Exlusion" of BAPIRETURN is good, but unfortunately it causes your app to contain two definitions of BAPIRETURN that conflict.

So, here's the workarround:

Take the content of BAPIRETURNTable.cs and copy it into another (new) file in your project. Then turn Exclude back to "true".

Former Member
0 Kudos

Thanks, Sounds like that will fix it. ReturnTable is missing. I'll try it as soon as I get the app back together.

Answers (0)