10 Replies Latest reply: Mar 23, 2009 1:26 PM by senthil kumar RSS

Function module for VBFA table

senthil kumar
Currently Being Moderated

Hi Gurus,

Please Help me on this Issue..

 

I want to retrieve data from vbfa table..while making query to retrieve data from vbfa tabl,its making performance issue on production server.

 

    SELECT vbelv

           vbeln

                INTO TABLE i_ref_data

    FROM vbfa FOR ALL ENTRIES IN i_billing_main

    WHERE

         vbelv   EQ i_billing_main-vbeln AND

         vbtyp_n EQ c_vbtyp_n.

 

so i have tried to retrieve data using functiom module "RV_ORDER_FLOW_INFORMATION" .in this function i was not able to pass multiple document no to this function module so put this function module inside the loop but this option also making performance issue..

 

LOOP AT i_billing_main_temp INTO wa_billing_main.

 

    CLEAR : wa_comwa,wa_vbfa.

    REFRESH i_vbfa.

 

    wa_comwa-vbeln = wa_billing_main-vbeln.

 

  • This function module used for retrieving document flow data from VBFA

 

    CALL FUNCTION 'RV_ORDER_FLOW_INFORMATION'

      EXPORTING

        comwa    = wa_comwa

      TABLES

        vbfa_tab = i_vbfa.

 

 

    SORT i_vbfa BY vbelv vbeln vbtyp_n.

    DELETE ADJACENT DUPLICATES FROM i_vbfa COMPARING vbelv vbeln vbtyp_n.

    SORT i_vbfa BY vbtyp_n.

 

    READ TABLE i_vbfa

             INTO wa_vbfa

             WITH KEY vbtyp_n  =  c_vbtyp_n

    BINARY SEARCH.

 

    IF sy-subrc EQ 0.

      wa_ref_data-vbeln = wa_vbfa-vbeln.

      wa_ref_data-vbelv = wa_billing_main-vbeln.

      APPEND wa_ref_data TO i_ref_data.

    ENDIF.

 

  ENDLOOP.

 

so kindly give me the solution for improving performance of this issue.

Is it having any function module to pass multiple inputs to the function module.?

 

 

Regards

P.Senthil Kumar

 

Edited by: senthil kumar on Mar 23, 2009 12:23 PM

Actions