2014 Feb 13 11:05 AM
Dear
There are two functions which are 'ATP_CHECK_BASIS' in program 'SAPLATP3 ', and the other 'AVAILABILITY_CHECK_CONTROLLER' in program 'SAPLATPC'; If i set break-point for either of them, the program will stop when i create sales order or delivery note through VA01 or VL01N. I want to know the logic relevance behind those two functions or two programs. Why does sap check both of them when process creating orders? anyone could give me some explaination?
I did do some debugs, however still couldnt find single clue. thanks!
T.P
best regards
2014 Feb 13 11:25 AM
There are many functions called during the ATP check. Some of them are:
- AVAILABILITY_CHECK_CONTROLLER
- AVAILABILITY_CHECK_SERVER
- AVAILABILITY_CHECK_EXECUTE
- AVAILABILITY_CHECK
- STOCK_RECEIPT_ISSUE_READ
- ATP_CHECK_BASIS
They are all involved in executing the ATP check. For example, AVAILABILITY_CHECK_CONTROLLER is used to call function AVAILABILITY_CHECK with the appropriate parameters (e.g. in VL01n, P_ATPCSX-PRREG = "B" but in VA01, it = "A").
Function STOCK_RECEIPT_ISSUE_READ is used to collect all the stocks, receipts & requirements into internal tables that can later be used by ATP_CHECK_BASIS to calculate the actual available stock. Function AVAILABILITY_CHECK is used to check your scope of check settings. AVAILABILITY_CHECK_EXECUTE is used to set locks etc. All these functions are pretty much inter-connected and together allow the system to execute the availability check. It is not logical to compare FM AVAILABILITY_CHECK_CONTROLLER with ATP_CHECK_BASIS
2014 Feb 13 11:25 AM
There are many functions called during the ATP check. Some of them are:
- AVAILABILITY_CHECK_CONTROLLER
- AVAILABILITY_CHECK_SERVER
- AVAILABILITY_CHECK_EXECUTE
- AVAILABILITY_CHECK
- STOCK_RECEIPT_ISSUE_READ
- ATP_CHECK_BASIS
They are all involved in executing the ATP check. For example, AVAILABILITY_CHECK_CONTROLLER is used to call function AVAILABILITY_CHECK with the appropriate parameters (e.g. in VL01n, P_ATPCSX-PRREG = "B" but in VA01, it = "A").
Function STOCK_RECEIPT_ISSUE_READ is used to collect all the stocks, receipts & requirements into internal tables that can later be used by ATP_CHECK_BASIS to calculate the actual available stock. Function AVAILABILITY_CHECK is used to check your scope of check settings. AVAILABILITY_CHECK_EXECUTE is used to set locks etc. All these functions are pretty much inter-connected and together allow the system to execute the availability check. It is not logical to compare FM AVAILABILITY_CHECK_CONTROLLER with ATP_CHECK_BASIS
2014 Feb 14 6:25 AM
Thanks Noel. Your response helps me get clear picture of those inter-connected functions.
2014 Feb 14 9:36 AM
Hi Peng,
Just one other point. FM AVAILABILITY_CHECK_CONTROLLER can almost be considered an interface between the calling application and the availability check. Therefore, if you were to call an availability check in your own coding, you should call AVAILABILITY_CHECK_CONTROLLER - this will then go on to call all the other relevant functions. It would usually not make sense to call ATP_CHECK_BASIS by itself for example; this should be triggered by a call to AVAILABILITY_CHECK_CONTROLLER.
2014 Feb 13 11:26 AM
Hi Peng,
When you are in debbug mode, you can check the process in the STANDARD tabscript. It might help you to find a clue.
Best regards
2014 Feb 14 6:22 AM
Hi
Thanks for the reply. I just want to confirm on this. Does the 'stack level 1,2,3,,,,,,14,,' show how the function module get triggerred from? Or put it another way to say: is it like a path which shows us how this function module comes from?
see the snapshot on debug mode:
Best Regards
T.P
2014 Feb 14 11:31 AM
Hi,
In your case, your FM is called in the FORM that is in the 13. Here you can see the steps(FM, FORMs, etc) that an execution follows.
Best regards