Dynamic drop down list in Adobe forms

I have created a drop down list using enumerated drop down list from webdynpro native tab and binded in the object palette by giving $record.sap-vhlist.DESCR\.DATA\.FIELD.item[]* in the list items dynamically.DESCR is the field in the internal table into which i fetched data from the database table .I have written this code in a BADI.I dont know whether my form's display type is activex or native? I am not getting any values in the drop down list.can anybody please tell me what might be missing and how should i know whether my form is ActiveX or Native?
My form is called from portal so i have used BADI to connect portal to form

Hi sarang,
I have done a dynamic drop down list in which DESCR field comes from database table and pops into the drop down dynamically. I was working for a PCR scenario so the adobe form was called from portal.I will tell u all the required steps.It might work for u as it is working for me:
1.In the form:
I used two elements from library first is a "ENUMERATED DROP DOWN LIST NO SELECT" from web-dynpro native tab and second is "ISR_TEXT DISPLAY INVISIBLE ON EDIT MODE" from ISR controls tab.Place them one on other inthe form.
For drop down list the setting are:
     In object, field tab click on list items there in ITEMS put :$record.sap-vhlist.DESCR\.DATA\.FIELD.item[*].in ITEMS TEXT write text in ITEMS KEY write key.
     In binding,in default binding put $record.DESCR.DATA[*].FIELD.
For text element the settings are:
     In binding,default binding put Normal.
     when we select ISR_TEXT DISPLAY INVISIBLE ON EDIT MODE it automatically comes with calculated read only int he value tab.so open script editor and place the below code:
$record.DESCR.DATA.FIELD (in calculate).
2.Now the code in BADI is as follows:
In BADI we have to write the code for drop down list in the METHOD "SCENARIO_SET_ADDITIONAL_VALUES"
As i didnt change the standard BADI i added an enhancement spot in which i wrote a function module which fills ADDITIONAL_DATA. and the below code fills the ADDITIONAL_DATA .
DATA: t_t572b TYPE STANDARD TABLE OF t572b WITH HEADER LINE,
        t_t554t TYPE STANDARD TABLE OF t554t WITH HEADER LINE.
  SELECT * FROM t572b INTO TABLE t_t572b WHERE sprsl EQ 'E'.
  CLEAR ls_additional_data-fieldindex.
  LOOP AT t_t572b.
    ADD 1 TO ls_additional_data-fieldindex.
    ls_additional_data-fieldname ='DESCR_KEY'.
    ls_additional_data-fieldvalue = t_t572b-descd.
    APPEND ls_additional_data TO additional_data.
    ls_additional_data-fieldname ='DESCR_LABEL'.
    ls_additional_data-fieldvalue = t_t572b-descr.
    APPEND ls_additional_data TO additional_data.
    CLEAR t_t572b.
  ENDLOOP.
For DESCR field the we have to declare  DESCR_KEY and DESCR_LABEL in the place holders for key values and palce holders for default values in characteristics tab(where all the fields for the form are defined) of ur respective scenario.(where ur pcr scenario is defined)
Hope ur problem got resolved.
Please let me know if any doubts.
If ur form is not called from portal and u want a dynamic drop down list the difference is put a data drop down list and in object, field tab click on list items there in ITEMS select the field into which u populated the data from the database table (this code shud be written in code Initialization in the respective interface) and in ITEMS TEXT put $ in ITEMS KEY put $.and in binding as we normally do bind it to the respective field in which the data is populated from database table.
It should work.

