Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

OOPS in ABAP

Former Member
0 Likes
821

Hey Experts.............

How Can we write coding to retrieve data from 2 table say vbak and vbap

<b>using OOPS in ABAP</b>

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
756

Hi ,

There will be no diff in the select statement used to select data from the table.

Now if you want to use oops in this case , the you need to create a class with a method containing the slect statement to retrieve the data and the call this method.

Regards

Aun

5 REPLIES 5
Read only

Former Member
0 Likes
757

Hi ,

There will be no diff in the select statement used to select data from the table.

Now if you want to use oops in this case , the you need to create a class with a method containing the slect statement to retrieve the data and the call this method.

Regards

Aun

Read only

Former Member
0 Likes
756

Hi Ravi,

Create a class using se24, create a method having parameters according to the selection criteria and export parameters of method as the internal tables of type vbak and vbap.

in the method code write the appropriate statements to retrieve data from the tables

call this method in your program and retrieve data from the tables.

Hope this helps.

Regards,

Kinshuk

Read only

Former Member
0 Likes
756

I don't think there is any difference in the select statement.

Write an inner join between the two tables.

Read only

Former Member
0 Likes
756

Hi Ravi,

Data is retrieved from the database tables using Select statements.

You can embed the same inside a method of a local class which you define in your program & call the same(method) in START-OF-SELECTION event in your report.

Regards,

Chetan.

PS:Reward points if this helps.

Read only

Former Member
0 Likes
756

hi,

u can create a local class or global Z class it's upto u, to create a global class create it in se24.

local class you can do it in the report program itself.

write a select stmt insed the method and call the mothd by creating object to the class if the method is instance method.