cancel
Showing results for 
Search instead for 
Did you mean: 

Drop Down List population - Abap dynpro adobe form - type ZCI

Former Member
0 Kudos

Hi ,

How to create drop down list on a field. I am using ZCI type of form. (Abap dynpro adobe form - type ZCI)

Most of the post i have seen only refers to the setting in forms but not about the settings in interface in se80 or SFP. please give me the detail steps to create drop down field and how to populate it.

In other words is how to populate the drop down fields, where does the values come from to these fields.

Thanks,

Nikhil

Edited by: NIKHILKUMAR POOJARI on Apr 3, 2009 7:28 PM

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

You can create Drop Down List in two ways:

FIRST METHOD:

Create a context node A with cardinality 1..1 and in this create a context node A1 with cardinality 0..n and in this node create attributes TEXT and VALUE.

Now goto method and in that method using code wizard read the node A1.

And use the below code snippet sample in your program


*Declare the TYPES or Some Internal Table For Eg:
TYPES : BEGIN OF TY_TABLE,
             TEXT TYPE SOMETYPE,
             VALUE TYPE SOMETYPE,
END OF TY_TABLE.

*Define Internal Table and work area.
DATA : IT_TABLE TYPE STANDARD TABLE OF TY_TABLE INITIAL SIZE 0,
           WA_TABLE TYPE TY_TABLE.

SELECT TEXT VALUE FROM TABLENAME INTO TABLE IT_TABLE.

lr_node_info->bind_table( IT_TABLE ).

And in the Adobe Form Layout

Go to Menu of the Adobe LiveCycle Designer:

Tools>Options..>DataBinding

In that window u just check the Show Dynamic properties Check Box.

Now for the Drop Down go the binding tab in object palette and click on the list items and there specify the text as the internal table text field and value as internal table value field and select the internal table.

SECOND METHOD:

Use the Value Help Drop Down list from the Library Pallette of the Adobe Form. and define the binding from the Context. Now in the WebDynpro, under the Context of that particular field under the Properties: specify the Input Help as Dictionary Search Help and in Determined Input Help give the custom search help name.

Also do see that in the SFP goto SAP ToolBar utilities click on the "Insert WebDynpro Script".

Regards

Pradeep Goli

Former Member
0 Kudos

HI Pradeep,

Can you please tel me what i am doing worng here :

types : begin of ty_nameid,

ZCARRIAGERESTRIC type ZCARRIAGERESTRICT,

DESCRIPTION type ZDESCRIPTION,

END OF ty_nameid,

tyt_nameid TYPE TABLE OF ty_nameid.

data : it_nameid type tyt_nameid,

wa_nameid TYPE ty_nameid.

DATA lo_nd_name TYPE REF TO if_wd_context_node.

DATA lo_nd_nameid TYPE REF TO if_wd_context_node.

DATA lo_el_nameid TYPE REF TO if_wd_context_element.

DATA ls_nameid TYPE wd_this->element_nameid.

  • navigate from <CONTEXT> to <NAME> via lead selection

lo_nd_name = wd_context->get_child_node( name = wd_this->wdctx_name ).

  • navigate from <NAME> to <NAMEID> via lead selection

lo_nd_nameid = lo_nd_name->get_child_node( name = wd_this->wdctx_nameid ).

  • @TODO handle not set lead selection

IF lo_nd_nameid IS INITIAL.

ENDIF.

  • get element via lead selection

lo_el_nameid = lo_nd_nameid->create_element( ).

  • @TODO handle not set lead selection

IF lo_el_nameid IS INITIAL.

ENDIF.

  • alternative access via index

  • lo_el_nameid = lo_nd_nameid->get_element( index = 1 ).

  • @TODO handle non existant child

  • IF lo_el_nameid IS INITIAL.

  • ENDIF.

select * from ZCARRIAGERESTRIC INTO CORRESPONDING FIELDS OF TABLE it_nameid.

  • get all declared attributes

  • lo_el_nameid->set_attribute(

  • EXPORTING

  • Value = it_nameid

  • name = 'NAMEID' ).

lo_nd_nameid->bind_table( it_nameid ).

but its giving dump WebDynpro Exception: The ADS call has failed.

i have created the Node as under

CONTEXT

-


NAME (NODE)

-


NAMEID (NODE)

-


ZCARR (ATTRIBUTE)

-


DESCR (ATTRIBUTE)

-


DESC (ATTRIBUTE)

I tried the second method, but that too failed. while entering the INSERT WEB DYNPRO SCRIPT it gave an error 'Error while entering script'.

Edited by: NIKHILKUMAR POOJARI on Apr 6, 2009 11:04 AM