on 09-17-2009 2:08 PM
Hi Experts,
I am getting a dump when generating an Invoice out of a Billing document. It uses a Smartforms to generate Invoice.
The dump indicated TIME OUT error. After these I asked the BASIS to increase time but its still giving the dump.
The dump states that "The program "/1BCDWB/SAPLSF00000005" has exceeded the maximum permitted runtime
without interruption, and has therefore been terminated".
The dump pints out towards to a select query, Please find the same as bewlo:-
FORM %CO9.
DATA : lv_fplnr LIKE fpla-fplnr,
lv_bedat LIKE fpla-bedat,
lv_endat LIKE fpla-endat.
DATA : lv_date TYPE d,
lvy(4) TYPE c,
lvm(2) TYPE c,
lvd(2) TYPE c.
DATA : li_vbpa LIKE vbpa OCCURS 0 WITH HEADER LINE,
li_vbadr LIKE vbadr OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF li_vbfa OCCURS 0 ,
vbelv LIKE vbfa-vbelv ,
posnv LIKE vbfa-posnv ,
END OF li_vbfa .
DATA: count(2) TYPE n .
*Retreiving item text
CONCATENATE is_bil_invoice-hd_gen-bil_number gwa_it_gen-itm_number INTO gv_tdname.
Retreiving site number and site location
-
> SELECT vbelv posnv FROM vbfa
INTO TABLE li_vbfa
WHERE vbeln = is_bil_invoice-hd_gen-bil_number
AND posnn = gwa_it_gen-itm_number.
DESCRIBE TABLE li_vbfa LINES count .
READ TABLE li_vbfa INDEX count .
IF sy-subrc = 0 .
MOVE li_vbfa-vbelv TO gv_vbelv1 .
MOVE li_vbfa-posnv TO gv_posnv .
ENDIF .
Kind;y suggest What best can we do to resolve this issue.
Abby.
Increasing the maximum time for a program is not a good solution for a poorly built program. The SELECT does not use an index, so you should see if you can get the data more efficiently.
Rob
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
U need to improve the select of VBFA table, you aren't using the main key fields VBELV and POSNV.
Max
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
try this way//
SELECT vbelv posnv FROM vbfa
INTO TABLE li_vbfa
WHERE vbeln = is_bil_invoice-hd_gen-bil_number
AND posnn = gwa_it_gen-itm_number.
DESCRIBE TABLE li_vbfa LINES count . "check the Line count if it is zero below read goes to dump
if count gt 0. "add this
READ TABLE li_vbfa INDEX count .
IF sy-subrc = 0 .
MOVE li_vbfa-vbelv TO gv_vbelv1 .
MOVE li_vbfa-posnv TO gv_posnv .
ENDIF .
endif.
Prabhudas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Note 185530 might help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.