Skip to Content
0
Former Member
Sep 12, 2011 at 06:18 PM

Time Out Issue

17 Views

I have below Select Query which is written in Remote Enabled Function Module. This RFC is called by Thrid party application and it gives "TIME_OUT" runtime error.

I need your suggestions to Improve the performance of this query or if there is any way to run the RFC in background.

SELECT t1~avm_nr  "Order number
             t1~gpag    "Sold to party
             t2~pos_nr  "Line item number
             t5~upos_nr "Sub-item
             t3~inhk_kfm "Business Content component
             t5~ur_beleinh "Initial booking Unit
             t5~belegeinh "Basic Booking Unit
             t2~pstyv "Item categories
             t4~ein_nr   "Schedule line number
             t4~aendate  "Sched line last change date
             t4~aentime  "Sched line last Change time
             t5~s_termin "Publication date
             t5~webpubl_date_frm "Web Pub start date
             t5~webpubl_date_to "Web Pub end date
             t7~motivid   "Technical spec id
             t7~motiv  "Ad spec no.
             t7~azart_gest  "Design Type
             t2~bsark  "PO type
             t3~chiffre_nr "IS-M/AM: Box Number
             APPENDING TABLE it_bcc_list
      FROM  jhak AS t1
            INNER JOIN jhap AS t2
              ON t2~avm_nr = t1~avm_nr
            INNER JOIN jhapa AS t3
                    ON t3~avm_nr = t1~avm_nr
                  AND  t3~pos_nr = t2~pos_nr
            INNER JOIN jhae AS t4
              ON t4~avm_nr = t1~avm_nr
              AND t4~pos_nr = t2~pos_nr
            INNER JOIN jhaea AS t5
              ON t5~avm_nr = t1~avm_nr
              AND t5~pos_nr = t2~pos_nr
              AND t5~ein_nr = t4~ein_nr
            INNER JOIN jhamot AS t7
              ON t7~avm_nr = t1~avm_nr
            INNER JOIN jhamoz AS t8
              ON t8~avm_nr = t1~avm_nr
             AND t8~pos_nr = t2~pos_nr
             AND t8~ein_nr = t4~ein_nr
             AND t8~motiv =  t7~motiv
        WHERE
              (
               t1~avm_nr IN it_sel_order_no_loop "Order no.
               AND
               (
* Selection based on Content Component and Booking Unit
* and Web publication date from & to and record change date
* and time from & to
                (
                   t3~inhk_kfm IN it_sel_bus_cc
                   AND
                   t5~belegeinh IN it_sel_book_unit
                   AND
                   (
                   NOT
                       (
                         t5~webpubl_date_frm > pub_end_date
                         OR
                         t5~webpubl_date_to < pub_start_date
                        )
                    )
                  )
                )
              )
        AND    t2~pstyv IN it_pstyv
        AND    t2~statusk <> '01' "-- Line item not deleted
        AND    t4~statusk <> '01' "-- Schedule line not deleted
        AND    t4~upos_nr <> '0000'
        AND    t5~belegeinh > ''
        AND    t5~merkmal8 <> 'X' "-- Schedule line not unpublishable
        AND    t5~upos_nr <> '0000'
        AND    t5~xersch IN (v_pubd,v_unpubd) "-- Published indicator
        AND    t7~motivstat <> '01' "-- Ad spec not deleted
        AND    t8~upos_nr <> '0000'.
    ENDIF.

Regards,

CJ