Function to simulate PO pricing
Hi,
I am using function ME_PO_PRICE_SIMULATION to recalculate purchase rebate agreement in a querry.
The FM didn't work if an article get a flag for deletion or a status which didn't allowed the purchase.
Is there an other FM to simulate the purchase pricing ?
Is there a FM to calculate or recalculate the rebate agreement condition ?
Thanks
Hi,
The FMs
ME_PRICE_SIMULULATION_PROCESS
ME_SOURCE_PRICE_SIMULATION
didn't give the pricing.
Or if yes how do you use it ?
Thanks
Ké
Similar Messages
-
Hello all,
I am facing a bit of a challenge in finding a FM that would allow me to get the current price of a PO item (simulate pricing) that fits my requirements. I have tried BAPI_PO_CREATE1 in test mode and ME_PO_PRICE_SIMULATION, which do what I need -- except they both require SAP authorization to create a new PO. Unfortunately, these are not good in my case because users with only display privileges should be able to run the report I am currently working on, it currently gives an error since they don't have the permissions.
Does anyone know any other FM's or methods that I could use to simulate pricing, that does not require privileges to be able to create a new PO?
Thanks,
DanMy workaround was to make a copy of ME_PO_PRICE_SIMULATION, and create a copy of the include LEINJF0S, and add an export parameter to the function call 'ME_CREATE_PO_HEADER' (I_NO_AUTHORITY_CHECK = 'X') which bypassed the authority check for PO Create.
-
Function module to get Pricing conditions of billing document
Hi All,
Please help me getting the pricing condition values for a billing document. I got values from KONV table against perticular Condition type. but i need to get the values against step number maintained in Conditions for my billing item. is there any function module to get all condition data maintained in document with totals and discounts aswell.
Please help me. if required i will give tou full details what i required.
Kumar.Hi Kumar,
Please check below mentioned Function Module for details:
RV_PRICE_PRINT_GET_BUFFER
RV_PRICE_PRINT_GET_MODE
RV_PRICE_PRINT_HEAD (Header)
RV_PRICE_PRINT_HEAD_BUFFER
RV_PRICE_PRINT_ITEM (Item)
RV_PRICE_PRINT_ITEM_BUFFER
RV_PRICE_PRINT_REFRESH
Regards,
Tutun -
TABLE function to simulate parameterized view
Hi all,
Since view can not have parameters, I tried to used stored procedure to return ref cursor then used TABLE function in select statement to simulate a view with parameters, since it's easy to pass parameters to a stored procedure.
The idea is like this
function foo (p1 int, p2 int)
return sys_ref_cursor
c sys_ref_cursor -- sorry, i forgot the buildin ref cursor name, just used
this as pseudo code
is
open c for select * from table_a where col1=:p1 and col2=p2 using p1, p2;
return c;
end;
select * from table(foo(1,2)) does not work, I know that I can iterate throught
the cursor and pipe it out to a SQL type in function foo, then use TABLE
function in SELECT statement. However, it seems so much coding work. Is it the
only way or do you have better idea?
Thanks in advance.It is just not correct that you cannot parameterize views.
Nicolas gave you a link above which has an example using a context.
Even before Oracle supported contexts you could have parameterize views using package variables.
SQL> create or replace package pkg_vars as
2 function get_job return emp.job%type;
3 procedure set_job (p_job in emp.job%type)
4 end pkg_vars;
5 /
Package created.
SQL>
SQL> create or replace package body pkg_vars as
2 g_job emp.job%type;
3
4 function get_job return emp.job%type)
5 is
6 begin
7 return g_job;
8 end get_job;
9
10 procedure set_job (p_job in emp.job%type
11 is
12 begin
13 g_job := p_job;
14 end set_job;
15 end pkg_vars;
16 /
Package body created.
SQL>
SQL> create or replace view view_emp1 as
2 select deptno, count(empno) cnt
3 from emp
4 where job = pkg_vars.get_job
5 group by deptno
6 ;
View created.
SQL> select distinct job from emp;
JOB
CLERK
SALESMAN
PRESIDENT
MANAGER
ANALYST
5 rows selected.
SQL> exec pkg_vars.set_job('CLERK');
PL/SQL procedure successfully completed.
SQL> select * from view_emp1;
DEPTNO CNT
30 1
20 2
10 1
SQL> exec pkg_vars.set_job('MANAGER');
PL/SQL procedure successfully completed.
SQL> select * from view_emp1;
DEPTNO CNT
30 1
20 1
10 1
SQL> -
Function Module to change pricing condition in Agreement
Hi Experts ,
While creating purchase agreement (ME31L) BDC i want to change the pricing condition in the document at item level .
Planing to use function modules to change the pricing condition after document is created .
Any help in function module which will change the pricing condition in Agreement will be appreciated .
Any other suggestion are also welcome (-: .
Thank You .how to change the pricing consition in agreement(ME31L)
-
Vendor partner function not available for pricing
Dear Consultants,
I am using a self defined partner function which is a vendor and attached to my customer master in sales area data tab.
I have defined a condition table in which one of the key is this partner function. The condition record is maintained for this combination but during sale order creation this value is not getting determined in pricing. In the pricing analysis screen a exclamaiton sign is seen against this.
Kindly help as to how to make the system read the value attached in the partner function tab.
Thanks & Regards
SourabhYou will need to populate it in MV45AFZZ in userexit_pricing_prepare_tkomk.
-
Bapi or function to simulate billing plan
Hi,
I need to use a function module or a bapi to simulate (but no create) billing plan in the contract items. (VA42)
I know this function module : BILL_SCHED_GENER_UNTIL_HORIZON.
But even if i fill the different structures, i don't have any datas in the output tables.
Do you know another "moreeasy to use" function or bapi to simulate billing plan ?
I know this one : BILLING_SCHEDULE_GENERATE but it's harder to use it.
ThanksHi,
I progressed with the use of this function module.
I will try to explain how i used it and maybe someone could tell me if 'im wrong somwhere.
So i select a document in VBAK. I also get the corresponding datas in VBAP, VBPA, VEDA, VBKD, FPLA and FPLT.
I forced the field endat of FPLA at 2009/12/31 and the billing plan of this document is generated until 2008/12/31.
So, what i expect is to generate the missing datas in the internal table FPLT (i first only have datas until 2008/12/31 and would like to generate billing plan until 2009/12/31)
I get the KOMK and KOMP data with this FM :
CLEAR : s_komk, s_komp.
CALL FUNCTION 'SPR_KOMK_KOMP_FILL'
EXPORTING
pi_i_spr = s_pispr (Get with MF PISPR_FILL)
IMPORTING
pe_i_komk = s_komk
pe_i_komp = s_komp
EXCEPTIONS
org_structure_not_completed = 1
OTHERS = 2.
I filled the VEDA_HEADER strcture with FM :
CALL FUNCTION 'SD_VEDA_SELECT'
EXPORTING
i_document_number = veda-vbeln
i_item_number = veda-vposn
i_trtyp = 'A'
IMPORTING
e_vedavb = s_veda_header.
MOVE s_veda_header TO s_veda_header2.
CLEAR s_veda_header2-vposn.
I filled the internal tables fpla and fplt with this FM :
REFRESH : t_fpla_old, t_fpla_new, t_fplt_old, t_fplt_new.
CALL FUNCTION 'BILLING_SCHEDULE_READ'
EXPORTING
fplnr = s_vbkd-fplnr
TABLES
zfpla = t_fpla_old
zfplt = t_fplt_old.
So, here are the values passed to the function module :
CALL FUNCTION 'BILL_SCHED_GENER_UNTIL_HORIZON'
EXPORTING
i_fplnr = vbkd-fplnr
i_waers = vbak-waerk
i_komk = s_komk
i_komp = s_komp
i_kompax = kompax
i_fkrel = 'I'
i_absagen = 'D'
i_kfplan = ''
i_veda = s_veda_header
i_veda_kopf = s_veda_header2
IMPORTING
e_kompax = kompax
TABLES
fpla_new = t_fpla_new
fpla_old = t_fpla_old
fplt_new = t_fplt_new
fplt_old = t_fplt_old.
So, i have the correct generated lines in t_fplt_new, until 2009/12/31, but i dont' have any amount in netpr field, for all lines, even the first ones that had amount in t_fplt_old.
So if anybody knows if i forgot something or if i'm wrong somewhere, please tell me. Maybe it's not the good way to simulate billing plan.
Thanks
Ps : if you need more details or if i'm not clear, tell me. -
BAPi/call function that calculates the pricing condition in CRM order
Hello Experts,
Can anybody suggest me which BAPI to be used in order to recalculate the pricing condition that is already maintained in the CRM order.
I'm trying to upload .txt file which contains basic price value ( condition type ZPR0 ) to update in the order. This new value should over write the existing one in the CRM order & recaluclate the tax & other condition types in the pricing procedure. Can anybody suggest me how to go abt.
Regards
Devika.S
Edited by: Devika.S on Apr 7, 2009 7:07 AMHi Devika,
Can you have a look at these two BAPIs as listed below to see if any of them fits your requirement?
BAPI_BUPA_FRG0030_ADD - Add pricing data
BAPI_BUPA_FRG0030_CHANGE - Changing pricing data
Hope this helps,
Cheers,
Sougata. -
BAPI or FM to Simulate Pricing for Sales order
Hi,
We are replicating sales order processing using Webdynpro(Portal).In that we are done with sales order Create,Change,Display except pricing for new custom condition types.
The rquirement is whenever the user added new custom Condition Type along with the Condition amount for the line item the net value for the line item should be recalculated and should be dispalyed in the screen.
I have searched for any BAPI or Function Module to calculate the pricing in Simulation mode and return the Netvalue for the Sales order line item.But no luck.I need to know is there any BAPI or FM avaliable for the same?
Regards,
Vigneswaran SHi Namesh,
Thanks for the reply.I think you are not getting my point.We dont have any issues in SAP GUI.We are developing Sale order screen in Webdynpro and in that we have to handle the pricing part.Means that whatever operation user can do in pricing (like changing the condition amount and immediately net value will get upadted) in SAP GUI,has to be done using Webdynpro(portal) as well.To do changes in Pricing condition type and amount at webdynpro side,we have to simulate the pricing using BAPI inorder to recalculate the net value and display it on the webdynpro screen.Please tell me is ther any FM or BAPI to calculate the pricing.
Regards,
Vigneswaran S
Edited by: Vigneswaran S on May 14, 2008 11:44 PM -
hello,
which function module do the pricing in SD?
Which parameters are necessary to start this function module?
Thanks,
Haraldhi,
The following is used in SD to calculated pricing ,
You need to fill the komk & komp structure and pass the structure komv .
call function 'PRICING'
exporting
calculation_type = 'C'
comm_head_i = komk
comm_item_i = komp
importing
comm_head_e = komk
comm_item_e = komp
tables
tkomv = komv.
saravanan -
Module function to create and read pricing condition
Hello,
I am looking for an easy function module that enable us to get the pricing condition record ?
(As transaction for example VK13)
And I am looking for a function module to create pricing condition ?
(As transaction XK15 or at least VK11)
Thanks in advance,
Maximefor creating try BAPI_FTR_CONDITION_CREATE (no experience with this one..)
for reading use Function SD_COND_ACCESS
consider more than one Condition Table may be involved via AccSeq for your KSCHL.
Fill KOMK and KOMP accordingly for all Tables of AccSeq for the KSCHL
Cheers
carsten
example:
*& Report ZCAWA_CONDR
TESTREPORT
Konditionen lesen via Zugriffsfolge des eingegebenen KSCHL
C.Wagener, 11.02.2009
REPORT zcawa_condr.
PARAMETERS:
p_kappl TYPE kappl DEFAULT 'V',
p_kschl TYPE kschl DEFAULT 'ZGRA',
p_vkorg type vkorg default '0100',
p_vtweg type vtweg default '00',
p_datum TYPE sydatum default sy-datum,
p_mlfb type YYBCEZNDR default '6MD90001AA'.
DATA: ls_komk TYPE komk.
DATA: ls_komp TYPE komp.
DATA: ls_konp TYPE konp.
DATA: lt_t682i TYPE TABLE OF t682i WITH HEADER LINE .
DATA: ls_koprt TYPE koprt.
DATA: lt_conditions TYPE TABLE OF a000 WITH HEADER LINE.
DATA: ls_sdprothead TYPE sdprothead.
ls_komk-prsdt = p_datum.
ls_komk-vkorg = p_vkorg.
ls_komk-vtweg = p_vtweg.
ls_komp-zzyybcezndr = p_mlfb.
Tabellen der Zugriffsolge zur Konditionsart ermitteln
SELECT * FROM t682i AS a
JOIN t685 AS b ON
akvewe EQ bkvewe AND
akappl EQ bkappl AND
akozgf EQ bkozgf
INTO CORRESPONDING FIELDS OF TABLE lt_t682i
WHERE b~kvewe EQ 'A'
AND b~kappl EQ p_kappl
AND b~kschl EQ p_kschl.
pro ZugFolgen-Tab-Eintrag FuBa aufrufen
LOOP AT lt_t682i.
CALL FUNCTION 'SD_COND_ACCESS'
EXPORTING
application = p_kappl
condition_type = p_kschl
date = p_datum
header_comm_area = ls_komk
position_comm_area = ls_komp
t682i_i = lt_t682i
koprt_i = ls_koprt
TABLES
condition_records = lt_conditions
EXCEPTIONS
field_is_initial = 1
not_read_unqualified = 2
read_but_not_found = 3
read_but_blocked = 4
t682z_missing = 5
t681v_missing = 6
t681z_missing = 7
mva_error = 8
OTHERS = 9.
und raus, wenn Treffer
READ TABLE lt_conditions INDEX 1.
IF sy-subrc EQ 0.
SELECT SINGLE * FROM konp INTO ls_konp
WHERE knumh EQ lt_conditions-knumh.
IF sy-subrc EQ 0.
IF ls_konp-konwa EQ '%'.
ls_konp-kbetr = ls_konp-kbetr / 10.
ENDIF.
WRITE ls_konp-kbetr.
EXIT.
ENDIF.
ENDIF.
ENDLOOP. -
Copy Pricing Cond. from PO to Billing Doc. in 3rd Party Sales
Background
For Third Party Processing, the standard SAP "Document Flow" is:
Sales Order -> Purchase Order -> Invoice Receipt -> Billing Document
Question 1
We have this Third Party Model described above mplemented with my current customer. Standard SAP Condition Type VPRS is in the SD Pricing Procedure and during Sales Order creation it is determined via Material Master. However, after the Invoice Receipt is created against the PO, it appears that VPRS is redetermined in the Billing Document based off of the 'Cost' from a Condition Type in the PO.
My question is as follows: How does it 'know' to do this??? I do not see any code or calculation type in the Pricing Procedure that tells it to pull it from the condition type in the Purchase Order. Where is this code - or - where is this functionality derived from in Pricing Configuration???
Question 2
This question is dependent on Question 1, but is it possible to pull other pricing values from the PO into a different Sales Order condition type(besides VPRS of course) using stricly Pricing Configuartion or do I have to code some sort of Calculation Type to do this?
Thanks for any help here!
MikeHello Mike
Question 1:
It knows it from config as you rightly guessed. Let me quote from SAP help documentation:
Documentation for VPRS says "For a third-party business transaction, the costs are determined from the purchase order:"
If Customizing has been configured appropriately, the system determines the cost for third-party order processing from the value of the vendor invoice plus proportional statistic conditions (for example, cash discounts or statistical freight) from the purchase order in Materials Management.
The quantity indicator in the billing documentu2019s document flow then controls where the cost comes from. Activate indicator F in the Billing quantity field (billing quantity equals goods receipt quantity minus quantity already billed).
This is in copy control. VTFA - Item cat settings
Links:
http://help.sap.com/erp2005_ehp_04/helpdata/EN/d7/5cf0e89e5911d2959e00a0c9306794/frameset.htm
http://help.sap.com/erp2005_ehp_04/helpdata/EN/eb/85a078893811d2ac830000e8a5bd28/frameset.htm
Question 2:
I don't think it is possible to pull other pricing values from the PO into a different Sales Order condition type using strictly Pricing Configuration. You will have to code some sort of formula ( Alt. Cond. Base value/Alt. Condition Value) to do this.
Hope this helps. -
Restrict Pricing updates in Sales Order
Hi All,
I have created a pricing conditon formula to get the price for the real time contract price from a third party Contract management system through a RFC call, and assigned the formula to a condition type.
In this formula, if there was an error i am exporting the error message to a memory and importing the value from that memory to set a billing block in the user exit SAVE_PREPARE_DOCUMENT (MV45AFZZ).
The problem i am facing is that the formula is getting called many times uncessarily for eg. when you click pricing etc
and not necessarily updates the price all times. Actually the price is not updated when called from the following routine and is basically because of the following code.
Form: xkomv_bewerten.
IF xkomv-kofrm NE 0 AND wertformel EQ space AND komp-kposn NE 0.* rettkomv = xkomv*.
xkwert = xkomv-kwert. frm_kondi_wert-nr = xkomv-kofrm. PERFORM (frm_kondi_wert) IN PROGRAM saplv61a IF FOUND. xkomv = rettkomv.
ENDIF.
During Change Sales Order, because of this even a billing block is set before, it is getting cleared without updating the price.
Can somone help me with this?
Thanks.
MartinHi,
Do one thing you could ask your functional consultant to restrict pricing update into IMG Guide. There is pricing where SD consultant restrict the Pricing Updates. If they have problem then let me i will tell you how and where you can do the pricing restriction.
Regds,
Rakesh
Edited by: Rakesh Kumar on Aug 8, 2009 1:35 PM -
Pricing routine is not called even after assigning it in pricing procedure.
Hi
I created a pricing routine (Condition value) for one ZCondition type. I saved it in the workbench request. Functional consultant assigned this pricing routine to condition in Pricing Procedure. The routine was called while creating a PO. It works perfect in development system. But after we transported to quality server the routine is not getting called. Routine is displayed in pricing procedure in quality server. Routine program also exists in quality server. But the program include statement is not found in standard program RV64ANNN in quality. But in development the include statement appears in this program. How this program was not modified in quality server after transport? Its a SAP standard program and it was not saved in any request and was not modified manually too.
Can anyone explain me what could be the reason that the program RV64ANNN is not updated in quality server to include the routine?
How can we update this program without modifying it manually?
Would deleting the pricing routine and recreating it help resolve this problem?Hi,
Refer to the following Notes:
[Note 22808 - Transferring formulas|https://service.sap.com/sap/support/notes/22808]
[Note 388998: VOFM: Check report for entries in TFRM/TFRMT|https://service.sap.com/sap/support/notes/388998]
[Note 28683: PERFORM_NOT_FOUND: VOFM routine is not active|https://service.sap.com/sap/support/notes/28683]
Note 22808 - Transferring formulas is the first place you should look. FYI, there is a lot of information on this topic available by searching for SAP Notes that have "RV80HGEN" and/or "VOFM" as keywords.
Regards,
Jamie
Edited by: James Gaddis on Mar 19, 2008 10:59 AM - Added an additional SAP Note number and comment about searching for more Notes. -
To make the Pricing Condition types inactive in Pricing Procedure
Hi Experts,
I am facing a senario where, in a sales order, pricing procedure, if one of the pricing condition type does not exist, then two other condition types (even though they are determined by condition records), should be either made inactive or should not appear in the pricing procedure.
Example: If I have 3 condition types in Pricing Proc say
YYY1, YYY2, YYY3, then the scenarios are
a. If one of the condition types YYY1 is not determined, then, YYY2 and YYY3 should not be either determined in the sales order or should be made inactive. This same logic applies to both YYY2 and YYY3.
b. If all three condition types are determined in Pricing Proc of the sales order, then, the price should be considered.
If it was just YYY1 then, I could have done it in VOFM by writing a routine and assigning it to YYY2 and YYY3 in pricing proc. However, the scenario is to check the other condition types as well and make YYY1 inactive if any of the other condition type does not exist. Both condition types are determined after YYY1 which is another difficulty.
I tried creating a dummy condition type and assigning it to Pricing Proc (at the end of Pricing Proc). For this dummy condition I put in a pricing requirement which checks for all three condition types and if one does not exist, then it make other conitions inactive.
However, this does not work in VA02 and VA03 as XKOMV is either not getting filled up or even if is getting filled, it is not having the condition type. It some times has condition records, and sometimes not... (not very sure why)
So, I was thinking of using user exit for the same. However, I was unable to find a suitable user exit for the same where KONV table can be read or XKOMV can be filled.
Can you please suggest if any user exit can be used for this or if we can implement it in a different way?
Regards,
Mukund SHi,
I think you can use condition exclusion functionality to select best pricing condition from a set of conditions in pricing. You can compare conditions in many ways.
I believe you can plot a solution with little research. The below link is for your reference.
[http://help.sap.com/saphelp_40b/helpdata/fr/93/743483546011d1a7020000e829fd11/content.htm]
Maybe you are looking for
-
How to search a genre for a specific title in the iTunes Store and have a concise result
How can I search the iTunes for say: Title = "Satisfied" and Genre = "Christian & Gospel" and have a result with only tunes that start with "Satisfied" within the Genre "Christian & Gospel"
-
How do we create generate webservices.xml file?
Hi all, Im new to webservices... im able to generate mapping.xml file using wsgenerate but i dont know how do we generate webservices.xml. Im waiting for ur reply. http://tech.groups.yahoo.com/group/completeJava/ http://tech.groups.yahoo.com/group/co
-
Download internal table data in excel format
Hi , i have a requirement where i need to download the internal table data in excel format .. I tried using the FM SAP_CONVERT_TO_XLS_FORMAT but this downloads to excel sheet same as .txt file foemat without columns ... i need to have the data
-
Problem with opening two frame by single hyperlink
HI to everyone, I making a project , in that i want if i click on a particular hyperlink. then it open two Different frame which is showing different content . one is in the same page in which is h yperlink is appearing pelink (means in the same fram
-
Zip download CRC error javascript
zip download CRC error javascript Hello xperts, i am trying to develop a jsp page containing a javascript code which should download a zip file, i have a script that works fine for this as a separated part ,but when i intgegrate this code to anoter,