‎2010 Oct 08 7:32 AM
Hi,
We have a z report to display the service tax of customers. This report was executing as required till the previous month but wen we tried to execute it this month we are not getting either the report or errors.
When checked in SM50 we got the details listed below.
No Ty. PID Status Reasn Start Err Sem CPU Time Cl. User
1 DIA 1331222 Running Yes 157:02 1929 320 BASIS
Report / Spool action
ZFI_SERVICE_TAX
Main Program
ZFI_SERVICE_TAX
Action Table
Sequential Read RFBLG.
Could any one suggest me the reason and a solution for this issue.
Thanks in advance,
Neela
Edited by: Neela M B on Oct 8, 2010 12:02 PM
‎2010 Oct 08 9:32 AM
Hi.
1) Double click the line on SM50.
2) Copy the line "Last SQL statement".
3) Go to ST05, press "Enter SQL Statement"
4) Paste there the statement and press Explain
And then post here the result.
Rui Dantas
‎2010 Oct 08 7:45 AM
Seems to be a performance problem ...
Please post your SELECT command on this table (BKPF, BSEG, ...)
‎2010 Oct 08 9:32 AM
Hi.
1) Double click the line on SM50.
2) Copy the line "Last SQL statement".
3) Go to ST05, press "Enter SQL Statement"
4) Paste there the statement and press Explain
And then post here the result.
Rui Dantas
‎2010 Oct 08 11:11 AM
Hi,
In st05 when i pasted the last sql statement and executed i am getting an error
Error received from Explain SQL.
Kindly suggest.
Thanks in advance,
Neela.
‎2010 Oct 08 11:20 AM
‎2010 Oct 08 11:34 AM
Hi,
I have pasted the "Last SQL statement".
SELECT
"MANDT" , "BUKRS" , "BELNR" , "GJAHR" , "PAGENO" , "TIMESTMP" , "PAGELG" , "VARDATA"
FROM
"RFBLG"
WHERE
"MANDT" = :A0
ORDER BY
"MANDT" , "BUKRS" , "BELNR" , "GJAHR" , "PAGENO"#
But this statement is not used in the program.
Thanks in advance,
Neela.
‎2010 Oct 08 11:54 AM
The select you posted should work in ST05; just make sure you don't include the last #.
RFBLG is the database table behind table BSEG (so in ABAP you have a select BSEG, not to RFBLG). Basically you are making a FULL access to BSEG, so yes, it is pretty bad.
Can you post the SELECT to BSEG you have in your ABAP program?
Also, is it inside a LOOP or executed only once?
Regards,
Rui Dantas
‎2010 Oct 08 12:06 PM
Hi,
I am pasting the code below.
IF I_BSAD[] IS NOT INITIAL.
SELECT DMBTR BELNR REBZG BUZEI FROM BSEG
APPENDING TABLE I_BSAD_ST
FOR ALL ENTRIES IN I_BSAD
WHERE BELNR EQ I_BSAD-REBZG
AND BUKRS EQ P_BUKRS
AND GJAHR EQ I_BSAD-REBZJ
AND HKONT EQ '0011404501'
OR HKONT EQ '0011404502'.
ENDIF.
Kindly suggest.
Thanks in advance,
Neela
‎2010 Oct 08 12:14 PM
I think it should be
WHERE BELNR EQ I_BSAD-REBZG
AND BUKRS EQ P_BUKRS
AND GJAHR EQ I_BSAD-REBZJ
AND (HKONT EQ '0011404501'
OR HKONT EQ '0011404502').
‎2010 Oct 08 12:20 PM
Yep, correct the parenthesis and you should be alright.