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

Short Dump

Former Member
0 Likes
949

Hi,

Good day experts,

i got the short dump which is Time-Out.

Error anlasys:

After a certain length of time, the program is terminated. In the case

of a work area, this means that

- endless loops (DO, WHILE, ...),

- database accesses producing an excessively large result set,

- database accesses without a suitable index (full table scan)

do not block the processing for too long.

The system profile "rdisp/max_wprun_time" contains the maximum runtime of a

program. The

current setting is 600 seconds. Once this time limit has been exceeded,

the system tries to terminate any SQL statements that are currently

being executed and tells the ABAP processor to terminate the current

program. Then it waits for a maximum of 60 seconds. If the program is

still active, the work process is restarted.

successfully processed, the system gives it another 600 seconds.

Hence the maximum runtime of a program is at least twice the value of

the system profile parameter "rdisp/max_wprun_time".

plz give me solution.

regards,

kk

6 REPLIES 6
Read only

former_member386202
Active Contributor
0 Likes
774

Hi,

Check ur code i think ur using LOOP wich is endless or DO statement which is also endless.

Otrherwise paste ur code here.

Regards,

Prashant

Read only

Former Member
0 Likes
774

tables : fkkvkp,

iflot,

tspat,

bapiisubpa,

dfkkop.

type-pools: slis.

*-------End Tables Declaration

*-------Variables Declaration

types : begin of gty_gpvkont,

gpart type fkkvkp-gpart,

vkont type fkkvkp-vkont,

end of gty_gpvkont.

data : gv_gpvkont type standard table of gty_gpvkont with non-unique key gpart with header line," vkont WITH HEADER LINE,

gwa_gpvkont type gty_gpvkont.

types : begin of gty_trans,

city1 type ad_city1,

fvkont type vkont_kk,

fbetrw type dfkkop-betrw,

tvkont type vkont_kk,

tbetrw type dfkkop-betrw,

gpart type gpart_kk,

cname type uname,

cdate type sy-datum,

cuzeit type sy-uzeit,

end of gty_trans.

data : gt_transf type standard table of gty_trans with non-unique key fvkont tvkont gpart with header line,

gwa_transf type gty_trans,

gv_bdcdata like bdcdata occurs 10 with header line.

data : gv_fldcat type slis_t_fieldcat_alv.

types : begin of gty_output,

tplnr type iflot-tplnr,

standno type iflot-standno,

vkont type fkkvkp-vkont,

gpart type fkkvkp-gpart,

city1 type ad_city1,

ylidea type fkkvkp-yylidea,

ycolstat type fkkvkp-yycolstatcode,

nontrans type betrw_kk,

nondiv type betrw_kk,

namef type bu_namep_f,

namel type bu_namep_l,

*-----Inactive Amount Balance Begin

bet01 type betrw_kk, "Credit Elec

bet03 type betrw_kk, "Credit Water

bet04 type betrw_kk, "Sewage Amount

bet06 type betrw_kk, "Refuse Amount

bet07 type betrw_kk, "Property Rates

bet08 type betrw_kk, "Prepaid Elec

bet09 type betrw_kk, "Prepaid Water

total type betrw_kk,

*-----Inactive Amount Balance End

inact(1),

end of gty_output.

*-------End Variables Declaration

*-------Select-Options and Parameters

selection-screen : begin of block ybl2 with frame title yft002.

parameters : p_trans radiobutton group pgr1,

p_open radiobutton group pgr1.

selection-screen : end of block ybl2.

selection-screen : begin of block ybl1 with frame title yft001.

select-options : s_city1 for bapiisubpa-city1,

s_gpart for fkkvkp-gpart,

s_vkont for fkkvkp-vkont,

s_stndno for iflot-standno,

s_tplnr for iflot-tplnr,

s_inactd for fkkvkp-yyinactivedate.

selection-screen : end of block ybl1.

parameters : p_maxsel type tbmaxsel default '200'.

*-------End Select-Options and Parameters

*-----Start of event processing

initialization.

yft001 = 'User Selection'. "#EC *