Similar Messages

  • How to get prefilled drop down list in Adobe form from WebDynpro context

    Hi All,
    We all know that we can have dropdown list in webdynpro which can be automatically populated by the context node collection.
    How can we have the same functionality in Adobe form drop down list. I tried to bind the node attribute to drop down list in Adobe form but it shows me only first element. I am not able to see all the elements in the dropdown but if I am doing same thing for WebDynpro DropDown list I can see the complete List.
    Anybody with Solution?

    Hi Ricky
    I have started a thread for this problem and got an answer for it already. Unfortunately I did not have the time to check it out yet; have a look over there:
    https://mail.cirrus.ch/exchweb/bin/redir.asp?URL=https:///community [original link is broken]
    I appreciate if you tell me whether it worked for you.
    Andreas

  • How to add values to drop down list in adobe forms

    how to add values to drop down list in adobe forms

    Hi,
    If you are using WD Java following are steps of filling values in DD Box:
    1 Create a simple type in the Dictionary.
    2 Create an attribute "CountryNew" in the Context of type created by you.
    3 Write following code in the init method of the form:
    IWDAttributeInfo countryinfo =
                   wdContext.nodeEmployee().getNodeInfo().getAttribute("CountryNew");
    ISimpleTypeModifiable Country = countryinfo.getModifiableSimpleType();
    IModifiableSimpleValueSet countryValueSet =
                   Country.getSVServices().getModifiableSimpleValueSet();
    countryValueSet.put("IN", "INDIA");
    countryValueSet.put("US "USA");
    4 Add a Enumrated DD box in the form and bind it to the attribute "CountryNew"
    Hope this helps
    Amit

  • Drop down list in ADOBE Forms - WDP for ABAP...urgent

    Hi Gurus,
    Can you please explain me how to display values in the dropdown list of Adobe interactive form in WDP for ABAP. Also expalin me how to accept them in the program once the user selects the value from the list. The requirement is I have to call the RFC, get the data and display in the dropdown list at the time of initialization.

    hi,
    to populate the dropdown list you can do it...
    1). manually or 
    2). by code(i work in java... there must be some ABAP equivalent...)
    1). <b>manually</b> go to interactive form->edit
         go to Object tab->field tab ->
         you must see something like
         List Items :
         Text     + x
         click on the green + sign...
         it promps you to type. type in the value press enter... and so  on...
    2) <b>by Code...</b>
        //set up contents of a drop down list dynamically...
        IWDAttributeInfo countryInfo = wdContext.nodeTravelData().getNodeInfo().
                getAttributeInfo().getAttribute("DestinationCountry");
        ISimpleTypeModifiable countryType =
                countryInfo.getModifiableSimpleType();
        IModifiableSimpleValueSet countryValueSet  =
                countryType.getSVServices().getModifiableSimpleValueSet();
        countryValueSet.put("1","Germany");
        countryValueSet.put("2","UK");
    This will work....
    regards,
    -amol gupta

  • Populating values to drop down list in Adobe Forms

    Hi,
    We have added a drop down list in our adobe form. Our requirement is Payment Terms should be displayed in this drop down list. We tried by adding values to drop down list in object palette window by using '+' sign. But now we want to display values dynamically from table T052U. We need to bring two fields ZTERM and TEXT1. We don't want to use database connection, just from a table as an importing parameter it should be appended to this list.
    Atpresent, we don't want to use webdynpro or java for getting values.
    Please provide suitable answers.

    hi,
    cretae simple type in data dictionary i don't have any idea to create simple type in adobe forms.
    For creating Simple Type------in Dictionary->Local Dictionary->Data Type->Simple Type(here right click u get  create simple type).and after that choose Enumaration Here u can add values
    and create a node WITH one attribute and this attribute is off Type of that simple type u created in local dictionary and bind that node with interactive form data source property ,now in interactive form drag and drop that attribte from your dataView Run your application  these values will populate in your Interactive form.
    Regards
    Trilochan

  • Drop down list in Adobe forms

    Hi All,
    I need to provide a drop down list in the Adobe form. I am calling this form from an SE38 program. I have selected the 'Value Help drop down list' element. How do i pass the value or bind the values to this element. The values for the drop down list are selected from a standard table at runtime.
    I tried using Enumerated drop down list also but did not work.
    Any idea????
    Thanks,
    Prakash Pandey

    Hi ,
    Thanks for posting this, saved me a lot of hassles trying to program something. One question. My values are in a nested table. e.g. I have a table with criteria for an appraisal. The criteria have a dropdown on them with a ratings. So, one appraisal, many citeria, many possible rating values. When I put in your code, e.g. $record.APPRAISAL.CRITERIA.DATA[].RATINGS.DATA[] , I get all Ratings relevant to all criteria on each line for the criteria table, not just for the criterion they belong to. How do I specify that it should only pick up the ratings for the current criterion ?
    Hope my explanation makes sense
    Thanks !

  • Regarding drop down list  in adobe forms ::::urgent

    hi
    i have a drop down list with entries 1,2,3...  and a text field in the form layout.
    now the requirement is when i select one entry from the list
    the name of that particular entry should display in the text field.
    suppose say for ex...
    entry 1   name=xxxxx
    entry 2   name =yyyyy.
    like wise depending on what i select it should display the result in the text box..
    let me know the logic for it...
    Edited by: suman yerravelli on Mar 4, 2008 6:03 AM

    hi all
    i have a drop down list with entries 1,2,3... and a text field in the form layout.
    now the requirement is when i select one entry from the list
    the name of that particular entry should display in the text field.
    suppose say for ex...
    entry 1 name=xxxxx
    entry 2 name =yyyyy.
    like wise depending on what i select it should display the result in the text box..
    let me know the logic for it...

  • Dynamic Drop down list

    Hi Friends,
    I am working on a Drop down list in Adobe Interactive Form.
    I have a internal table contaning some values, i have binded my dropdown element wiht the field of the table containing the values. Thatu2019s working fine an I can select on value from the drop down list.
    I want to add a new value to select another value from the drop down list or delete it.
    The scenario is that when I click on add-Button to selects another value from the drop down list in subform,  I add another Drop down list, but I canu2019t open the second or third drop down to select the value.
    Iu2019m a new in JavaScript. I thing a missing something in JavaScript, wenn I click add-Button
    Please let me know what is missing or send me an exampel.
    Thanks and Regards.

    Hi Chintan,
    Thank you for your help.
    I will try to explain more clearly my problem .
    In my case, my form will be used in ABAP system without any web dynpro applicatoin . forms are send by mail and retrieve by mail in SAP .
    I define a PDF forms in the ABAP stack of SAP . in the form i create a table subforms , number of rows depend on what is store on the database.
    In the fact, my field is defined as dropdownlist box and value are link to the content of the interface attributes .
    For thr first row that works fine but when i add a line, the content is not populate automaticaly, and i can' t open the dropdownlist.
    When user receive the forms, he can add lines to the table while it's define as dynamic. My problem is that on NEW LINE the dropdownlist box is empty.
    How can i solved this issue ?
    Tanks

  • Populating Drop-down List in Interactive Forms for Java

    Hi,all
    I need to populate a drop-down list in Interactive Form.
    I tried to do it by using Dynamic Properties of the drop-down
    list,but didn't give nothing.At the same time I have successfully
    populated a simple drop-down list(on webdynpro view),which I
    replaced near my InteractiveForm.
    What may be the problem?
    Regards,
    Michael

    Use the DDL from the Web Dynpro pallette. Bind the same/ similar attribute of the DDL you used in the web Dynpro view in the interactive form also... this should work..
    Thanks and Regards,
    Anto.

  • How to populate data from dynamic drop down list to the text field

    Hi,
    I tried to populate data from dynamic drop down list to city field. I would like to concat data from drop down list.When selecting add button to add the item and select item from drop down list, data should be displayed in the text field. However, Please help. I spent alot of time to make it works I am not successful.
    Please see the link below.
    https://acrobat.com/#d=SCPS0eVi6yz13ENV0cnUdw
    Thanks for your help
    Cindy

    Hi Rosalin,
    Loop the hidden table, get the values and populate drop down in each iteration.
    DropDownList1.addItem("Text","Value");
    You can use one more solution for this scenario. If it is a matter of 2,3 dropdowns, put three dropDowns in the form layout and give seperate static data binding to them. At run time make the dropDowns hide/visible as per the requirement.
    Hope this helps.
    Thanks & Regards,
    Sanoosh

  • Drop down values in Adobe Forms vanishes upon Check and Send in HRAS

    Hello
    The drop down values in Adobe Forms vanishes upon Check and Send while initiating the process.
    I also get the error , u2018 The Entered Value is not on the List of Valid Valuesu2019   when I select the values again and try to SUBMIT.
    We are in EHP4u2026 and I am seeing many Notes has been released to address these issues in EHP3 itself..
    Request your help and supportu2026.
    Thanks
    Meena Venkatesan

    Hello
    Thanks for the swift response.
    We applied the Note 1413209 and 1403266. The fix didnu2019t work.
    I noticed the SAP Note 1403266 mentions a prerequisite Note 1346443 which is for SP4.
    We are currently in SP5 and our system mentions Note 1346443 as u2018Cannot be Implemented. u2018
    Please advise.

  • Dynamic Drop-down list - selected value can't be cleared ...

    1. check out the following code of a dynamic drop down list using cursor :-
    DECLARE
         -- DROP-DOWN LIST OF ALL DEPARTMENTS
         TEMPNUMBER NUMBER(2) := 2 ;
    -- Because we've to initialize the list
    -- at least with 1 item.
    CURSOR C_DEPT IS
         SELECT DEPT_ID FROM DEPARTMENT;
    BEGIN
         ABORT_QUERY ;
         CLEAR_LIST('DEPTLIST');
         FOR TEMP IN C_DEPT LOOP
         ADD_LIST_ELEMENT( 'DEPTLIST', TEMPNUMBER, TEMP.DEPT_ID, TEMP.DEPT_ID );
         :SRBLOCK.LST := TEMP.DEPTNO;
         -- prev. line set the newly selected value
         TEMPNUMBER := TEMPNUMBER + 1 ;
         END LOOP;     
    END;
    2. problem is as we've to atleast initialize with one list item... that item can't be cleared with CLEAR_LIST.
    3. how can i actually clear that and still use cursor. because i've searched forum for this thing and found all those code not working ... for my project ...
    4. quick help needed ...

    Hi Omar,
    I have solution for you
    To populating or refreshing the lists you can use
    two procedures:
    One of them - generic, which can be used for all types of list
    Another is specific which contain a SQL statement to retrieve the data for
    particular list.
    1. Specific procedure:
    PROCEDURE GET_DEPARTMENT_LIST
    IS
    sql_stat VARCHAR2(32767);
    ret_code NUMBER;
    BEGIN
    -- SQL Statement for Drop-down List
    -- (must have two columns for label and value - both VARCHAR2)
    sql_stat := ' SELECT DEPARTMENT_NAME,TO_CHAR(DEPT_ID)'
    ||' FROM SCHEMA.DEPARTMENT';
    POPULATE_MY_LIST('BLOCK.DEPARTMENT_LIST',sql_stat,ret_code);
    END;
    2. Generic procedure:
    PROCEDURE POPULATE_MY_LIST
    (item_name VARCHAR2,
    sql_stat VARCHAR2,
    out_code OUT NUMBER)
    IS
    rg_id RECORDGROUP;
    rg_name VARCHAR2(100);
    ret_code NUMBER;
    item_id ITEM;
    BEGIN
         item_id := FIND_ITEM(item_name);
         IF ID_NULL(item_id) THEN
              out_code := -1;
              RETURN;
         END IF;
         --Creating Record Group with Unique Name
         rg_name := 'RG_'||SUBSTR(item_name,INSTR(item_name,'.',1)+1,LENGTH(item_name));
         --Checking Record Group Name for existance
         rg_id := FIND_GROUP(rg_name);
         --If Group does exist - delete it
         IF NOT ID_NULL(rg_id) THEN
              DELETE_GROUP(rg_id);
         END IF;
         --Creating Record Group
         rg_id := CREATE_GROUP_FROM_QUERY(rg_name,sql_stat);
    ret_code := POPULATE_GROUP(rg_id);
    IF (ret_code <> 0) THEN
         out_code := ret_code;
         RETURN;
    END IF;
    POPULATE_LIST(item_name,rg_id);
    IF NOT FORM_SUCCESS THEN
         out_code := -2;
         RETURN;
    ELSE
    out_code := 0;     
    END IF;
    DELETE_GROUP(rg_id);
    END;
    Hope it help.
    Dmitry

  • Drop down list in Adobe : PCR Scenario

    Dear Experts,
    I am struggling to get the drop down list in Aobe forms.
    The values are getting populated in the internal table in BADI. But the values not coming in drop down list.
    Could you please help me on this issue?
    Should i have to write script for this?? script option is not coming in my ADLC.
    your valuable help will be definitly rewarded.
    thanks
    Yogesh.

    Hi Yogesh,
    Try using the WDP Activex dropdown in your form.
    Regards,
    Arafat

  • Cteate 2 Dynamic drop down list

    Hi all
    i want to create 2 dynamic drop down list using struts and hibernate
    i want the first one to display countries name then if i select a country name the second drop down list will automatic display the country cities .
    i'm using database here and my tables like that :-
    country table
    country_id number(3) pk
    country_name varchar(50)
    city table
    city_id number(5) pk
    country_id(3) fk references country(country_id)
    city_name varchar(50)
    thank you in advance

    Hi Omar,
    I have solution for you
    To populating or refreshing the lists you can use
    two procedures:
    One of them - generic, which can be used for all types of list
    Another is specific which contain a SQL statement to retrieve the data for
    particular list.
    1. Specific procedure:
    PROCEDURE GET_DEPARTMENT_LIST
    IS
    sql_stat VARCHAR2(32767);
    ret_code NUMBER;
    BEGIN
    -- SQL Statement for Drop-down List
    -- (must have two columns for label and value - both VARCHAR2)
    sql_stat := ' SELECT DEPARTMENT_NAME,TO_CHAR(DEPT_ID)'
    ||' FROM SCHEMA.DEPARTMENT';
    POPULATE_MY_LIST('BLOCK.DEPARTMENT_LIST',sql_stat,ret_code);
    END;
    2. Generic procedure:
    PROCEDURE POPULATE_MY_LIST
    (item_name VARCHAR2,
    sql_stat VARCHAR2,
    out_code OUT NUMBER)
    IS
    rg_id RECORDGROUP;
    rg_name VARCHAR2(100);
    ret_code NUMBER;
    item_id ITEM;
    BEGIN
         item_id := FIND_ITEM(item_name);
         IF ID_NULL(item_id) THEN
              out_code := -1;
              RETURN;
         END IF;
         --Creating Record Group with Unique Name
         rg_name := 'RG_'||SUBSTR(item_name,INSTR(item_name,'.',1)+1,LENGTH(item_name));
         --Checking Record Group Name for existance
         rg_id := FIND_GROUP(rg_name);
         --If Group does exist - delete it
         IF NOT ID_NULL(rg_id) THEN
              DELETE_GROUP(rg_id);
         END IF;
         --Creating Record Group
         rg_id := CREATE_GROUP_FROM_QUERY(rg_name,sql_stat);
    ret_code := POPULATE_GROUP(rg_id);
    IF (ret_code <> 0) THEN
         out_code := ret_code;
         RETURN;
    END IF;
    POPULATE_LIST(item_name,rg_id);
    IF NOT FORM_SUCCESS THEN
         out_code := -2;
         RETURN;
    ELSE
    out_code := 0;     
    END IF;
    DELETE_GROUP(rg_id);
    END;
    Hope it help.
    Dmitry

  • How to create Dynamic Drop down list ?

    Hi experts
    I want to create a Dynamic Drop down list that should be an Editable,after editing that i need to save.
    thanks,
    vikram.c.

    Hello,
    Please go through this link:
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/vc/linking%2bdrop-down%2blists
    If useful reward.
    Vasanth

