Skip to Content
author's profile photo Former Member
Former Member

customer exit code

Hi to all

I am working in PA module in HR ,In my Report i have to count total number

of trainee and lateral in given Date range that From date to To Date ,

Before that i have to calculate a Total Employee Strength before one day

of From date , suppose user enter a 1st of April 2007 to 1st of jun 2007 ,

so Employee strength should be calculated till the 31march 2007. for that i have to write a customer exit , can you give me a sample code for this.

I will assign a point


Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Sep 21, 2007 at 08:25 AM


    Here is the code, i'm assuming ur till date means 1st of that year to one day from date of your date variable.


    l_year type /bi0/oifiscyear,

    l_date_low type sy-datum,

    l_date_high type sy-datum,

    l_s_range type rsr_s_rangesid,

    l_s_var_range type line of rrs0_t_var_range.

    if i_step = 2. "After Selection screen is shown

    read table i_t_var_range into l_s_var_range with key vnam = 'YOURVAR'.

    if sy-subrc = 0.

    l_date_high = l_s_var_range-low.

    l_date_high = l_date_high - 1.

    l_year = l_s_var_range-low+0(4).

    concatenate l_year '01' '01' into l_date_low.

    clear l_s_range.

    l_s_range-sign = 'I'.

    l_s_range-opt = 'BT'.

    l_s_range-low = l_date_low.

    l_s_range-high = l_date_high.

    append l_s_range to e_t_range.



    But one thing what i did for this scenario, i made one dummy restricted key figure with the user entry variable and hide that. and created another restricted key figure with user exit variable.

    hope this helps.



    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.