cancel
Showing results for 
Search instead for 
Did you mean: 

Route and Order enhancements

former_member1257031
Participant
0 Kudos

Hi ,

I have a scenario , where PO is creating a SO and depending on Plants(Updated in the text tab of SO ) the route is getting updated in the Sales Order (Screenshot). Now if the Plant is D764 , the route is SGINOA . Now this route is getting populated via some exits . How do I check the same , how its getting updated/ or the background code of it  ?

Thanks

MM_sD

Accepted Solutions (1)

Accepted Solutions (1)

former_member223981
Active Contributor
0 Kudos

Route in sales orders is usually determined by function SD_ROUTE_DETERMINATION. This function makes a call to a user exit and a badi. These can be used to altering the standard route determination. They are called here in function SD_ROUTE_DETERMINATION:

**************************************************

* Customer route determination ***********************************


  sy-subrc = 0.


  CALL CUSTOMER-FUNCTION '001'


     EXPORTING


          i_vbak              = i_vbak


          i_vbap              = i_vbap


          i_likp              = i_likp


          i_vbkd              = i_vbkd


     IMPORTING


          e_route             = e_route


     TABLES


          c_prot              = c_prot


          i_vbpa              = lt_vbpa


          i_lips              = i_lips            "<<< insert HP_203549


     CHANGING


          c_aland             = i_aland


          c_azone             = i_azone


          c_lland             = i_lland


          c_lzone             = i_lzone


          c_vsbed             = i_vsbed


          c_tragr             = i_tragr


          c_grulg             = i_grulg


          c_flag_gen_vt       = i_flag_gen_vt


          c_flag_gen_grulg    = i_flag_gen_grulg


          c_flag_incr_grulg   = i_flag_incr_grulg


     EXCEPTIONS


          no_route_found         = 1


          continue_with_standard = 2


          OTHERS                 = 3.

*****************************************************************

That is user exit EXIT_SAPL0VRF_001. The following is the call to the BADI:

*****************************************************************

IF NOT lr_badi_sd_route IS INITIAL.                         "n_640691


    CALL METHOD lr_badi_sd_route->route_determination


      EXPORTING


        is_vbak                = i_vbak


        is_vbkd                = i_vbkd


        is_vbap                = i_vbap


        is_likp                = i_likp


        it_vbpa                = lt_vbpa[]


        it_lips                = i_lips[]


      IMPORTING


        ev_route               = e_route


      CHANGING


        cv_aland               = i_aland


        cv_azone               = i_azone


        cv_lland               = i_lland


        cv_lzone               = i_lzone


        cv_vsbed               = i_vsbed


        cv_tragr               = i_tragr


        cv_grulg               = i_grulg


        cv_flag_gen_vt         = i_flag_gen_vt


        cv_flag_gen_grulg      = i_flag_gen_grulg


        cv_flag_incr_grulg     = i_flag_incr_grulg


        ct_prot                = c_prot[]


      EXCEPTIONS


        no_route_found         = 1


        continue_with_standard = 2


        OTHERS                 = 3.



    CASE sy-subrc.

******************************************************************************

So maybe there is code maintained in one of these places.

Answers (1)

Answers (1)

moazzam_ali
Active Contributor
0 Kudos

Hi

Did you check MV45AFZZ program? Check this program in SE38 and see if there is some enhancement implemented in this program.

Thank$

former_member1257031
Participant
0 Kudos

Hi ,

I am trying to check the MV45AFZZ bt for that there are 3-4 Modules for Route , I tried to put Brk-pts in all of them and then tried for debugging the Order . However the debugger didnt stopped in any of them .

Can anyone help me to guide how to find the exact code in exact exits by debug .

Thanks

moazzam_ali
Active Contributor
0 Kudos


Hi

What is that code about? Is that custom code for determining route?

Thank$