cancel
Showing results for 
Search instead for 
Did you mean: 

BADI CRM_PRIDOC_COMH_BADI is not triggering for user checks

former_member224326
Participant
0 Kudos

Hi Experts

I have implemented the Note "1853382 -To maintain the value to the field AUTHORITY_LEVEL  in pricing procedures that have been downloaded from ECC to CRM"..

As suggested in the Note i have written the report to update the  pricing procedure's field AUTHORITY_LEVEL and then as per the another SAP note Note 1166349, a BADI CRM_PRIDOC_COMH_BADI has been enhanced to maintain user level check to give display or edit options to user.

When a condition type is entered in the order , condition type is not appearing for the users which are not maintained/not maintained in the BADI.

So which ever the condition type got update with value in field AUTHORITY_LEVEL, this condition type is not appearing to any user irrespective of the BADI check. Also I have observed  that BADI CRM_PRIDOC_COMH_BADI is not triggering when condition type is entered in order.

Is there any reason for this. Please help.

Thanks

Shaik



Accepted Solutions (0)

Answers (1)

Answers (1)

former_member186543
Active Contributor
0 Kudos

Hi Chand ,

The BADI is triggered in FM : CRM_PRIDOC_COM_BUILD_OW. Can you please put a debugger in this FM , to further find out the cause of the BADI not getting called.

    statics: sr_header_badi type ref to if_ex_crm_pridoc_comh_badi,

             sv_flg_header_badi_created type crmt_boolean.

    If not lv_header_type is initial.

      if sv_flg_header_badi_created = false.

        call method cl_exithandler=>get_instance

          EXPORTING

            exit_name              = 'CRM_PRIDOC_COMH_BADI'

            null_instance_accepted = true

          CHANGING

            instance               = sr_header_badi.

        sv_flg_header_badi_created = true.

      endif.

      if not sr_header_badi is initial.

        call method sr_header_badi->header_communication_structure

          EXPORTING

            flt_val         = lv_header_type

          CHANGING

            cs_comadm_h_com = es_comadm_h_com.

      endif.

    endif.

/Hasan

former_member224326
Participant
0 Kudos

Hi Hasan

you are right, CRM_PRIDOC_COM_BUILD_OW is getting triggered when I edit the Order and while the condition type type tab is selected but not at time of condition type and mount field values are entered and save.

Thanks

Shaik

former_member186543
Active Contributor
0 Kudos

Hi Chand,

Build FMs trigger only once and not while saving , so it seems that this BADI hits only once as you specified in the scenario.

/Hasan

former_member224326
Participant
0 Kudos

HI Hasan

As per the SAP note Note 1166349, a BADI CRM_PRIDOC_COMH_BADI has been enhanced to maintain user level check to give display or edit options to user on Pricing condition entered on order item. But this BADI is not at all getting triggered.

Is there any way out.

Thanks

Shaik

former_member224326
Participant
0 Kudos

Hi Hasan

I have come across the CRM_PRCIL_ENHANCEMENT enhancement spot, using this we can hide lines in the pricing condition .. Did you implemented this enhancement spot to hide the lines in the price details based on business role.

please share the code snippet.

Thanks

Shaik

former_member186543
Active Contributor
0 Kudos

Hi Chand,

I think there has been some misunderstanding , I haven't done this requirement ever so I don;t have code for this requirement.

I was just helping you on my knowledge of the technical side.

/Hasan

SandeshK
Participant
0 Kudos

Hi Chand,

How did you fix this issue. I am having similar kind of issue. Can you please let me know how you achieved it.

Thanks,

San