SNP Macro - unexplained
Dear Experts,
I have created a simple macro to copy forecast KF into another order series KF in SNP.
However, I am finding that the values are not being copied during direct execution. Though the macro works fine as default macro and for a TS KF.
Also, the behavious is different for VMI promotion KF than any other order series KF.
Any suggestions?
I am working in SCM 7.0
Thanks and Regards,
Thanks Pawan,
I have a demand components (shelf life) which is calculated in planning book TS key figure and also safety stock which has two different method SZ and MB for the same product at different Invoicing locations with safety days of supply also varying.
I need to aggregate them. I can create order KF but since the computation is based out of macro in PB, they will not get aggregated.
Any inputs?
Thanks
Similar Messages
-
Syntax for CASE / WHEN in SNP Macros.
Dear APO Gurus,
I'm having problems using CASE when in SNP macros, even though I've tried quite a few syntaxes.
could someone please tell me how to Use CASE WHEN (WHEN WHEN WHEN...) ENDCASE in macros ? this would save me an awful lot of IF
Thanks in advance,
HuguesHi,
you can import an example macro to see how the CASE usage works. In order to do so, perform the following.
1.) Enter Makro Builder and enter your new macro book
2.) In the Menu, choose "Edit" -> "Import macros"
3.) Choose "SAP Example and template macros" as reference book
4.) use "Using the Case statement" as reference macro.
This will import the example macro which you can take as reference.
Best regards
Rico Frenzel -
APO SNP macro working at a product level (across locations)
I am using APO V5.1.
I have a macro requirement where I want to perform calculations at a product level (ie for a given product, look across all relevant locations).
I can do this interactively by selecting a product.
But in a background job I can only select the 9AMALO level of aggregation.
Does anyone know how I could get round this?...Hi,
Could you please give some more details of your exact requirement?
Since you mentioned about 9AMALO, I would assume that you want something to be done in SNP, but it's not clear what you could do in interactive SNP which you are not able to achieve in background job.
If something is possible in foreground, most likely it would be available in background as well, and we can give you the solution after you give some more details.
Thanks - Pawan -
Hi All,
We have a scenario where a particular DP or SNP Macro is being used in several jobs.
Is there any way to find out that in what all jobs is a particular MACRO being used in my APO system (a kind of where used scenario for Macros).
Thanks in Advance,
VikramHi Vikram.
Following tables are relevant:
/SAPAPO/TSPLBAKT Background Planning Activities. This table contains MAKRO filed which has macro id.
/SAPAPO/TSPLBT : Texts for Background Planning Run Number
A query can be prepared based on these tables.
Regards
Datta -
Dp/snp changes in production support
Hi sap gures
APO DP/SNP- productionm support, which kind of changes or Enhancement we can do
in DP/SNP, please let me know, i am new for this project..
Regarding
R.suresh KumarHi Suresh,
BAPI In SNP
BAPI_PIRSRVAPS_GETLIST Planned Independent Requirement i.e. Forecast
BAPI_POSRVAPS_GETLIST3 Procurement Order (Purchase Requisition / Stock Transfer Requisition)
BAPI_MOSRVAPS_GETLIST2 Planned / Production Order r
BAPI_SLSRVAPS_GETLIST2 Sales Order / Deliveries
BAPI_STSRVAPS_GETLIST2 Stocks
BAPI_LOCSRVAPS_GETLIST2 Locations
BAPI_PRDSRVAPS_GETLIST2 Products
BAPI_RSSRVAPS_GETLIST Resources
BAPI_TRLSRVAPS_GETLIST Transportation Lane
BAPI_PROCRELATION_GETLIST2 Procurement Relationship
And BADI
Short Description For Transaction
/SAPAPO/DM_PO_OP_DA2 BAdI: Change Opening Period and Calendar Product Overview, Product View, DS Planning Board, Interactive SDP
/SAPAPO/CDPS_SIMCTRL PP/DS Heuristic: Save/Merge/Delete Own Data Product Overview, Product View, DS Planning Board
/SAPAPO/PPT_TREE_COL Additional Columns in Navigation Tree Product Overview, Product View
/SAPAPO/RRP_SRC_EXIT BAdI for Selecting Source of Supply, Creating Planned Orders Product Overview, Product View
/SAPAPO/CULLRTOEXPL Enhancement for PP/DS PDS Explosion Product Overview
/SAPAPO/POV_COL POV: BADI for Columns Product Overview
/SAPAPO/RRP_COVPARAM Time Parameters for Receipts in the Days' Supply Calculation Product Overview, Product View
/SAPAPO/RRP_IO_COL User-Exit for Enhancement of the Order View Product View
/SAPAPO/CDPS_FT Configuration of Interface for Error-Tolerant Scheduler DS Planning Board
/SAPAPO/PRODU_CONVEX Product Number Conversion DS Planning Board, Interactive SDP
/SAPAPO/PROD_DEPOBJ Product Usages (Deletion Blocks) DS Planning Board, Interactive SDP
/SAPAPO/CDPS_RC_CDAT Change Curve Data for the Resource Utilization Chart DS Planning Board
/SAPAPO/CDPS_MC_CDAT Change to Curve Data for Product Stock Chart DS Planning Board
/SAPAPO/SDP_INTERACT SDP: Interactive Planning Interactive S&D Planning
/SAPAPO/SDP_COLWIDTH Planning Period Column Width Default Interactive S&D Planning
/SAPAPO/SDP_SELECTOR User Exits for SDP Selector Interactive S&D Planning
/SAPAPO/SDP_SAVE Data Save Operation Check Interactive S&D Planning
/SAPAPO/ADVX Use this BADI for complex calculations in Planning book DP/SNP Macro Builder
/SAPAPO/CURTO_CREATE, /SAPAP/CURTO_SNP PPDS and SNP PDS Creation
Regards,
MJ -
Function ROUND() in Macros with APO 4.0
Hi,
We are facing problems with using the Round Function in SNP Macros.
As per SAP Documentation, ROUND( X ; Y ) rounds X to Y decimal places. The arguments can be numbers that you enter in Operator/function dialog boxes, as well as cell(s), row(s) or column(s) from the planning table or the auxiliary table.
- Round Function is taking the constants as Argument X and giving the required output.
- However, it doesnot give any results when used with Auxillary KF/KF given as Argument X. During the macro design, no error is provided. In the Planning Book on execution, It gives a dump with message - Unable to interpret "KF Name" as a number.
In case anyone has worked with the function, inputs would be greatly appreciated and suitable awarded
Thanks and Regards,
regards,
SudhirIn the first place, can you explain why you need the function through a macro when it can be done in dataview configuration. IN the transaction /SAPAPO/SDP8B, you can always enter the data view and click on edit and then right click on the auxilary KF to setup the decimal precision required. I am not sure if you are trying to achieve the same functionality through a macro.
-
Hi,
Is there any method in APO of smoothing out a
supply plan similar to the range of coverage profile in R/3.
What we would like is that:
APO looks out say 100 days in the future.
Adds all demand.
Divides by 100 to get an average daily demand.
Creates a supply plan based on this average.
Thanks,
LHi Liam.
I believe that you could acheive this in SNP with the use of macros manipulating the target stock level key figure.
You could include a TS key figure to capture average daily demand and include it how you require in the calculation of the target stock level.
Under normal conditions, Heuristic run aims to reach the target stock level in each bucket.
Haven't tried it, but would suggest caution when moving away from standard SNP macros and lots and lots of testing.
Hope this helps.
M -
Dynamic safety stock in PP/DS
Hello,
My question is about how PP/DS uses dynamic safety stock. I use safety stock keyfigure in SNP to calculate dynamic safety stock and make it available for PP/DS. When I run planning heuristic in PP/DS, does heuristic go and execute the macro?
Let me give an example case.
A is header, B is component of A. When I make a full planning run in PP/DS, first A is planned, then using dependent demands from A, B is planned. While planning B, safety stock also must be calculated. Is this process an inteactive process between SNP and PP/DS? I mean, PP/DS creates planned orders for A, then dependent demand generated for B. When it comes to plan B, heuristic calls SNP and macros calculate SS and SS is used in PP/DS heuristic as requirement? Is the process like that? or Do i have to run SNP either online or bacgrounf first, calculate SS there, and then run PP/DS heuristic?
Thanks,
ESomnath, Harish;
Thanks for your help. I read all these notes and threads. But I could not find the answer to my question.
First of all, I am using SS method MB. not an extended safety stock method.
I want to implement the same SS calculation as in R/3 coverage profile. In coverage profile, average daily requirement is calculated using X weeks of demand, and Y days of SS is calculated. I want to do the same calculation in APO.
We are using PP/DS for short term planning. Here my question is in which way SS is calculated while running planing heuristic in PP/DS. I listed 2 possible ways, can you please tell which way PP/DS work?
1) PP/DS will run for the example BOM structure I gave before. So, in this example, I need to run planning for header material first in order to find dependent demand for component. Then I need to make planning for component. If I calculate SS in SNP before starting to run PP/DS for header material, SS for component is calculated in SNP using the demand calculated before PP/DS planning run. Is this how dynamic SS works?
2) or when I run planning for component, does PP heuristic call SNP macro and calculates SS with the most updated demand situation?
Thanks,
Ergul -
Forecast Doubling at Month End
Has anybody run across the anomoly where when a month ends and a new month begins in the same week and the forecast numbers double?
Thanks
PaulHi Paul,
You could try out the following in your quality system to try to find out exactly where you have the issue (if not done already):
1) Delete the forecast for one product (or few products) using /sapapo/md74 for all time periods for which you release the forecast from DP to SNP
2) Modify the variant of the job that you use to release the forecast to include only the product (or products) for which you deleted the forecast above (leave all other selection criteria as they are)
3) Run ONLY the forecast release job. It would now release teh forecast only for your selected products.
Now check the forecast data for the above selected products in SNP planning view:
a) If data has not doubled yet in SNP, that would mean that some SNP macro which runs later in a job must be causing the doubling. Focus on the SNP jobs that run after the release, and try to identify the macro.
b) If the data is having this doubling issue already, then try to come out of the SNP planning book. You would see either of the following behaviour:
b1) If system asks you for a save that means that some default macro has run when you entered the planning view, and it's trying to save the data when you exit the view. You can then focus on the default & entry kind of macros available in your planning view.
OR
b2) If system didn't ask you to save, that means data had already changed during release. Then you could focus on enhancements used in release or possible SAP bugs.
Hope this shoudl help.
Thanks - Pawan -
Setting up SNP with ECC at a macro level
Hello experts
What are the different scenarios that can be set up with SNP - ECC - SNP with respect to Distribution planning ?
Meaning stock transfers , assuming PPDS will be active and will only be used for creating PPDS planned orders.
We have 10 plants and 34 DC's and regional DC's.
Thank you.
Regards
KKHI KK
This is more an architecture question that has to be addressed at macro level.
Assuming your demand is coming from DP or somewhere outside, a SNP run either SNP Heuristics or CTM or optimizer could be setup to move that demand from DCs to Plants. Then you run the planing runs at each plant in PPDS producing planned orders in short term and SNP run for medium to long term. If you have external procurement, the system creates purchase reqs.
If your plants are sourcing your DCs and then to regional DCs, you may want to run this in 3 stages, first SNP from regional DC to DC, then DC to plant and finally at Plant.
At one of our projects, we separated the SNP runs into Heuristic( where these is no capacity issue) and some into CTM ( where there are more constraints).
Based on the scenario, you may choose to integrate these planed orders, purchase reqs. from SNP/PPDS to ECC and execute there.
You may also run a deployment run from the plants to DCs and not integrate these deployment reqs. with ECC ( as you would not execute them yet), then finally convert these deployment reqs. into STOs/POs and then push these to ECC for execution.
There are infact so many possibilities based your business need. You may take above as a frame work. Hope this helps. -
Issue in BAPI- BAPI_PBSRVAPS_GETDETAIL2 with custom default macro in SNP
Hi Experts,
System Details:
SCM 5.0
SP Pack: 13
SNP PA1- No Time series Key figures, only order series
SNP PA3: With time series KF, which also included dynamic safety stock time series KFs
We have created custom macro ZGSCM_SAFETY_STOCK copy
of /SAPAPO/SAFETY_CALC where we used BAPI- BAPI_PBSRVAPS_GETDETAIL2 to
get the dynamic safety stock values from PA3(Planning area3-Planning book3) to PA1(Planning area1-Planning book1). We are getting two issues while doing this as below:
1) Issue we are facing is that when it goes to PA3, it actually save
PA3 planning book for that user as a active planning book and return
back with PA3-planning book. So to avoid this, we call same BAPI again
where we are just calling PA1 planning book without any selection and It works fine and returns
the safety stock values correctly. But now when we load multiple items and
doing the drill down then we are getting an error message saying:
Error reading planning objects (No SNP master data table found)
Error reading data - Planning book cannot be processed further
Do we have any other way to set the active session for user after BAPI call with in the program?
2) Also it always call default macros when BAPI calls which we don't
want, Is there any way we can avoid calling default macros while calling BAPI-BAPI_PBSRVAPS_GETDETAIL2
Regards,
HiteshHi,
The first issue which you faced is becasue of the BAPI which tries to access all the Key Figurs of the data view from which you need to copy data. These KF might be used in different Macros & those macro's might be running for different periodicities.
You can create separate data view the the same planning book & assign the KF to the newly created data view. Most probably, this will solve your problem & you wont get any error message.
Incase the error message pops up, you need to create diffent planning book or planning area (based on your previous PA) & then try. This will definately solve problem which u had faced.
Thanks!
Jay -
SNP - Descriptive characteristics in Macro
Hello,
we are using descriptove characteristics in SNP to make the customer information from DP available with the forecast.
Does anyone of you know whether there is any macro function that can be used to read the value of the descriptive characteristic?
Thanks and regards,
Ankeyou can use characteristics to write forecast on customer number and to consume the forecast from r/3 sales orders on characteritic customer number
-
Hi,
Can somebody refer me the commonly used macros in SNP?
Thank you.hi visu
are you talking about the macros in addition to the ones in the standard SNP book?
i normally create the macros if there is a business requirement
some that come up are
to mark holidays with a different color or
to have months with a different number of working days colored differently or
to change the logic of the days of supply
to do some calculations based on the location/ material or to pop up messages -
User defined macro in SNP PB abends
Hello
We ahve a simple macro to clear a key figure value in the initial column. Macro works fine in Interactive planning. Maco abends with the error "Assertion Failed", when we run in the background.. Any pointers / help would be appreciated.
RaghuI have seen this assertion failed error specifically with alert macros. We had the problem because we used to run 12 alert macros in parallel. Then we put in a performance intensive alert macro - that is 13 alert macros in parallel and we started getting the assertion failed error. We then removed the performance intensive macro and started running it separately and it solved the issue. Run the macro and ask your basis team and dba's to monitor the utitlization of memory and see if the macro is failing because of performance reasons
Thanks
Aparna -
APO - SNP Alert Macros running too slow
Hi,
We have created alert macros which run for next 27 weeks for 38000 Product-Location Combinations. They are running too slow.
We are deleting alerts externally using program /sapapo/amon_reorg and then running this macro with "ADD" . This macro slows down once it starts filling up alert table with 100,000 records. What are the best practices for writing the macro so that it runs fast ?.
Thanks.Is it necessary to write all the alerts? What I mean is, do you filter the results when you view them through the Alert Monitor?
If your alert profile has a minimum threshold set for an alert type, then you can read this threshold in the macro and only write alerts that fall below the threshold.
e.g.
Step: Get Threshold Values : ( 1 Iterations :Initial;Initial )
Action Box: Get Threshold Value
LAYOUTVARIABLE_SET( 'Alert_Thresh' ;
ALERT_PROFILE_THRESH( SDP_ALERT_PROFILE' ; '4100' ; 'I' ) )
Where SDP_ALERT_PROFILE is the profile that contain sthe minimum threshold you want to use and 4100 is the alert type. The I is for information, can use either W for Warning or E for Error as well.
Then use the variable Alert_Thresh to check if your value falls below this, only then write the alert.
Regards
Ian
Maybe you are looking for
-
I was pushed into the sea with my iphone 5s in my back pocket, I got out and pulled my phone out of my back pocket and it turnt itself off. I went straight home and tried using a hair dryer but was unsucessful, put it in rice which also failed and i
-
Custom Realm using LDAP?
Hi, has anyone implemented a custom realm using LDAP? I was suprised to learn that ACLs are not supported in the LDAPRealm. Our corporate direction is to have a central LDAP security store - including ACLs. Unfortunately the LDAP server is MS SiteSer
-
FM Radio Presets Not saved if player is powered
I bought a new Zen Stone Plus GB and have found that the Preset FM Radio stations are deleted when the power is turned off. Please advise on the procedure to save the Preset Radio Stations permanently if possible.
-
Failover Cluster 2008 R2 - VM lose connectivity after live migration
Hello, I have a Failover Cluster with 3 server nodes running. I have 2 VMs running in one the the host without problems, but when I do a live migration of the VM to another host the VM lose network connectivity, for example if I leave a ping running,
-
MP-BGP and MPLS multipath load sharing
Hi, I am trying to PoC MPLS multi path load sharing by using per-PE-per-VRF RDs in the network. I have a simple lab setup with AS65000 which consists of SITE1 PE1&PE2 routers (10.250.0.101 and 10.250.0.102), route reflector RR in the middle (10.250.0