2008 Jul 09 11:58 PM
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
2008 Jul 10 1:48 AM
Try BADI : "BADI_LE_SHIPMENT". You will get tons of matierial for this badi in this forum if you search.
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
2008 Jul 10 1:48 AM
Try BADI : "BADI_LE_SHIPMENT". You will get tons of matierial for this badi in this forum if you search.
2008 Jul 10 4:02 PM
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
2008 Jul 10 4:16 PM
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.
2008 Jul 10 7:21 PM
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.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |