Application Development 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: 

Doubt in SAP

Former Member
0 Kudos

Hi gurus,

Our client accessing SAP system through GUI as well as WEB link.

I developed one customized Report,its working fyn if we are using GUI. Execute the report by using WEB link it throughs to Run time error.If we give selection screen fields to restrict the data then O/P will come, We try to display Whole data at a time it throws a run time error.

I consult our basis people, they told changes are required in the program level.But i didnt get exact idea where the changes are required.

Please can any one tell me , Really this will require modification in program level , Or this can be any thing else other than this.

Thanks in Advance

Thanks and Regards

Siri.....

4 REPLIES 4

Former Member
0 Kudos

dear friend,

definalty at the program end the problem is there,

you have to check the table or pls check the data tranzation at

the screen level to make some field mandatory.

so that u can reduse the data flow to display.

one thing more pls use collect statment at the final table.

and use left join or join only this will very effective.

for a refrence i am seanding you a section of code.

psl go through it.

rewards are expecting.

vivek

TABLES: EKKO, EKPO, ZADVMUTH,mseg.

TYPES : BEGIN OF s_ekko,

ebeln like ekko-ebeln,

ekgrp like ekko-ekgrp,

AEDAT LIKE EKKO-AEDAT,

END OF s_ekko,

Begin of s_ekkpo ,

netwr like ekpo-netwr,

ekgrp like ekko-ekgrp,

werks like ekpo-werks,

aedat like ekko-aedat,

loekz like ekpo-loekz,

End of s_ekkpo,

Begin of s_Final,

descr type string,

emode type string,

Cimmco type ekpo-netwr,

BMT type ekpo-netwr,

BTB type ekpo-netwr,

PTP type ekpo-netwr,

Cimmco1 type ekpo-netwr,

BMT1 type ekpo-netwr,

BTB1 type ekpo-netwr,

PTP1 type ekpo-netwr,

Srno type c length 1,

Final type ekpo-netwr,

final1 type ekpo-netwr,

end of s_final.

DATA : it_ekkpo type table of s_ekkpo,

wa_ekkpo type s_ekkpo,

it_final type table of s_final,

wa_final type s_final.

DATA: rptname LIKE sy-repid .

*-->Tables for field catalog

DATA: fcat TYPE TABLE OF slis_fieldcat_alv WITH NON-UNIQUE DEFAULT KEY

WITH HEADER LINE INITIAL SIZE 0,

fs_layo TYPE slis_layout_alv,

fevents TYPE TABLE OF slis_alv_event WITH NON-UNIQUE DEFAULT KEY

WITH HEADER LINE INITIAL SIZE 0,

fheader TYPE TABLE OF slis_listheader WITH NON-UNIQUE DEFAULT KEY

WITH HEADER LINE INITIAL SIZE 0.

DATA: it_sortcat TYPE slis_sortinfo_alv OCCURS 1,

wa_sort LIKE LINE OF it_sortcat,

gd_layout TYPE slis_layout_alv,

gd_prntparams TYPE slis_print_alv.

****************************************************************

******USER INTERACTION OPTION FOR THE INVOICE NO

****************************************************************

SELECTION-SCREEN : begin OF BLOCK B1 WITH FRAME TITLE R.

SELECT-OPTIONS: DAD FOR EKKO-AEDAT OBLIGATORY.

SELECTION-SCREEN : END OF BLOCK B1.

****************************************************************

******USER INTERACTION OPTION FOR THE INVOICE NO

****************************************************************

START-OF-SELECTION.

CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'

EXPORTING

percentage = '93'

text = 'Wait Processing ....'.

SELECT sum( ekpo~netwr )

ekko~ekgrp

ekpo~werks

ekko~aedat

ekpo~loekz

into table it_ekkpo

from ekko

inner join ekpo

on ekkoebeln = ekpoebeln

WHERE ekgrp IN ('C01', 'C02', 'DG1', 'E01', 'O01', 'P01', 'R02' , 'E02')

and WERKS IN ('1100', '1101' , '1110', '1111' , '1120' , '1130')

and ekko~aedat in dad

Group by

ekko~ekgrp

ekpo~werks

ekko~aedat

ekpo~loekz.

loop at it_ekkpo into wa_ekkpo where ekgrp ne 'E02'

and loekz ne 'L'.

if wa_ekkpo-aedat eq dad-high.

if wa_ekkpo-werks eq 1100 or wa_ekkpo-werks eq 1101.

wa_final-cimmco = wa_ekkpo-netwr.

elseif wa_ekkpo-werks eq 1110 or wa_ekkpo-werks eq 1111.

wa_final-bmt = wa_ekkpo-netwr.

elseif wa_ekkpo-werks eq 1120.

wa_final-btb = wa_ekkpo-netwr.

elseif wa_ekkpo-werks eq 1130.

wa_final-ptp = wa_ekkpo-netwr.

endif.

wa_final-final = wa_ekkpo-netwr.

        • For cumulative

if wa_ekkpo-werks eq 1100 or wa_ekkpo-werks eq 1101.

wa_final-cimmco1 = wa_ekkpo-netwr.

elseif wa_ekkpo-werks eq 1110 or wa_ekkpo-werks eq 1111.

wa_final-bmt1 = wa_ekkpo-netwr.

elseif wa_ekkpo-werks eq 1120.

wa_final-btb1 = wa_ekkpo-netwr.

elseif wa_ekkpo-werks eq 1130.

wa_final-ptp1 = wa_ekkpo-netwr.

endif.

wa_final-final1 = wa_ekkpo-netwr.

else. " For cumulative

if wa_ekkpo-werks eq 1100 or wa_ekkpo-werks eq 1101.

wa_final-cimmco1 = wa_ekkpo-netwr.

elseif wa_ekkpo-werks eq 1110 or wa_ekkpo-werks eq 1111.

wa_final-bmt1 = wa_ekkpo-netwr.

elseif wa_ekkpo-werks eq 1120.

wa_final-btb1 = wa_ekkpo-netwr.

elseif wa_ekkpo-werks eq 1130.

wa_final-ptp1 = wa_ekkpo-netwr.

endif.

wa_final-final1 = wa_ekkpo-netwr.

endif.

wa_final-descr = 'Purchase Order Placed.'.

wa_final-srno = 'A'.

wa_final-emode = 'Domestic'.

Collect wa_final into it_final.

endloop.

0 Kudos

Hi Vivek,

Thanks for giving valuable suggestion,I have some doubts , Kindly clarify me..

1) In your program you told use joins,I have totally 7 tables are there, thats the reason I use For all Entries.

2) our client doesnt want any mandatory fields in that report.

3) In your program below start-of-selection you call one function module 'SAPGUI_PROGRESS_INDICATOR' what is the exact use of this.

4) I know about collect statment, But our client dont want to add the numeric fields, thats the reason I used Append Statement.

5) Main point my program is working fine when We execute by using GUI,The problem is only when we try to see the o/p by using weblink only.

Please tell me these Details.

Thanks in Advance..

Thanks and Regards

Siri..

dev_parbutteea
Active Contributor
0 Kudos

Hi,

Your application is timing out. WEB link is timing out before SAP returns any output. In this case you need to restrict you selection criteria or optimize your code so that it takes less time.

Regards,

Dev

0 Kudos

Hi Dev,

can you please tell me how can I optimize my code.

Thanks in Advance.

Thanks and Regards

Siri..