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: 

Problem with Logical Database - Get stmt

Former Member
0 Kudos

Hi,

There is a standard LDB which is used in custom developed report.

GET A

GET B

When there is no record fetched from B table, it moves to end-of-selection and finishes the report execution. But in some cases I dont want this to happen. Only GET A needs to be executed. It need not do a GET B statement, since there is no corresponding record in B table.

If some condition.

GET A.

else.

GET A.

GET B.

endif,

But this is not posiible., since it cant be binded by If stmts.

Please let me know how can this be achieved.

Thanks

4 REPLIES 4

former_member194669
Active Contributor
0 Kudos

You may need to use fm LDP_PROCESS for this.

Please check demo program DEMO_LOGICAL_DATABASE

Former Member
0 Kudos

Hi,

Try Reject statment...check Sap help for more info..

GET A.
IF some condition.
  REJECT.
ENDIF..

GET B.
endif,

0 Kudos

Thats fine. But I dont want the GET B to get executed. Since there is no record in tht table for tht condition.

Get B -> Fetch wil return no record. So it goes to end-of-selection and completed report processing. But in my case it shouldnt happen. It should proceed further down in processing the report. So only i thought

If some condition.

Get B

endif.

So when there is no record case, Get B will not be executed. Binding by if is not possible.

So please let me know how to proceed

Former Member
0 Kudos

Solved