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

performance issue using function module FAGL_GET_GLT0

Former Member
0 Kudos
939

I had used the functionmodule  FAGL_GET_GLT0 in my custom program and but it is taking very long time to execute the function module only and please find the below code for this.

And also during execution of the function module it is taking more CPU Hikes for that System. Please find the attached screen shot.

Could you please let me know is there any I can reduce the performance of this function module FAGL_GET_GLT0.


data:lt_fieldname type TABLE OF char30,
      ls_fieldname type char30,

data: LT_GLT0             TYPE STANDARD TABLE OF GLT0,
        LS_GLT0             TYPE GLT0,

ls_fieldname = 'RYEAR'.
append ls_fieldname to lt_fieldname.

ls_fieldname = 'RPMAX'.
append ls_fieldname to lt_fieldname.

ls_fieldname = 'RLDNR'.
append ls_fieldname to lt_fieldname.

ls_fieldname = 'RRCTY'.
append ls_fieldname to lt_fieldname.

ls_fieldname = 'RVERS'.
append ls_fieldname to lt_fieldname.


ls_fieldname = 'RACCT'.
append ls_fieldname to lt_fieldname.


ls_fieldname = 'RBUKRS'.
append ls_fieldname to lt_fieldname.

ls_fieldname = 'RBUSA'.
append ls_fieldname to lt_fieldname.


ls_fieldname = 'TSLVT'.
append ls_fieldname to lt_fieldname.

ls_fieldname = 'TSL01'.
append ls_fieldname to lt_fieldname.


ls_fieldname = 'TSL02'.
append ls_fieldname to lt_fieldname.


ls_fieldname = 'TSL03'.
append ls_fieldname to lt_fieldname.


ls_fieldname = 'TSL04'.
append ls_fieldname to lt_fieldname.


ls_fieldname = 'TSL05'.
append ls_fieldname to lt_fieldname.


ls_fieldname = 'TSL06'.
append ls_fieldname to lt_fieldname.

ls_fieldname = 'TSL07'.
append ls_fieldname to lt_fieldname.

ls_fieldname = 'TSL08'.
append ls_fieldname to lt_fieldname.


ls_fieldname = 'TSL09'.
append ls_fieldname to lt_fieldname.

ls_fieldname = 'TSL10'.
append ls_fieldname to lt_fieldname.


ls_fieldname = 'TSL11'.
append ls_fieldname to lt_fieldname.

ls_fieldname = 'TSL12'.
append ls_fieldname to lt_fieldname.

ls_fieldname = 'TSL13'.
append ls_fieldname to lt_fieldname.

ls_fieldname = 'TSL14'.
append ls_fieldname to lt_fieldname.

ls_fieldname = 'TSL15'.
append ls_fieldname to lt_fieldname.


ls_fieldname = 'TSL16'.
append ls_fieldname to lt_fieldname.


ls_fieldname = 'HSLVT'.
append ls_fieldname to lt_fieldname.


ls_fieldname = 'HSL01'.
append ls_fieldname to lt_fieldname.


ls_fieldname = 'HSL02'.
append ls_fieldname to lt_fieldname.

ls_fieldname = 'HSL03'.
append ls_fieldname to lt_fieldname.

ls_fieldname = 'HSL04'.
append ls_fieldname to lt_fieldname.


ls_fieldname = 'HSL05'.
append ls_fieldname to lt_fieldname.

ls_fieldname = 'HSL06'.
append ls_fieldname to lt_fieldname.

ls_fieldname = 'HSL07'.
append ls_fieldname to lt_fieldname.

ls_fieldname = 'HSL08'.
append ls_fieldname to lt_fieldname.


ls_fieldname = 'HSL09'.
append ls_fieldname to lt_fieldname.


SELECT * FROM SKB1
    INTO TABLE LT_SKB1
    WHERE BUKRS IN BUKRS AND
          SAKNR IN SAKNR AND
          WAERS IN WAERU AND
          FDLEV IN FDLEV
         ORDER BY BUKRS.

LOOP AT LT_SKB1_TMP INTO LS_SKB1.
      LS_RA_COMPANY_CODE-SIGN   = 'I'.
      LS_RA_COMPANY_CODE-OPTION = 'EQ'.
      LS_RA_COMPANY_CODE-LOW  = LS_SKB1-BUKRS.
      APPEND LS_RA_COMPANY_CODE TO LT_RA_COMPANY_CODE.
   ENDLOOP.

IF LT_SKB1_TMP[] IS NOT INITIAL.

      CALL FUNCTION 'FAGL_GET_GLT0'
        EXPORTING
          I_GLT0_RLDNR      = '00'
          I_RRCTY           = '0'
          I_RVERS           = '001'
          I_RYEAR           = LV_GJAHR
          I_RBUSA           = SPACE
          I_RPMAX           = '016'
          I_RANGE_BUKRS     = LT_RA_COMPANY_CODE
          I_RANGE_RACCT     = ET_RA_ACCOUNT
          I_AUTHORITY_CHECK = ABAP_TRUE
        IMPORTING
          ET_GLT0           = LT_GLT0.

endif.


5 REPLIES 5

former_member195402
Active Contributor
0 Kudos
543

Hi,

please check SAP notes dealing with 'FAGL_GET_GLT0' performance issues like

1741346 - FAGL_GET_GLT0: Performance probl due to too large field list

Regards

Klaus

0 Kudos
543

The Note 1741346 is already implemented in my system. But still we are facing this issue. Could you please advice is there any other option is there to get the better performance

0 Kudos
543

Hi,

I suggested to check all SAP notes dealing with FAGL_GET_GLT0. Note 1741346 was just a sample.

I found 128 notes for this function module.

For example reading the correction instruction of note 1811139 you can find a performance improvement calling this function module with additionally parameter I_CURTP.

This doesn't mean, that this note is needed in your system. It means, that the improvement that came with this note for SAPDBSDF may also work for your call adding the new parameter I_CURTP.

But this is only the next sample. Please check all possible notes starting with the newest ones.

Regards,

Klaus

Brindavan_M
Contributor
0 Kudos
543

Hi Durgaprasanth,

How you are executing the functional module in front end or background. Bettter put th trace and find out. If you believe only this functional module causing issue in your z* program then you need to spilt the variant.

Post log about  the workload analysis (ST03) as well for particular functional module.

Thanks,

Brindavan

0 Kudos
543

I am executing the function module in Foreground only