on 12-11-2015 9:58 PM
Hi Gurus
I have a requirement very special.
I need to simulate que order routing of a comercial document that has no yet created an production order. This simulation is perfectly recrated on transaction CU50, because it gives me the resulting routing based on the sales document configuration.
Now what I need, is a way to replicate/use the CU50 transaction on an abap program that retrieves the resulting simulation routing of several sales documents.
I don't know if this is posible via LSMW o FM o BAPIs
hope someone have a useful idea.
Hi Manuel,
please try with 'CP_EX_PLAN_READ':
CALL FUNCTION 'CP_EX_PLAN_READ'
EXPORTING
PLNNR_IMP = l_plnnr
PLNAL_IMP = l_plnal
STTAG_IMP = p_date
CUOBJ_IMP = i_vbap-cuobj
TABLES
PLAS_EXP = i_plas
PLFH_EXP = i_plfh
PLFL_EXP = i_plfl
PLPO_EXP = i_plpo
EXCEPTIONS
NOT_FOUND = 1
PLNAL_INITIAL = 2
OTHERS = 3.
I had a similar need in the past, and I was successful in reading the routing (mainly, tha data in the PLPO_EXP structure, with the above FM.
The trick is to enter the routing group and group counter (l_plnnr and l_plnal) that are the ones of the configurable material, while the configuration object is the one of the material used in the sales document item (inthe example above, it's coming from VBAP-CUOBJ).
I do hope this will help.
Thanks and bye,
Flavio
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you can try BAPI - BAPI_SALESORDER_SIMULATE
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check if below help,
https://scn.sap.com/thread/415100
Bapi Simulate sales order problem | SCN
Best Regards,
Ameya B.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
7 | |
6 | |
4 | |
4 | |
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.