User exit for pricing in Sales Order
Hi Gurus,
I have a requirement while changing Sales Order and an Inquiry.Below is the requirement.
I have a custom filed at the Sales Order Item level as VBAP-XXXXX. When the user changes this value to a value (say abc) then the NET value in the Conditions tab of the line item should become zero and also the grid of the conditions tab should be displayed as zero.
I have custom item categories for which the Pricing (TVAP-PRSFD) is blank (No pricing). For this type of Item categories I can make the NET price s ZERO by implementing some custom logic in the user exit userexit_new_pricing_vbap. Since this item category is not relavant for pricing then when I carry out new pricing the net value is set to ZERO.
But for other item categories, this field (TVAP-PRSFD) is set to X (Pricing standard). For this item categories I cant make the NET value as zero.
So Can you please let me know the possibility of implementing the above mentioned logic?
Are they any user exit to update the pricing table KOMP?
Are they any user exit to change the TVAP-PRSFD value based on my requirements?
Is there any other way of implementing this logic irrespective of item categories?
Hi Vinod,
I am sending you my code please check it,
if TKOMK-SPART = 10.
if XKOMV is not INITIAL.
clear v_JEXP.
READ TABLE XKOMV with key kschl = 'JEXP'.
if sy-subrc = 0.
check XKOMV-kwert = 0.
message i003(ZT) with 'Value should not be 0 for conditioin type JEXP'.
v_JEXP = 'X'.
else.
message i003(ZT) with 'Maintain the mandatory Conditioin type JEXP'.
v_JEXP = 'X'.
endif.
if v_JEXP = 'X'.
XVBUV-MANDT = sy-mandt.
XVBUV-POSNR = '000010'.
XVBUV-TBNAM = 'VBAP'.
XVBUV-FDNAM = 'PRSOK'.
XVBUV-FEHGR = 20.
XVBUV-STATG = '06'.
XVBUV-FCODE = 'PKON'.
XVBUV-SORTF = 9999.
XVBUV-LFDNR = 0000.
XVBUV-UPDKZ = 'I'.
append XVBUV.
endif.
endif.
endif.
Please suggest something to solve this.
Thanks and Regards,
Vicky.
Similar Messages
-
User exit for saving a sales order
hi
wats the user exit when saving a sales order?Hi,
SDTRM001 Reschedule schedule lines without a new ATP check
V45A0001 Determine alternative materials for product selection
V45A0002 Predefine sold-to party in sales document
V45A0003 Collector for customer function modulpool MV45A
V45A0004 Copy packing proposal
V45E0001 Update the purchase order from the sales order
V45E0002 Data transfer in procurement elements (PRreq., assembly)
V45L0001 SD component supplier processing (customer enhancements)
V45P0001 SD customer function for cross-company code sales
V45S0001 Update sales document from configuration
V45S0003 MRP-relevance for incomplete configuration
V45S0004 Effectivity type in sales order
V45W0001 SD Service Management: Forward Contract Data to Item
V46H0001 SD Customer functions for resource-related billing
V60F0001 SD Billing plan (customer enhancement) diff. to billing plan
tables : modsap
tcode : cmod,smod
Reward if usefull -
User Exit for Cancel in Sales Order
Hi ,
Can anybody tell me which user exit is fired when a sales order is cancelled?
I want to clear all the entries made in the additional data B tab which updates a custom table.
Thanks in advance.Hi Andrea,
That userexit is fired when we delete a sales document. But I want an exit which will be triggered when we cancel a Sales order while creating.
When I create a sales order through VA01 and give data in additional data B, and press the cancel button, the values in the tab are not getting cleared for the next sales order.
So I want an exit which triggers when pressing cancel button though VA01.
Thanks. -
User exit for partners in sales order
Hi all,
In creating/changing sales order, the sales employee partner (PE) is always defaulted from sold-to in Customer Master. However, the new requirement is this: We have one customer A (sold-to) with 20 ship-to. When creating sales order, only for this specific customer A, we want to default sales employee from Ship-To, NOT sold-to in customer master. The rest of the customers will continue to default from Sold-To. I looked thru user-exit:
Exit_saplv09a_004 and Exit_saplv09a_003.
I think exit saplv09a004 is more appropriate. But how would i get the sales document number ? I want to get the sold-to number to change the ship-to for this customer. Have anyone come across this ? I have looked thru other threads.
Do anyone has some coding samples in using the parameters ?
Thanks
JoyceCheck whether the sale order number is available in stack, then you can get it in the exit using field symbols.
Check this retrieving internal table info. during runtime from callstack.
In the same manner apply as required. -
User exit after saving a sales order
Dear SAP-community,
I am looking for an user-exit that runs after the creation of a sales order. I need the created VBELN of the sales order and want start some additional functionality which should be triggered directly afetr saving?
Does anyone know such a exit?
Thanks
Kind regards
MarkusPlz SEARCH in SCN before posting.
User exit after saving sales order
user exit for saving a sales order -
User-exit for transaction co13: PP Order Cancel Confirmation
Hello!
Whether prompt, please,
exist what that user-exit for transaction co13: PP Order Cancel Confirmation?
Thanks,
Anton.Hi Antonio,
Please check this all user exits (SMOD) available for CO13.
CONFPP01 - PP order conf.: Determine customer specific default values
CONFPP02 - PP order conf.: Customer specific input checks 1
CONFPP03 - PP order conf.: Cust. specific check after op. selection
CONFPP04 - PP order conf.: Customer specific input checks 2
CONFPP05 - PP order conf.: Customer specific enhancements when saving
CONFPP06 - PP Order Confirmations: Actual Data Transfer
CONFPP07 - Single Screen Entry: Inclusion of User-Defined Subscreens
CONFPS01 - PS confirmation: Determine customer specific default values
CONFPS02 - PS confirmation: Customer specific input checks 1
CONFPS03 - PS confirmation: Customer specific check after op. selection
CONFPS04 - PS confirmation: Customer specific input checks 2
CONFPS05 - PS confirmation: Customer specific enhancements when saving
CONF0001 - Enhancements in order confirmation
CONFPI01 - Process order conf.: Calculate cust.specific default values
CONFPI02 - Process order confirmation: Customer spec. input checks 1
CONFPI03 - Process order conf.: Cust. spec. check after op. selection
CONFPI04 - Process order conf.: Customer specific input checks 2
CONFPI05 - Process order conf.: Cust. spec. enhancements when saving
CONFPI06 - Process order confirmation: Actual data transfer
CONFPM01 - PM/SM order conf.: Determine cust. specific default values
CONFPM02 - PM/SM order confirmation: Customer specific input checks 1
CONFPM03 - PM/SM order conf.: Cust. spec. check after op. selection
CONFPM04 - PM/SM order conf.: Customer specific input check 2
CONFPM05 - PM/SM order conf.: Cust. specific enhancements when saving
Regards,
Ferry Lianto -
Need Help for User Exit for Pricing
Dear ABAPers
I created a user exit for pricing where I am comparing a condition type (manually entered(ZD01)) to another condition type(YD01). If the entered value is more than the other condition type than pricing should not be updated.
RATE = 0.
IF KOMP-ZZVBTYP = 'C'.
IF KOMP-PRSFD = 'X' OR
KOMP-PRSFD = 'A'.
IF KOMV-KSCHL = 'ZD01'.
LOOP AT XKOMV WHERE KSCHL EQ 'YD01'.
KOMP-KZWI2 = ( XKOMV-KBETR / 10 ).
ENDLOOP.
RATE = KOMV-KBETR / 10.
IF ( RATE <> 0 ) AND ( RATE < KOMP-KZWI2 ).
MESSAGE W991. "Maximum Allowed Discount Has Exceeded !!!!
CLEAR KOMV-KBETR.
CLEAR KOMV-KWERT.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
It is giving me the message but it is also updating the pricing. I want not to be updated. So in place of modify screen i need to reset pricing procedure.
I need a function module or a abap key word which can reset the pricing procedure.
Thanks in Advance.
regards,
MAMas per i can understand you are coding in user-exits ,.. so if you are giving that
message 'Maximum Allowed Discount Has Exceeded !!!!' type 'E'.
i think it will work. I think there is no way to stop the processing without type e.
regards
shiba dutta -
User Exit for Pricing Condition
Hi all,
I wanted to change the values of few fields in the communication structure KOMK and KOMP for Delivery Order when pricing is being processed.
Is there a User exit for doing the same.
Regards,
Rupesh.hi,
In Pricing in SD the fields on the basis of which pricing is done are derived from the FIELD CATALOG which is a structure KOMG .This structure is used to transfer transaction data to the pricing procedure in SD and is also known as communication structure.This structure KOMG consists of two tables KOMK for Header related fields and KOMP for item related fields.
The fields which are not in either of the two tables KOMK and KOMP
cannot be used in pricing .Sometimes a need arises when the pricing
is to be based on some other criteria which is not present in the form of fields in either of the two tables.
This problem can be solved by using USEREXITS which are provided for pricing in SD.
Pricing takes place both when the SALES ORDER ( Transaction VA01) is created as well as when INVOICING ( Transaction VF01) is done.Hence SAP provides 2 userexits ,one for sales order processing which is
USEREXIT_PRICING_PREPARE_TKOMP or
USEREXIT_PRICING_PREPARE_TKOMK
Depending upon which table (KOMK or KOMP) the new fields were inserted we use either of the above two userexits.These userexits are found in include MV45AFZZ of the standard SAP sales order creation program SAPMV45A.
In the case of userexit which will be called when invoicing is done ,these
are provided in the include RY60AFZZ which is in the standard SAP
program SAPMV45A. The name of the userexits are same. i.e
USEREXIT_PRICING_PREPARE_TKOMP or
USEREXIT_PRICING_PREPARE_TKOMK
These userexits are used for passing the data from the communication structure to the pricing procedure, for this we have to fill the newely
created field in the communication structure KOMG for this we fill the code in the above userexit using the MOVE statement after the data that
has to be passed is taken from the database table by using the SELECT statement. The actual structure which is visible in these userexits and which is to be filled for that particular field is TKOMP or TKOMK.
Before the coding for these userexits is done ,it is necessary to create a new field in either of the two tables KOMK or KOMP .For this purpose
includes are provided in each of them .
To create the field in header data(KOMK) the include provided is KOMKAZ
and to create the field in item data(KOMP) the include provided is KOMPAZ.
One possible example for the need of creating new fields can be e.g. Frieght to be based upon transportation zone ,for this no field is available in field catalog and hence it can be created in KOMK and then above userexits can be used to fill the transportation data to it.
2)The other method of finding userexit is to find the word USEREXIT in the
associated program of the transaction for which we want to determine userexit using SE38.
3)The other method of finding userexits is to find the include in case of SD/MM applications where the userexits are located ,this can be found in the SAP reference IMG generally in the subfolder under SYSTEM MODIFICATION.
Some other examples of userexits in SD are:
USEREXIT_NUMBER_RANGE
This userexit is used to assign a different internal document number to the
sales order(VA01) when it is created depending on some criteria like a different SALES ORGANIZAION(VKORG) .
USEREXIT_SAVE_DOCUMENT_PREPARE
This userexit is used to insert the ABAP code which will be called when
the document (sales order VA01) is just about to be saved.This userexit is used generally for custom checks on different fields , to display some information before the order will be saved or for making changes to certain fields before the sales order will be saved.
Hope this helps, Do reward. -
User exit for pricing to calcumlate net sales value and taxat billing level
Hi,
Can anyone suggest me , which user exit i can used for below scenario.
Create a new user exit attached to pricing procedure ZXTNIC in order to exclude the conditions YTN1 & YTN2 from the calculation of the net sales value and include the value of the conditions YTN1 & YTN2 to the calculation of the Tax vale.
From pricing procedure ZXTNIC need the net value to be till line 500 only and exclude the value of the conditions YTN1 & YTN2
BACKGROUND
Inter-company invoice is not calculated correctly in terms on the net sales value. The calculation of the net sales value is correct as some conditions are included in the calculations which must be excluded.
The reason for creating the user exist is that any change in the pricing conditions class can not be used to exclude them from the net price, without totally changing the concept behind the conditions (new conditions, new access sequence in taxes, IC changes and so on).
FUNCTIONAL DETAILS
The user exit will run on the values of the line item and the header of the pricing conditions
The user exit will subtract the current net value from the value of the conditions YTN1 & YTN2, also the Tax value will be added to the value of the conditions YTN1 & YTN2.
Need the Net value = 8,032 and not 8,882
This value will be calculated as follows = Current Net u2013 YTN1 u2013 YTN2 = 8,882 u2013 0,773 u2013 0,077 = 8,032
Need the Tax value = 2,395 and not 1,545
This value will be calculated as follows = Current Tax + YTN1 + YTN2 = 1,545 + 0,773 + 0, 077 = 2,395
Regards,
Jayaramsolved
-
User exit for pricing to calculate net sales value and tax at billing level
Hi,
Can anyone give the solution for below thing.
I have written the code for to calculate the net sale a value and tax value based on condition types YTN1 & YTN2 and with pricing procedure "ZXTNIC" under user exit "userexit_field_modification" in include program LV69AFZZ
Calculation as per below
FD:
The user exit will run on the values of the line item and the header of the pricing conditions
The user exit will subtract the current net value from the value of the conditions YTN1 & YTN2, also the Tax value will be added to the value of the conditions YTN1 & YTN2.
Need the Net value = 8,032 and not 8,882 " here 8832 value is before calculation
This value will be calculated as follows = Current Net u2013 YTN1 u2013 YTN2 = 8,882 u2013 0,773 u2013 0,077 = 8,032
Need the Tax value = 2,395 and not 1,545 " here 1545 value is before calculation.
This value will be calculated as follows = Current Tax + YTN1 + YTN2 = 1,545 + 0,773 + 0, 077 = 2,395
When i will execute the VF01 transaction there in initial screen values are not updating automatically.Once we will select item line and then clicking on " item pricing condition" icon i.e., item level , then only the values are updating both in item level and header level.
But when we will execute the VF02 and VF03 the values are updating automatically as per condition.
So please suggest me is there any exit for this requirement.
Regards,
JayaramHi,
You should implement your logic in VOFM Copying routine for billing document.
Regards
Prasenjit -
User-Exit for Pricing Strategy on return order.
hi,
If we have scale pricing implemented for returns how to arrive at the
base price (Pr00) condition record value based on the (Ordered qty - Returned Qty) in this scenario which user exit we shall use??
Thanks in advance,
Regards,
B.AnandhUse transaction VOFM, Formula, scale base and condition base.
-
User Exit/BADI to Lock Sales order for any changes in VA02 (Excluding Prici
Hi All,
I am looking for an User Exit or BADI which disallows any kind of changes in Sales Order on a particular condition.
This can't b controlled through Authorization, so have to look for an exit. Please suggest.
If possible, please provide the example.
ThanksHi,
Check the user exit MV45AFZZ in this exit u will be finding the Lot of stages where we can control the VA01 or VA02 . Please find the exit with the name SAVE before. Try to check any changes For sales order in CDHDR and CDPOS and give some error message .
Thanks and Regards,
Srinivas. -
User Exit for XD02 in Sales area data in Sales tab
Hi Sap Gurus,
I have a problem . I need help .
The requirement is
In XD01 transaction , In Sales area data, In Sales tab i need to add a Check box which i already have added.This check box refers to KNVV table-Zflag
In VA01 transaction , In menu goto -> header -> Sales , In Additional data B .
I have another Check box. This check box refers to Vbaktable-Zflag .
<b>I need the code and exact locations where to put this to get my issue resolved which is given below in Functional Description</b>.
Functional Description where you can understand better.
Our custom logic will be initiated once the Sold-to Party (VBAK-KUNNR) is entered for any order type. When the sold-to party is entered the user exit program will check table KNVV for the custom field ZFLAG that corresponds to the Print Prices on Delivery Note flag (hereafter referred to as the Pricing Flag) and populate the same setting of the flag into the ZFLAG that will be on the Additional data B tab on a sales order at the header. The user can manually change VBAK-ZFLAG Pricing Flag setting to something different than what is populated for the customer master level.
If the user happens to change the sold-to party for any reason then the user exit program should take the following approach when populating the ZFLAG Pricing Flag in a sales order:
- Recheck the ZFLAG Pricing Flag setting in the customer master for the sold-to party that the user has newly selected.
The user will still have the option to manually ZFLAG Pricing Flag on a sales order after the user exit program defaults it.Transaction Code - XD02 Change Customer (Centrally)
Exit Name Description
SAPMF02D User exits: Customer master data
No of Exits: 1
USER EXIT
http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
http://www.sapgenie.com/abap/code/abap26.htm
http://www.sap-img.com/abap/what-is-user-exits.htm
http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
http://www.easymarketplace.de/userexit.php
http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
http://www.sappoint.com/abap/userexit.pdfUser-Exit
http://www.sap-img.com/ab038.htm
http://help.sap.com/saphelp_46c/helpdata/en/64/72369adc56d11195100060b03c6b76/frameset.htm
http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
http://www.sap-img.com/abap/what-is-user-exits.htm
http://expertanswercenter.techtarget.com/eac/knowledgebaseAnswer/0,295199,sid63_gci982756,00.html
Rewards if useful.........
Minal -
User exit for pricing at billing level
Hi ,
can you pl. suggest me,which user exit i can use for below scenario.
Create a new user exit attached to pricing procedure ZXTNIC in order to exclude the conditions YTN1 & YTN2 from the calculation of the net sales value and include the value of the conditions YTN1 & YTN2 to the calculation of the Tax vale.
From pricing procedure ZXTNIC need the net value to be till line 500 only and exclude the value of the conditions YTN1 & YTN2
BACKGROUND
Inter-company invoice is not calculated correctly in terms on the net sales value. The calculation of the net sales value is correct as some conditions are included in the calculations which must be excluded.
The reason for creating the user exist is that any change in the pricing conditions class can not be used to exclude them from the net price, without totally changing the concept behind the conditions (new conditions, new access sequence in taxes, IC changes and so on).
Regards,
JayaramFirst read the BADI online documentation and then [Implement thef BAdIs in the Enhancement Builder|http://help.sap.com/saphelp_nw04s/helpdata/en/b2/873842134bad04e10000000a1550b0/frameset.htm], put some break-point to check the data sent/received in debug.
Regards,
Raymond -
Free Goods Problem and User Exit if needed in Sales Order
Hello All,
The problem is related to Free Goods in Sales Order which is given with an example -
We have maintained Free Goods ( T Code - VBN1) in inclusive scenario which is as follows -
For 210 PAC (Pack) of Material A 18 PAC Free.
Where 1 PAC = 20 BT (Bottle) and 20 PAC = 1 CV (Case Pack)
In the material master of Material A the Base Unit Of Measurement (UOM) = PAC and Sales UOM = Blank so that we can use any conversion factor maintained for the material.
The conversion factors maintained for Material A are as follows -
1 BT = 1BT
1 PAC = 20 BT
1 CV = 20 PAC
Now when we are raising sales order for 11 CV the free goods are not generated in the Sale Order.
Again if we maintain the Sales UOM in CV and raise the sales order it is showing :
10 CV as main item and 1 CV as Free which is wrong because in the conversion factor we have already maintained 1CV = 20 PAC , Whereas in the inclusive scenario it is given 11CV = 210 PAC and 210 PAC = 18 PAC is free.So in any case it is taking into account 2 more PACs.
Please suggest what need to be done in this case in respect of User Exit or Source Code in ABAP if needed.
Thanks & Regards
Priyanka MitraHello Priyanka Mitra,
We are facing a problem same as you.
How did you solve this problem?
We are very glad if you teach it concretely.
Please advise your solution to us.
Thanks.
Maybe you are looking for
-
Dears, I have a problem, each time i open any website from safari, and error pops up saying request time out! What can i do?
-
Reinstalling Elements 10 after the price went up for CC-full and I downgraded to just CC-LR and PS. But can't get past accept licence screen. Click OK to accept that and it just goes round in an endless loop where the licence screen reappears each ti
-
Problem accessing oracle databse with JSP
hI i'M TRYING TO ACCESS A ORACLE 8I DATABASE VIA A JSP. THE DATABASE IS LOCATED REMOTELY ON THE NETWORK AND I' USING JDEVELOPER 9i VERSION 9.0.3.1 wHEN I RUN MY JSP, I WANT IT TO DISPLAY THE RESULT OF A QUERY ON MY JSP PAGE but instead i get this err
-
I get error -50 when trying to download iTunes Extras
Every time I try to download the iTunes Extras for movies I've redeemed via Digital Copy the download fails to complete. It usually errors out with error -50, but occasionally I get another error. No matter how many times I retry or resume the down
-
FND_ENV_CONTEXT - clear down
Hi We are running Purge Conc Requests job each night - and clearing down conc requests Parameters are for ALL data I noticed that the FND_ENV_CONTEXT table has nearly 40 million rows Any ideas what this table is and how I can specifically clear it do