Skip to Content
Author's profile photo Former Member

Enhance SETTYPE context node in view PRDGENSET/SLSeteOV of component PRDGENSET

Using SETTYPES for products is a very common practice to add custom fields. If we mention a value table while creating the settype attribute then on generating the configuration we get value help without any effort. But there are some instances where we need to explicitly add a value help to the attribute.

In such cases generally we do our coding in the GET_V_ method of the corresponding attribute. But unfortunately for context node SETTYPE we can’t access the attributes directly. Moreover the context node can’t be enhanced as any other context nodes. To tackle such situations we need to take the following steps:

Step 1: Go to SE24 and create a new class ZL_PRD_<set type id>_CN to provide value help. Give CL_CRM_UIU_PROD_SET_CN_SL as the superclass.

Step 2: Enhance the component PRDGENSET. Enhance the view  PRDGENSET/SLSeteOV.

Step 3: Change the Associated Type of the page attribute ‘SETTYPE’ from CL_PRDGENSE_SLSETOV_CN01 to ZL_PRD_<set type id>_CN.

Step 4: Redefine the method GET_V_S_STRUCT in class ZL_PRD_<set type id>_CN to provide value help.

We can use various methods present in the custom class created to read or modify attribute value for the given settype.

We came across such a requirement where value help was implemented in  CRM 5.0 using search help in the screen program. To implement the same in CRM 7.0 we followed the steps mentioned earlier.

Assigned Tags

      9 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member
      Blog Post Author

      The above approach works fine if we are using only one settype. If we have more than one then change the associated type of page attribute SETTYPE to CL_CRM_UIU_PROD_SET_CN_SL.

      Author's profile photo Former Member
      Former Member

      Hi Sayan,

      I have same requirement to redefine get_v method to provide search help as standard filed is piclist.I enhanced component and view,but i dnt know how to enhance the conext node.can u help me in this by giving step by step procedure for it.

      Thanks in advance.

      Regards,

      Naresh

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Hi Naresh,

      It is not possible to enhance the context node SETTYPE in component PRDGENSET using wizard. To implement value help you can do one of the following:

      1. Manually Enhance the context node.

      2. Implement BADI CRM_PRDGENSET_VALUEHELP

      http://scn.sap.com/docs/DOC-25913

      3. Follow the steps mentioned in the above document. Change the associated type of page attribute SETTYPE to CL_CRM_UIU_PROD_SET_CN_SL

      Regards,

      Sayan

      Author's profile photo Former Member
      Former Member

      Hi Sayan,

      Thanks a lot for your reply.

      Can you provide the process of enhancing context node manually.

      I will provide the field details where i want to search help instead of piclist.

      UI Component-ELMOE

      View-ELMOE/VGeneralData

      Context Node-GENERALDATA

      Attribute Name-STRUCT.MAPPING_FORMAT

      Really appreciate your time and suggestions.

      Thanks and Regards,

      Naresh.

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Hi Naresh,

      For the above attribute you don't need to manually enhance the context node.

      1. Firstly enhance the component

      2. Then enhance the view

      3. Then right click on the context node and choose enhance to enhance the context node.

      4. ZL_ELMOE_VGENERALDATA_CN00 class gets created on enahncing the context node. Go to that class and redefine the method GET_P_MAPPING_FORMAT.

      Author's profile photo Former Member
      Former Member

      Hi Sayan,

      I solved that problem with the help of my basis consultant.

      Iam facing new problem here that After redefining the method get_v still search help is not calling.In debugging i found that rv_valuehelp_descriptor not holding data.i wil provide the code which i have use.

         Data: ls_param_mapping type IF_BSP_WD_VALUEHELP_F4DESCR=>GTYPE_PARAM_MAPPING,

               ls_input_mapping type IF_BSP_WD_VALUEHELP_F4DESCR=>GTYPE_PARAM_MAPPING_TAB,

               ls_output_mapping type IF_BSP_WD_VALUEHELP_F4DESCR=>GTYPE_PARAM_MAPPING_TAB.

               ls_param_mapping-context_attr = 'STRUCT.MAPPING_FORMAT'.

               ls_param_mapping-F4_attr = 'MAPPING_FORMAT'.

      append ls_param_mapping to : ls_input_mapping,ls_output_mapping .

      Create Object rv_valuehelp_descriptor type CL_BSP_WD_VALUEHELP_F4DESCR

      Exporting

      iv_help_id = 'CRM_MKTLIST_FORMAT'

      iv_help_id_kind = if_bsp_wd_valuehelp_f4descr=>help_id_kind_name

      iv_input_mapping =  ls_input_mapping

      iv_output_mapping = ls_output_mapping .

      * the search help is came from CRM 5.0 to CRM 7.1Ehp1 after up-gradation.Search help contains data in 7.1.

      Filed is still as piclist in webui.

      Do i have to implement any BADI for this?

      Please help me in this also.

      Once again thanks for you time.

      Regards,

      Naresh

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Hi Naresh,

      Instead of ls_param_mapping-F4_attr = 'MAPPING_FORMAT' use

      ls_param_mapping-F4_attr = 'LIST_FORMAT'.

      Regards,

      Sayan

      Author's profile photo Former Member
      Former Member

      Hi Sayan,

      Thanks a lot for your support,

      I tried with that also,but it was helpless.Search help not working in GUI also,because of that reason only  we planned to provide search help in WEB UI.

      Please give me the solution to come out from this issue.

      Really appreciate your time and suggestions.

      Thanks and Regards,

      Naresh.

      Author's profile photo Former Member
      Former Member

      Hi Sayan,

      I solved my problem by redefining get_p and get_v methods.

      Thanks a lot for your support.

      Regards,

      Naresh