yft002 = 'Transfer/Open Items'. "#EC *

*-----Authorization checks

phakama-authcheck-00.

start-of-selection.

*-----Business Partner & Contract Account from Selection Screen

select gpart vkont from fkkvkp

into table gv_gpvkont

up to p_maxsel rows

where gpart in s_gpart

and vkont in s_vkont

and yyinactivedate in s_inactd. "#EC *

data : gv_fout type ygpart_atransfer,

gv_final type ygpart_atransfer,

gwa_fout like ygpart_address_lt.

sort gv_gpvkont.

delete adjacent duplicates from gv_gpvkont.

*-----Get all open items based on business partner

loop at gv_gpvkont into gwa_gpvkont.

clear gv_fout.

refresh gv_fout.

if p_open = 'X'.

call function 'YISU_ATRANSFERS_DATA'

exporting

i_gpart = gwa_gpvkont-gpart

tables

i_date = s_inactd

e_output = gv_fout.

*-----Process internal table data based on selection screen

loop at s_city1.

translate s_city1 to upper case.

modify s_city1 index sy-tabix.

endloop.

loop at gv_fout into gwa_fout.

translate gwa_fout-city1 to upper case. "#EC *

modify gv_fout from gwa_fout.

endloop.

loop at gv_fout into gwa_fout

where city1 in s_city1

and tplnr in s_tplnr

and standno in s_stndno. "#EC *

append gwa_fout to gv_final.

clear gwa_fout.

endloop. "#EC *

sort gv_final by gpart vkont.

delete adjacent duplicates from gv_final.

else.

*-----Spec Changed 23 Get transferred item

perform process_transferred_tems using gwa_gpvkont-gpart.

endif.

endloop.

end-of-selection.

*-----Diaplay appropriate ALV

perform display_output.

include y_r_isu_automatic_transfersf01.

*-----Display Output End

this is for about INCLUDE CODE:

----


***INCLUDE Y_R_ISU_AUTOMATIC_TRANSFERSF01 .

----


&----


*& Form process_transferred_tems

&----


form process_transferred_tems using iv_gpart.

types : begin of lty_vkonti,

vkont type fkkvkp-vkont,

gpart type fkkvkp-gpart,

ylidea type fkkvkp-yylidea,

ycolstat type fkkvkp-yycolstatcode,

end of lty_vkonti.

data : lt_inactive type fkkvkp occurs 10 with header line,"#EC *

lt_active type fkkvkp occurs 10 with header line, "#EC *

lt_vkonti type standard table of lty_vkonti with non-unique key vkont with header line."#EC *

*-----Check for all inactive accounts

select * from fkkvkp

into table lt_inactive

where yyinactive = 'X'

and yyinactivedate < sy-datum

and not yyinactivedate is null

and not yycolstatcode is null

  • AND yylidea IN ('01','02','03','04')

and gpart = iv_gpart. "#EC *

if sy-subrc = 0.

*-----Check for inactive accounts flagged as LIDEA

loop at lt_inactive . "whERE ( ( yylidea = '01' ) OR

  • ( yylidea = '02' ) OR

  • ( yylidea = '03' ) OR

  • ( yylidea = '04' ) ).

lt_vkonti-vkont = lt_inactive-vkont.

lt_vkonti-ylidea = lt_inactive-yylidea.

lt_vkonti-ycolstat = lt_inactive-yycolstatcode.

lt_vkonti-gpart = lt_inactive-gpart.

  • IF NOT lt_vkonti-ycolstat IS INITIAL.

append lt_vkonti.

clear lt_vkonti.

  • ELSE.

  • CLEAR lt_vkonti.

  • ENDIF.

endloop.

sort lt_vkonti.

delete adjacent duplicates from lt_vkonti.

*------Active Accounts

*------Check contract account numbers linked to the same business partner as inactive account

  • LOOP AT lt_vkonti. "Loop at inactive accounts

select * from fkkvkp "Find active accounts linked to the business partner

appending table lt_active

where yyinactive = ' '

and gpart = iv_gpart. "#EC *

