cancel
Showing results for 
Search instead for 
Did you mean: 

Setting up mandatory field in VT01N

Former Member
0 Kudos

Hi,Can any one please tell me how to make Shipment Route field mandatory in VT01N.

Thanks,

Prabhu.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Dear Prabhu,

in shipment the route automatically comes from the delivery once you check planning.

other wise you need to use the BADI:BADI_LE_SHIPMENT

this will resolve you issue.

Regards,

Abdul Rahim

Former Member
0 Kudos

Thanks a lot for your answer abdul.helpful

Regards,

Prabhu.

Answers (3)

Answers (3)

Former Member
0 Kudos

Dear prabhu,

please use the fallowing code:


METHOD if_ex_badi_le_shipment~at_save.

   DATA: l_data   TYPE cxshipment,          " Entire Data Structure

         t_vttk   TYPE vttkvb_tab,          " Table to Store Shipment Header Data

         wa_vttk  TYPE LINE OF vttkvb_tab" Work Area for Shipment Header Data

         t_vtrlk  TYPE vtrlk_tab,           " Table to Store Delivery Header Data

         wa_vtrlk TYPE LINE OF vtrlk_tab.   " Work Area for Delivery Header Data

   DATA: l_text1 TYPE string,

         l_text2 TYPE string,

         l_text3 TYPE string,

         l_text4 TYPE string.

   CLEAR: l_data.

   l_data = im_shipments_at_save.           " Available Data Structure

   t_vttk[]  = l_data-new_vttk[].           " Get Shipment Details

   t_vtrlk[] = l_data-new_vtrlk[].          " Get List of deliveries used to create the shipment

* Only One shipment is created - hence always check Index 1

   CLEAR: wa_vttk.

   READ TABLE t_vttk INTO wa_vttk INDEX 1.

   IF sy-subrc IS INITIAL.

 

*   Issue Error Message if Route  is not maintained

       IF wa_vttk-route IS INITIAL.

         CLEAR: l_text1.

         l_text1 = 'Please Maintain Forwarding Agent'.

         MESSAGE e000(zsd) WITH l_text1

                   DISPLAY LIKE 'I' .

       ENDIF.

Former Member
0 Kudos

Hi Prabhu,

you can use a user exit to check if shipment route is filled in your shipment according to the status.

You have to create this enhancement via CMOD.  Try enhancement V56FSTAT, exit EXIT_SAPLV56F_011 and add your coding in the include ZXV56U16 using i_status (value 1 planned, 2 registered and so on) field. Ask for the help of an abaper.

Regards,

JM

rahul_vishwakarma2
Contributor
0 Kudos

Hi Friend,

   You can use incomplete log also for the same as follow : On Transportation Setting IMG

   SPRO > Transportation > Shipments > Define and Assign Activity Profiles

  Hope this will also help you to get the solution.

Regards,

Kundan

Former Member
0 Kudos

Hi Kundan,

can you please explain me in detail.

Regards,

Prabhu.