cancel
Showing results for 
Search instead for 
Did you mean: 

Badi Is not Triggered: USMD_UI_EVENT2

mohd_riyajuddin
Participant
0 Kudos

Dear,

I have Implemented a BADI to Hide, And changes some property of UI During Runtime: But the BADI is not getting called even I have passed UI Configuration as my Custom Application Name at Filter value of BADI and Implemented all the methods.

And also Let me know where I have missed out.

Regards,

Riyajuddin

Accepted Solutions (0)

Answers (2)

Answers (2)

mohd_riyajuddin
Participant
0 Kudos

Dear Raghuram/MDG_User,

By using this BADI- USMD_ACC_FLD_PROP_CUST_DEP_SET .

I am able to hide the field and change the property. But My requirement Is Based on Plant entered on first screen I am going to hide some TAB like example PURCHASEING tab.

By this I am not able to hide entire TAB which is not required Plese let me know how its possible.

Regards,

Riyajudddin

raghu3
Contributor
0 Kudos

Hi,

Please try FPM Context Based Adaption approach. Also check the document

Regards,
Raghu

mohd_riyajuddin
Participant
0 Kudos

Hello Raghuram,

My requirement: To add a  custom field on Material First screen Say - External material Group (EXTWG).I Manage to enhance first screen. Based on the value of first screen to hide some UIBBS on second screen.

Eg. If EXTWG =  'HT' Then hide views "SALES VIEW"  "PURCHASING VIEW".

By using BADI- I am able to file field and set property not able to hide the entire views.

Regards,

Riyaj

Former Member
0 Kudos

Hi Mohd,

Hope you are using a custom feeder class copied from CL_MDG_BS_MAT_FEEDER_FORM_SET for your initial screen.

Then try redefining method /PLMU/IF_FRW_G_GLOBAL_EVENTS~PROCESS_GLOBAL_EVENT and add below block of code under event 'MDGM_CONTINUE' in your custom feeder class as below. This could work.

DATA: lv_werks     TYPE werks_d.
DATA lt_uibbs      TYPE if_fpm_ovp=>ty_t_uibb.
DATA lo_cnr_ovp    TYPE REF TO  if_fpm_cnr_ovp.
DATA ls_uibb       TYPE if_fpm_ovp=>ty_s_uibb.

DATA: lo_fpm     TYPE REF TO if_fpm,
       lo_fpm_ovp TYPE REF TO cl_fpm_ovp.

CASE io_event->mv_event_id.
     WHEN cl_mdg_bs_mat_c=>gc_event_continue. " 'MDGM_CONTINUE'


mo_context->get_attribute(
     EXPORTING
       iv_name  = 'YPLANT'    " Custom  attribute on initial screen
     IMPORTING
       ev_value = lv_werks ).

IF lv_werks = 'TEST'.

   TRY.
       lo_cnr_ovp  ?= cl_fpm=>get_instance( )->get_service( cl_fpm_service_manager=>gc_key_cnr_ovp ).
       lo_cnr_ovp->get_uibbs( IMPORTING et_uibb = lt_uibbs ).
     CATCH cx_fpm_floorplan.
   ENDTRY.


   lo_fpm = cl_fpm_factory=>get_instance( ).
   lo_fpm_ovp ?= lo_fpm->get_service('CNR_OVP').

   TRY.
       LOOP AT lt_uibbs INTO ls_uibb WHERE config_id = 'MDG_BS_MAT_MARA_SALES_05'. " Check for UIBB to hide
         ls_uibb-hidden = 'X'.
         lo_fpm_ovp->change_uibb(
           EXPORTING
             is_uibb                   ls_uibb   " UIBB to be changed
         ).

       ENDLOOP.
     CATCH cx_fpm_floorplan.
   ENDTRY.

ENDIF.


ENDCASE.

mohd_riyajuddin
Participant
0 Kudos

Hello,

Thanks for sharing valuable Information. Will try and let you know.

Regards,

Riyajuddin.

mohd_riyajuddin
Participant
0 Kudos

Hello,

I am not getting  all UIBBS here only one I am getting.

Component - FPM_FORM_UIBB_GL2

Interface Views - FORM_WINDOW

