cancel
Showing results for 
Search instead for 
Did you mean: 

How to change the input help mode of an attribute in code

Former Member
0 Kudos

I have a context attribute that has a domain type of string.

Since I am trying to develop a dynamic application, depending on other factors I would like the users to enter either dates or strings in this field.

Is there a way to change the input help mode of an attribute in code (so that when I need a date, the helper button that shows the calendar will be displayed to assist entry)?

I tried to even harcode it in my context  (as a test), but I can't even find the input help for date fields (F4_DATE in SHLC), as per the documentation.

Can someone please help?

Thank you,

Harry

Accepted Solutions (1)

Accepted Solutions (1)

former_member199125
Active Contributor
0 Kudos

Just give the datatype as BEGDA in attribute properties

Regards

Srinivas

Former Member
0 Kudos

Can I change the datatype of an attribute in code? If so, can you please share some code?

Thanks,

Harry

former_member199125
Active Contributor
0 Kudos

yes, we can do it dynamically using coding.

     DATA: lo_tabnode        TYPE REF TO IF_WD_CONTEXT_NODE.

      DATA: lo_tabnode_info   TYPE REF TO IF_WD_CONTEXT_NODE_INFO.

      lo_tabnode = wd_context->GET_CHILD_NODE( name = 'THCUS' ). "the custom table node

      lo_tabnode_info = lo_tabnode->get_node_info( ).

      CALL METHOD lo_tabnode_info->set_attribute_value_help

        EXPORTING

          name = 'ZZ_PROLE_R3'  '' atribute name

          value_help_mode = 121 "dicitonary search help

          value_help = 'BEGDA'

.

FYI

am sure about 131 is for ovs help and remaining i dont remember exactly

131 for OVS help

121 dictionary search help

111

101

Regards

Srinivas

Former Member
0 Kudos

Thank you so much.

I think it works! (I am saying that because I'm currently on a AS ABAP trial system, and I get a message saying 'value help not available'. I am assuming this is because BEGDA is only available on "normal" systems.

Anyway thanks a lot, this is exactly what I needed.

Thanks,

Harry

Answers (0)