Application Development 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: 

How to fetch?

Former Member
0 Kudos
167

Hi friends...

I am creating a report for earnings in foreign currency. In that

there are some 10 to 12 G/L account numbers which are given by the user.I have to take records from bsid table belonging to only that G/L accounts. So how can I do this ?

I am thinking I'll store that g/ls in an intenal table & I'll compare each records (which i'll get from Bsid) with that g/l. Is it ok..... or I have to go for some other method.

Plz give me suggestion.....

5 REPLIES 5

Former Member
0 Kudos
103

Hi ram,

select g/lno f2 f3 from bsid into internal table for all entries in (g/l internal table)

where f1 = int table-g/l number.

Hope this will help u

Regards

Karthik

0 Kudos
103

how can I store given g/l numbers in an internal table

0 Kudos
103

Hi

R u going to get the numbers in selection screen ? or they r going to give particular numbers, if so , just give those numbers in where condition as hard coded values.

May i know that plz

Regards

Karthik

0 Kudos
103

create a range table.

data: begin of GL_TAB occurs 0,

sign(1) type c,

option(2) type c,

low type saknr,

high type saknr,

end of GL_TAB.

GL_TAB-sign = 'I'.

GL_TAB-option = 'EQ'.

GL_TAB-low = g/l no.

append GL_TAB.

Clear GL_TAB.

continue it for all 10/12 g/ls.

and use it in SELECT query SELECT........... IN GL_TAB.

Reward if useful

Thanks

ANUPAM

Former Member
0 Kudos
103

Hi,

You can create the ranges and store GLs in the ranges. You can do as below :


Ranges : gr_hkont for bsis-hkont.

gr_hkont-sign = 'I'.
gr_hkont-option = 'EQ'.
gr_hkont-low = '0000123344'.
append gr_hkont.

Append all GLs to the ranges gr_hkont.

select <fieldnames> from BSID into table itab 
                               where hkont in gr_hkont.
                               and add other field if requires.

or if you have GL in selection screen.

You have do as below :

select <fieldnames> from BSID into table itab 
                               where hkont in so_hkont.
                               and add other field if requires.

Where so_hkont is the selection screen parameters

Thanks,

Sriram Ponna.