How to access/display custom pricing condition values in the webshop (eg. o
Hello,
we are using B2B with IPC-pricing, using our own pricing conditions. Calculation of the prices works fine (can be verified when enabling the price analysis link).
Now we need to show some of these own pricing condition's values (not the ones available in the salesdocument header/item like getNetValue, getTaxValue,..) in the shopping basket (order.jsp).
How can we achieve this (eg. get the IPC to transfer these values back to the shop or read them somewhere)?
Thanks for any hint
Kind regards,
Manuel
Hi all,
We've found the solution according to the post from Rajinikanth G and Sateesh Chandra (http://scn.sap.com/thread/2046477). That will work (return any pricing information/details like custom pricing conditions, subtotal1 - 6 etc. as in pricing analysis) for order.jsp (display shopping basket), order_change.jsp and orderstatusdetail.jsp (display order), but not for confirm.jsp (order confirmation / print order).
<%@ page import="com.sap.isa.businessobject.header.HeaderSalesDocument" %>
<%@ page import="com.sap.isa.businessobject.ipc.IPCBOManager" %>
<%@ page import="com.sap.isa.core.UserSessionData" %>
<%@ page import="com.sap.spc.remote.client.object.IPCClient" %>
<%@ page import="com.sap.spc.remote.client.object.IPCDocument" %>
<%@ page import="com.sap.spc.remote.client.object.IPCException" %>
<%@ page import="com.sap.spc.remote.client.object.IPCItem" %>
<%@ page import="com.sap.spc.remote.client.object.IPCPricingCondition" %>
<%@ page import="com.sap.spc.remote.client.object.IPCPricingConditionSet" %>
<%
String priHdrCondTxt = "";
String priItmCondTxt = "";
HeaderSalesDocument hsDoc = ui.header;
UserSessionData usd = UserSessionData.getUserSessionData(request.getSession());
IPCBOManager ibom = (IPCBOManager) usd.getBOM(IPCBOManager.NAME);
IPCClient ipcClient= ibom.getIPCClient();
if (ipcClient == null)
ipcClient = ibom.createIPCClientUsingConnection(hsDoc.getIpcConnectionKey());
ipcClient.getIPCSession().setCacheDirty(); // important to get the correct data
ipcClient.getIPCSession().syncWithServer(); // important to get the correct data
IPCDocument ipcDocument = ipcClient.getIPCDocument(hsDoc.getIpcDocumentId().getIdAsString()); //getIpcDocumentId: null without setCacheDirty and syncWithServer
try{
// Header
priHdrCondTxt += "<br>------HEADER--------";
IPCPricingConditionSet hPriCondSet = ipcDocument.getPricingConditions();
IPCPricingCondition[] hPriCond = hPriCondSet.getPricingConditions();
for(int i=0; i<hPriCond.length; i++)
priHdrCondTxt += hPriCond[i].getConditionTypeName() + "(" + hPriCond[i].getDescription() + ")" + hPriCond[i].getConditionValue() + " //<br>";
//Item
IPCItem[] ipcItems = ipcDocument.getItems();
for(int i=0; i<ipcItems.length; i++)
priItmCondTxt += "<br>------ITEM--------";
IPCPricingConditionSet iPriCondSet = ipcItems[i].getPricingConditions();
IPCPricingCondition[] iPriCond = iPriCondSet.getPricingConditions();
for(int x=0; x<iPriCond.length; x++)
priItmCondTxt += iPriCond[x].getConditionTypeName() + "(" + iPriCond[x].getDescription() + ")" + iPriCond[x].getConditionValue() + " //<br>";
}catch(IPCException e) {
%>
<%=priHdrCondTxt%><br>
<%=priItmCondTxt%>
In confirm.jsp there is no IPC-document available (<HeaderSalesDoc>.getIpcDocumentId()/getIpcConnectionKey() are null). Also BOM -> getBasket()/getOrder()/getCustomerOrder()/getQuotation() are empty. Here we've transferred the necessary pricing informations from basket to confirmation through the UserSessionData.
Set data in order.jsp:
<%
String itemId = "Item-" + item.getProductId() + "SomeValue";
HashMap pricesForConfirm = new HashMap();
pricesForConfirm.put("Header-SomeValue", "Val1");
pricesForConfirm.put(itemId, "Val2");
UserSessionData usd = UserSessionData.getUserSessionData(request.getSession());
usd.setAttribute("pricesForConfirm", pricesForConfirm);
%>
Show data in confirm.jsp:
<%
String itemId = "Item-" + item.getProductId() + "SomeValue";
UserSessionData usd = UserSessionData.getUserSessionData(request.getSession());
HashMap pricesForConfirm = (HashMap) usd.getAttribute("pricesForConfirm");
s2 += pricesForConfirm.get("Header-SomeValue");
s2 += pricesForConfirm.get(itemId);
%>
That whole solution does work fine also when pricing analysis is disabled in XCM. (Note that we've enabled "doItemCalls" in backendobject-config.xml according to note https://service.sap.com/sap/support/notes/1004533, but we did not use the ExtensionData-mechanism to transfer data from/to ABAP, because that would need changes on ABAP- (to fetch and fill) and Java-side (to read and display) and because we could not find/access relevant pricing information from IPC at the time the BAdI is called. Also the BAdI CRM_ISA_HDR_PRICING mentioned in the note does apply for the web catalog. We've used that to give IPC more information to calculate the netValue using additional pricing conditions for the catalog.)
We've also implemented note https://service.sap.com/sap/support/notes/892761 to show a different price (eg. grossValue) in the mini basket (total items and price in basket).
If there's a need to display a different price in the catalog, there note https://service.sap.com/sap/support/notes/1022962 could be implemented.
Similar Messages
-
How can I display more than one value in Calendar ?
Hi,
the standard (example) script allows for the display of one value only (as I understood). How can I display two or three values, from the very same table ? Students of mine during an HTMLDB workshop in Leipzig did ask that question.
Do we have a more detailed docum. on the use of the calendar ?
pls kindly advise. TIA.
Bernhardmy solution:
Source fo the calendar starts:
snip>
declare
q varchar(32767) := null;
begin
q := 'select "ETA", <--- Date Field and concatination of fields as follows:
"SCHIFFSNAME"|| "ETA_TIME"|| "TERMINAL"||''(br*)'',
null,
null,
null,
null
from "#OWNER#"."SCHEDULE"'; . . . . . . .
snip>
comment on (br*) - you have to use "<" and ">" instead of "( " and ")" to have the "break/new line effect"
brgds
Bernhard -
Hi All,
I have a strange issue, where in when we eneter a material into sales order(VA01/Va02), there is a customized pricing condition type which is triggered. But the problem is, the condition base value appears zero and net value is calculated accordingly. When we save the sales order, the COndition value appears and net value changes because of this. Initially Condition value appears zero. It is an Item condition. Whet could be the reasons for this discrepancy.
Thanks ,
SwathiHI,
Kindly Check your Pricing procedure in V/08 , and also check in Sale order level how system is calculating what is the value is picking based on that you can do the necessary changes in pricing procedure
Regards,
Prasanna -
Billing header pricing condition value
Hi,
I have requirment to display billing header pricing condition value. I have check using first go to Vbrk then find Knumv field,go to KONV and find all condition record value.
But in KONV there are only Items condition record SO how to find header. please replyHi ,
Instead of KONV, get the header condition value from KONH
regards,
santosh -
How can I get SD pricing conditions list as in VA01 without creating SO?
Hi Guys,
I have searched a lot of posts for this answer but only found that it's not possible to do through function 'PRICING' without creating SO document.
My initial input is: sales organization, distribution channel, customer, material number, pricing date. Can I find relevant pricing conditions based on this info? I need to make a report, which would display all pricing conditions with values based on the selection parameters mentioned earlier. Thanks for any help.Use function module 'PRICING'
This is a pretty big task interms of collecting all the required data.
Check where used list for pricing. This is used in 2 places. Put a break point on them and run your sales order transaction. See what are the fields passing through.
You can also determine from KOMK and KOMP . One for customer and the other for material. Make sure you pass all the data that is required.
You will get results of conditions in importing table. (may be konv)
Using simulate will actually creates a document number (i believe). Even though this will not be available in VBAK, VBAP... the number will be taken off from the sales order number range.
I have used PRICING function module in of my work. -
Custom Pricing Conditions not working for a PO in SRM
Hi Experts,
We are on SRM 5.0, ECC 6.0 , Extended Classic Scenario.
We configured the pricing conditions in SRM . We defined the our custom pricing condition types as below
Condition type --- Condition Class --- Calculation Type
Frieght(%) --- Prices --- Percentage
Frieght Value --- Prices --- Fixed Amount
We also defined the Calculation Schema.
But when we try to define the pricing conditions in SRM during PO creation\change , the standard pricing condition types work but when we input the above defined custom pricing condition type, the value entered gets cleared. Pricing Overview is not calculating the values of the custom Pricing condition types.
Please assist as where i have gone wrong. Do I need to run any standard report for pricing or do i have to implement any BADI.
Thanks,
Addy.Hi Sanjeev,
I have run SM52 and VMC is active with 4 VM's .
Please suggest.
Thanks,
Addy.
Edited by: Addy1209 on Nov 18, 2010 4:28 PM -
Crm_order_maintain ,changing pricing condition value at item level
Hi,
I am trying to change the pricing condition value at item level while creating sales order through CRM_ORDER_MAINTAIN.
I am not able to change the condition value.
Code is below.
wa_inputfields-ref_guid = wa_orderi-guid.
wa_inputfields-ref_kind = 'B'.
wa_inputfields-objectname = 'PRIDOC'.
wa_fieldname-fieldname = 'KBETR'.
append wa_fieldname to wa_inputfields-FIELD_NAMES.
wa_fieldname-fieldname = 'KMEIN'.
append wa_fieldname to wa_inputfields-FIELD_NAMES.
wa_fieldname-fieldname = 'KPEIN'.
append wa_fieldname to wa_inputfields-FIELD_NAMES.
wa_fieldname-fieldname = 'KSCHL'.
append wa_fieldname to wa_inputfields-FIELD_NAMES.
wa_fieldname-fieldname = 'WAERS'.
append wa_fieldname to wa_inputfields-FIELD_NAMES.
INSERT wa_inputfields INTO TABLE it_inputfields.
wa_pricing_add-KSCHL = 'ZP06'.
wa_pricing_add-WAERS = 'USD'.
wa_pricing_add-KBETR = '10'.
wa_pricing_add-KPEIN = '1'.
wa_pricing_add-KMEIN = 'ST'.
INSERT wa_pricing_add INTO table it_pricing_add .
wa_pricing-REF_GUID = wa_orderi-guid.
wa_pricing-REF_KIND = 'B'.
wa_pricing-PRICING_TYPE = 'A'.
wa_pricing-COND_ADD = it_pricing_add.
wa_pricing-PRICING_PROCEDURE = 'ZVDSP'.
append wa_pricing to it_pricing.
Can you tell me how to overwrite the condition value while creating sales order using crm_order_maintain.?
Regards,
Indhra.EHello Indhra,
Check the CT_INPUT_FIELDS table, in the OBJECTNAME field you will find all the tables that are filled during the function call. Check those tables mentioned in the OBJECTNAME to look for any pricing related data.
When your order is in change mode and you activate debug <b>just before you make the change</b>, the CRM_ORDER_MAINTAIN FM call contains <b>data only relevant for the change you just made</b>. In other words, you need to fill exactly the same tables as CRMD_ORDER does.
E.g. You just change the pricing procedure and you see in debug that 5 tables are filled, you must do exactly the same in your code! It's quite anoying but you're using a low-level API FM that can handle ANY transaction type in CRM!
Check it, it works!!
<b>Reward points if useful!</b>
Regards,
Joost -
Receive "The page cannot be displayed" for Pricing Conditions
To all,
I receive the message "The page cannot be displayed" for Pricing Conditions when I select the "Accesses" button. I then received the message "HTML field saved to C:\temp\CRM_IPC.html".
This only seems to happen when using the pricing in the service order confirmation.Hi Bob,
R u using IPC for pricing, if yes just check the connections to the IPC server.
The error is because of the IPC connection not getting established.
<b>Please reward points if it helps.</b>
Regards,
Amit Mishra -
Modification of MIGO Financial Posting from Custom Pricing Conditions on PO
Hello All,
I am currently at a client where there are 7 custom Pricing Conditions associated with Sub-Contracting POs. Because there is a Global Template in place, there is no way to include these custom Pricing Conditions in the typical Purchaing Automatic Account Determination.
We are considering a custom development whereby we would associate each custom Pricing Condition to a unique Expense GL Account, but have it all lumped to the same GR/IR LIability Account.
My big question is....does anyone know where/how we can hook up a User Exit, BAdI, BAPI, or some other method to affect the GL Posting based on a look up table, upon the posting of a MIGO transaction?
Any assistance with this would be greatly appreciated.
Thank,
Marchi,
in the condiion type remove the Quantity scale basis and try
Thanks -
Pricing Condition Values in Sales order
Hi Guru's
Where the Header level Pricing condition Values stored in Sales Document?
Thanks and Regards
Srinivas KapugantiHi srinivas
Generally the values are stored at the following tables :
KOMK - header data is stored
KOMP - Item data is stored
You can check these tables through SE11 or SE16
Regards
Srinath -
BAPI_PO_CHANGE, changing condition value in the purchase order
Hi Friends,
I have a requirement,
a flat file is present in the application server that contains the information about PO,PO-ITEM,Condition type, movement type , condition value, plant, storage location .
And i m calling the bapi "BAPI_PO_CHANGE" and passing the po number to it.
the bapi returns the following tables, i_return, i_header,i_cond, i_item,i_itemx.
But the purpose of calling the BAPI is, to check, if the condition value in the specified PO is '0', then it has to replace with the value of condition type present in the flat file.
But when we check the tablei_return, its shows error type.
And the PO is not updated with the new condition value.
Help me out in sorting this problem, by telling me
what value is to be passed to the respective BAPI and what should i do to solve the issue?
and after that i m using a BAPI " BAPI_GOODSMOVEMENT_CREATE".
and it is for the purpose of creating the GR(Goods Receipt),
when i go through the i_return table of the bapi, it si returning a message that "BAPI_201 Unable to create goods movement".
Help me in proving the input to those bapi's and how can i get the expected output?
And let me know, what the bapi's ,"BAPI_COMMIIT" and " BAPI_ROLLBACK" , will be doing?
Edited by: kumar t on Aug 9, 2008 1:02 PMHI
[Check the Link|http://abap.wikiprog.com/wiki/BAPI_PO_CHANGE]
[Commit|http://abap.wikiprog.com/wiki/BAPI_TRANSACTION_COMMIT]
[Roll Back|http://abap.wikiprog.com/wiki/BAPI_TRANSACTION_ROLLBACK]
Regards
Pavan -
How to create a custom task in SRM for the standard task
Hi Gurus,
How to create a custom task in SRM for the standard task eg: TS10407929
regards,
George.from PFTC itself. Same.
-
I like the bookmarks on the left side of the screen. I don't want to be navigating through a tree of all of my various bookmarks. How can I display all of my bookmarks along the left side of my browser window like earlier versions of Firefox?
View > Sidebar > Bookmarks (Ctrl+B)
Press F10 or tap the Alt key to bring up the "Menu Bar" temporarily if the Menu Bar is hidden.
*https://support.mozilla.com/kb/how-do-i-use-bookmarks -
How can we make the value of pricing condition flow to the sales invoice?
At an intercompany process, we have the condition type PBXX at the purchase order. On the other hand, at the sales invoice (which is created by VF01) of the sames process, there exists the condition type PR00. The calue of the condition types PBXX and PR00 should be the same. How can we make the value of PBXX flow to the sales invoice? I can create new pricing procedures if needed. I can change the types of the pricing conditions (such as PBXX or PR00) included at the procedures (by customization) if needed. All I need is to have the value of the price at the purchase order the same with the sales invoice at the same process. The transaction codes used at this process are:
ME21N - Create purchase order
VL10D - Create delivery
VF01 - Create invoice
Thanks in advance for the answers...Yes, i verified that the config item id in the pricing table and the cz_config_items table are the same (once we save the configuration).
The reason we have to do this is coz I have to pass additional parameters, which are item speciific (captured at confiugurator runtime session) while making a call to the pricing engine.
Hence, we are capturing some additional pricing parameters (during a runtime configurator session) in a custom table, and plan to link those to the corresponding items in the 'CZ_Pricing_Structure' table thru the config_item_id. -
Wrong pricing condition values when using GN_INVOICE_CREATE
Hi all,
I am currently handling a program where I have to display all the materials in a given sales area and some corresponding values that depend on pricing conditions. I am using FM GN_INVOICE_CREATE to extract table komv. However, I am experiencing a problem because the values I am getting are different from those in table konv. I am getting the price conditions without the value of field KNUMV.
I would like to ask if anybody has any idea on how to go about this or maybe another function module that I can use to get the data I need.
Thanks a lot..
Regards,
jacHi,
Thanks for your reply. I only have the field AUART for checking on the pricing conditions.
Here is a the part of my code
CALL FUNCTION 'GN_INVOICE_CREATE'
EXPORTING
vbsk_i = i_vbsk
id_kvorg = ''
id_no_dialog = c_exis
invoice_date = p_datum
pricing_date = p_datum
IMPORTING
vbsk_e = i_vbsk
TABLES
xkomfk = i_komfk
xkomfkgn = i_komfkgn
xkomfkko = i_komfkko
xkomv = i_komv
xthead = i_thead
xvbfs = i_vbfs
xvbpa = i_vbpa
xvbrk = i_vbrk
xvbrp = i_vbrp
xvbss = i_vbss
EXCEPTIONS
OTHERS = 1.
The only parameters in those that have values are c_exis = X, p_datum = given date, and xkomfkgn. The other parameters are all initial when passed to the function module. I get a resulting komv table however, values are incorrect.
Thanks again for the help..
Regards,
jac
Maybe you are looking for
-
Can I attach two scanners each having a different twain drivers
Can I attach two scanners each having a different twain drivers? I have a brothers all in one printer (scan print fax) it has a twain driver for the scan. I want to add a slide scanner to my system, it requires a different twain driver. Ia thi a prob
-
HT201210 my iphone is locked up "in recovery mode" need help unlocking
Does anyone have any idea how to unlock "iphone in recovery mode". videos from youtube have not worked
-
I was informed to go to Finders and click on launch pad, and I did and the launch pad opened, but it does not automatically go to the dock, and I can't find a way to get it there.
-
Im working on a REM environment. I have a problem in the Capacity Planning 1.Im using the CM21 for sequencing my planned orders. 2.I have created some individual capacity for one workcentre. 3.When itry to use the CM27 i dont find any planned orders
-
SQLLOADER : How to use to Id from another table
Hi , We want to use sqlloader to load data from input file into multiple temporary tables, which will be called by us as 'Load Tables'.We will have three directories 'Input' , 'Working' and 'Acrhive' . All input files before processing will be in 'in