Net Price is geeting change after BAPI
Hi,
I am paasing netprice value as 1.00 in the line item while creating creating PO by using BAPI BAPI_PO_CREATE1. But the value is getting changed after po created. Please suggest me what to do? immediate response will be appreciated.
Regards,
Priyaranjan
Hi,
Thanks for your reply. Yes there is some user-exit is there but in that user-exit netprice is not calculated. when i debug the stnadrd bapi at one moment the value is getting changed.As it is a standard program one we can't chnage this value. Please help me in this regards. Is there any other parameter i have to pass?
Please see the below code and suggest me
refresh all the tables before use
refresh bapimepoheader.
refresh bapimepoheaderx.
refresh bapimepoitem.
refresh bapimepoitemx.
refresh bapimepocond.
refresh bapimepocondx.
refresh BAPIMEPOSCHEDULE.
refresh BAPIMEPOSCHEDULX.
refresh bapiret2.
clear WA_ORDER-EBELN.
setup the data interface
sort i_po by ebelp ascending.
read table i_po index 1.
PO header info
clear bapimepoheader.
bapimepoheader-vendor = i_po-lifnr. " vendor no.
bapimepoheader-purch_org = i_po-ekorg. " purch org
bapimepoheader-pur_group = i_po-ekgrp. " purch gp
bapimepoheader-comp_code = i_po-bukrs. " company
bapimepoheader-doc_type = i_po-bsart. " order type
bapimepoheader-created_by = sy-uname.
bapimepoheader-creat_date = sy-datum.
bapimepoheader-doc_date = sy-datum.
bapimepoheader-currency = i_po-waers. " currency
bapimepoheader-currency_iso = i_po-waers. " currency
spec.changed by Chee Kok on 06/27/2003: use Z00 instead of Z000
bapimepoheader-pmnttrms = 'Z00'. " payment term
spec.changed by Chee Kok on 06/27/2003: use exchange rate from ref PO
bapimepoheader-exch_rate = i_po-wkurs. " fx rate
bapimepoheader-ex_rate_fx = 'X'. " fixed fx rate (kufix)
bapimepoheader-zzsubmi = wa_order-zzsubmi. " Collective No DEVK949611
append bapimepoheader.
clear bapimepoheaderx.
bapimepoheaderx-vendor = 'X'. " vendor
bapimepoheaderx-purch_org = 'X'. " purch org
bapimepoheaderx-pur_group = 'X'. " purch gp
bapimepoheaderx-comp_code = 'X'. " company
bapimepoheaderx-doc_type = 'X'. " doc tye
bapimepoheaderx-created_by = 'X'.
bapimepoheaderx-creat_date = 'X'.
bapimepoheaderx-doc_date = 'X'.
bapimepoheaderx-currency = 'X'. " currency
bapimepoheaderx-currency_iso = 'X'. " currency
bapimepoheaderx-pmnttrms = 'X'. " payment term
bapimepoheaderx-exch_rate = 'X'. " fx rage
bapimepoheaderx-ex_rate_fx = 'X'. " fixed fx rate
bapimepoheaderx-zzsubmi = 'X'. "Collective No DEVK949611
append bapimepoheaderx.
PO item info & condition table
loop at i_po.
clear bapimepoitem.
bapimepoitem-po_item = i_po-ebelp. " order item no.
bapimepoitem-tax_code = WA_ORDER-mwskz. " tax code
bapimepoitem-material = i_po-ematn. " material
bapimepoitem-ematerial = i_po-ematn. " material
bapimepoitem-quantity = i_po-menge_for_save. " qty
bapimepoitem-PO_UNIT = i_po-meins. " order unit
bapimepoitem-plant = i_po-werks. " plant
bapimepoitem-item_cat = i_po-pstyp. " item cat.
bapimepoitem-info_upd = 'X'. " info. record
bapimepoitem-stge_loc = i_po-lgort. " storage loc
bapimepoitem-ret_item = 'X'. " return item (retpo)
bapimepoitem-net_price = i_po-netpr. " net price
bapimepoitemx-po_price = '2'. " DEVK954608
for plant 2010, set stock type to "Quality inspection"
(New requirement from Chee Kok 2003/07/24)
if I_PO-WERKS = '2010'.
bapimepoitem-QUAL_INSP = 'X'. " stock type
use "Blocked stock" instead (Chee Kok 2003/07/25)
bapimepoitem-QUAL_INSP = 'S'. " stock type
endif.
append bapimepoitem.
clear bapimepoitemx.
bapimepoitemx-po_item = i_po-ebelp. " order item no.
bapimepoitemx-po_itemx = 'X'." important: OSS note 484692
bapimepoitemx-tax_code = 'X'. " tax code
bapimepoitemx-material = 'X'. " material
bapimepoitemx-ematerial = 'X'. " material
bapimepoitemx-quantity = 'X'. " qty
bapimepoitemx-PO_UNIT = 'X'. " order unit
bapimepoitemx-plant = 'X'. " plant
bapimepoitemx-item_cat = 'X'. " item cat.
bapimepoitemx-info_upd = 'X'. " info. record
bapimepoitemx-stge_loc = 'X'. " storage loc
bapimepoitemx-ret_item = 'X'. " return item (retpo)
bapimepoitemx-net_price = 'X'. " net price
bapimepoitem-po_price = 'X'. " net price DEVK954608
for plant 2010, set stock type to "Quality inspection"
(New requirement from Chee Kok 2003/07/24)
if I_PO-WERKS = '2010'.
bapimepoitemx-QUAL_INSP = 'X'. " stock type
endif.
append bapimepoitemx.
clear BAPIMEPOSCHEDULE.
BAPIMEPOSCHEDULE-PO_ITEM = i_po-ebelp. " order item
BAPIMEPOSCHEDULE-SCHED_LINE = '1'. " sch line no.
BAPIMEPOSCHEDULE-DEL_DATCAT_EXT = 'D'. " deli cat.
BAPIMEPOSCHEDULE-DELIVERY_DATE = l_datum. " current date
BAPIMEPOSCHEDULE-QUANTITY = i_po-menge_for_save. " qty
append BAPIMEPOSCHEDULE.
clear BAPIMEPOSCHEDULX.
BAPIMEPOSCHEDULX-PO_ITEM = i_po-ebelp. " order item
BAPIMEPOSCHEDULX-SCHED_LINE = '1'. " sch line no.
BAPIMEPOSCHEDULX-PO_ITEMX = 'X'. " important: OSS note 484692
BAPIMEPOSCHEDULX-SCHED_LINEX = 'X'. " important: OSS note 484692
BAPIMEPOSCHEDULX-DEL_DATCAT_EXT = 'X'. " deli cat.
BAPIMEPOSCHEDULX-DELIVERY_DATE = 'X'. " date
BAPIMEPOSCHEDULX-QUANTITY = 'X'. " qty
append BAPIMEPOSCHEDULX.
clear bapimepocond.
bapimepocond-itm_number = i_po-ebelp. " order item no.
bapimepocond-cond_type = 'PB00'. " cond type
bapimepocond-cond_value = i_po-netpr. " net price
bapimepocond-cond_value = i_po-kbetr. " net price
bapimepocond-currency = i_po-waers. " currency
bapimepocond-currency_iso = i_po-waers. " currency
bapimepocond-COND_UNIT = i_po-kmein. " price uom
bapimepocond-COND_UNIT = i_po-meins. " order unit
bapimepocond-COND_UNIT = i_po-BPRME. " price UOM (PO or IR)
bapimepocond-COND_UNIT_ISO =
bapimepocond-COND_P_UNT = i_po-kpein. " price unit e.g. 1
bapimepocond-COND_P_UNT = i_po-PEINH_FOR_SAVE.
" price unit from info rec or PO
bapimepocond-change_id = 'I'. " insert mode!
append bapimepocond.
clear bapimepocondx.
bapimepocondx-itm_number = i_po-ebelp. " order item no.
bapimepocondx-cond_type = 'X'. " cond type
bapimepocondx-cond_value = 'X'. " net price
bapimepocondx-currency = 'X'. " currency
bapimepocondx-currency_iso = 'X'. " currency
bapimepocondx-COND_UNIT = 'X'. " price unit
bapimepocondx-COND_UNIT_ISO = 'X'.
bapimepocondx-COND_P_UNT = 'X'.
bapimepocondx-change_id = 'X'. " insert mode
append bapimepocondx.
endloop.
CLEAR: L_SUBMI.
L_SUBMI = WA_ORDER-ZZSUBMI.
EXPORT l_submi TO MEMORY ID 'SUBMI'.
call the bapi function finally
call function 'BAPI_PO_CREATE1'
exporting
NO_PRICE_FROM_PO = 'X' "*DEVK954608
poheader = bapimepoheader
poheaderx = bapimepoheaderx
POADDRVENDOR =
TESTRUN =
importing
exppurchaseorder = WA_ORDER-EBELN " saved return po no.
tables
return = bapiret2
poitem = bapimepoitem
poitemx = bapimepoitemx
POADDRDELIVERY =
POSCHEDULE = BAPIMEPOSCHEDULE
POSCHEDULEX = BAPIMEPOSCHEDULX
POACCOUNT =
POACCOUNTX =
pocond = bapimepocond
pocondx = bapimepocondx
POLIMITS =
POCONTRACTLIMITS =
POSERVICES =
POSRVACCESSVALUES =
POSERVICESTEXT =
Begin of SR20040----DEVK954608
commit work.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
IMPORTING
RETURN =
Similar Messages
-
*Is it possible to change NET PRICE of Service PO after Invoice.*
if it is possible can you please mention what are ways to change NET price after INVOICE
I would suggest Forum "ERP - Logistics Materials Management (MM)":
SAP ERP - Logistics Materials Management (SAP MM)
But I believe you should try Forum Search beforehand:
http://forums.sdn.sap.com/search!default.jspa -
Change Net price in the PO after releasing blocked invoice
Hi,
We had a PO which had wrong price for an item. Invoice amount was hight for this line item and so the invoice was blocked. Accounting manually unblocked the invoice so purchasing could correct the price on the PO but now the net price column is greyed out in the PO just for that line itme.
Please can anyone let me know how to change the price on the PO so that invoice could be processed.
Thanks
MiraHi,
Once PGR Processed you can't change the Price of the PO.
First you have to reverse the INvoice in MR8M..
Then you have to cancel the MIGO through 102 movement type.
then you do changes in PO item value.
afterthat do MIGO & MIRO.
it will work.
SAM -
Need to pull INITIAL(vbap)net price of Sales Order, after changing viaVA02
Hi Experts,
Mine is differetnt requirement..........
I created a my_Sales_order_12345678 with 2 items, as follows,(all following values/entries r for my_Sales_order_12345678)
line item_10---->net_value_netpr = $100
line item_20---->net_value_netpr = $200
Then the VBAP entries as r as follows,
POSNR -
>NETPR
10----
> $100
20----
> $200
I changed first time as via VA02 tx, as
line item_10---->net_value_netpr = $300
line item_20---->net_value_netpr = $400
Then the VBAP entries as r as follows,
POSNR -
>NETPR
10----
> $300
20----
> $400
I changed second time as via VA02 tx, as
line item_10---->net_value_netpr = $500
line item_20---->net_value_netpr = $600
Then the VBAP entries as r as follows,
POSNR -
>NETPR
10----
> $500
20----
> $600
My requirement: for some reason, I need the initial values, I mean
the VBAP entries of,
POSNR -
>NETPR
10----
> $100
20----
> $200
I tried with CDHDR & CDPOS tbls, but no use? So, from Where Can I get/pull them??
thanq
Edited by: Srinivas on Jan 24, 2008 12:22 AMhi sirnivas..
Thanq you for the points..these are the first i ever recieved..
if you are working on peice of code which can get the price history do me a favour if you have finished the code just explain it to me who did u do that...
i have been working on an object from last two weeks to get the latest price...
the thing is even though the price for condition items has been changed it wont get updated in the Sales orders unless new pricing fot the document is done...
so i have to get all the sales orders who condition items price has been changed and display them in an ALV...so if you can get the exact old values...for the conditions i guess the opposite also can be done.....
Here i have suggestion for you...in condition items there is a process called SCHEMA ( pricing Schema) which you can see using Condition Analysis button at the bottom of the condition item window...
you can see all the price changes to the condition when you parse the tree structure of the procedure..EXAMPLE :- R0000 etc...
so some Sales orders if the Schema has been changed all the existing condition are replaced by New ones from the changed Schema...so i guess that would play an important role in deciding the Price of Sales order...
I know this is bit long but .....if you did finsish your program do let me know how you did it...
Thankyou very much and good luck. -
PO net price to be constant till the invoice-even if there is change in PIR
Hi All,
When a PO is created for material and the net price of the PO is 'X'. when the net price value is changed in the purchase info record to ' X-1' . The invoice document corresponding to the PO would be 'X-1' . Please let me know, what configuration setting needs to be done for the invoice document to have 'X' price.
Regards,
PSSDear pSS,
As per i know, when you create a PO with ref to PIR, then the saved the PO, the you change the value in PIR, the PO net price won't change until you refresh the PO, and about invoice, its depend on your PO, is it GRbasedIV or not. -
Automatic update net price in PO creation
Dear expert,
I just found an issue while creating a new PO.
I fill in all data needed, included net price. And when I press "enter", surprisingly the system automatically update the Net price with last PO price. and I need to manually change again the net price with current price.
Anyone can describe why system automatically update the PO price? is there any setting to inactivate it??
thanks much,
nasikhinHi,
Please read the note:
456691 FAQ: Price determination in purchasing
3. How does price determination determine the conditions via a 'Last
purchase order'?
Answer:
If the info record does not contain any valid conditions, but a "last
document" exists for the info record, the system copies all of the
conditions from this document if the following prerequisites are met:
o The net price must be zero (EKPO-NETPR = 0.00) after the system
has carried out price determination.
Page 5
However, the net price is not zero after price determination has
taken place and the system does not copy the conditions from the
last PO if master conditions that are included in the net price
calculation are maintained at, for example, vendor level or
material group level.
o The last document is not a request for quotation.
o The info record has not been deleted.
o The vendor and the material in the info record are identical to
the vendor and the material in the last document.
o The calculation schema of the last document is the same as the
current schema that has been determined.
The system simply executes a copy function to transfer the conditions
from the last document. The system does not check for requirements for
the calculation schema.
The system does not copy the condition records of the subsequent
settlement (the condition type has the condition class "C"); instead,
they are always determined again to ensure that the condition records
are consistent with the field contents (also see Note 486757).
If you generally do not want the system to transfer the conditions from
the last PO, you can use the user parameter EVO to deactivate this (also
see Note 675523).
So you can use the parameter EVO.
Best Regards,
Arminda Jack -
MM purchase order net price clearing
hie gurus
after a field extension for MM fields in transaction me21 the net price is being cleared after pressing enter and an error message saying enter a net price greater than 0 is being displayed. hw cn i fix this problem?Hi
Yet again another classic example of making structural changes to standard table field definitions. The screen structure passess values to the work area and clears the screen field, calculations take place and the data is passed back to the screen fields but because of the changes effected the field definitions differed and thus a background error occured.
regards
Isaac Prince -
SCENARIO IS AFTER THE VENDOR HAS INCREASED HIS PRICE AND THE SAME HAS BEEN CHANGED MANUALLY,IN THE NEXT TRANSACTION WITH THE SAME VENDOR,THE INCREASED PRICE SHOULD GET INTO THE NET PRICE FIELD OF PO,
THANKS IN ADVANCE
PRASADdo you have a problem with the keyboard?
If the info record does not contain any valid conditions, but a "last document" exists for the info record, the system copies all of the conditions from this document if the following prerequisites are met:
The net price must be zero (EKPO-NETPR = 0.00) after the system has carried out price determination.
However, the net price is not zero after price determination has taken place and the system does not copy the conditions from the last PO if master conditions that are included in the net price calculation are maintained at, for example, vendor level or material group level.
The last document is not a request for quotation.
The info record has not been deleted.
The vendor and the material in the info record are identical to the vendor and the material in the last document.
The calculation schema of the last document is the same as the current schema that has been determined.
The system simply executes a copy function to transfer the conditions from the last document. The system does not check for requirements for the calculation schema.
The system does not copy the condition records of the subsequent settlement (the condition type has the condition class "C"); instead, they are always determined again to ensure that the condition records are consistent with the field contents (also see Note 486757).
If you generally do not want the system to transfer the conditions from the last PO, you can use the user parameter EVO to deactivate this (also see Note 675523). -
Net price in R/3 PO differ from the actual local PO net price Urgent
Hi,
I am working on extended classic scenario
I created a local PO, in which the net price of the material is 100 Euro later on I changed the payment terms and when I checked the backend PO which is the copy of the local PO, I found that the net price has been changed from 100 Euro to 212 Euro and when I checked the PO in SRM I could see the same value i.e. 100 Euro.I checked the change document in backend system and found that the net price has been changed by the SRM_RFC user.
This has happened for quite a few number of local PO
I am not able to understand how the backend PO net price can differ from the local PO net price.
Please provide me useful input
Regards,
YatendraHi Yatendra,
I think this is due to R/3.
Can you check the source of supply in R/3 PO ?
especially if a PIR or contract has been assigned ?
Look at price conditions in R/3 PO item, to see the execution plan of pricing.
I think that during ECS PO creation in R/3, the SRM price is correctly passed, but during the change the price is overwritten by R/3.
What are your SRM & R/3 releases ?
Check OSS arround BAPI_PO_CREATE, BAPI_PO_CREATE1 and BAPI_PO_CHANGE.
Rgds
Christophe
PS: please reward points for helpfull answers -
Hi Gurus,
Now I'm working on Quantity Contract.Client requirement is to get the Net price for Quantity Contract after saving.
In standard SAP it's not there.
Can anybody has thought to get the net value of Quantity Contract after saving???
Thanks & Regards
PKBHi Pranaya ,
As it is a quantity contract , therefore the Target Value is not mandatory .
If you wish to make it mandatory goto
sproMaterials ManagementPurchasingContractDefine Screen Layout at Document Level for contracts.
Select the field selection MKK and in Administrative data, header you can make it mandatory.
Regards
Ramesh Ch -
Vendor code in Purchase order changed after invoice,net price showing zero.
Dear Experts ,
In one purchase order , user had done GR & invoice for a line item ( service ),item category "D" , and
thereafter somehow the system allowed user to change the vendor code. The PO line is now having amounts in
the sub-service line items , but net price for the line item is showing as zero. Since the PO was made
directly without any contract/RFQ/PR , there is no reference document or info record shown against the line
item.
In the conditions tab of Item details,the condition for basic price is not seen & since there are no amounts
applicable for the other conditions such as insurance , octroi etc., the NET price shown for the item is
Zero, which is also getting printed in the PO as zero , which is not acceptable , as we can not send to the
vendor PO copy having prices for individual services printed correctly but the total gross price showing
zero.
Pl advise what can be done so that Net Price is shown correctly & not zero.I think the new vendor is having a different pricing schema than the old vendor. Check the pricing schema for the old vendor (in purchasing view in field 'Schema Group. vendor) and compare it to the new vendor. I think they're different.
If it is then what i think happening is the user already input the price for the condition type in pricing schema A, then the vendor is changed and the new pricing schema is kiciking in thus making the old condition type missing.
Try to either:
A. Change to the old vendor back,
B. Change the pricing schema of the new vendor to be the same with old vendor -
Changing Net Price using bapi 'BAPI_PO_CREATE1'
Hi All,
I have a requirement to create the PO using BAPI .In this , the Net Price value is automatically updated from Info record.
Can any one pls suggest the procedure how to update this Net Price through a flat file , and not through the info record.
Thanks in advance...
Regards,
Sivani.HI,
Try to set the IMPORT paramter NO_PRICE_FROM_PO = 'X'.
also if u want the data from the flat file collect the data from flat file to internal table.
loop through that internal table
call BAPI.
endloop.
Hope this solves ur problem
Thanks ,
Ruchi -
Change of Net Price in Sales Order
Hello Experts!
I wanted to know how the "Net Price" of a sales order can be "changed" by the system or "indirectly" by the user. I have an issue with the net price that changed in the sales order, and wanted to know how this could have happened; <b>besides</b> changing the pricing conditions, price adjustments, and order surcharge. Is there someway the system could have changed it or user "indirectly"? Please advise. Thank you in advance!
WCNet price is not changed directly.
It's chanegd via changes to pricing only unless you have some code which updates this field AFTER SAP calculated it based on pricing conditions.
NOTE: if you reject line items it's vlaue is substracted form order net value, the same is true if any of your pricing conditions is made inactive due to various reasons.
Changes to pricing condiitons are not shown in order change history, you can see changes per condition record, but if any of your conditions in sales order was made inactive - you won't see it in change log. One of the options may be - if you generate any outputs (IDOCs) which send pricing info - you can check those IDOCs to determine when & what was changed in the pricing of your order. -
Net Price not Updating Using BAPI : BAPI_CONTRACT_CREATE
Dear Experts,
I am facing an issue while creating CONTRACT using the bapi: BAPI_CONTRACT_CREATE. I am creating the Contract based on data from my excel sheet. And we are maintaining the INFO RECORDS for the same materials.
In the excel sheet we are providing the NetPrice (NETPR) and creating the Contract. My issue is " instead of taking the Net Price from the excel it is taking the Net Price from Info Records". For Example, if for a Particular material the Net Price in our excel file is 125, after bapi execution, the net price is updating as 100 instead of 125 in Contract Creation( ME31k-ME33K). In the Info Records we are maintaining this net price(100) for that material.
Thanks in Advance for your response.
Regards,
Prasadyou can use BAPI_CONTRACT_CREATEFROMDATA
* Create Contract Order Number [BAPI_CONTRACT_CREATEFROMDATA]
CALL FUNCTION 'BAPI_CONTRACT_CREATEFROMDATA'
EXPORTING
contract_header_in = header
convert = 'X'
IMPORTING
salesdocument = v_order
TABLES
return = t_return
contract_items_in = itab_item
contract_items_inx = itemx
contract_partners = t_partners
contract_conditions_in = t_conds
contract_conditions_inx = t_condsx
contract_data_in = t_contract
contract_text = t_texts. -
Change the Scheduling agreement net price through BAPI_SAG_CREATE
Hi all
I want to change the item net price of Purchasing scheduling agreement through bapi BAPI_SAG_CHANGE.I passed the item no ,and the net_price in the table parameters Item, Itemx and i passed the item no , condition record no , condition type ,condition value in the following table parameters Item_condition.Item_conditionx.I passed the validity periods in the Item_cond_validity Para meter.
Once i run the bapi i got the below 3 messages
1.Instance of the object type Purchase SchedAgreement has been changed.
2. Scheduling Agreement changed
3.Change NETPR could not be effected.
The net price change are not effected.
So, what are the mandatory parameters and data i need to pass
to change the net price?
Regards,
KranthiHello Kranthi,
How did you solve this? I am trying to do the same but I get the same message as you do.
Thanks in advance!
Kind regards,
Jamiros
Maybe you are looking for
-
Flash and quicktime export not possible at all!
hi iwork dev team! as there was no result on my prev post, here again: i use keynote'08 4.02 on imac with 2gb and osx 10.5.2. i created a presentation with 15 slides and over all 16,5 minutes. each slide has a mp3 sound file attached (the speakers vo
-
Does Time Machine backup iCal?
I had a problem with some lost todo items the other day and checked to see if I could see a backup calendar as a quick way to solve the problem. If I am on address book and enter time machine, I see backups of my old address books and if I am on mail
-
IMac monitor has stopped working
On boot up/bringing the system out of sleep the monitor flashes for a second, if it's coming out of sleep I can see the desktop/any windows currently open before it dies. Currently I'm using an external monitor which works fine however it's still ann
-
WHY CAN'T I EVER GET A REDEEM CODE TO WORK FOR A MOVIE
ican never get a movie with a redeem code to download, the message always comes up "session timed out try again
-
How to create TAB deliminated file
Hi, When we download a file from interanl table using GUI_DOWNLOAD function module how can we make it TAB Delimated.