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

time out in converted program

former_member649905
Participant
0 Likes
665

Hi experts,

could you please take a look into the converted program to access archived data? I converted it using the /pbs/select_into_table but it just time out

Original Program

if not orderno is initial.

select bukrs gjahr belnr buzei bldat xblnr blart monat

into (wa-bukrs, wa-gjahr, wa-belnr, wa-buzei, wa-bldat,

wa-xblnr, wa-blart, wa-monat)

from bsis where aufnr in orderno

and bukrs in company

and budat in postdate

and hkont in costelem

and gsber in busarea

and belnr in docno

and bldat in docdate

AND XBLNR IN ZXBLNR

and blart in doctype

and kostl in costctr.

wa-bsis_count = wa-bsis_count + 1.

perform get_details.

endselect.

else.

...

endif.

-


Converted program

IF NOT ORDERNO IS INITIAL.

SELECT * INTO CORRESPONDING FIELDS OF TABLE TAB1523 "PBS

FROM BSIS

WHERE AUFNR IN ORDERNO AND BUKRS IN "PBS

COMPANY AND BUDAT IN POSTDATE AND HKONT IN COSTELEM "PBS

AND GSBER IN BUSAREA AND BELNR IN DOCNO AND BLDAT "PBS

IN DOCDATE AND XBLNR IN ZXBLNR AND BLART IN DOCTYPE "PBS

AND KOSTL IN COSTCTR. "PBS

CALL FUNCTION '/PBS/SELECT_INTO_TABLE' "PBS

EXPORTING "PBS

ARCHIV = 'CFI' "PBS

OPTION = '' "PBS

TABNAME = 'BSIS' "PBS

CLR_ITAB = '' "PBS

SCHL1_NAME = 'BUKRS' "PBS

SCHL2_NAME = 'HKONT' "PBS

TABLES "PBS

I_TABELLE = TAB1523 "PBS

SCHL1_IN = COMPANY "PBS

SCHL2_IN = COSTELEM "PBS

EXCEPTIONS EOF = 4 "PBS

OTHERS = 2. "PBS

LOOP AT TAB1523

WHERE ( AUFNR IN ORDERNO AND BUKRS "PBS

IN COMPANY AND BUDAT IN POSTDATE AND HKONT IN "PBS

COSTELEM AND GSBER IN BUSAREA AND BELNR IN DOCNO "PBS

AND BLDAT IN DOCDATE AND XBLNR IN ZXBLNR AND BLART "PBS

IN DOCTYPE AND KOSTL IN COSTCTR ). "PBS

MOVE TAB1523-BUKRS TO WA-BUKRS . "PBS

MOVE TAB1523-GJAHR TO WA-GJAHR . "PBS

MOVE TAB1523-BELNR TO WA-BELNR . "PBS

MOVE TAB1523-BUZEI TO WA-BUZEI . "PBS

MOVE TAB1523-BLDAT TO WA-BLDAT . "PBS

MOVE TAB1523-XBLNR TO WA-XBLNR . "PBS

MOVE TAB1523-BLART TO WA-BLART . "PBS

MOVE TAB1523-MONAT TO WA-MONAT . "PBS

WA-BSIS_COUNT = WA-BSIS_COUNT + 1.

PERFORM GET_DETAILS.

ENDLOOP . " BKPF

else.

...

endif.

Any suggestions why that program times out? Could please insert the appropriate solution for me?

Regards

4 REPLIES 4
Read only

former_member212713
Contributor
0 Likes
626

Hi Blaiso ;

Did you run program with debug?

Where is program most spending time? For example select or func. or loop?

I'm waiting your answer and then I will continue.

Best regards.

Read only

0 Likes
626

Hi Melih,

Thanks for replying, syntaxtically that program is correct...it's time out belong on the long search on the key field like HKONT and BUKRS, which are the only to available based on /pbs/se16. So I added 1 more field BELNR which is a key field on BSIS...still not resolved.

What is the suitable tool to troubleshoot a program that time out in ABAP? Keep in mind that the syntax is correct....somewhere it's taking to much time to fetch the data... I was thinking about the runtime analysis but since it's time out we won't be able to evalute performance data file...may I right?

Any advice please!!!!

Regards.

Read only

0 Likes
626

Hi Blaiso ;

I think your problem in select statement.

Because you dont use PK or any index.

If we don't use PK or any index on table, We spend a lot of time.

So I suggest you 2 way;

1. You can use index with on table.

2. You can create new index on table according your where cond.

Best regards.

Read only

0 Likes
626

resolved... thanks for your input

Edited by: Blaiso on Jul 25, 2011 3:35 PM