Skip to Content
avatar image
Former Member

Need to hide an entity using code as CBA not working

Hi,

We have a requirement to hide an entity for a specific change request type. We did CBA but its not working and also we configured the entity in MDGIMG as 'Not relevent' but still no luck.

Is there any way where we can hide it using code in feeder class or somewhere.

Waiting for your help.

Regards,

Raj

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    Jan 17 at 11:27 PM

    Hi Raj,

    First of all you need to understand how CBA works. Few points which are important:-

    1) Logical Action works in sync with CR Type.

    2) Once the Adaptation is loaded by the system for the UI, then it can't be changed in the same session dynamically.

    So for Create Scenario, before adaption is actually getting called, System has already fetched the details for the ACTION & CR TYPE. Now based on that your desired CBA is getting triggered. Which is working.

    For Display/Change Scenario, When you are clicking the BP for display. System determines the ACTION but there is no CR involved at this time, that means Base Configuration will get called. Now if you do the Change in BP & select your CR Type ( ACTION = CHANGE & CR TYPE = Selected CR ), remember point (2), your desired CBA will not get loaded. As base config is already loaded.

    What you need to do in this case, put values '00' & '01' in the Step Column. This columns represent the step in the Workflow. By doing this, whenever the BP is getting displayed or changed, your desired CBA will get call.

    NOTE: If the business requirement is only to hide 1 UIBB based on the user authorization, then use code to hide the UIBB from the UI

    Cheers,

    Rohit

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Rohit,

      Thanks!!! I am doing the same now and trying to achieve the hide/unhide using code.

      I also tried to use a new field in schema like grouping and tried to write the code and still no luck.

      Enough debugging and no outcome. :( :( but in the course, really understood how the CBA works. :)

      Thanks a lot for the direction you have given. Really appreciate your help.

      Regards,

      Raj

  • Oct 27, 2017 at 05:31 AM

    Hi Raj,

    CBA is the best & first approach to hide any UIBB based on CR Type. If it's not happening with CBA, try to find out the cause. In most of the cases it is because of the Personalization. Clear the personalization and it should work ( if CBA is done the right way ).

    Using code should be last resort, however if you wanna do that using code, then find out the application controller class & inside method IF_FPM_OVP_CONF_EXIT~OVERRIDE_EVENT_OVP, you can hide the individual UIBBs.

    Either you can enhance the Standard application controller class or the best way is to create your Z class & assign the application controller class as super class & then redefine the same method.

    Cheers,
    Rohit

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Raj,

      Let's take the example of creating a Business Partner or a Vendor. You should have Configuration/CBA like below

      I have created a CBA just for Change Request Type ZHVVEN02.

      So, if I am going to create a standard Vendor (VENDR01), Process a Vendor(VENDR02) or just display a Vendor, my base configuration get called.

      But if I create the Vendor using my CR type ZHVVEN02, then 3rd adaptation is getting called. See the screenshot.

      I hope you are also doing the same.

      Cheers,

      Rohit

  • avatar image
    Former Member
    Jan 17 at 11:42 AM

    Hello,

    Thanks!! Sorry for the late reply.

    We had some design changes but now again this issue is knocking me. :)

    Please find step by step approach is given and its mentioned where I need to trigger the CBA.

    I really need some direction here. Somewhere stuck completely.

    _____________________________________________________________

    For create scenario, I have created ZBP_EMPL. Created a CBA and adjusted my UIs. For change/Display scenario, I have created ZBPCEMPL. Added a different CBA and adjusted my UIs.

    For the time being, I have just added 2 CBA, One for create and other for Change/Display.

    While creating the BP, its triggering correctly the required CBA. So for create ZBP_EMPL: No Issue

    Once the BP is created, I am trying to display it using the search screen. Then when I am clicking the link BP is opened in DISPLAY mode and there the CBA is not trigerring. Also when I am trying to EDIT the screen, still unable to trigger the CBA defined for DISPLAY/CHANGE scenario.

    Also tried using code in CL_BS_BP_GUIBB_ROOT class.

    Method: IF_FPM_GUIBB_FORM~GET_DATA

    Code:

    Please help. I am really stuck here and not able to find any solution.

    Regards,

    Raj

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 19 at 01:58 PM

    Hi Raj,

    Sometimes you need to delete and recreate .

    This is what i've done in one of the project to make it work.

    Thanks and Regards,

    Logan.D

    Add comment
    10|10000 characters needed characters exceeded