SAP has many pricing capabilities. Some customers may want to create pricing that is only applicable in a 'Sales' environment, or for 'seasonal' pricing, or for 'clearance' of slow moving stock. Mascidon has created this functionality using Boyum B1 Productivity tools.
The 'Line Loop' used with a SQL query and the use of the 'While' macro are featured in this application.
Using Boyum to add 'Special Items Sales' Within SAP B1
This Boyum application allows users to track 'Sale Item Pricing' within SAP. As examples, 'Special items sales' could be created to address seasonal sales, or to reduce excess inventory, or to increase movement of sales for specific items.
This application assumes:
1. Only a selective group of inventory products are 'sale' priced;
2. Not all customers are eligible to participate in this sale; and
3. The 'sale' is for a limited period of time.
To implement the creation of the sale, these steps are involved:
1. Use SAP standard functionaloty to create a price list that documents the pricing for items that are included in the sale. This process is not explained as I assume you have some knowledge of SAP.
2. Use Boyum to provide the means to 'select' which customers are eligible for the sale. This includes providing the means to use a check box to select the customers eligible, and then have the system update the eligible customers.
3. Use Boyum to provide the means to 'Reset' eligible customers in order to restart the eligibility process.
4. Use Boyum to automatically use the 'sales price' for sales items for eligible customers.
Create a Seasonal Price List
Selecting Eligible Customers
After setting up a price list, the next step is to select which customers are eligible for the sale. To accomplish this a button 'Flag BPs' has been added to the BP master screen using the Boyum Item placement tool.
Using a Boyum B1 Validation, the button calls a Boyum Universal Function to prompt the user to select one of the 3 options - Flag BPs; Reset Flags; Show Flagged BPs.
Flagging the Customers
Use Selective SQL Query
Clicking on the 'Flag BPs' button calls a Boyum Universal Function to execute a SQL query. Note: if using Hana, the query would be changed to match Hana format.
Use the 'Format' wizard to select the first column as editable. This provides the means to 'Select' a customer as eligible / ineligible for the sale.
Be sure to set the field 'FormType Suffix' as not doing so will result in other 'SQL UF queries' displaying a 'Close' button that is not intended.
The resulting SQL screen is shown with the check box unselected for the 1st column. You could default it to 'Selected' using SQL.
At this point the user checks which customers are eligible for the sale items and then clicks the 'Close' button.
Updating Customer Flag
The customer record must reflect that this customer is eligible for the sale. I chose to use 'Property 64' in the customer master record to identify eligible customers. Most SAP users have one or more customer properties open, so this can be altered if property 64 is already in use. Alternatively, a user defined field in the business partner could be the 'eligibility' flag.
When the user 'checks' the customers that are eligible and then clicks on the 'Close' button, property flag 64 for the selected customers is updated. This executes a Boyum Universal function. This is a 'Line Loop' universal function that only executes for those records on the query screen that have been 'Checked'.
For each checked customer the 'line loop' executes the Boyum Universal Function SP-03 - which is a macro that does the following:
a. Opens and activates the business partner master screen
b. Moves the customer code 'selected' from the query to the business partner code on the BP master screen
c. Clicks the 'Find' button on the BP master screen
d. Clicks the 'Property 64' field - thereby 'Selecting' this property
e. Clicks the 'Update' button on the BP master screen
f. Closers the BP master screen
This process is repeated in the line loop for each of the customers selected. Then the line loop completes its function by executing the Boyum Universal function SP-02 to close the query form. The last step in SP-02 runs a query of all BP's selected as eligible - just so the user can check if they made any errors.
Boyum Line Loop to Process Customers
Running this update sets the 'Property Flag 64' for each business partner that is eligible for the 'Sale'. You can run a query showing the customers eligible at any time (SP-06). This report is available from the 'Flag BPs' button on the BP master File screen.
Resetting Customer Flags - use the 'WHILE' macro
Clicking on the 'Reset Flags' button calls a Boyum Universal Function macro to reset the Business partner proerty 64 flag (off). The means chosen for this reset is to use the 'WHILE' macro command. The 'while' is true as long as there are any customers with property 64 set to 'Y'. When this is no longer true, the macro provides a message indicating the update is complete.
A 'Transfer' command using SQL extracts the 'count' of the number of customers with property flag 64 set to 'Y' - and stores this information in the macro variable @STORE1.
The macro 'While' command then checks the value of the @STORE1 variable and exits the processing when it is zero.
Within the 'While' loop the system finds the 'first' customer with property 64 set to 'Y' and stores this information @STORE2. Then a series of macro commands opens up the customer screen, populates the customer id with @STORE2, 'finds' the customer, sets property 64 to 'N', updates the BP data, and closes the BP master screen for the customer just updated.
Another 'Transfer' SQL command recounts the number of customers with property flag 64 = 'Y'. As long as the count is greater than zero, the 'While' loop continues.
After the 'While' loop ends, a popup message indicates the flags have all been reset.
Defaulting Item Price to 'Sales Price List' on Sales Orders - Using Boyum 'Validate'
The previous steps defined a 'sales price list' with prices for a select group of items. Then we used Boyum to identify the customers that were eligible for partaking in this sale. The last step is to use Boyum to set the item price to the 'sales price' if the customer is eligible, and the item has a sales price, and the sales order is within the 'sales price list starting and ending dates.
Using SAP tools, we could associate a start and end date for a 'price list'.
NOTE: reference the accompanying shot of the price lists and note that the 'sale price list' has a date range of 03/01/2023 to 04/08/2023.
Use SAP Tools to Add Start - End Dates to Price Lists
To have the price from the 'sales price list' default properly on a sales order, the following must be true:
a. The item being ordered must have a non-zero price in the 'sales price list';
b. The order date must within the start - end date defined for this 'sales price list'.
c. The customer must be eligible for the sales pricing;
Normally the price list default for the customer is NOT the 'sales price list'. Boyum can be used to force the item price to be retrieved from the sales price list and used in the sales order entry. This is done with a Boyum B1 Validation on the sales order screen when leaving the 'Item' entry column.
If the SQL conditions (as defined for a, b, c above) are met, then the price is retrieved from the 'Sales price list' (List number = 6 in my example) and displayed on the sales order for this item.
Sales Order Entry - Defaulting the Sales List Prices
The end result of the Boyum functions is that as a sales order is entered for an eligible customer, within the date range of the sale, for an item that has a 'sale' price set up in a 'sales list' price list, the sale price defaults correctly.
Summary of Boyum Use for setting up 'Sales Pricing'
Boyum was used to create a function in SAP to allow the user to set up a 'Sales Price'. The 'Sale' was defined for a specific period of time and the Boyum functions have no impact outside of this time period. A new 'Price List' was defined that contained only the items that are being included in the sale. This was done with standard SAP functionality.
NOTE: you can import a new price list from Excel - alleviating the cumbersome keying into SAP.
Once the 'sales price list' was defined, Boyum functions were used to selectively determine which customers were eligible for the sale. The Boyum functions included: an 'editable SQL' query; a 'line loop' to process the 'selected' customers; a macro to update customer property 64 in the BP Master screen; and a 'While' macro to reset property 64 when needing to restart a new sales process.
With the pricing defined and the eligible customers defined, a Boyum function was used to retrieve the 'sales pricing' for eligible customers wanting to purchase items on sale within the sale time frame. This Boyum 'Validation' function called a price lookup function that populated the price for the item.
NOTE: the last step - the 'validation' process can be extended to delivery orders and invoices by altering the 'Formtype' field on the B1 Validation from '139' to '139,140,133'. This is useful if customer purchases can be entered without 'sales orders'.