User-Exit MV45AFZZ - userexit_move_field_to_vbkd
Hi All,
I have one requirement which i need to get department number, stored in table T023T and assigned to sales order item level.
The logic is based on material i am getting the material group and based on material group i am getting the department number which is maintained in the Description2 field of table T023T.
i written the above logic in form 'userexit_move_field_to_vbkd' and moved department number to VBKD-ABTNR. But i dont know why for some materials Department number is assigning wrong values and for some it is assigning correct value.
Please help me out is there any other place to move the data to department number while creating sales order.
Regards,
Siva.
HI Siva,
In this user MV45AFZZ, value are store in structure like,
Xvbkd- hold current values, Yvbkd contain old value.
like this yvbak, yvbak, Xvbep,yvbep,vbap,xvbap,yvbap.
try to change this internal structure value then it will populate.
Thanks,
Sendil
Similar Messages
-
Is the Sales Order Item User Status available in user exit MV45AFZZ
Hello,
Does anyone know if a sales order line item user status is available within user exit MV45AFZZ (USEREXIT_SAVE_DOCUMENT)?
I need to send an email when the status changes from one specific value to another specific value but I don't seem to have access to what the latest value is in this user exit.
I have found a table XTVSTAT which cntains some user status' but it's not clear which status maps to which line item.
If anyone has any suggestion please let me know.
Thanks,
RubyHi,
I do need to access the values as I need to check for a specific change to the user status from value A to value B.
I have already tried debugging the user exit and searching through the available variables but the status information doesn't seem to be available.
I guess I will have to try the output determination route. Can you explain this in a bit more detail please.
Thanks,
Ruby -
User exit MV45AFZZ - Unable to modify the code
Hi,
I am working in ECC 6.0 version and new to this editor.
I need to do some changes in include MV45AFZZ,when sales order is saved.
When i try to go to change mode,program is asking for 'Access key'.
Whether i need to get 'Access key' from SAP,or is there any procedure for doing code changes in this exit?
Please help.
Thanks & Regards,
Seshagiri.Hi Seshagiri,
To modify the User exit MV45AFZZ you need to get the Access Key from the Basis.
The Basis Team will Generate the Access Key so that you can make the changes .User exit MV45AFZZ is not yet Used so that why its asking the Access key.
Thanks & Regards,
Nelson
Reward points if helpfull -
Manually trigger Availability Check in the Sales Order User Exit MV45AFZZ
Hi All,
As per the normal scenario where sales orders are created and the schedule line delivery dates are determined.
Based on some business logic for few customers we need to change the delivery priority and confirmation delivery date.
We are implementing this logic in the user exit MV45AFZZ in the routine USER_EXIT_SAVE_DOCUMENT_PREPARE.
The availability check logic is already implemented by then. Now we have scenarios where the date redetermined by the custom logic is greater than the one determined by the standard availability check done by SAP.
We have changed the values of the field VBEP-EDATU as per our logic but we still have 2 lines in the schedule line data where the requested date is greater than the confirmed date.
This can be tackled if we can redo the Availability Check.
Can someone provide pointers on how can we trigger the availability check manually in the code.
Regards,
KarthikWhat was the solution?
-
User Exit Mv45afZZ for Promotional BOM
Hi All,
I am adding custom code to the user exit MV45AFZZ for Promotional BOM. The aim is to add a new entry in the Line tiems details with the BOM header data.
Say if the initial order is like this: It should like this after user exit execution:
Material Quantity Itm Ctg Material Quantity Itm Ctg
M1 10 X M3 1 Z
M1 10 X M1 10 X
M2 10 X
We assume that in the configuration, we have configured so, such that, BOM Item M3 comprises of Items (M2, M1) with 10 Qty each.
For this purpose, we are adding a new row to the XVBAP table at runtime. But, when we post the order, finally the quantity field for item M3 is automatically getting changed to 10.
Please help and revert back. Let me know if i have to clarify more on my doubt.
Thanks
DebabrataHi,
The userexit save_document_prepare will directly hit the tables like vbak and vbap. So, as i can see that you would like to change at the pricing conditions so it is better to user the user exit:userexit_pricing_prepare_tkomk...
All the pricing conditions will be stored in the tkomp and tkomk tables.
The changes can be happnd at this level also.
Thanks
rohith -
Global data declaration in user exit 'MV45AFZZ ' for VA01
Hi folks,
i am using USEREXIT_PRICING_PREPARE_TKOMP in MV45AFZZ for VA01 pricing modification.i need to declare one Global internal table for this exit.i tried to do this one in MV45ATZZ.but i can not save as it is asking access key.
how can i achieve this one?
ur answers will be rewarded.
Thanks
pabiHi Pabitra,
You can find the parent program and use an enhancement point to declare a global internal table mainly in the top include of the program
ed: if t-code ABC is executed then the program for the t-code ABC is your parent program...
Here SAPMV45A is your parent program for VA01
and in INCLUDE MV45ATOP.
use ENHANCEMENT-POINT MV45ATOP_02 SPOTS ES_SAPMV45A STATIC. to declare the global internal table
Once the table is declared,also check in the user exit by debugging if the table is made available..
i have done the above technique to use an internal table in userexit_save_document after declaring table in the mentioned enhancement point and it worked for me...
Pls check and revert
Reward if useful
Regards
Byju -
Which user exit MV45AFZZ or MV45AFZ1 or MV45AFZB to use.
Hi All,
In the Sales Order Types ZDRC and ZCRU, when Sales Org is US15, the field VBAP-MVGR1 shall be mandatory.
We need to use MV45AFZZ or MV45AFZ1 or MV45AFZB user exit.
In MV45AFZB, USEREXIT_CHECK_VBAP, seems closest, which is used to carry out additional checks (e.g. for completion) at item level.
Please suggest.
Thanks.Hi
Pl check this exit...this may be useful to meet the requirement
in program MV45AFZB
USEREXIT_CHECK_VBAK
This user exit can be used to carry out additional checks (e.g. for completion) in the document header. The system could, for example, check whether certain shipping conditions are allowed for a particular customer group.
Thanks,
Ravi -
Hi Gurus,
I have put logic in userexit "MV45AFZZ" , in FORM USEREXIT_SAVE_DOCUMENT_PREPARE .That is to change schedule line category based on "User Status" . If user status is u201CAPPR u201C schedule line category should automatic change to CP .
loop at XVBEP.
if RV45A-ASTTX = 'APPR'.
xVBEP-ETTYP = 'CP'.
xvbep-updkz = 'U'.
xvbep-BDART = '4'.
modify xvbep .
ENDIF.
endloop.
This is working fine, updating the value.
Now the problem is:
1. Whenever schedule line cat changes via user exit for sales orders and sales order saved, sales order is not showing in MD04 . if I will changed schedule line category manually CP . It is showing in MD04.
We have make to order scenario . so it is not coming for MRP run if I will changed through user exit.
Please help me out .
Thanks in advance .
Regards,
SubhashHi
Please, do a trace with ST05 and check if your system is updating table VBBE before this userexit. Other question, run report SDRQCR21 and check if it update MD04 (see Note 25444 - SDRQCR21: Recovery of sales and delivery requirements)
I hope this helps you
Regards
Eduardo -
Hello,
I have a requirment when the user changes the delivery date for a order a mail has to trigger to the sales people.
As of now I know the place to capture both the new and the old date. - FORM USEREXIT_SAVE_DOCUMENT.
My question is, is Email possible through the exit.
If it is, is it recommended, would it impact a lot on the performance of the exit.
any alternative ideas.
Let me know.
Thanks,
SterIt will not have any performance issue to give email functionality,hardly it takes 2 or 3 seconds to raise message.
Note : Use one include program within MV45AFZZ ,use email coding in that include.
Thanks
Seshu -
Urgent- Help abt User Exit MV45AFZZ
very good morning to all the SAP Masters out there....
I had already posted a thread regarding the same but didnt get helpful answers...
Hope I will get some this time...
It is Interesting actually...
I need ur help for solving an issue...
when Sales Order is Being created...the Purchase Requisition and Requisition item is generated in the Schedule Line of Sales order's Line Items
If I am not worng we are able to make changes in MV45AFZZ program for SalesOrder..
So My requirement is..
When Sales order is being created the value of KDMAT field of VBAP table should also be saved in EBAN-BEDNR...the length for BEDNR is 10 so it'll b taken care to limit VBAP-KDMAT with in 10 Chars...
help me to Carry XVBAP-KDMAT into EBAN-BEDNR for VA01 Transaction....
Points Rewrded for Helpful answersHi,
Why don't you try the exit
V45E0001
where the description says "Update Purchase Order from Sales Order"
Please find below the documentation for the exit
Update Purchase Order from Sales Order
With this customer exit the standard system behavior regarding updating order data from the sales order can be expanded or restricted.
The module is called up when the sales order is changed, as long as the conditions for changing the order have been filled. It transfers the document number, the purchase requisition number and a table for the fields to be changed in the order (T_PURCHASE_DATA). This can be expanded or restricted in the existing Customizing.
The rule is: To change a field with the name FIELDNAME, a subprogram (form routine) with the name POSITION_CHANGE_FIELDNAME must exist in the program SAPMM06E.
OR..in MV45AFZZ in userexit_save_document we need to write the code to manually update the table EBAN field by using abap code like modify table or seeking a BAPI..consider this as the last resort pls.....
Reward if it helps
Regards
Byju -
How to capture an address change for a sale order in user exit MV45AFZZ?
Hi ,
My requirement is to capture the address change in sale order .
I have to write the code in my own z-include in MV45AFZZ of SAPMV45A.
Here I have to use VBAP-KUNNR for PARVW = AG or WE. And ADDR1_DATA.
Could you please give me idea , how to capture the address change?
Thanks ,
Suresh.Farshid,
As I understand it it is the RCS software that replaces the $Revision$ with $Revision: 1.2$. Is that correct?
There are two things that you need to be aware of if this is the case.
First, the length of the text fields are saved as part of the SystemBuild model file. This means that when the revision control software replaces the tag the length is no longer correct, and SystemBuild will not be able to load the file correctly. You can still change the text as long as you make sure the the length of the tag stays the same. For example if the version number is a single digit decimal then single digit, then when you create the file you could store the revision as $Revision: x.x$. When the tag gets replaced by the revision control software you would get
$Revision: 1.2$ which is the same length.
Next you need to be aware of potential line breaks. When the SystemBuild model is saved as ASCII then line breaks are added at regular intervals, so the tag might be broken up on two lines. This could prevent the revision control software from recognizing the tag. To prevent this save the file as binary.
In short make sure that the text the revision control software adds is the same length as the text that it replaced and save the files as binary files.
Carl L
National Instruments
www.ni.com/matrixx -
Dear All
I have crated one validation for VBAK-VKBUR (Sales office) field in VA01. - MV45aFZZ
In FORM USEREXIT_FIELD_MODIFICATION. section, I put the validation.
On error message, it come out of the session,
However, i want to stay in the same session and focus on filed VKBUR.
my code as
if <Conditon>
MESSAGE 'error message here..!' TYPE 'E' DISPLAY LIKE 'S'.
endif.
I want the error message and control should stay on the same session.
Your input will be helpful to me
Regards,
VenkatHi,
You can try as below.
if <Conditon>
MESSAGE 'error message here..!' TYPE 'S' DISPLAY LIKE 'E'.
endif.
Regards
Gangadhar -
Sales order split line user exit MV45AFZZ
Hi Guys.
Requirement is to split the sales order line items into multiple based on certain requirement. I Started coding in MV45AFZZ (USerexit_Save_Document_Prepare). Basically what i am doing is looping at XVBAP and based on some condition inserting additional line in XVBAP and adding a new line with new UOM and incrementing the POSNR.). The data seems to be ok to me. But when i save i am getting update terminated error. Can anyone help me out ?
Thanks
Vikram.Hi,
Ary you using any 'COMMIT WORK' there?? If yes, that may cause this kind of error. Appending the records in XVBAP with mandatory fields should work. -
Hi Friends
how to write the User Exit for Payment terms at Item Level. Any Sample User Exits can help me if no exact User Exit Is there
User Exit Name : USEREXIT_MOVE_FIELD_TO_VBKD
Thanks in Advance.
Regards
sahitiHi Amrish.
thanks again.
Hear is the complete ticket which i got from the client.
1. User exit in Program MV45AFZZ
User Exit Name : USEREXIT_MOVE_FIELD_TO_VBKD.
create an include first - and then add the statements to that include..
this way when there is a patch or an upgrade - we need to only type the include statement and not the extire userexit.
2. External Table Specifications:
the table is client dependent
table name: zpaymentterm.
client(keyfield)-mandt
sales org(key)vkorg
sales Doc-(key)auart
material Grp-Matkl
cust:kunnr
Payment term (zterm) : ijput field in table maintenance
3. select from the ztable using vbak-vkorg/vbak-auart/vbap-matkl/vbak-kunnr is equal to zztable fields.
move corresponding zztable-zterm to vbkd-zterm.
4. Validations: if no entry found in ztable then payment term from the customer master should be copied in the document.
5. Create the maintenence view for the table and assigned with Transaction Code.
Thanks in advance.
Sahiti. -
Hi,
I've got a requirement in user exit MV45AFZZ where i need to update field VBKD-KDGRP when a plant is changed in VA01 or in VA02.I wrote a logic for creating the VBKD-KDGRP getting this from Z table based on the plant entered......and automating the field VBKD-KDGRP in the item level of Sales order.....in USEREXIT_MOVE_FIELD_TO_VBKD
Now my other requirement is like i need to update this VBKD-KDGRP when a plant is changed in VA02 without effecting the logic of automating the field VBKD-KDGRP while creation of sales order using VA01...Shall i need to change the logic in USEREXIT_MOVE_FIELD_TO_VBAP or in USEREXIT_FIELD_MODIFICATION.........and how....need you guys suggestionsThx for the quick response.......
I did tried using sy-tcode = 'VA02' but my question is how should i track the value of the plant which i change............suppose while creation a sales order if the plant is already configured for that material it will display automatically right........and my code does gives me the correct customer group based on the automated plant and displays correctly in its concern field VBKD-KDGRP( which i did it absouletly right in userexit_move_field_to_vbkd)
My worries are when i change the plant and press enter the value in VBKD-KDGRP should also be changed......this is not happing and for this to happen how should i trap the value which i've changed.....This is in case of 'VA01' while creating sales order and while chaning tooo in "VA02"....
Maybe you are looking for
-
Guided Access no longer working
Ive used my guided acess on my iphone 4 with ISO 7.1.2 for my daughter to play with. Now it's no longer working. the triple click still works but it does not with the guided access. Any help on figuring out how to get it to work would be greatly appr
-
I'd like to receive some clarification on an issue I certainly feel deserves it. Please keep in mind any reference to "original media" need not be digital at all or in any way under the control of Adobe before being loaded or converted to PDF format.
-
Moving from CS 5.5 Master Collection to CS 6 Design & Web Premium
Last year I purchased a downloadable version of CS5.5 Master Collection and installed it on 2 Macs. I recently purchased CS6 Design and Web Premium. Should I uninstall all CS5.5 products before I install CS6? Can I then go back and install the CS5.5
-
Transfering songs from I-Pod Shuffle to my PC I-tunes
i was wondering if anyone knows how to transfer songs from a ipod shuffle to the i-tune pc list. while reinstalling the software on my computer i lost all my songs on i-tunes and dont have the cds to add them back to i-tunes
-
New iTunes version either changed or messed up my shortcut
Ever since I upgraded to the new iTunes I can no longer use the keyboard shortcut of optioncommandright arrow to move to the next song while i Tunes is minimized. I am having to either go to iTunes itself or use the dock to right click then choose "n