if sy-subrc = 0.

  • ENDLOOP.

types : begin of lty_trans,

vkont type vkont_kk,

opbel type dfkkop-opbel,

betrw type dfkkop-betrw,

augbl type dfkkop-augbl,

end of lty_trans.

data : lt_trans type standard table of lty_trans with non-unique key vkont opbel

with header line.

          • IF s_inactd IS INITIAL.

          • s_bldat-sign = 'I'.

          • s_bldat-option = 'BT'.

          • s_bldat-high = sy-datum.

          • APPEND s_bldat.

          • CLEAR s_bldat.

          • ENDIF.

          • DELETE ADJACENT DUPLICATES FROM s_bldat.

*****

loop at lt_vkonti. "Loop at inactive accounts

*-----Get cleared items from DFKKOP

select vkont opbel betrw augbl from dfkkop

appending table lt_trans

where augst is not null

and augrd = '03'

  • AND augdt IN s_bldat

and stakz <> 'H'

and vkont = lt_vkonti-vkont

and abwtp <> 'R'. "#EC *

  • lt_trans-vkont = lt_vkonti-vkont.

  • lt_trans-opbel = dfkkop-opbel.

  • lt_trans-betrw = dfkkop-betrw.

  • lt_trans-augbl = dfkkop-augbl.

  • APPEND lt_trans.

  • CLEAR lt_trans.

*-----End Get cleared items from DFKKOP

endloop.

endif. "End Retrieve all active accounts

endif. "End Check all inactive accounts

data : lv_cnt type i.

clear lv_cnt.

describe table lt_trans lines lv_cnt.

ranges : lr_augbl for dfkkop-opbel.

data : lv_vkont type vkont_kk occurs 10 with header line.

clear lr_augbl.

refresh lr_augbl.

if lv_cnt > 0. "There are transferred items

loop at lt_trans.

lr_augbl-sign = 'I'.

lr_augbl-option = 'EQ'.

lr_augbl-low = lt_trans-augbl.

append lr_augbl.

clear lr_augbl.

endloop.

select vkont from dfkkop

into table lv_vkont

where opbel in lr_augbl.

if sy-subrc = 0.

sort lv_vkont.

delete adjacent duplicates from lv_vkont.

clear lv_cnt.

describe table lv_vkont lines lv_cnt.

if lv_cnt > 0 .

read table lt_trans index 1.

gwa_transf-gpart = iv_gpart.

gwa_transf-fvkont = lt_trans-vkont.

call function 'YISU_SUMOPENITEMS_VKONTGPART'

exporting

i_gpart = gwa_transf-gpart

i_vkont = gwa_transf-fvkont

importing

e_betrw = gwa_transf-fbetrw.

loop at lv_vkont.

gwa_transf-tvkont = lv_vkont.

call function 'YISU_SUMOPENITEMS_VKONTGPART'

exporting

i_gpart = gwa_transf-gpart

i_vkont = gwa_transf-tvkont

importing

e_betrw = gwa_transf-tbetrw.

append gwa_transf to gt_transf.

endloop.

clear gwa_transf.

endif.

endif.

endif.

sort gt_transf.

delete adjacent duplicates from gt_transf.

data : lv_pntdata type bapiisubpd,

lv_addr type bapiisubpa occurs 10 with header line.

clear lv_cnt.

loop at gt_transf.

add 1 to lv_cnt.

clear : lv_pntdata,

lv_addr.

refresh lv_addr.

call function 'BAPI_ISUPARTNER_GETDETAIL'

exporting

partner = gt_transf-gpart

importing

partnerdata = lv_pntdata

tables

taddress = lv_addr.

gt_transf-city1 = lv_addr-city1.

*------Store Created,User and time Begin

data : lv_augbl type dfkkop-augbl.

read table lt_trans index 1.

select single augbl from dfkkop "#EC *

into lv_augbl

where opbel = lt_trans-opbel.

if sy-subrc = 0.

select single ernam cpudt cputm from dfkkko

into (gt_transf-cname,gt_transf-cdate,gt_transf-cuzeit)

