‎2006 Jan 19 1:34 PM
hi,
i need to select particular fields(not select * )
from bsis table in my Logical database. how can i write code for this?
for eg,
In Ordinary report , we can write (select belnnr into
itab_bsis-belnr) like this.
but in Logical Database how can i write the code ?
Neptune.M
‎2006 Jan 19 1:44 PM
Hi,
you can write the same as in case of report.
no difference. for refrence check PNP ldb.
check the include <b>DBPNPF01</b> this is used in PNP.
regards
vijay
‎2006 Jan 19 1:44 PM
Hi neptune,
1. If these fields are not provided
by the ldb,
then u can just use simple select
(select *, fields from BSIS etc)
(just like normal report)
regards,
amit m.
‎2006 Jan 21 10:10 AM
hi ,
sorry for the late reply.
In my report , i wrote the code like this
select belnr hkont from bsis into ibsis
where hkont eq s_hkont.
if i execute ,
'ibsis is not defined in logical database'
error was displayed.
i already declared ibsis as
Data : begin of ibsis occurs 0,
hkont like bsis-hkont,
belnr like bsis-belnr,
end of ibsis.
then
what is my actual problem? and where it is?
how can i select particular fields?
Thanks
Neptune.M
‎2006 Jan 21 10:17 AM
Hi neptune,
1 select belnr hkont from bsis into TABLE ibsis.
-- use the word TABLE
2. Also, the definition of the table
must be before using the sql.
regards,
amit m.
‎2006 Jan 21 10:58 AM
hi Amit,
Thanks for your reply.
i have changed my cod as yours.
but still now also error is coming. The Error is
"IBSis is not a Logical Database Table'
How can i correct it ?
‎2006 Jan 21 11:27 AM
Hi,
You can use GET BSIS FILEDS BELNR HKONT.
Regards,
Suresh Datti
‎2006 Jan 21 11:32 AM
hi,
if i geive get bsis fields belnr hkont, then
'bsis is not specified for field selection' error was displayed.
plz tell me what is the way to correct ?
‎2006 Jan 21 11:34 AM
HI
BSIS should part of your Logical database. Only then you can use it in the GET event.
Regards,
Suresh Datti
‎2006 Jan 19 2:00 PM
Hi,
try this in ldb-program:
form put_bsis.
...
select bukrs belnr gjahr... into i_bsis
from bsis...
put i_bsis.
...
endform.
Andreas
‎2006 Jan 19 2:03 PM
Hi,
I am not exactly sure if this might help:
http://help.sap.com/saphelp_nw04s/helpdata/en/9f/db9be035c111d1829f0000e829fbfe/frameset.htm
You can look up also the whole chapter on logical databases.
Regards,
Snezhi
‎2006 Jan 21 11:56 AM
Hi again,
1. What logical datbase name
have u specified in the attributres of the program?
2. If ur code is short/medium,
pls give so that we can know further !
regards,
amit m.
‎2009 May 11 8:13 AM
Hi,
I am new to ABAP.Currently I'm practicing logical database. I am facing a similar problem like what Neptune is having.
I have created a logical database 'Z03_SAMPLEDB5' using tables KNA1, KNB1,KNB4,KNB5 and KNKK.
I have defined the Database program and selections.Now I would like to use this logical database in one of my programs.
Please find the code of the program in which I'm using this logical datbase :
REPORT Z03_SAMPLELDB5.
tables : kna1.
data: begin of t occurs 0,
kunnr like kna1-kunnr,
land1 like kna1-land1,
bukrs like knb1-bukrs,
end of t.
start-of-selection.
get kna1.
clear t.
move-corresponding kna1 to t.
append t.
end-of-selection.
write: /20 'Customer No.', 40 'Country code', 55 'Company Code'.
ULINE.
loop at t.
write: /20 t-kunnr, 40 t-land1, 55 t-bukrs.
endloop.
In the output screen I could get data for only 'Customer No' and 'Country code' .'Company Code' is blank.
Please let me know what I need to do to get data for 'Company Code' as well.
Thanks,
Prasuna
‎2009 May 11 11:16 AM
Hi,
U just follow the program demo_seltab_get_event.
Regards,
Naveen M.