cancel
Showing results for 
Search instead for 
Did you mean: 

Dropdown code in ABAP adobe form

Former Member
0 Kudos

Hi All,

I am trying to desing a dropdown can any one help in writing code for it.

1) I designed ABAP Adobe form with ZCI layout & display type as activeX

2) In layout editor I tried to use Standard->Drop-down list or

WebDynpro ActiveX->Value Help->drop down list or

WebDynpro native->Value Help->drop down list.

3) I bind drop down with context element ($record.NODE1.DATA[*].PERNR)

contect structure is as:

---Node1

-


Pernr

3) Then I tried to write code in 'WDDOINIT', but it is giving error

-


>>>>Access via 'NULL' object reference not possible

Please guide me in completing code for dropdown value help.I want to fill itab-a into node1-pernr:

method WDDOINIT .

 
  DATA lo_nd_node1 TYPE REF TO if_wd_context_node.
  DATA lo_el_node1 TYPE REF TO if_wd_context_element.
  DATA ls_node1 TYPE wd_this->element_node1.
* navigate from <CONTEXT> to <NODE1> via lead selection
  lo_nd_node1 = wd_context->get_child_node( name = wd_this->wdctx_node1 ).

* @TODO handle not set lead selection
  IF lo_nd_node1 IS INITIAL.
  ENDIF.

* get element via lead selection
  lo_el_node1 = lo_nd_node1->get_element(  ).

* @TODO handle not set lead selection
  IF lo_el_node1 IS INITIAL.
  ENDIF.

* get all declared attributes
  lo_el_node1->get_static_attributes(
    IMPORTING
      static_attributes = ls_node1 ).

DATA: BEGIN OF itab,
       a TYPE persno,
      END OF itab.
DATA: wa_itab LIKE itab.
DATA: t_itab TYPE STANDARD TABLE OF itab.

      wa_itab-a = '1'.
      APPEND wa_itab TO t_itab.
      wa_itab-a = '2'.
      APPEND wa_itab TO t_itab.
      wa_itab-a = '3'.
      APPEND wa_itab TO t_itab.
      wa_itab-a = '4'.
      APPEND wa_itab TO t_itab.

******--pernr
*****  ls_node1-pernr = '80000086'.
*****
******--Send the values back to the node
  lo_el_node1->set_static_attributes(
   EXPORTING
    static_attributes = ls_node1 ).
endmethod. 

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

}