where opbel = lv_augbl.

endif.

*------Store Created,User and time Begin

modify gt_transf index lv_cnt.

clear gt_transf.

endloop.

endform. " process_transferred_tems

&----


*& Form display_output

&----


form display_output .

data: lv_repid like sy-repid.

  • DATA lt_sort TYPE slis_t_sortinfo_alv.

data lv_extab type slis_t_extab.

  • DATA gv_status_set TYPE slis_formname VALUE 'STATUS_SET'.

data lv_layout type slis_layout_alv.

data lv_variant type disvariant. "#EC *

data lv_lns type i.

  • display data

lv_layout-zebra = 'X'.

lv_layout-numc_sum = 'X'.

lv_layout-box_fieldname = 'MARK'. " fieldname for checkbox

lv_layout-box_tabname = 'GV_FINAL'. " tabname for checkbox

lv_layout-cell_merge = ' '.

lv_layout-colwidth_optimize = 'X'.

  • variant

lv_variant-report = sy-repid.

lv_variant-username = sy-uname.

if p_open = 'X'.

*-----Display Output Begin

  • build field catalog

call function 'REUSE_ALV_FIELDCATALOG_MERGE'

exporting

i_structure_name = 'YGPART_ADDRESS_LT'

i_bypassing_buffer = 'X'

changing

ct_fieldcat = gv_fldcat[]

exceptions

others = 0.

*-----Division Text from TSPA

data : lwa_fldcat like line of gv_fldcat.

delete gv_fldcat where fieldname = 'BET08'.

delete gv_fldcat where fieldname = 'BET09'.

loop at gv_fldcat into lwa_fldcat.

case lwa_fldcat-fieldname.

when 'MARK'.

lwa_fldcat-tech = 'X'.

modify gv_fldcat from lwa_fldcat.

when 'BET01'.

select single vtext from tspat

into lwa_fldcat-seltext_s

where spart = '01'

and spras = 'E'. "#EC *

lwa_fldcat-seltext_m = lwa_fldcat-seltext_s.

lwa_fldcat-seltext_l = lwa_fldcat-seltext_s.

lwa_fldcat-reptext_ddic = lwa_fldcat-seltext_s.

modify gv_fldcat from lwa_fldcat.

when 'BET03'.

select single vtext from tspat

into lwa_fldcat-seltext_s

where spart = '03'

and spras = 'E'. "#EC *

lwa_fldcat-seltext_m = lwa_fldcat-seltext_s.

lwa_fldcat-seltext_l = lwa_fldcat-seltext_s.

lwa_fldcat-reptext_ddic = lwa_fldcat-seltext_s.

modify gv_fldcat from lwa_fldcat.

when 'BET04'.

select single vtext from tspat

into lwa_fldcat-seltext_s

where spart = '04'

and spras = 'E'. "#EC *

lwa_fldcat-seltext_m = lwa_fldcat-seltext_s.

lwa_fldcat-seltext_l = lwa_fldcat-seltext_s.

lwa_fldcat-reptext_ddic = lwa_fldcat-seltext_s.

modify gv_fldcat from lwa_fldcat.

when 'BET06'.

select single vtext from tspat

into lwa_fldcat-seltext_s

where spart = '06'

and spras = 'E'. "#EC *

lwa_fldcat-seltext_m = lwa_fldcat-seltext_s.

lwa_fldcat-seltext_l = lwa_fldcat-seltext_s.

lwa_fldcat-reptext_ddic = lwa_fldcat-seltext_s.

lwa_fldcat-reptext_ddic = lwa_fldcat-seltext_s.

modify gv_fldcat from lwa_fldcat.

when 'BET07'.

select single vtext from tspat

into lwa_fldcat-seltext_s

where spart = '07'

and spras = 'E'. "#EC *

lwa_fldcat-seltext_m = lwa_fldcat-seltext_s.

lwa_fldcat-seltext_l = lwa_fldcat-seltext_s.

lwa_fldcat-reptext_ddic = lwa_fldcat-seltext_s.

