on 06-24-2016 9:36 AM
Hi Gurus,
I need help for a solution to perform availability check in sales orders without explicitly going to VA02 (avoiding va02 as using Va02 triggers the SO approval workflow).
I am aware of V_V2 but V_v2 has and issue that it is run for a plant/material combination which includes all orders for these. I need to perform availability check for a specific SO (all line items).
So I would be thinking of creating a Z T-Code where I can call any FM or BAPI to impact/change the SO. My Workflow can be prevented since the T-Code will not be VA02 (background change is acceptable).
Please help if there is any standard method for this or if my idea is the correct choice, then please help with FM/BAPI for the same.
You can Check Availability using V_V1 for Specific sales order.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sachin,
You can check Function module
Sales Order: Simulate Sales Order
This method has the same interface definition as the BAPI_SALESORDER_CREATEFROMDAT1 function but differs from it in that here the sales order is not updated.
Here you can determine availability and pricing. This data is displayed in the ORDER_ITEMS_OUT table.
Hope this helps.
Thank,
NRS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
"So I would be thinking of creating a Z T-Code where I can call any FM or BAPI to impact/change the SO. My Workflow can be prevented since the T-Code will not be VA02 (background change is acceptable)."
You are thinking along the correct lines in my opinion. See note 549064, Q2. This note explains why it was not possible to include every selection field for the V_V2 program. You could just enhance it with the selection of the VBELN.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use below FM to perform Availability check for the material and plant
CALL FUNCTION 'AVAILABILITY_CHECK_CONTROLLER'
TABLES
p_atpcsx = li_atpcs
p_atpfieldx = li_atpfield
p_atpmatx = li_atpmatx
p_mdvex = li_mdvex
p_tmvfx = li_tmvfx
CHANGING
p_atpca = k_atpca
EXCEPTIONS
error = 1
OTHERS = 2.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If the result of ATP check means more products will be delivered, does it not make sense to have somebody review the order again?
I am not a workflow expert, but it is not a must to have workflow start conditions bound to a TCODE.
No idea what your workflow does exactly, but considering that you can perform changes to sales documents also from other transactions (change materials, delivering plant, repricing from VA05, plenty of stuff with MASS), there is definitely a way to abuse your design.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This does not look very promising. At the very least, think about calling function AVAILABILITY_CHECK which initiates the handling of availability check, but bear in mind that populating all the parameters needed for this function will become a real burden.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
6 | |
3 | |
3 | |
3 | |
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.