cancel
Showing results for 
Search instead for 
Did you mean: 

SAP CRM - Enable Custom Component fields in pop-up

Former Member
0 Kudos

Hi,

We created a custom component with view as a pop-up and calling from other component, but the fields are displayed in disable mode.

Kindly provide some solution to make the fields editable.

Thanks in advance.

Regards,

Sivakishore

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Siva,


This issue  is because of data is not passing to Popup component.

Please check the outbound plug for your component are u sending collection wrapper data or not ?

and one more thing check the Popup component . Comp Controller WD_USAGE_INITIALIZE and Inbound plug second component u are getting the collection wrapper bound or not .

Let me know any difficulty found.

Thanks,

Vishwa

deepika_chandrasekar
Active Contributor
0 Kudos

Hi,

Put the below code in do_prepare_output method

CALL METHOD super->do_prepare_output
    EXPORTING
      iv_first_time = iv_first_time.

me->view_group_context->set_view_editable( me ).

and then redefine method SET_VIEW_GROUP_CONTEXT method and put below code then check.

DATA:lr_vgc TYPE REF TO cl_bsp_wd_view_group_context.
  IF iv_parent_context IS BOUND.
    me->view_group_context ?= iv_parent_context.
  ELSE.
    CREATE OBJECT lr_vgc
      TYPE
      cl_bsp_wd_view_group_context.

    IF lr_vgc IS BOUND.
      me->view_group_context ?= lr_vgc.
    ENDIF.

  ENDIF.

Regards,

Deepika.

Former Member
0 Kudos

Hi Deepika,

Thank you for your response.

I tried but it is not working.

Please suggest is there any otherway to resolve.

br,

Sivakishore

dharmakasi
Active Contributor
0 Kudos

Hi Sivakishore,

Try adding the below code in do_init_context method

DATA: lr_col TYPE REF TO if_bol_bo_col.

     DATA: lr_ent TYPE REF TO cl_bsp_wd_value_node.


CREATE DATA ls_data TYPE "give your view structure here.

     CREATE OBJECT lr_ent

       EXPORTING

         iv_data_ref = ls_data.

lr_col ?= me->typed_context->context node name->collection_wrapper.

lr_col->add( lr_ent ).

Then try adding below code in do_prepare_output

if me->view_group_context->IS_VIEW_IN_DISPLAY_MODE( ) EQ abap_false.

me->view_group_context->SET_ALL_EDITABLE( ).

endif.


do the same step as mentioned by deepika for set_view_group_Context method.


if still did not work with above process, you can modify get_i method of the attributes with code

rv_disabled = 'FALSE'.

this will enable the attribute.



Best Regards,

Dharmakasi.


naresh_kabar
Explorer
0 Kudos

Hi siva,

Using AET tool add field and In edit mode press F2 and check it's Role key, component , object type Context ID and open BSP Workbench and open Role configuration key and in edit mode add your field.

navn_metts
Active Participant
0 Kudos

Hi Siva,

Can you please check the .htm page of the popup view for the <chtmlb:config  > tag.

And pass the displayMode  = "FALSE".


Please let me know if it works.


Br,

Navn.

Former Member
0 Kudos

Hi Naveen,

I tried that also but it is in display mode only.

Kindly provide any other option I can try.

Thanks & Regards,

Sivakishore