cancel
Showing results for 
Search instead for 
Did you mean: 

Dump while generation an Invoice

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi

U need to improve the select of VBFA table, you aren't using the main key fields VBELV and POSNV.

Max

Former Member
0 Kudos

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

Pawan_Kesari
Active Contributor
0 Kudos

Note 185530 might help

Former Member
0 Kudos

Hi Pawan,

But what if My Smartform is a Custom One. Abhii, I believe this Note is for Standard programs for Sure.

Please reply.

Edited by: Abhii on Sep 23, 2009 5:37 PM