Skip to Content
avatar image
Former Member

SAP FIORI Track Purchase Order backend error

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Sep 01, 2017 at 09:56 AM

    The problem is resolved.

    The solution is to create an index for table ekko with mandt, bstyp and aedat.

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 31, 2017 at 12:08 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi thanks for your answer.

      I already checked on table lvl and there are only around 50 items on headlevel with 1 position item each for the given time interval (7 days).

  • avatar image
    Former Member
    Aug 31, 2017 at 02:55 PM

    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.
    
    Add comment
    10|10000 characters needed characters exceeded

  • Sep 04, 2017 at 06:35 AM

    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)

    Add comment
    10|10000 characters needed characters exceeded