Showing posts with label SAPMV45A. Show all posts
Showing posts with label SAPMV45A. Show all posts

Tuesday, January 22, 2013

SAP ECC6.0 : Consignment Issue Custom Schedule Dates Auto Update

Six months ago, I had the task to do a custom implementation on the consignment issue document that it could automatically update the line item's schedule dates. Schedule dates like Goods Issue Date, Loading Date, Material Available Date and Transportation Plan Date. All these dates by requirement is to be updated according to Line Item's Delivery Date. The Delivery Date will determine all the Schedule Dates according to the Route's Transit Days. So to speak, we need to ensure that this change is only for consignment issue and no other document will be affected. 

Let's identified all those Schedule Dates that we need to modify or automatically update : 
  • VBEP-WADAT (Goods Issue Date)
  • VBEP-LDDAT  (Loading Date)
  • VBEP-MBDAT (Material Availability Date)
  • VBEP-TDDAT  (Transportation Date) 
Now, here's the challenge, how do I make sure the change takes place and it shows on Shipping Screen. There are two places of Shipping Screen that need to display the updated values. So, I identified two screens :
  • SAPMV45A - SCREEN 4552 (Line Item - Schedule Lines - Shipping Tab)
  • SAPMV45A - SCREEN 4921 (First Screen - Shipping Tab)
Modification for above screens requires 2 enhancement points and 1 user exit. 

1. SAPMV45A - SCREEN 4552 (Schedule Line - Shipping)
There will be one enhancement point here just to ensure the automatic calculation of those schedule dates are display at the screen. The enhancement point will be right after MODULE VBEP-EDATU_AUSGEBEN. That will be where the screen start to fill the schedule dates.

Inside the enhancement point, you should take into consideration of WORK DAYS and NON-WORK DAYS. The day, after Delivery Date minus Transit Days, falls on NON-WORK DAYS, then it should push back one day until it is a WORK DAY. 

In order to get the Transit Days, you need to query TVRO (SAP Table). The field that shows number of days is TRAZTD. This value is in hours and you will need to convert it to days. The function to do the conversion is 'CONVERSION_EXIT_TSTRG_OUTPUT'. 

After you have determine the number of Transit Days and WORK DAY/NON-WORK DAY, you will use the new date as your schedule dates. These schedule dates will be updated to XVBEP. 

2. SAPMV45A - SCREEN 4921 (Overview - TC - Shipping Default)
There is no modification here. The result is a result of calculation in MV45AFZZ. 

3. MV45AFZZ (User Exit)
The logic in SAPMV45A - SCREEN 4552 is applied here too. Same logic.

williamwilstroth... consignment issue, mv45afzz, tvro, traztd, route.

Tuesday, December 11, 2012

SCN RANT : My work and SCN is complicated to use!

The world's coming to an end. Serious? The Mayan calendar ended there meaning world ending on that day or their finance fiscal calendar ends on that period? :) Anyway, if SAP even existed that time, I guess they forget to maintain their factory calendar, SCAL, and let's hope we are able to celebrate 2012 Christmas. 

Working with ABAP has always been challenging since my training days (8 years ago!), no doubt about it. Early 2012, I had been focusing on modifying Sales Screens especially Shipping and line item's shipping tab. Based on shipment route (VBAP-ROUTE), to determine the Loading Date, Material Availability Date, Delivery Date, Goods Movement Date and few more dates. My solution to these fixes was modifying in program SAPMV45A at screen 4552 (PBO Module). You can do some manipulation to the screen value too. Okay, enough said and you can go along and play with it. 

On another hand, I have NOT used SDN since it, well, became SCN. I find it complicated and the original forum's topic has been moved and changed to somewhere unknown. Why did you guys, SAP, have to move it?? The original design was way much better to navigate and easier to find stuffs than the new one, duh! SCN just makes it complicated and the hopelessness hung there whenever you have to go to the guide to see where the ABAP forum has been changed to which page. The wholesome of using SDN as a forum is no longer as great as it used to be. Can the guys who are responsible for this SCN project give something better? I can neither ditch SCN nor ignore it because it is every SAP professionals life stream! Looking for ABAP resources was fun with the good old SDN until it became SCN... it is sucks, all the way...

Okay, enough ranting of SCN. Back to some of my current assignments which involve heavy modification of MV45AFZZ's routine (USEREXIT_SAVED_DOCUMENT) and IDOC outbound process (IDOC_OUTPUT_ORDRSP) was the longest enhancement of all projects. Not to say it is difficult but it requires the functional to spend hours of testing in order to get a thumbs up. The nature of the change was complex as it requires to listen to the slightest change in VA01 and VA02 screens e.g. change of order quantity, change of first date, or even change of header's info will trigger an IDOC Order Response. Of course, it is taken care now but the amount of energy and time spent in that room with two functionals to verify all the functionality is working and non original process is affected - is humungous!. Anyway, all is done and ended well. 

Now my next task is to determine why there is an error pop up when one line item gets firmed for consignment order. Talk about errors and bugs, Christmas is coming and I hope things goes well when I am not around. Merry Christmas to all readers who have come here to get some ideas and I thank you very much. Have a good Christmas and may the end of the world is just another merry day to you!


williamwilstroth... SCAL, IDOC, MV45AFZZ and end of world???