cancel
Showing results for 
Search instead for 
Did you mean: 

USEREXIT_AVAILABILITY_OUT active only for order processing

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member223981
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

Hey Noel:

Sorry for later reply .

We tried EXIT_SAPLATPC_002, qty is changed qty in user exit, but would be changed back afterwards.

As we r in urgent fixing, we use USEREXIT_AVAILABILITY_OUT instead.

Anyway, thanks.

Answers (1)

Answers (1)

Lakshmipathi
Active Contributor
0 Kudos

 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