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: 

calling Ldb

Former Member
0 Kudos

Hi Experts

Can i call 2 logical database screens in one program.

my requirement is i have to combine to standard programs as one program ,but problem is each standard program of first 2 selection screen blocks is calling through logical data base selection screen.

is there any solution for this .

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hii

1. A logical database is in fact

a program only.

2. This LDB provides two main things :

a) a pre-defined selection screen

which handles all user inputs and validations

b) pre defined set of data

based upon the user selection.

3. So we dont have to worry about from

which tables to fetch data.

4. Moreover, this LDB Program,

handles all user-authorisations

and is efficient in all respects

while creating type PNP

in logical database field.

REPORT z_ldb.

*----


infotypes : 0001.

TABLES : PERNR.

*----


GET PERNR.

WRITE 😕 PERNR-PERNR.

5. The selection screen which u see

is coming from logical database PNP program.

6. Execute

7. U will get a list of pernr.

SAPDBPNP

this is the main program of LDB PNP

which does the main work.

SAPDB + ldb name.

In the attributes of your program you must have entered the name of the logical database

it is through there the selection screen comes

Regards

Naresh

10 REPLIES 10

Former Member
0 Kudos

Hii

I guess we can't call 2 ldb's in one screen

check this demo program for ldbs

<b>RFBELJ00</b>

also chk this link

<b>http://help.sap.com/saphelp_47x200/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/frameset.htm</b>

Regards

Naresh

Message was edited by: Naresh Kumar

Former Member
0 Kudos

Hi,

i dont think you can use 2 LDBs at a time. just find out all the selection parameters used in your LDBs and include it in your default selection screen.

Regards.

Aswin

0 Kudos

Hi aswin

already i created selection screen using one ldb declarations but controlling of data is going to default ldb screen only

thats the problem .......its not giving correct output.

Former Member
0 Kudos

u can't attach 2 LDBs to a report but u can call the back ground programs associated with those LDBs as per ur requirement & call the respective first screens

0 Kudos

explanation needed in detail

Former Member
0 Kudos

Hii

1. A logical database is in fact

a program only.

2. This LDB provides two main things :

a) a pre-defined selection screen

which handles all user inputs and validations

b) pre defined set of data

based upon the user selection.

3. So we dont have to worry about from

which tables to fetch data.

4. Moreover, this LDB Program,

handles all user-authorisations

and is efficient in all respects

while creating type PNP

in logical database field.

REPORT z_ldb.

*----


infotypes : 0001.

TABLES : PERNR.

*----


GET PERNR.

WRITE 😕 PERNR-PERNR.

5. The selection screen which u see

is coming from logical database PNP program.

6. Execute

7. U will get a list of pernr.

SAPDBPNP

this is the main program of LDB PNP

which does the main work.

SAPDB + ldb name.

In the attributes of your program you must have entered the name of the logical database

it is through there the selection screen comes

Regards

Naresh

0 Kudos

You can probably use the function module LDB_PROCESS to meet your reqt. Pl take a look at DEMO_LOGICAL_DATABASE on how to use this function.

Regards,

Suresh Datti

Former Member
0 Kudos

try using the submit programs and getting the necessary input from firts programs pass it to another progam.

Manohar2u
Active Contributor
0 Kudos

Try calling an LDB from function module and check ??

Here is the link for reference

<a href="http://help.sap.com/saphelp_erp2005/helpdata/en/64/237f8cd43711d1950b0000e8353423/frameset.htm">Calling a Logical Database Using a Function Module</a>

Regds

Manohar

Former Member
0 Kudos

Hi,

You can call 2 LDB's through function module LDB_PROCESS.

You need to call above FM twice.

call function 'LDB_PROCESS'

exporting

ldbname = 'SDF'

tables

callback = it_callback

selections = it_selscreen

exceptions

ldb_selections_error = 1

ldb_selections_not_accepted = 2

free_selections_error = 3

callback_no_event = 4

callback_no_program = 5

callback_no_cbform = 6

others = 7.

if sy-subrc = 0.

get bsis.

endif.

You can also refer to DEMO_LOGICAL_DATABASE program for your reference.

Cheers,

Vikram

Pls reward for helpful replies!!