cancel
Showing results for 
Search instead for 
Did you mean: 

Workdays without calendar assigned in location

Former Member
0 Kudos

Hello Experts,

If we don't have any shipping or receiving calendar assigned to location then how does macro BUCKET_WDAYS( CALENDAR( ACT_LOCATION ; 'SD' ; ACT_VERSION ) work?

Determine workdays

Row: Workdays ( Frm  W 40/2016 ) =

BUCKET_WDAYS( CALENDAR( ACT_LOCATION ; 'SD' ; ACT_VERSION )

;

Row: Forecast ( Frm  W 40/2016 )

)

Also how to check the result of this macro? Is there any other meaning of ";" othar than separator?

Is there any book other than sap that can help me to learn macro building?


Accepted Solutions (0)

Answers (3)

Answers (3)

ruchi_das2
Active Participant
0 Kudos

Ayan,

Please refer to SAP Help on how the macro works.

https://help.sap.com/saphelp_scm70/helpdata/en/ea/3ac95360267614e10000000a174cb4/content.htm


BUCKET_WDAYS() - The specification of a calendar as the first argument is optional. If you do not specify a calendar, the system reads the calendar given by the time stream in the storage buckets profile. If no time stream is defined, the system uses calendar days.

For testing, create a time stream with Mon-Fri workdays and assign it to the shipping calendar of the location. Try to manually populate forecast in SNP Planning Book and see if you can have forecast on non-working days. Depending on the SCM version, you will get a pop-up that "You are trying to transfer requirements for the period xxxxx....xxx in which there are no workdays according to the calendar."

Regards

AK

Former Member
0 Kudos

I created new calendar(5 working days/week) and assigned to DC as shipping calendar. Also assigned "WORKINGDAYS" KF to planning book.

Created new macro as copy of "Determine Workdays" i.e. executable directly and can see 5 days (DC with shipping cal assigned) and 7 days(without shipping calendar). Test Macro function in ADVM transaction shows the same result.

Thanks for helping me learning, Amol and Abhishek. I am going to try POP UP macro and then close this thread.

Former Member
0 Kudos

Thanks for your response, Amol. I used std PA 9ASNP02 and PB 9ASNP94 as a reference for my SNP set up. Assigned WORKINGDAYS but I don't see any value in this KF.

Could this be reason that DC and Plant doesn't has any calendar assigned where as macro need SD calendar to calculate workdays?

Former Member
0 Kudos

HI Ayan

You can copy the SNP standard planning book 9ASNP94 to another Z* planning book/Data view where you can play around the macros and understand them in detail. Please also find below the link below where you can find more details about the SNP macro functions.

SNP Functions - Planning Area Administration - SAP Library

";" is separator between 2 steps within the macro.

Please use OUTPUT_POPUP macro function to display your results.

OUTPUT_POPUP

Syntax

OUTPUT_POPUP ('dialog_box_description'; 'field_label'_1' ; value in field 1 ;... ; 'field_label_10' ; value in field 10)

Description

OUTPUT_POPUP opens a dialog box that displays the alphanumeric or numerical values of the extra fields contained in the product master record and/or location master record. A maximum of 10 field values can be displayed in this box.

You also have working days KF which you can pull into data view. Once the macro has executed, the information is filled into this KF.

Please let us know if this information help you.

Thanks

Amol