cancel
Showing results for 
Search instead for 
Did you mean: 

IPC PricingUserExits VARCOND

Former Member
0 Kudos

Hi Experts,

I need some help for implemention of the Userexit PricingUserExits with IPC 4.0 in conjunction with variant condition VARCOND. The IPC runs in ISA-scenario against SAP ERP.

The task is to read the database whether there is an attribute ZZVA5_FVC for the variant condition VARCOND. This has to be done for all VARCONDs. Each VARCOND might have a different attribute ZZVA5_FVC. VARCOND might even have no attribute ZZVA5_FVC.

In the method checkRequirement of PricingUserExits should be checked if ZZVA5_FVC is not NULL, then requirement 910 should become true. If ZZVA5_FVC is NULL, then requirement 912 should become true.

The implemention is


public boolean checkRequirement(IConditionFindingManagerUserExit item,
                                IStep step,
                                int reqNo) {
IAttributeValue xvalue;
xvalue = item.getItemAttributeValue("ZZVA5_FVC");
if ( xvalue != null ) {
	zzva5_fvc  = xvalue.getValue();
	if (zzva5_fvc.equals("")) {
		zzva5_fvc = null;
	}
boolean ret;
switch (reqNo) {
     case 910:   
	if ( zzva5_fvc != null ) {   	
	   ret = true;
       	} else {
       	   ret = false;
       	}
       	return ret;
     case 912:   
       	if ( zzva5_fvc != null ) {   	
           ret = false;
        } else {
           ret = true;
        }
        return ret;

But I don't know what I have to do to have access to VARCOND in order to read the database and set the attribute ZZVA5_FVC for each VARCOND. The access of the database is not the problem. But I don't know which methods of PricingUserExits or other classes are to be used to read VARCOND and set ZZVA5_FVC.

I have already done some experiments. What I have found out is

- method checkRequirement is only called once, although there are more then one VARCONDs with different ZZVA5_FVC.

- I have tried methods overwriteConditionValue, determineRelevantAttributesForValueFormula and getConditionValueFormulaNumbers. But these methods are not called. I think because T683S-KOFRM are empty for the requirements 910 and 912 in SAP customizing.

Thanks in advance

Karl-Wilhelm

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Karl-Wihelm,

Have you implemented the following BAdI?

CRM_COND_COM_BADI

For item condition variables you got to use the method

method if_ex_crm_cond_badi~item_communication_structure

and set the variable "ZZVA5_FVC".

Generally, you will use CRM_ORDER_READ to get the value of this variable in the transaction and set it in the item_communication_structure. Prior to doing this the variable you using must have been added to the Pricing Communication structure.

Easwar Ram

http://www.parxlns.com

Former Member
0 Kudos

Hello Easwar,

we are running IPC 4.0 against SAP ERP 5.0. So I can't implement the CRM-BAdI CRM_COND_COM_BADI.

The task has been implementend in ERP 5.0 in ABAP. I have to re-implement in the IPC 4.0 in JAVA.

Regards

Karl-Wilhelm