lwa_fldcat-reptext_ddic = lwa_fldcat-seltext_s.

modify gv_fldcat from lwa_fldcat.

          • WHEN 'BET08'.

          • SELECT SINGLE vtext FROM tspat

          • INTO lwa_fldcat-seltext_s

          • WHERE spart = '08'

          • AND spras = 'E'. "#EC *

          • lwa_fldcat-seltext_m = lwa_fldcat-seltext_s.

          • lwa_fldcat-seltext_l = lwa_fldcat-seltext_s.

          • lwa_fldcat-reptext_ddic = lwa_fldcat-seltext_s.

          • MODIFY gv_fldcat FROM lwa_fldcat.

          • WHEN 'BET09'.

          • SELECT SINGLE vtext FROM tspat

          • INTO lwa_fldcat-seltext_s

          • WHERE spart = '09'

          • AND spras = 'E'. "#EC *

          • lwa_fldcat-seltext_m = lwa_fldcat-seltext_s.

          • lwa_fldcat-seltext_l = lwa_fldcat-seltext_s.

          • MODIFY gv_fldcat FROM lwa_fldcat.

when 'TOTAL'.

lwa_fldcat-seltext_s = 'Total'. "#EC *

lwa_fldcat-seltext_m = 'Total'. "#EC *

lwa_fldcat-seltext_l = 'Total'. "#EC *

lwa_fldcat-reptext_ddic = 'Total'. "#EC *

modify gv_fldcat from lwa_fldcat.

when 'INACT'.

lwa_fldcat-seltext_s = 'Inactive'. "#EC *

lwa_fldcat-seltext_m = 'Inactive'. "#EC *

lwa_fldcat-seltext_l = 'Inactive'. "#EC *

lwa_fldcat-reptext_ddic = 'Inactive'. "#EC *

modify gv_fldcat from lwa_fldcat.

when 'NONTRANS'.

lwa_fldcat-seltext_s = 'Non-Transferrable'. "#EC *

lwa_fldcat-seltext_m = 'Non-Transferrable'. "#EC *

lwa_fldcat-seltext_l = 'Non-Transferrable'. "#EC *

lwa_fldcat-reptext_ddic = 'Non-Transferrable'. "#EC *

modify gv_fldcat from lwa_fldcat.

when 'NONDIV'.

lwa_fldcat-seltext_s = 'Non-Division'. "#EC *

lwa_fldcat-seltext_m = 'Non-Division'. "#EC *

lwa_fldcat-seltext_l = 'Non-Division'. "#EC *

lwa_fldcat-reptext_ddic = 'Non-Division'. "#EC *

modify gv_fldcat from lwa_fldcat.

when 'TPLNR'.

lwa_fldcat-seltext_s = 'Connection Object'. "#EC *

lwa_fldcat-seltext_m = 'Connection Object'. "#EC *

lwa_fldcat-seltext_l = 'Connection Object'. "#EC *

lwa_fldcat-reptext_ddic = 'Connection Object'. "#EC *

modify gv_fldcat from lwa_fldcat.

endcase.

endloop.

delete gv_final where not ( vkont in s_vkont ).

data : lwa_final like line of gv_final.

loop at gv_final into lwa_final.

lwa_final-total = lwa_final-bet01 +

lwa_final-bet03 +

lwa_final-bet04 +

lwa_final-bet06 +

lwa_final-bet07.

modify gv_final from lwa_final.

endloop.

  • display grid

call function 'REUSE_ALV_GRID_DISPLAY'

exporting

i_callback_program = sy-repid

i_callback_pf_status_set = 'SET_PFSTATUS'

i_callback_user_command = 'OPENITEM_TRANSFER'

i_callback_top_of_page = 'TOP_OF_PAGE'

is_layout = lv_layout

it_fieldcat = gv_fldcat[]

tables

t_outtab = gv_final

exceptions

program_error = 1

others = 2.

if sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

endif.

