cancel
Showing results for 
Search instead for 
Did you mean: 

How to get data from multiple tables

Former Member
0 Kudos

Hello Everyone,

I need to read data from a few tables (VBAK, VBAP, VBUK, VBUP etc.) because I'd like to get all open Sales Orders. I've tried to use RFC_READ_TABLE but it looks like it can read only 1 table at a time. I've tried to read data from individual table and then join them but it didn't work out very well because I got about 1.5 millions records from just the VBUP table. So anyone knows if there is any function that I can use to join those tables and just get the records I need?

Any help would be highly appreciated.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Tang,

You have to create a custom BAPI in SAP that would do all these joining works and then call for it from your .NET side.

Former Member
0 Kudos

Hi Nhan,

Thank you for your reply.

Do I have to be a SAP developer to create BAPI on SAP? What kind of access rights do I need?

I've tired to use other BAPIs such as BAPI_SalesOrder_GetList and it doesn't work for me because I don't have all customer numbers and I need to get all un-shipped orders for all customers.

I've read a post on the internet brieftly menitoned that we can create a table to store information about the tables we want to join and then call the RFC_READ_TABLE function. Do you know if that is possible?

Is there any other way you can think of?

Former Member
0 Kudos

Hi Tang,

For your information, you can create a view- which represents distributed data from different tables. Refer to this link for details: http://help.sap.com/saphelp_webas620/helpdata/en/cf/21ec5d446011d189700000e8322d00/content.htm

I have no idea if RFC_READ_TABLE could work well with view- maybe you should give it a try.

Former Member
0 Kudos

Hi Nhan,

I don't have direct access to create views on SAP. Do you know if there is any BAPI or functions that I can call from VB to create temporary views or tables?

Thanks

Former Member
0 Kudos

Hi,

I'm afraid there's no such function.

Former Member
0 Kudos

Thank you for trying to help.