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: 

Fetching values using select query

Former Member
0 Kudos

Hi i want to get the details of belnr and bukrs using the where codn fields bukrs,anlkl,brdatu,ktansw,budat,WBS element.

1)The value of bukrs is entered in the selection screen

2)the value of asset class is optional and present in the anka

3)brdatu is already fetched and placed in a table.field brdatu is present in table j_ittaxdep

4)ktansw is entered in the selection screen and present in table j_ittaxdep

5)budat is fetched and placed in a table.

6)wbs element already fetched and is present in prps table.

Can anyone please tell how to code.actually the values of bukrs,anlkl ktansw, are present in structure anlav,brdatu is present in structure rbada and budat is present in structure anek.By using this structure is there way to get the belnr and bukrs value.

6 REPLIES 6

Former Member
0 Kudos

Use BSEG table,

I meane your avilable all entries prsent in BSEG table.

Just go through to it.

Regards

ricky

0 Kudos

Hi some fields which i had mentioned above are not present in bseg table for eg ktansw,brdatu.

0 Kudos

Hi,Hema,

Only for Belnr u have to use BSEG table,For other u have to use different tabel.

If u r at Asset side then u just look out at ANLC and if u are at controloing side then just go through costing tables.

U will find the table by which u will get all entries.

Regards

Ricky

0 Kudos

See if i write as select stmt like select belnr bukrs from bseg into table gi_belnr where ktansw = s_ktansw then ktansw field should be also present in bseg table in such codn have to code for the above codn using different tables.

0 Kudos

Hi,

Hema,

things are not so flate as you are thinking.

first u understand for which application u are using these Queries.Ask ur functional guy to confirm the usage tables.Then use thsee tables to get the data into u r internal tables and for these internal tables value u have to fetch belnr bukrs fronm bseg or FI table .

so first confirm the tables the plan how to get data.

if u need my help the write me in brief?

Regards

Ricky

0 Kudos

Hi,

KTANSW is GL Account same as BSEG-SAKNR,

BRDATU IS FROM J_1ITAXDEP IS SAME AS SY-DATUM,

Regards

ricky

Edited by: Ricky Maheshwari on Sep 2, 2008 8:36 AM