Showing posts with label VA01. Show all posts
Showing posts with label VA01. Show all posts

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???

Thursday, February 11, 2010

SAP ECC6.0 : Auto Create SO (with ref Invoice)

A month more ago, I had undertook an assignment to modify a 3rd Party Commission report to be more dynamic and with the help of a functional along the way. That 3rd Party Commission had originally one type of reporting layout only. With the latest change, it has 4 types of reporting layout. One being able to automatic create Sales Order with reference to Invoice. The other 3 types of reporting will be just reporting only.  

What is more important in this entry that I had finally managed to full this assignment is the overall dynamics of automatic create Sales Order (SO) with reference to invoice. In order for this automatic creation of SO to work it requires a few implementation of User Exit, 2 routines (VOFM) and one customized table to control copy to procedure. The reason behind this requirement ie SO created with reference to Invoice must overwrite the Distribution Channel (VTWEG) checking in VA01; during the creation, SOLD-TO partner must be overwrite; line items in SO will be overwrite, MATNR, ARKTX and PSTYV (item category); and clearing the batch.
Therefore, the 3rd Party Commission report having the automatic SO creation is just a catalyst to fire-up a string of events in the process. The 3rd Party Commission's BDC just enter selected data in first screen, copy with reference is clicked, select first line item, and then clicked the save button. As I'd wrote 3rd Party Commission is just a catalyst so we will proceed to deeper discussion on the User Exits and Routines that will further fulfill this requirement.

Customize Table for copy-to-procedure control
Fields to consider control are VKORG, VTWEG, SPART, KUNNR, ICTP, MATNR, PSTYV, FKARV, and AUARN. Take special consideration on ICTP, IC meaning 2000 inter-company customers and TP meaning 1000 3rd party.

Routine : (VOFM-Copying Req-Orders)
In this part, I need to copy requirement Orders, routine 021, to modify the Distribution Channel (VTWEG) checking. Per standard, if SO being created with reference to Invoice have conflicting of VTWEG, it will display an error message. Therefore, routine 21 will be copied over and make the required changes to cater for Distribution Channel (VTWEG) checking. For a start, the customized table will be query against the VBRK's VKORG, VTWEG and SPART.

Routine : (VOFM-Data Transfer-Orders)
In this part, I need to copy requirement Orders, routine 003, to modify and update SOLD TO partners. As partners being copied SOLD TO, the SHIP TO and the rest will be deleted. Therefore, this routine is to control copying of partners of SO. Condition checking is similar Copying requirements of Orders.

User Exit : MV45AFZZ
1. USEREXIT_MOVE_FIELD_TO_VBAK
The purpose of this user exit is to update Distribution Channel (VTWEG) and update line item's Item Category (PSTYV). During this process, I looped XVBAP so its' line item's item category can be updated. However, there's one consideration to this point, customized table's KUNNR need to be check against KNA1 so to further validate ICTP field and KNA1's KTOKD. For example, if customized table's ICTP field is 'IC' and KNA1's KTOKD is '2000' meaning, PSTYV and VTWEG can be updated.

The above condition I wrote is only validated if VBAK-AUART and VVBRK-FKART matches customized tables' AUARN and FKARV. More important, I found out that for all this updates to be activated, there's this field called SVBAK-TABIX must be updated with a value '1'.

2. USEREXIT_MOVE_FIELD_TO_VBAP
The purpose of this user exit is to update MATNR, ARKTX, KWMENG, ZMENG, FKIMG, VTWEG_AUFT, and update item's position if Invoice is batch-split, and clear CHARG.

Condition for this user exit is similarly to USEREXIT_MOVE_FIELD_TO_VBAK.

There you have it, an automatic creation of SO with extra conditions in the background process. This implementation requires thorough understanding of SO creation. This is just one big part of the development.

You will need help from an SD functional who knows the whole concept of this implementation because there is a need to configure certain items especially allocation of certain item category that can be only use in this application. Therefore, functional and developer should work close with each other.

williamwilstroth... Invoice to SO in automation