else.

      • lwa_fldcat-tabname = 'GT_TRANSF'.

      • lwa_fldcat-fieldname = 'GPART'.

      • lwa_fldcat-seltext_s = 'Business Partner'. "#EC *

      • lwa_fldcat-seltext_m = 'Business Partner'. "#EC *

      • lwa_fldcat-seltext_l = 'Business Partner'. "#EC *

      • lwa_fldcat-reptext_ddic = 'Business Partner'. "#EC *

      • lwa_fldcat-key = 'X'.

      • APPEND lwa_fldcat TO gv_fldcat.

      • CLEAR lwa_fldcat.

***

      • lwa_fldcat-tabname = 'GT_TRANSF'.

      • lwa_fldcat-fieldname = 'FVKONT'.

      • lwa_fldcat-seltext_s = 'From Contract Acc'. "#EC *

      • lwa_fldcat-seltext_m = 'From Contract Acc'. "#EC *

      • lwa_fldcat-seltext_l = 'From Contract Acc'. "#EC *

      • lwa_fldcat-reptext_ddic = 'From Contract Acc'. "#EC *

      • lwa_fldcat-key = 'X'.

      • APPEND lwa_fldcat TO gv_fldcat.

      • CLEAR lwa_fldcat.

***

      • lwa_fldcat-tabname = 'GT_TRANSF'.

      • lwa_fldcat-fieldname = 'FBETRW'.

      • lwa_fldcat-seltext_s = 'From Contract Acc Balance'. "#EC *

      • lwa_fldcat-seltext_m = 'From Contract Acc Balance'. "#EC *

      • lwa_fldcat-seltext_l = 'From Contract Acc Balance'. "#EC *

      • lwa_fldcat-reptext_ddic = 'From Contract Acc Balance'. "#EC *

      • lwa_fldcat-no_sum = 'X'.

      • APPEND lwa_fldcat TO gv_fldcat.

      • CLEAR lwa_fldcat.

***

      • lwa_fldcat-tabname = 'GT_TRANSF'.

      • lwa_fldcat-fieldname = 'TVKONT'.

      • lwa_fldcat-seltext_s = 'To Contract Acc'. "#EC *

      • lwa_fldcat-seltext_m = 'To Contract Acc'. "#EC *

      • lwa_fldcat-seltext_l = 'To Contract Acc'. "#EC *

      • lwa_fldcat-reptext_ddic = 'To Contract Acc'. "#EC *

      • APPEND lwa_fldcat TO gv_fldcat.

      • CLEAR lwa_fldcat.

***

      • lwa_fldcat-tabname = 'GT_TRANSF'.

      • lwa_fldcat-fieldname = 'TBETRW'.

      • lwa_fldcat-seltext_s = 'To Contract Acc Balance'. "#EC *

      • lwa_fldcat-seltext_m = 'To Contract Acc Balance'. "#EC *

      • lwa_fldcat-seltext_l = 'To Contract Acc Balance'. "#EC *

      • lwa_fldcat-reptext_ddic = 'To Contract Acc Balance'. "#EC *

      • APPEND lwa_fldcat TO gv_fldcat.

      • CLEAR lwa_fldcat.

***

      • clear sy-ucomm.

      • CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

      • EXPORTING

      • i_callback_program = sy-repid

        • i_callback_pf_status_set = 'SET_PFSTATUS'

        • i_callback_user_command = 'OPENITEM_TRANSFER'

      • i_callback_top_of_page = 'TOP_OF_PAGE'

      • is_layout = lv_layout

      • it_fieldcat = gv_fldcat[]

      • TABLES

      • t_outtab = gt_transf

      • EXCEPTIONS

      • program_error = 1

      • OTHERS = 2.

      • IF sy-subrc <> 0.

        • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

        • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

      • ENDIF.

data : lv_header type ref to ycl_header.

call method ycl_header=>create

exporting

zline_size = 157

ztitle = sy-title

zpageno = sy-pagno.

write : / .

write : / sy-uline(157).

format color 5 intensified off.

write : / sy-vline,

'City',"#EC *

at 42 sy-vline,

at 43 'Bus,Part.',"#EC *

at 53 sy-vline,

