Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

User exit for display of first day in report

Hello friens,

I have to design a query in which my user want to see following way

-


Billed Packs----


-


Week1 Week 2...................week 52

packA

packB

Now user want to see the aggregated bill packs for each week.

And user does not want to see Week numbers , for e.g.

-


Billed Packs----


-


01/20xx 02/20xx 03/20xx ....................

packA

packB

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 pd.sapbi@gmail.com

Points will be awarded.

Former Member
Former Member replied

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'

EXPORTING

WEEK = wa9-low

IMPORTING

DATE = l_fst_day

  • EXCEPTIONS

  • 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.

ENDIF.</i>

<b>data: n_fst_day type sy-datum.

clear n_fst_day.

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.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question