Application Development 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 Tuning-Conversion Exits used in a loop

Former Member
0 Kudos

Hi Experts,

I am doing some performance tuning on a report as it leads to time outs sometimes.

I have found a loop-endloop which takes  long time it is as follows:

ITAB has 26400 records

Time for loop  to finish around 1 min

loop at itab

1.  CONVERSION_EXIT_KONPD_OUTPUT this converts itab-psphi to vbeln

2.   CONVERSION_EXIT_ALPHA_INPUT add leading zeros to vbeln

3.    CONVERSION_EXIT_ABPSP_INPUT convert itab-posid to WBS element

Append ITAB to ITAB_FINAL

endloop.

To improve this i am doing as follows

loop at itab

    read buffer table if conversion exists use the internal table

1. CONVERSION_EXIT_KONPD_OUTPUT and storing it in a buffer table and using that instead for next records

2. Instead of CONVERSION_EXIT_ALPHA_INPUT movng the field to numeric 10 so no conversion exit required

3.CONVERSION_EXIT_ABPSP_INPUT as it is (WBS are unique)

Append ITAB to ITAB_FINAL

endloop.

Does help much and the process only improves by 10 seconds.

Can someone advice if something better can be done or remove conversion exits?

2 REPLIES 2

Former Member
0 Kudos

Solved by using database fields internal and external fields so no need to use the conversion exits

former_member196213
Active Participant
0 Kudos

hi Bhanu,

     What I feel is using conversion_exits degrades performance by making function call loading extra objects which is just only to do some conversions.

     What I do when I know that for this input this will be the output I do it manually rather than calling new FMs.

     Example :

          PERNR : 00123456

          PERNR : 123456 (After using conversion exits)

     Suggestion : 

    

          PERNR : 00123456

          PERNR : 123456 ( shift pernr left deleting leading '0'

That might not be true in your case but its worth a try. use following

          SHIFT < variable > LEFT DELETING LEADING <your choice>     "00123456 --> 123456

          SHIFT < variable > RIGHT DELETING TRAILING <your_choice>  "12345600 --> 123456

          OVERLAY PERNR with 00000000.                                            "123456 --> 00123456

There is something known as UNPACK that is solely applicable of integer type that too packed one.

If you can figure out the ouput required forat then these few simple chickens will tune performance to great extents.

HAPPY ABAPing.