at 54 'ContrAcc From',"#EC *

at 67 sy-vline,

at 68 'Transferred Amt',"#EC *

at 86 sy-vline,

at 87 'ContrAcc To',"#EC *

at 101 sy-vline,

at 102 'Amount To',"#EC *

at 120 sy-vline,

at 121 'Created By',"#EC *

at 134 sy-vline,

at 135 'Changed On',"#EC *

at 145 sy-vline,

at 146 'Time',"#EC *

at 157 sy-vline.

write : / sy-uline(157).

format reset.

loop at gt_transf.

write : / sy-vline,

gt_transf-city1,

at 42 sy-vline,

at 43 gt_transf-gpart,

at 53 sy-vline,

at 54 gt_transf-fvkont,

at 67 sy-vline,

at 68 gt_transf-fbetrw ,

at 86 sy-vline,

at 87 gt_transf-tvkont,

at 101 sy-vline,

at 102 gt_transf-tbetrw,

at 120 sy-vline,

at 121 gt_transf-cname,

at 134 sy-vline,

at 135 gt_transf-cdate,

at 145 sy-vline,

at 146 gt_transf-cuzeit,

at 157 sy-vline.

endloop.

write : / sy-uline(157).

endif.

endform. " display_output

&----


*& Form uSER_COMMAND

&----


  • text

----


form openitem_transfer using iv_ucomm type sy-ucomm

iv_selfield type slis_selfield."#EC *

data : lv_final like line of gv_final.

read table gv_final index iv_selfield-tabindex into lv_final.

case iv_ucomm.

when 'TRANSFER'.

perform fill_bdcdata.

call transaction 'FP40' using gv_bdcdata.

endcase.

check p_open = 'X'.

case iv_selfield-fieldname.

when 'GPART'.

set parameter id 'BPA' field lv_final-gpart.

call transaction 'FPP3' and skip first screen.

when 'VKONT'.

set parameter id 'KTO' field lv_final-vkont.

call transaction 'CAA3' and skip first screen.

endcase.

endform. "user_command

&----


*& Form set_pfstatus

&----


form set_pfstatus using it_extab type slis_t_extab. "#EC *

set pf-status 'YTRANS_STAT' excluding it_extab.

endform. "set_pfstatus

&----


*& Form TOP_OF_PAGE

&----


form top_of_page. "#EC CALLED

data: lt_list_commentary type slis_t_listheader with header line.

lt_list_commentary-typ = 'H'.

lt_list_commentary-info = sy-title.

append lt_list_commentary.

concatenate 'Date:' sy-datum(4) '/' sy-datum+4(2) "#EC NOTEXT

'/' sy-datum+6(2) into lt_list_commentary-info.

lt_list_commentary-typ = 'S'.

append lt_list_commentary.

concatenate 'User Name: ' ' ' sy-uname into "#EC NOTEXT

lt_list_commentary-info.

lt_list_commentary-typ = 'S'.

append lt_list_commentary.

call function 'REUSE_ALV_COMMENTARY_WRITE'

exporting

it_list_commentary = lt_list_commentary[].

endform. "TOP_OF_PAGE

&----


*& Form fill_bdcdata

&----


form fill_bdcdata . "#EC *

data : lv_final type ygpart_atransfer,

lwa_final like line of gv_final,

lv_errcnt type i.

clear lv_errcnt.

loop at gv_final into lwa_final where mark = 'X'.

append lwa_final to lv_final.

endloop.

*-----Check there are 2 records selected

data : lv_lines type i.

clear lv_lines.

describe table lv_final lines lv_lines.

if lv_lines <> 2.

message e000(y_cm_atransfers).

  • Two line items MUST be selected in order to transfer values

add 1 to lv_errcnt.

endif.

*-----Check 1 is inactive and 1 is active

read table lv_final into lwa_final with key inact = 'X'.

if sy-subrc <> 0.

message e001(y_cm_atransfers).

  • An INACTIVE and ACTIVE contract account must be selected

add 1 to lv_errcnt.

endif.

check lv_errcnt = 0.

clear lwa_final.

