Skip to Content
author's profile photo
Former Member

How to bind data dynamically in drop down list via internal table?

Hi all,

I have created a field in the layout with type DROPDOWN which is a field of internal table.

I want to show that whatever data is populated in that field of intenal table,it should be shown in the form of drop down list.

Please help how to proceed in it.

Thanks in advance,

Rosalin

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    author's profile photo
    Former Member
    Posted on Mar 15, 2011 at 08:34 AM

    Hi Rosalin,

    Search the forum before posting. Check whether the following blog helps you out.

    [http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/6793] [original link is broken] [original link is broken] [original link is broken];

    Thanks & Regards,

    Sanoosh

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      Use following script to loop table, get the values and add to dropdown list.

      var hidTab = xfa.resolveNodes("mainForm.subForm.table[*].DATA[*]");
      var hidTab_len = hidTab.length;
      for (var i=0; i<hidTab_len; i++)
      {
           var text  = hidTab.item(i).Field1.rawValue;
           var value = hidTab.item(i).Field2.rawValue;
           DropDownList1.addItem("text","value");
      }

      Thanks & Regards,

      Sanoosh

  • author's profile photo
    Former Member
    Posted on Mar 15, 2011 at 11:14 AM

    Hi Roslin,

    Goto SFP tcode.

    1.Create Interface

    In gobal Definitions->Types->Define Structure.

    In gobal Definitions->gobaldata->Define Variable

    Initialization->Define Outparameters

    Select * into table IT_table from (Custom or standard table).

    2. Create forms

    Goto layout->Drag and drop the Drop-Down list

    And the Bind the value IT_table

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on May 03, 2011 at 03:06 PM

    HI Sanoosh,

    I have used the binding to the internal table values for displaying the drop-down list values and I could see them in the PDF form when i execute the form through a print program but when I integrated the form in WebdynproABAP , all the internal tables usually you declare under 'Global data' were not visible in context in Webdynpro ABAP, Could you let me know how I could get these values for drop-down lists and for online interactive form , my interface type is ABAP dictionary based , is it correct or need to be changed for dipslaying the values in dropdown list box as per SAP standards ???

    Thanks,

    SP

    Add comment
    10|10000 characters needed characters exceeded