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: 

Data retrival error in Logical Database

Former Member
0 Kudos

Hello Gurus,

I am working on a Report on ASSET ACTIVITY BY DATE RANGE .

The program is copied from std. program S_ALR_87011990.

The above std. program displays for the whole financial year. This is modified for a particalar period range in the new leveraged program.

My question is in the below code.

We are fetching data using LDB ADA. The statement "GET anlcv" works fine here, I mean Sy-subrc is 0 and anlcv structure has some data in it.

When it comes to statement "GET anepv" in the below code, we are not getting any data into that structure and sy-subrc NE 0. Then it is skipping all the get statements and directly going to statement " PERFORM abga_simulieren.".

My logic lies in between this Get statement and the perform statement. When i see it in debugging mode my statement is not executed at all.

What needs to be done. Please anyone help me.

***********************************************************************

GET anlcv.

CHECK select-options.

MOVE anlcv TO sav_anlcv.

GET anepv.

CHECK select-options.

Nur Bewegungen des Jahres des Berichtsdatums durchlassen.

CHECK anepv-bzdat GE sav_gjbeg.

CHECK anepv-bzdat IN so_bzdat. "Added for SIR-3132

Bewegungen in SAV_ANEPV sammeln.

MOVE anepv TO sav_anepv.

APPEND sav_anepv.

GET anlb LATE.

Check auf Bestandskonto bei Gruppensummen erst hier, wegen

fehlender Abgänge/Umbuchungen

IF NOT summb IS INITIAL.

IF NOT anlav-ktansw IN so_ktanw.

REJECT 'ANLAV'.

ENDIF.

ENDIF.

ANLCV aus Save-Area zurueckholen.

CHECK NOT sav_anlcv-anln1 IS INITIAL.

MOVE sav_anlcv TO anlcv.

Abg-Simu: Abgang simulieren.

PERFORM abga_simulieren.

*************************************************************************

Promise to reward points

Regards

Mac

1 REPLY 1

Former Member
0 Kudos

Hi

look at the following stuff related to LDB and do accordingly

A logical database is a special ABAP/4 program which combines the contents of certain database tables. You can link a logical database to an ABAP/4 report program as an attribute. The logical database then supplies the report program with a set of hierarchically structured table lines which can be taken from different database tables.

LDB offers an easy-to-use selection screens. You can modify the pre-generated selection screen to your needs. It offers check functions to check whether user input is complete, correct, and plausible. It offers reasonable data selections. It contains central authorization checks for data base accesses. Enhancements such as improved performance immediately apply to all report programs that use the logical database.

Less coding s required to retrieve data compared to normal internel tables.

Tables used LDB are in hierarchial structure.

Mainly we used LDBs in HR Abap Programming.

Where all tables are highly inter related so LDBs can optimize the performance there.

Check this Document. All abt LDB's

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.highlightedcontent?documenturi=...

GO THROUGH LINKS -

http://www.sap-basis-abap.com/saptab.htm

http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9bfa35c111d1829f0000e829fbfe/content.htm

http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/frameset.htm

http://help.sap.com/saphelp_nw04/helpdata/en/c6/8a15381b80436ce10000009b38f8cf/frameset.htm

/people/srivijaya.gutala/blog/2007/03/05/why-not-logical-databases

www.sapbrain.com/FAQs/TECHNICAL/SAP_ABAP_Logical_Database_FAQ.html

www.sap-img.com/abap/abap-interview-question.htm

www.sap-img.com/abap/quick-note-on-design-of-secondary-database-indexes-and-logical-databases.htm

http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/content.htm

http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db9bb935c111d1829f0000e829fbfe/content.htm

Gothru the blog which provides info on LDB's:

/people/srivijaya.gutala/blog/2007/03/05/why-not-logical-databases

Sample code

TABLES: SPFLI,

SFLIGHT,

SBOOK,

SCARR.

START-OF-SELECTION.

GET SPFLI.

WRITE:/ ’SPFLI: ’, SPFLI-CARRID, SPFLI-CONNID,

SPFLI-AIRPFROM, SPFLI-AIRPTO.

GET SFLIGHT.

WRITE:/ ’ SFLIGHT: ’, SFLIGHT-CARRID, SFLIGHT-CONNID, SFLIGHT-FLDATE.

GET SBOOK.

WRITE:/ ’ SBOOK: ’, SBOOK-CARRID, SBOOK-CONNID,

SBOOK-FLDATE, SBOOK-BOOKID.

GET SFLIGHT LATE.

WRITE:/ ’ GET SFLIGHT LATE: ’, SFLIGHT-FLDATE.

Regards

Anji