data : lv_gpart type gpart_kk,

lv_vkontf type vkont_kk,

lv_vkontt type vkont_kk.

clear : lv_gpart,

lv_vkontf,

lv_vkontt.

read table lv_final into lwa_final with key inact = 'X'.

lv_gpart = lwa_final-gpart.

lv_vkontf = lwa_final-vkont.

clear lwa_final.

read table lv_final into lwa_final with key inact = ''.

lv_vkontt = lwa_final-vkont.

clear gv_bdcdata.

refresh gv_bdcdata.

gv_bdcdata-program = 'SAPLFKU1'.

gv_bdcdata-dynpro = '0100'.

gv_bdcdata-dynbegin = 'X'.

append gv_bdcdata.

clear gv_bdcdata.

gv_bdcdata-fnam = 'RFKU1-GPART_ORI'.

gv_bdcdata-fval = lv_gpart.

append gv_bdcdata.

clear gv_bdcdata.

gv_bdcdata-fnam = 'RFKU1-GPART_NEW'.

gv_bdcdata-fval = lwa_final-gpart.

append gv_bdcdata.

clear gv_bdcdata.

gv_bdcdata-fnam = 'RFKU1-VKONT_ORI'.

gv_bdcdata-fval = lv_vkontf.

append gv_bdcdata.

clear gv_bdcdata.

gv_bdcdata-fnam = 'RFKU1-VKONT_NEW'.

gv_bdcdata-fval = lv_vkontt.

append gv_bdcdata.

clear gv_bdcdata.

endform. " fill_bdcdata

Thank for ur concern.

Actually this was developed by some one. iam the potential developer. plz give me advice

regads,

kk

Read only

0 Likes
774

Hi Kiran,

In your short dump there should be an indication in which part of the program the time-out has occurred. Could you provide this information also?

Regards,

John.

Read only

0 Likes
774

At least some of the problem appears to be with nested loops. Please see:

[The Performance of Nested Loops|/people/rob.burbank/blog/2006/02/07/performance-of-nested-loops]

Rob

Read only

Former Member
0 Likes
774

In your dump there will be a section that points to where the error occured. Based on that you can look at your code where it occured and see what remedial steps that can be taken. Is this supposed to run online and can it also run in the background? The timeout error occurs only if are running a program online. Execute it in the background and see if it is ok.

Read only

Former Member
0 Likes
774

Hi Kiran,

I found that you have used select * and nested loops in your code .Time out dump will cause due to poor performance of the program.So to improve performance of your report follow the below procedures:

1 Always check the driver internal tables is not empty , while using FOR ALL ENTRIES

2 Avoid for all entries in JOINS

3 Try to avoid joins and use FOR ALL ENTRIES.

4 Try to restrict the joins to 1 level only ie only for 2 tables

5 Avoid using Select *. Restrict the the fields retrieved by your select sentences to the minimal set.

6 Avoid having multiple Selects from the same table in the same object.

7 Try to minimize the number of variables to save memory.

8 The sequence of fields in 'where clause' must be as per primary/secondary index ( if any)

9 Avoid creation of index as far as possible

10 Avoid operators like <>, > , < & like % in where clause conditions

11 Avoid select/select single statements in loops.

12 Try to use 'binary search' in READ internal table. Ensure table is sorted before using BINARY SEARCH.

13 Avoid using aggregate functions (SUM, MAX etc) in selects ( GROUP BY , HAVING,)

14 Avoid using ORDER BY in selects

15 Avoid Nested Selects

16 Avoid Nested Loops of Internal Tables

17 Try to use FIELD SYMBOLS.

18 Try to avoid into Corresponding Fields of

19 Avoid using Select Distinct , Use DELETE ADJACENT.

20 Use mostly primary key to access data

21 Before READ u sort the itab

22 Avoid the use of collect as much as you can.

Also use Run time analysis transaction SE30 and SQL Trace transaction ST05 to know about the performance level of the report

So go through each and every line of ur code and edit the code which taking more time.

Reward point if useful

With Regards,

Thasneem.