cancel
Showing results for 
Search instead for 
Did you mean: 

Last day of the week variable.

Former Member
0 Kudos

hI Gurus,

We have requirement, which we need to report based on last day of the week. We load data everyday, and want to report based on the last day of the week, for example.

Mon - 10

Tue - 20

Wed - 30

Thu - 60

Fri - 100.

I want to report on Friday (100).

Can anyone please help to achieve this without writing User exit.

I dont know ABAP much.

Thanks in Adv..

Deepak Kunavarapu

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hallo

Few questions:

1. Why do you load from Monday to thursday when there is no need to report? Maybe you can load into an ODS (Not reporting relvant) and then load only friday to your Cune

2. Create an aggregate and roll-up only Friday

3. User exit Variable on Request Number (basically you filter on the request Number)

Regards

Mike

Former Member
0 Kudos

If you load into a cube you can set the automatic deletion to delete requests:

- from the last 7 days.

- except on day x of the week.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi, USER Exit for Last day of the week. Can anyone please help me with the code, and steps to achieve this functionality.

Deepak Kunavarapu

Former Member
0 Kudos

Deepak..

below is the code, Its not perfect match for ur req. You can improvise upon it..

CALL FUNCTION 'BWSO_DATE_GET_FIRST_WEEKDAY'

EXPORTING

DATE_IN = report_date

IMPORTING

DATE_OUT = wk_s_date.

l_day_range = report_date - wk_s_date.

case l_day_range.

when 1.

report_date = l_report_date + 4.

when 2.

report_date = l_report_date + 3.

when 3.

report_date = l_report_date + 2.

when 4.

report_date = l_report_date + 1.

when 5.

report_date = l_report_date.

endcase.

CLEAR L_S_RANGE.

if I_VNAM = 'date_var'.

L_S_RANGE-LOW = report_date.

L_S_RANGE-OPT = 'EQ'.

endif.

L_S_RANGE-SIGN = 'I'.

APPEND L_S_RANGE TO E_T_RANGE.

endif.

Former Member
0 Kudos

Hi,

Hardly you can achieve this without user exit variable.

There are a lot of guys who could help with the code.

Do you report weekly? What time chars do you have in your infoprovider?

Best regards,

Eugene

Former Member
0 Kudos

Hi guys, thanks for your reply..

Eugene,

Do you report weekly? What time chars do you have in your infoprovider?

~ yes we do weekly reports, we have custom date chart.

Can some one help me with User Exit code, I'm not good in ABAP and I have no idea how to debug code.

thanks.

Deepak