Skip to Content
author's profile photo Former Member
Former Member

Simulate order routing like tcode CU50

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Dec 14, 2015 at 08:12 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 13, 2015 at 04:48 PM
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 14, 2015 at 07:14 AM

    you can try BAPI - BAPI_SALESORDER_SIMULATE

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.