‎2011 Apr 14 1:14 PM
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
*--
*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'.
‎2011 Apr 14 3:13 PM
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
‎2011 Apr 14 3:13 PM
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
‎2011 Apr 14 4:16 PM
‎2011 Apr 14 4:22 PM
‎2011 Apr 20 2:16 PM
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