on 08-31-2017 7:48 AM
Hello,
I have a problem with getting data from the backend (same issues was posted here but not resolved:. The app is loading forever and throws a timeout. I have also tried to manually reduce lv_package_size and lv_created_date in the debugger with no succes (see screenshot: error-track-po-backend.jpg).
It is getting stuck in following statement of method GET_PO_LIST in class CL_SRA020_PO_TRACKING_API:
FETCH NEXT CURSOR lv_db_cursor INTO CORRESPONDING FIELDS OF TABLE lt_tmp_po_head
Backendcomponent Patchlevel: SRA020 Release 600 SP-Level 0009
Frontendcomponent Patchlevel: UIX01EAP Release 100 SP-Level 0010
The problem is resolved.
The solution is to create an index for table ekko with mandt, bstyp and aedat.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The Ekko Table has around 480k entries and there is no index for bstyp and aedat for ekko. So maybe thats why it takes too long? Any ideas?
IF lv_cursor IS INITIAL.
* Get all the POs that contain the searchtext in the header, in at least one item or in the vendor master
OPEN CURSOR WITH HOLD lv_cursor FOR
SELECT h~ebeln h~aedat h~bsart h~ekgrp h~ekorg h~lifnr
h~memory h~frgrl h~waers
FROM ( ( ekko AS h
INNER JOIN m_kreda AS l ON h~lifnr EQ l~lifnr )
INNER JOIN ekpo AS i ON h~ebeln EQ i~ebeln )
WHERE h~bstyp = cl_mmpur_constants=>bstyp_f
AND h~loekz <> 'L'
AND h~aedat > iv_created_date
AND i~loekz <> 'L'
AND h~bsart IN lt_auth_bsa "1998858
AND h~ekorg IN lt_auth_eko "1998858
AND h~ekgrp IN lt_auth_ekg "1998858
AND i~werks IN lt_auth_wrk "1998858
AND ( h~ebeln LIKE lv_search_text OR
h~lifnr LIKE lv_search_text OR
l~sortl LIKE lv_search_txt_uc OR
l~mcod1 LIKE lv_search_txt_uc OR
i~txz01 LIKE lv_search_text OR
i~matnr LIKE lv_search_text OR
i~ematn LIKE lv_search_text )
ORDER BY h~aedat descending h~ebeln descending.
ENDIF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try to check and validate if the entries passed to the method of class CL_SRA020_PO_TRACKING_API are all valid. Also check if the entries dataset is short or long buy checking @ table level (this is tedious, but gives you gurantee if your dataset itself is huge (big) or small..
No idea much on this. Hope you get solution.
-PG
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks!
Actually while accessing the database, careful consideration should be given to index access in order to make the program as efficient as possible.
Here the 'Where clause' should be used appropriately so that proper index should be in same order use ST05 or SE30 to analyse which index is used.
Hope it help, Cheers!
-Pavan Golesar (PG)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.