Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

VT01N user exit

Former Member
0 Likes
1,452

Hello expert ABAPERS,

I have a requirement as follow:

- when user creates/changes a shipment document via VT01N/VT02N, I want to check to make sure all the criterias are met before user can click on the SHIPMENT START button. (I want to check if there is a shipment cost document before they can start a shipment to PGI the goods)

If the criterias are not met, I want to prevent the post goods issuing (as a result of clicking on the shipment start button) from happening and I want to uncheck this shipment start button.

I used exit EXIT_SAPLV56U_004, but I can't stop the PGI as it already happened and I can't uncheck the shipment start button.

Could you please guide me on how to handle this?

Thank you,

Jen

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,140

Try BADI : "BADI_LE_SHIPMENT". You will get tons of matierial for this badi in this forum if you search.

Try BADI : "BADI_LE_SHIPMENT". You will get tons of matierial for this badi in this forum if you search.

4 REPLIES 4
Read only

Former Member
0 Likes
1,141

Try BADI : "BADI_LE_SHIPMENT". You will get tons of matierial for this badi in this forum if you search.

Read only

0 Likes
1,140

Hi Shekha,

Thanks for directing me to this BADI. I've searched on this topic and looks like this is what I need. My problem is I don't know which transaction to get to V56FSTAT. I tried SE37, SE38, and CMOD without any luck. Could you kindly walk me thru this?

V56FSTAT Shipment processing: Activities when setting a status

V56SLDET Shipment processing: Leg determination

V56LOCID Shipment Processing: Determine Location Identification

V56L0001 Status of Shipments for a Delivery

Read only

0 Likes
1,140

I am not too sure about the direction you are going. if you want to implement one of the methods in the shipment badi, you have to go to se18/se19 and enter the badi name.

For V56FSTAT which is not related to the BADI you can go to SMOD and check the details.

Read only

0 Likes
1,140

Muchas thanks again.

I'm almost there. I digged into it and found either EXIT_SAPLV56U_004 or EXIT_SAPMV56A_001 that could do what I need. I could do some validation here before allowing the users saving the document. If the validation doesn't pass, I want to prevent them from checking the shipment start button (i_xvttk_wa-sttrg = 6) (In VT01N, there are several status buttons, and the one I want to focus on is button #6 which will post goods issue the delivery)

How do I uncheck the button?

Thanks so much for your help.

IF i_xvttk_wa-sttrg = 6.

CASE i_xvttk_wa-shtyp.

WHEN sto_rail.

CLEAR ship_cost.

SELECT fknum FROM vfkp

INTO ship_cost WHERE rebel = i_xvttk_wa-tknum.

ENDSELECT.

IF sy-subrc NE 0.

*I want to do the following:*

*- UNCHECK THE BUTTON*

*- REVERSE THE PGI if the PGI did happen*

*- SAVE the document.*

ENDIF.