Maybe you are looking for

  • Can I set the subject line to wrap around in folder pane? If so, how?

    I have my view set to Vertical - Folder pane and Preview pane side-by-side. I like to be able to display more of the subject in folder pane without enlarging the folder pane's width of reducing the width of the preview pane. Is it possible to make th

  • How to make more space on my startup disk

    I keep getting messages that I don't have enought space on my startup disk, I was wondering if I can download a program so see how I can clean it up, or see which files are using most of my disk to delete them or to put them in an external hard drive

  • Next_record issued

    hi to all using form6i and run in c\s After I run the next_record procedure for 7 times, "only 6 records in the table " ,there is no data in the 7th record . Could anyone knows how to add some condition to determine and stay with at the last record w

  • I deployed my .ear......Class loader failed...classs not found exception

    Hi, i deployed my application in Oracle 10g appserver....it shows the following exception [Sep 15, 2006 12:48:22 PM] [SWDMS.192.168.20.108] Application Deployer for swdms STARTS. [Sep 15, 2006 12:48:22 PM] [SWDMS.192.168.20.108] Copy the archive to C

  • SATA stuck in PIO : ms-7025

    Hi there ... ms-7025, newest BIOS, no raid, only 1 sata drive. DMA enabled for the drive in the BIOS. The SATA drive is not the boot drive. There are 3 PATA drives and 1 PATA DVD-RW installed. The SATA drive is an extended NTFS partition. It's a 500G