cancel
Showing results for 
Search instead for 
Did you mean: 

Issue in implementing value help for custom set type attributes

Former Member
0 Kudos

Hi Experts,

Need help in implementing the value help for custom set type attributes -

Created custom set types for Product and trying to implement the value help for an attribute . To do that created an implementation for BADI CRM_PRDGENSET_VALUEHELP  and wrote the code as below :

      IF component EQ 'ZZ0010'.

       
DATA:
         lv_prefix   
TYPE string.
       
CLEAR: gv_tasktype.
       
CONCATENATE lv_prefix 'STRUCT.ZZ0010' INTO ls_map-context_attr.
        ls_map
-f4_attr      = 'TASK_TYPE'.
       
APPEND ls_map TO: lt_outmap.   
        ls_map
-f4_attr = 'TEXT40'.
        ls_map
-context_attr = 'STRUCT.ZZ0010_DESC'.
       
APPEND ls_map to lt_outmap.

      
CREATE OBJECT rv_valuehelp_descriptor TYPE cl_bsp_wd_valuehelp_f4descr
        
EXPORTING
           iv_help_id       
= 'ZCSH_TASK_TYPE'
           iv_help_id_kind  
= if_bsp_wd_valuehelp_f4descr=>help_id_kind_comp
           iv_input_mapping 
= lt_inmap
           iv_output_mapping
= lt_outmap
           iv_trigger_submit
= abap_true.
     
ENDIF.

When I click the value help, pop-up shows the correct result set from the search help. When I choose the value, it is filling the field value correctly, but the description value is not getting populated. Checked the field names and confirmed that I am passing the right field names in the context_attr.

I am not sure what is missing here and how can I make the search help description field updated right after the item selection.

Thanks,

Nitish

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Nitish

Can you please let me know why are you writing code in Badi..You can write the same code in GET-V method right?

Regards

Raj

Former Member
0 Kudos

Hi Raj,

When we create custom set types, it will not create any static context nodes in the view with the set types but will get generated during the run time in the PRDGENSET component and SAP provided a BADI to implement custom search help. There is only one generic Get_V method for all set types.

Thanks,

Nitish

Former Member
0 Kudos

Follow this document : https://scn.sap.com/docs/DOC-25913

Regards,

Sayan

sumeet_gehlot
Contributor
0 Kudos

Hi Nitish,

Here the logic is fine but ithink you have missed your exporting parameter of your description.

open your search help ZCSH_TASK_TYPE in SE11

Check whether an importing and exporting parameters of your description field is checked.

Regards,

Sumeet

kumar5
Active Contributor
0 Kudos

HI,

Your code seems to be correct. First check in your search help in se11 as stated above by sumeet for importing and exporting .

Also double check your context attribute name . Press f2 in the UI for the description field and pass the context field name which shows there.

Thanks

Kumar.

Former Member
0 Kudos

Hi Sumeet,

I checked the Search Help and both the importing and exporting parameters are checked for the description field. Also doublechecked the attribute name from the context field. I can even see that initially the value appears on the description field, but when I saved or hit enter, it goes away.

Thanks,

Nitish

kumar5
Active Contributor
0 Kudos

Hi,

Can you please remove the

iv_trigger_submit = abap_true. line and test .

It may be causing the problem , because an event is being called with server round-trip which is removing the value of description.

Thanks

Kumar

Former Member
0 Kudos

Hi Kumar,

Tried removing the parameter as suggested, but no luck. Still not populating the description field.

Thanks,

Pruthivi

former_member224326
Participant
0 Kudos

Hi Nitish

Did you resolve this issue. Can you please post the code.

Thanks

Shaik