Application Development and Automation 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: 
Read only

Runtime Errors - DBIF_RSQL_INVALID_REQUEST

Former Member
0 Likes
734

Hello all,

I am getting a Runtime error when running a Zprogram. It is just happening in production environment, in the test one was working properly. Please check Source code I would appreciate any suggestion.

Thanks !!

Regards

Source code:

SORT lta_bseg.

DELETE ADJACENT DUPLICATES FROM lta_bseg.

*select data from bseg

*check if the records selected in lta_bseg are also cleared

*--


2--


*with augbl, belnr, gjahr as 'YEAR' from AUGDT and koart = 'S'.

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

*1.get all the entries from BSEG with AUGBL <> initial and koart = 'S'

*not to read it from the DB many times

IF p_date IS INITIAL.

SELECT * FROM bseg

APPENDING TABLE gta_bseg_check

WHERE augbl <> ''

AND koart = 'S'

AND bukrs IN s_bukrs

AND gjahr IN s_gjahr

AND augdt BETWEEN gv_date_last AND lv_date_end. "+

ELSE.

lv_date = gv_date_last - 1.

SELECT * FROM bseg

APPENDING TABLE gta_bseg_check

WHERE augbl <> ''

AND koart = 'S'

AND bukrs IN s_bukrs

AND gjahr IN s_gjahr

AND augdt EQ lv_date. "+

ENDIF.

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

2.check if lta_bseg records are cleared

CLEAR lwa_bseg.

LOOP AT lta_bseg INTO lwa_bseg.

READ TABLE gta_bseg_check WITH KEY bukrs = lwa_bseg-bukrs

belnr = lwa_bseg-augbl

gjahr = lwa_bseg-augdt(4)"take the year only

buzei = lwa_bseg-buzei

INTO lwa_bseg_check.

IF sy-subrc = 0.

APPEND lwa_bseg TO gta_bseg_result.

ENDIF.

ENDLOOP.

IF gta_bseg_result[] IS INITIAL.

MESSAGE 'No cleared documents for BSEG'(012) TYPE 'E'.

ENDIF.

ELSE.

MESSAGE 'No data is read from BSEG'(010) TYPE 'E'.

ENDIF.

ELSE.

MESSAGE 'No data is read from BKPF'(011) TYPE 'E'.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
682

Hi

Unfortunately, your first condition in WHERE clause is missing comparison operator. I am afraid the program is in PRD system.

Can you please re-check your code?

Also, please copy and paste the exact point at which the dump occured.

Regards,

Rupesh

4 REPLIES 4
Read only

Former Member
0 Likes
683

Hi

Unfortunately, your first condition in WHERE clause is missing comparison operator. I am afraid the program is in PRD system.

Can you please re-check your code?

Also, please copy and paste the exact point at which the dump occured.

Regards,

Rupesh

Read only

0 Likes
682

Problem solved!

Thanks

Read only

0 Likes
682

Do you mind sharing the solution.

Rob

Read only

0 Likes
682

Hi Rob,

Thanks for your help. I am afraid I dont have the solution because an Abap help me and I have no idea about what he did...

sorry

REgards