Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

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,

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question