User exit for display of first day in report
I have to design a query in which my user want to see following way
Week1 Week 2...................week 52
Now user want to see the aggregated bill packs for each week.
And user does not want to see Week numbers , for e.g.
01/20xx 02/20xx 03/20xx ....................
User want to see the Start date of that week which means Date of Monday for each week instead.
Now it is not defined, for how much weeks user want to see , so i created a interval range variable for Week selection.
Now from previous posts i learnt that to display Start date of Monday for each week I HAVE TO CREATE A USER EXIT.
And also create text variable which then i will be using in Description to do the same.
Can you please send me STEP BY STEP for same.
Can all of you please send me Code for creating user exit
Can you please send me some sample codes and sample documents for the same.
My email id is firstname.lastname@example.org
Points will be awarded.
As you said "<i>Now it is not defined, for how much weeks user want to see , so i created a interval range variable for Week selection</i>.", how can you decide about the number of KFs in the structures?? (Because u'll have to create as many text variables as the no. of weeks)
<b>But if that is not the case, following are the steps -
1. Go to cmod to create customize project.
2. Click on Enhancement Assignment & key in 'RSR00001'
3. Click on Components & double click on the function exit EXIT_SAPLRRS0_001.
4. Here you write the above code before the "Endcase" statement.
5. Repeat the above code for rest of the text variables with slight modification as follows...
insert modification between function module call & filling l_s_range9 --</b>i.e.
<i>CALL FUNCTION 'WEEK_GET_FIRST_DAY'
WEEK = wa9-low
DATE = l_fst_day
WEEK_INVALID = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
<b>data: n_fst_day type sy-datum.
n_fst_day = l_fst_day + 8.
l_s_range9-low = n_fst_day.</b>
<i>l_s_range9-sign = 'I'.</i>
Please assign the points if this is useful.