JAVA pricing exit in CRM

Hi all,
I'm new to CRM and have been working in ABAP but have only basic knowledge of JAVA. Right now, I have to convert pricing routine in R3 to java in CRM VMC AP 7.0. I have read OSS note about this ( the one with attached PDF on how to implement) , but I still not sure what to code.
I know this is not really a question but please anyone provide me with a coding for JAVA that I can use as a guidance.
ABAP Coding
Pricing routine 903
FORM FRM_KONDI_WERT_903.
data x1_komv like komv.
clear xkwert.
read table xkomv into x1_komv with key kschl = 'ZPRC'.
if sy-subrc eq 0.
xkwert = komp-kzwi1 + x1_komv-kwert.
else.
read table xkomv into x1_komv with key kschl = 'ZCHC'.
if sy-subrc eq 0.
xkwert = komp-kzwi1 + x1_komv-kwert.
else.
xkwert = komp-kzwi1.
endif.
endif.
if not komp-mgame is initial.
xkomv-kbetr = ( xkwert * 1000 ) / komp-mgame .
endif.
ENDFORM.
I know that in JAVA it must start with something like this since the type is BAS.
This is what I copied from the template.
package your.company.pricing.userexits;
import java.math.BigDecimal;
import com.sap.spe.pricing.transactiondata.userexit.BaseFormulaAdapter;
import com.sap.spe.pricing.transactiondata.userexit.IPricingConditionUserExit;
import com.sap.spe.pricing.transactiondata.userexit.IPricingItemUserExit;
public class ZSpecialBaseFormula extends BaseFormulaAdapter {
public BigDecimal overwriteConditionBase(IPricingItemUserExit pricingItem,
IPricingConditionUserExit pricingCondition) {
return pricingCondition.getConditionBase().getValue().setScale(0,
BigDecimal.ROUND_FLOOR);
Please anyone, I really have no idea how to read the condition record in JAVA. Thank you very much for any help.
Gilbert,

Hi,
The problem is somewhat solved.  I just want to share my solution to other in case anyone encountered the same problem.
Instead of using JAVA pricing exit , I insert a code in BADI CRM_PRICING_BADI.  Then I read all the condition type and modify them anyway i want and save it.
This solution is for those that don't need to use pricing in the webshop and don't feel like learning Java.
Gilbert

Similar Messages

  • IPC  java user exit- pricing routines

    Hi experts,
    I am new to IPC  java pricing routines and i have a requirement like this,
    1. The user enters manually in Quote the new price. (say cond type ZNEW)
    2. The cond record for ZTKE is available with the price as well as Max price and Min Price.
    3. The Routine formula should validate with ZTKEcondition record with maximum and minimum price available.
    4. If the new price is within the max/min range then pass it. System will do nothing and accept the manual price entered.
    5. If the price is not within the range then issue error message u2018Price not within the rangeu2019. The system does not accept the manual entry of the new price.
    Please let me know how to approach for the solution of the above.
    I know how to raise the error messages ,my main concern is to check the new price of condition type with the other condition type min n max values.
    Please provide me some pointers on it.
    Thanks.

    Hi Faiq,
    I am facing the same problem as you.
    I tried to solve it via the following code sample:
    throw new PricingRuntimeException([MessageClass], [MessageNumber], [Attributes], [RootCauseException]);
    throw new PricingRuntimeException("ZTEST", 0, new String[] {"test2"}, null);
    But no error appeared.
    Another possibility can be the following method!?
    But I do not know how to use it:
    pricingItem.getUserExitDocument().setStatusMessage(new StatusEvent());
    Perhaps meanwhile you have found another solution.
    If yes it will be nice if you post it.
    Greets Ruben

  • Pricing in SAP CRM 7.0 Ehp1

    Hi Experts,
    I have some doubts in the SAP CRM 7.0 EHP1  pricing.
    1.is IPC part of sap crm or any other third party tool ?
    2. How to find the IPC user exit in the sap crm system.
    3. ERP (R/3 version is 3.1)is the backend system  and already they implemented the pricing conditionS in SD. I know we can dodwnload the pricing conditions from ERP to SD Using midldleware.after downloading the pricing condition where i have to write the code?
    4. JAVA knowledge is required or not for writing the Pricing conditions.(I know only basic java coding and good in abap )
    Please help me.
    Thanks,
    Venkat

    Hi Venkat,
    There's good blog about pricing in SAP CRM 7.0 EHP1 : /people/srini.katta3/blog/2011/04/19/faster-and-powerful-pricing-engine-delivered-with-sap-crm-70-ehp1
    and also take a look at SAP Note Note 809820 - Userexit concept for pricing
    There you can download guide about how to develop user exit Pricing in CRM
    Hope it's help,
    Lina
    Edited by: Linawati Lie on Sep 5, 2011 10:51 AM

  • How do you test your Java Pricing UserExits in eclipse?

    How do you test your Java Pricing UserExits in eclipse?

    do you have to deploy the java class on vmc server to debug it
    Yes
    - So, the classes have to be compiled error free and uploaded to VMC.
    - VMC has to be restarted to test your classes.
    - You have to set the log levels appropriately for your classes using SM53 / SM52.
    -  You can also perform VMC debug through Eclipse.
    all of the details are available in the pricing exit manual*

  • Unable to debug user exit in CRM BW  (EXIT_SAPLRSAP)

    Hi Gurus,
    Please help me to debug user exit in CRM BW.
    I am using below enhancement
    RSAP0001 (Customer function calls in the service API)
    "EXIT_SAPLRSAP_003"
    Datasource is ZSTAONESYS0_TEXT
    The extract structure
    I have modified is "CRM_BIW_ST_T"
    ===========================
    Data Source "I_CHABASNM"
    CASE i_chabasnm.
    ZSTAONESYS0_TEXT -- Data source name
      WHEN 'ZSTAONESYS0_TEXT'.
        CLEAR l_s_crm_biw_st_t .
        LOOP AT  c_t_texts   INTO  l_s_crm_biw_st_t .
          l_tabix = sy-tabix.
          SELECT SINGLE * FROM crm_jest
                   INTO   wa_status
                   WHERE   inact  =  ' '.
          SHIFT wa_status-stat LEFT DELETING LEADING space.
          CLEAR l_stat.
          l_stat = wa_status-stat(1).
          IF  l_stat  = 'E'.
            l_s_crm_biw_st_t-bwstoppt   = wa_status-stat+3(2).
            MODIFY  c_t_texts  FROM l_s_crm_biw_st_t
                                  INDEX l_tabix.
          ENDIF.
        ENDLOOP.    
    ENDCASE.
    ===========
    Should I use a BADI?
    It would be great if you could give me
    relevant definition name for creating new BADI.
    Can I use "CRM_BWA_MFLOW" ?
    I promise to return and reward the answers.
    Really heart warming
    to see the dedication/ participation of
    Bhanu Gupta / A.H.P / Pizzaman and many others
    Thanks in advance, :-D
    AbyJacob, Bangalore
    ===================

    Dear SB,
    I was able to Debug my user exit successfully.
    ==>include ZXRSAU02. "EXIT_SAPLRSAP_003"
    You guys are really a big help
    Keep up the good work.
    Special Thanks to SDN community
    warm regards,
    Aby Jacob, Bangalore

  • Using a Velocity Template in Java User Exit Custom Handler

    I would have thought it would be possible to use a Velocity template in combination with a custom handler in a Java user exit, but I can't seem to figure out how  to do it, and I'm not finding an example of doing this anywhere in the GoldenGate docs.
    For example, I can create a Velocity template and use it to output transactions in the desired format to a file by using a propeties file that looks something like this:
    gg.handlerlist=myhandler
    gg.handler.myhandler.mode=tx
    gg.handler.myhandler.format=./dirprm/my_template.vm
    gg.handler.myhandler.type=file
    gg.handler.myhandler.file=my_output.txt
    What I'm hoping to do is to have a custom handler, and some how  be able to get to the Velocity formatted transaction data in the "transactionCommit(DsEvent, DsTransaction)" method of my custom extension of AbstractHandler by having a properties file that looks like this (same as the above, except for the type, and no file property ... eg:
    gg.handlerlist=myhandler
    gg.handler.myhandler.mode=tx
    gg.handler.myhandler.format=./dirprm/my_template.vm
    gg.handler.myhandler.type=my.custom.GGHandler
    I've verified that I have a valid DsEvent and a DsTransaction with the desired information in by custom handler's transactionCommit method ... and I can even pull out the required data and re-format it there to the desired format so that it looks just like the format that my Velocity template outputs when I'm outputting to a file (as shown in the first properties file).  But shouldn't I somehow  be able to access the Velocity transformation for my DsTransaction in my custom handler?
    Thanks for any assistance / info provided.

    I would have thought it would be possible to use a Velocity template in combination with a custom handler in a Java user exit, but I can't seem to figure out how  to do it, and I'm not finding an example of doing this anywhere in the GoldenGate docs.
    For example, I can create a Velocity template and use it to output transactions in the desired format to a file by using a propeties file that looks something like this:
    gg.handlerlist=myhandler
    gg.handler.myhandler.mode=tx
    gg.handler.myhandler.format=./dirprm/my_template.vm
    gg.handler.myhandler.type=file
    gg.handler.myhandler.file=my_output.txt
    What I'm hoping to do is to have a custom handler, and some how  be able to get to the Velocity formatted transaction data in the "transactionCommit(DsEvent, DsTransaction)" method of my custom extension of AbstractHandler by having a properties file that looks like this (same as the above, except for the type, and no file property ... eg:
    gg.handlerlist=myhandler
    gg.handler.myhandler.mode=tx
    gg.handler.myhandler.format=./dirprm/my_template.vm
    gg.handler.myhandler.type=my.custom.GGHandler
    I've verified that I have a valid DsEvent and a DsTransaction with the desired information in by custom handler's transactionCommit method ... and I can even pull out the required data and re-format it there to the desired format so that it looks just like the format that my Velocity template outputs when I'm outputting to a file (as shown in the first properties file).  But shouldn't I somehow  be able to access the Velocity transformation for my DsTransaction in my custom handler?
    Thanks for any assistance / info provided.

  • ABEND in Java User Exit with RAW DataType

    I have a Java User Exit Extract running against a trail file that has been pumped to the GoldenGate instance in question.  The extract starts up without any issues, but gives the following error after I update a record that has a RAW datatype as the primary key:
    JAVAWRITER(javawriter.c:269) [ERROR]: Error occurred (Java exception): UEDataSource.createOperation:
    com.goldengate.atg.datasource.InvalidTransactionState: A new operation was received without first receiving a BEGIN transaction. This can happen when processing is resumed in the middle of a transaction, or when there are "before" images in the trail that are not being sent to the user exit (always include "GetUpdateBefores" in the user-exit parameter file).
    I have tried a number of things to try to resolve this, but I can't seem to make this work.  the params for this extract currently looks like this:
    extract uePump
    sourcedefs ./dirdef/my_defgen.def
    setenv (GGS_USEREXIT_CONF = "dirprm/javaue.properties")
    getupdatebefores
    cuserexit ./dirprm/libggjava_ue.so CUSEREXIT passthru includeupdatebefores
    table my_schema.B_PLN_DIR, fetchmodcols (PLN_DIR_ID, *);
    table my_schema.*;
    ... I've tried leaving off the "includeupdatebefores" argument to the cuserexit, leaving out the fetchmodcols handling for the table with the RAW PK field, but I still get the error shown above.
    Any help / pointers is much appreciated.

    includeupdatebefores (lowercase) doesn't work;  you must use the uppercase INCLUDEUPDATEBEFORES !!

  • Different pricing procedure between CRM and ERP

    Hello,
    we`re using a CRM system which is connected to a ERP system. As not all pricing conditions from ERP are needed in CRM (an in addition the ERP pricing procedure is very complex), we would like to use a different (with less conditions) pricing procedure ind CRM.
    But now, when we transfer an order from CRM to ERP, the pricing procedure from ERP gets downloaded into the order in CRM and the prices are lost. Therefore I have 2 questions:
    1. Is it not possible to have a different pricing procedure in CRM than in ERP?
    2. Is it possible to stop transferring the pricing procedure from ERP back to CRM when transferring orders?
    Thank you in acvance for your help
    Jan

    Hi, Jan.
    1. Is it not possible to have a different pricing procedure in CRM than in ERP?
    Yes. You can use different  pricing procedure for you business documents.
    We use this for quotation management with inergation CRM-ERP.
    But, You must use same Condition Types and other objects.
    Denis.

  • Replicate pricing routine in CRM

    Hi all,
    I'm trying to replicate pricing routine from R3 to CRM 5.0 without using IPC.
    Most of the master data and copy control is done already, pricing routine is the only one that I'm having a problem with since we don't use IPC here.
    Have anyone experienced this before?  Appreciate all the help.
    Thanks
    Gilbert

    Gilbert
    1. <a href="http://help.sap.com/saphelp_crm50/helpdata/en/8b/06f837aea75351e10000009b38f8cf/frameset.htm">How Pricing is done in CRM ?</a>
    2. <a href="http://help.sap.com/saphelp_crm50/helpdata/en/f6/6f6d28bf197247918ae66002feec75/frameset.htm">Differences in Pricing in SAP CRM and SAP R/3</a>
    3. Pricing in crm
    Happy Working !
    Thanks
    <b>Allot pointzs if this helps!</b>

  • Customer pricing procedure in CRM

    Can anyone please let me know how to find customer pricing procedure in CRM that is assigned to a particular customer.

    Hi
    Customer pricing procedure is assigned to a BP in the sales area data under the billing tab.
    Check for any bp using the following steps
    1. Use tcode BP and enter the BP number.
    2. Choose the role Sold to Party
    3. Choose the tab Sales Area data.
    4. Choose your sales area and open the Billing tab.
    Here you can see the customer pricing procedure assigned to the BP.
    Hope this helps
    Regards
    Rekha dadwal

  • Standard extractors for pricing conditons in CRM

    HI Guys,
    I would like to extract pricing conditions from CRM and wondering if there is a standard extractor for that.
    thanks

    Hi Bhat,
    There is no standard CRM datasource to extract pricing information. I have attached a document to this message with a suggestion on how you might create your own extractor to load the pricing information, see the document pricingconditionssuggestion.DOC. Please note that this is only a suggestion and there is no guarantee that it will work
    or meet your requirements. If you implement the suggestion though please let us know the results.
    Best Regards,
    Des

  • How to find Exits in CRM (Customer Relationship Management)

    How do we find Exits in CRM ( Customer Relationship Management)

    Hi,
    Try these links below
    http://www.sap-img.com/ab038.htm
    http://abapcode.blogspot.com/2007/06/program-to-get-user-exit-for-any.html
    Regards,
    Tush

  • Java terminated exit code =1

    Hi all,
    I cannot start up my Netweaver Developer Studio (NWDS).
    I installed the NWDS Sp15 and have the jdk version 1.4.2_09 installed.
    I get the error message java terminated exit code =1
    -Xmx512m
    -Xms128m
    -XX:PermSize=32Mm
    -XX:MaxPermSize=192m
    I saw this error in some other forums. They were suggesting the following:
    - at least 1 GB available. I have 2GB RAM and 1GB is for my Virtual PC where I run the NWDS.
    - Right jdk version? I have 1.4.2_09
    - buildnum.txt file was missing, I included this in the eclipse directory with Build:200511250257
    What can I do more to solve this problem?
    Sandhya

    hi Sandhya,
       try to rename your workspace to some other name and restart the NWDS. i had similar problem and this one worked. there were some write access rights problem with me.
    just give it a try and see if it works.
    Regards
    ak.

  • ServletExec: Java VM exit code = 143

    Is this simply an out of memory condition?
    Wed Jun 07 10:04:32 2006] ServletExec: Java VM exit code = 143
    [Wed Jun 07 10:04:32 2006] ServletExec: Java VM message: #
    [Wed Jun 07 10:04:32 2006] ServletExec: Java VM message: # HotSpot Virtual Machine Error, Internal Error
    [Wed Jun 07 10:04:32 2006] ServletExec: Java VM message: # Please report this error at
    [Wed Jun 07 10:04:32 2006] ServletExec: Java VM message: # http://java.sun.com/cgi-bin/bugreport.cgi
    [Wed Jun 07 10:04:32 2006] ServletExec: Java VM message: #
    [Wed Jun 07 10:04:32 2006] ServletExec: Java VM message: # Java VM: Java HotSpot(TM) Server VM (1.4.2_04-b05 mixed mode)
    [Wed Jun 07 10:04:32 2006] ServletExec: Java VM message: #
    [Wed Jun 07 10:04:32 2006] ServletExec: Java VM message: # Error ID: 4A4156410E43505001E2
    [Wed Jun 07 10:04:32 2006] ServletExec: Java VM message: #
    [Wed Jun 07 10:04:32 2006] ServletExec: Java VM message: # Problematic Thread:
    [Wed Jun 07 10:04:32 2006] ServletExec: Java VM message: prio=10 tid=0x0026ad68
    [Wed Jun 07 10:04:32 2006] ServletExec: Java VM message: nid=0x9e4
    [Wed Jun 07 10:04:32 2006] ServletExec: Java VM message: runnable
    [Wed Jun 07 10:04:32 2006] ServletExec: Java VM message:
    [Wed Jun 07 10:04:32 2006] ServletExec: Java VM message: #
    [Wed Jun 07 10:04:32 2006] ServletExec: Java VM message:
    [Wed Jun 07 10:04:32 2006] ServletExec: Java VM message: Heap at VM Abort:
    [Wed Jun 07 10:04:32 2006] ServletExec: Java VM message:
    [Wed Jun 07 10:04:32 2006] ServletExec: Java VM message: Heap
    [Wed Jun 07 10:04:32 2006] ServletExec: Java VM message: def new generation
    [Wed Jun 07 10:04:32 2006] ServletExec: Java VM message: total 576K, used 437K
    [Wed Jun 07 10:04:32 2006] ServletExec: Java VM message: [0x10030000, 0x100d0000, 0x10740000)
    [Wed Jun 07 10:04:32 2006] ServletExec: Java VM message: eden
    [Wed Jun 07 10:04:32 2006] ServletExec: Java VM message: space 512K, 84% used
    [Wed Jun 07 10:04:32 2006] ServletExec: Java VM message: [0x10030000, 0x1009c420, 0x100b0000)
    [Wed Jun 07 10:04:32 2006] ServletExec: Java VM message: from
    [Wed Jun 07 10:04:32 2006] ServletExec: Java VM message: space 64K, 7% used
    [Wed Jun 07 10:04:32 2006] ServletExec: Java VM message: [0x100c0000, 0x100c12d0, 0x100d0000)
    [Wed Jun 07 10:04:32 2006] ServletExec: Java VM message: to
    [Wed Jun 07 10:04:32 2006] ServletExec: Java VM message: space 64K, 0% used
    [Wed Jun 07 10:04:32 2006] ServletExec: Java VM message: [0x100b0000, 0x100b0000, 0x100c0000)
    [Wed Jun 07 10:04:32 2006] ServletExec: Java VM message: tenured generation
    [Wed Jun 07 10:04:32 2006] ServletExec: Java VM message: total 3456K, used 2877K

    forum Nazi takes a little pity on newbie.
    Of course exit code is platform-specific, and u did not specify, but assuming windows, it may mean:
    The system cannot join or substitute a drive to or for a directory on the same drive.
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcesdk40/htm/cerefsystemerrors-alphabeticalorder.asp

  • "Server0" of Java Stack exits with exit code '-11113' while starting...

    Dear Experts,
           kindly refer the below link & solve the java startup error.
    The link is posted in
      Expert Forums  » Application Server  » SAP NetWeaver AS, Java 
    Thread : Java Server) exits with exit code -11113
    Link:
    The answer will be suitable rewarded. Thanks.

    Put the following parameters in the Java parameters list at all server nodes:
    -Dorg.omg.CORBA.ORBClass=com.sap.engine.system.ORBProxy
    -Dorg.omg.CORBA.ORBSingletonClass=com.sap.engine.system.ORBSingletonProxy
    -Djavax.rmi.CORBA.PortableRemoteObjectClass=com.sap.engine.system.PortableRemoteObjectProxy
    -Dorg.omg.PortableInterceptor.ORBInitializerClass.com.sap.engine.services.ts.jts.ots.PortableInterceptor.JTSInitializer
    Reboot the cluster.
    Kind regards,
    Tsvetomir

Maybe you are looking for

  • How to create a group bank?

    Hi All, Could anyone tell me how to create a bank group? Thaks Gandalf

  • Videos not showing in the playlist

    I have created a MV playlist which have no problem to play before I update my Itouch (4th Gen) to OS 6. I am able to see the playlist but not the contents. I deleted the playlist and tried to re-synced from Itunes. I tried reset my Itouch but still n

  • Best Export Options for QT5 Viewing

    I run a site for Mac OS 7 users and want to upload some videos there in QuickTime 5 format (the latest version for Mac OS 7). I am working on a G4 running Tiger and QuickTime 7 Pro. What are some of your opinions on the best export options for QT5 vi

  • General Servlet  Help

    Hi out there, Can sombebody pls to get started with this technology. I would like to know how to get javax.servlet package and how to use it with J2SDK 1.4.0. I have already downloaded JSDK 2.0, can somebody tell me what's the next step pls. Thanks i

  • Last  4 weeks store sales sum

    with using time series ago function amount+ago(amount ,week,1)+ago(amount ,week,2)+ago(amount,week,3) i am doing above like it's throwing error like nested time seriece function but it 's working well in 10g in 11g it 's problm can any one suggest me