cancel
Showing results for 
Search instead for 
Did you mean: 

F4help value reading

Former Member
0 Kudos


Hi,

Under Custom Context node(which is having only value attributes)  I have two value attributes...

for one value attribute I have added F4 help (Zsearch help)..

now my requirement is whenever i choose value from F4 popup for the value attribute1, based on the value that i selected,  value attribute 2 should fill immediately...

For example....

value attirbute1 :  emp number (zsearchhelp)

value attribute 2 : emp description

now when i select emp number form f4 help popup, i have to populate emp desctipiton immediately.....

please be remember that all context, value attributes are custom......

Thanks&Regads

Madhavi

Accepted Solutions (1)

Accepted Solutions (1)

deepika_chandrasekar
Active Contributor
0 Kudos

Hi Madhavi,

You can do it in on_select event of that attribute1. While setting the value attribute1 set the value for attribute2 also using lr_entity->set_property method by getting the description using BUPA_DESCRIPTION_GET FM for the selected BP or check in popup context node you have description for that BP.

lr_context_node = bpsearch_employee_popup->get_context_node( iv_cnode_name = 'EMPLOYEE' ).
  lr_current = lr_context_node->collection_wrapper->get_current( ).
  CHECK lr_current IS BOUND.

  lv_partner_no = lr_current->get_property_as_string( iv_attr_name = 'BP_NUMBER' ).


  lr_ent ?= me->typed_context->context node name->get_bo_by_index( iv_index = gv_index )."use index if table view, if form view use collection_wrapper->get_current.


  lr_ent->set_property( iv_attr_name = 'EMP_NO' iv_value = lv_partner_no ).


get partner description from context node or FM and set it
  lr_ent->set_property( iv_attr_name = 'EMP_DESC' iv_value = lv_partner_desc ).

Regards,

Deepika.

Former Member
0 Kudos

Hi Deepika,

As I am new to webui unable to understand on_select_event of field...

let me explain what I did in V method..

CREATE OBJECT rv_valuehelp_descriptor

      TYPE

        cl_bsp_wd_valuehelp_f4descr

      EXPORTING

        iv_help_id                  = 'ZSEARCH HELP'

        iv_help_id_kind             = if_bsp_wd_valuehelp_f4descr=>help_id_kind_name

        iv_input_mapping            = lt_input_mapping

        iv_output_mapping           = lt_output_mapping.

using the above code  F4 help is working fine...now the requirement is as and when I selelct valur from F4 help then value attribute2 should fill automatically....so where exactly I have to write the code....

and also context node is value node which custom having all value attributes...and this context node is not available at component controller too...

Thanks &Regards

Madhavi

Former Member
0 Kudos

Resolved my self....just added iv_trigger_submit = abap_true in exporting paramether and have written code in getter method of value attribute2....

CREATE OBJECT rv_valuehelp_descriptor

      TYPE

        cl_bsp_wd_valuehelp_f4descr

      EXPORTING

        iv_help_id                  = 'ZSEARCHHELP'

        iv_help_id_kind             = if_bsp_wd_valuehelp_f4descr=>help_id_kind_name

        iv_input_mapping            = lt_input_mapping

        iv_output_mapping           = lt_output_mapping

        iv_trigger_submit           = abap_true.

Answers (0)