Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

debug on atp check functions

peng_tang
Participant
0 Kudos

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

1 ACCEPTED SOLUTION

former_member223981
Active Contributor
0 Kudos

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

6 REPLIES 6

former_member223981
Active Contributor
0 Kudos

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

0 Kudos

Thanks Noel. Your response helps me get clear picture of those inter-connected functions.

0 Kudos

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.

adrian_mejido
Contributor
0 Kudos

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

0 Kudos

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

0 Kudos

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