on 10-21-2013 10:16 AM
Hey Guys,
I'm working on special requirement to manipulate ATP result in order processing only .
In this SAP recommended user exit, I dont find any good fields to limit my coding to order processing , means the coding apply to delivery processing as well. mverf_pos contains sales order only .
Any suggestion ? Pls ...
Thanks.
Karen
There are 2 exits that you can use to manipulate ATP after ATP is called. They are:
1) USEREXIT_AVAILABILITY_OUT which you have already found
2) EXIT_SAPLATPC_002
EXIT_SAPLATPC_002 is called here:
Function module AVAILABILITY_CHECK_CONTROLLER
*******************************************************
* User-Exit after check
IF P_ATPCA-FORCE_R3 IS INITIAL.
CALL CUSTOMER-FUNCTION '002'
TABLES
T_ATPCSX = L_ATPCSX_R3
T_MDVEX = L_MDVEX_R3
CHANGING
P_ATPCC = P_ATPCC.
ELSE.
CALL CUSTOMER-FUNCTION '002'
TABLES
T_ATPCSX = P_ATPCSX
T_MDVEX = P_MDVEX
CHANGING
P_ATPCC = P_ATPCC.
ENDIF.
*****************************************
P_MDVEX contains the ATP result (returned from AVAILABILITY_CHECK).
P_MDVEX-MNG02 contains the confirmed quantity.
In the ATPCSX structure, you will have the PRREG field. This always contains "A" for sales orders, and always contains a "B" for deliveries. Therefore, you could have a logic something akin to this:
If T_ATPCSX-PRREG CA (contains) A.
[Do whatever you want with Sales Orders]
P_MDVEX-MNG02 = [Whatever logic you want to implement]
If T_ATPCSX-PRREG CA (contains) B.
[Do whatever you want with Deliveries]
P_MDVEX-MNG02 = [Whatever logic you want to implement]
That would be one option of differentiating between ATP in sales orders and deliveries. This is also essentially how the standard system usually differentiates - Checking rule B is always used for deliveries, checking ule A is always used for sales orders.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I dont find any good fields to limit my coding to order processing
While technically, I cannot comment on the above, logically, if you say ATP, it would be applicable to sale order and delivery as well. Having said that, may be you can try with Function Module EXIT_SAPLATPC_001 or Enhancement SDTRM001, where you can restrict the coding to sale order only. Ideally, this should have been posted in ABAP forum
G. Lakshmipathi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.