Config ID - MDG_BS_MAT_SETTINGS_GL2_04.

When I will get all UIBBS then I will hide by using the code

Regards,

Riyajuddin

Former Member
0 Kudos

Hi Mohd,

Did you try same steps as told under section 5.1.1.2,

mohd_riyajuddin
Participant
0 Kudos

Hey,

I have done this but in just different way,

Enhanced schema BS_MAT,  By  View cluster (SM34) FPM_VC_ADAPT_SCHEMA.  By this I can add my customer defined field at CBA. Now my CBA contains ACTION, CR TYPE, MTART,WORKFLOW STEP, EXTWG.

@ External Material group(EXTWG) Is on my initial screen on Create material screen.

Then I added one entries on Table WDY_APP_PROPERTY, On this table I have added my Application name and EXTWG.

Then by using EXTWG at CBA, I can able to Hide UIBBS.  I find this a simple way to do..

Thanks For you support and quick response.

Regards,

Riyajuddin.

raghu3
Contributor
0 Kudos

Hi,

Is your UI configuration based on USMD_ENTITY_VALUE2 or on USMD_OVP_GEN?

If your using USMD_OVP_GEN , then the BADI is not triggered.

Regards,

Raghu

mohd_riyajuddin
Participant
0 Kudos

Dear,

I'm using MM data model.

Application : MDS_BS_MAT_OVP

UI configuration : BS_MAT_OVP_LAYOUT_03

Please let me know which badi is going to trigger.

Application Configuration : is custom I designed.

Regards,

Riyajuddin

Former Member
0 Kudos

Hi Mohd,

Please check BADI USMD_ACC_FLD_PROP_CUST_DEP_SET for changing the field properties(Mandatory, Hide) at runtime

raghu3
Contributor
0 Kudos

Hi,

You could use BADI USMD_ACC_FLD_PROP_CUST_DEP_SET

Regards,

Raghu

Former Member
0 Kudos

Hi Raghuram,

I'm using MM data model.

Application : MDS_BS_MAT

UI configuration : BS_MAT_INIT_05

what is the BADI to make fields mandatory

please let me know if you have any idea

Thanks,

Bhuvaneswari

Former Member
0 Kudos

Hi Vemulapalli,

I guess, application MDG_BS_MAT is on top of FPM_ADAPTABLE_OVP.

So try using BADI USMD_ACC_FLD_PROP_CUST_DEP_SET to set fields mandatory.

Use parameter CT_FLD_PROP in Method MODIFY_FLD_PROP_ATTR




Former Member
0 Kudos

Hi,

I tried the above BADi but it is setting fields mandatory in BS_MAT_OVP_LAYOUT_05

but i need to make field mandatory in initial screen BS_MAT_INIT_05.

Thanks,

Bhuvaneswari

raghu3
Contributor
0 Kudos

Hi,

Check section 5.3 :Enhance initial screen in the below document.

scn.sap.com/docs/DOC-30192

Regards,
Raghu

Former Member
0 Kudos

Hi Raghuram,

i tried setting error message in feeder class CL_MDG_BS_MAT_FEEDER_FORM_SET in method ON_CONTINUE_EVENT but it throwing the error message and redirecting to next page.

Any idea how to handle this?

Thanks,

Bhuvaneswari.

Former Member
0 Kudos

Hi Vemulapalli,


I guess, you should set FAILED flag as X on checking whether values are filled in

in your implementation for Service Provider BADI /PLMB/EX_SPI_APPL_ACCESS

Method /PLMB/IF_EX_SPI_APPL_ACCESS~BEFORE_ACTION



Former Member
0 Kudos

Hi Vemulapalli,


Did you try setting FAILED flag in BADI ?

/PLMB/EX_SPI_APPL_ACCESS

Method /PLMB/IF_EX_SPI_APPL_ACCESS~BEFORE_ACTION


Former Member
0 Kudos

Hi,

If i try to set the FAILED flag in BADI

/PLMB/EX_SPI_APPL_ACCESS

Method/PLMB/IF_EX_SPI_APPL_ACCESS~BEFORE_ACTION

then the initial screen goes to display mode.


Any idea,


Thanks,

Bhuvaneswari.