How  to add values in Listbox

Hi All,
PARAMETERS: cust_dbt(3)
                  AS LISTBOX VISIBLE LENGTH 20
                    DEFAULT 'yes'.
Above code shows only 'yes' value when we click on drop down list box.
How to assign both 'yes' & 'No' values to the drop down list box.

Hi
Use the fun module VRM_SET_VALUES to get the multiple values for that LIST BOX
see the sample code
Input : p_char = 'J'.
Press: enter
List Box of Month = January, June , July.
REPORT ZLIST_VALUES.
TYPE-POOLS vrm.
tables:
spfli.
parameters: p_char type c.
parameters:
p_month(12) as listbox visible length 20,
p_year as listbox visible length 20 .
DATA:
t_table TYPE STANDARD TABLE OF vrm_value,
t_table1 TYPE STANDARD TABLE OF vrm_value,
vrm_values1 LIKE LINE OF t_table.
DATA:
t_year TYPE STANDARD TABLE OF vrm_value.
data: w_year(4) type n value '2000'.
at selection-screen output.
vrm_values1-key = 'a'.
vrm_values1-text = 'January'.
APPEND vrm_values1 TO t_table.
vrm_values1-key = 'p'.
vrm_values1-text = 'February'.
APPEND vrm_values1 TO t_table.
vrm_values1-key = 'q'.
vrm_values1-text = 'March'.
APPEND vrm_values1 TO t_table.
vrm_values1-key = 'r'.
vrm_values1-text = 'April'.
APPEND vrm_values1 TO t_table.
vrm_values1-key = 's'.
vrm_values1-text = 'May'.
APPEND vrm_values1 TO t_table.
vrm_values1-key = 't'.
vrm_values1-text = 'June'.
APPEND vrm_values1 TO t_table.
vrm_values1-key = 'u'.
vrm_values1-text = 'July'.
APPEND vrm_values1 TO t_table.
vrm_values1-key = 'v'.
vrm_values1-text = 'August'.
APPEND vrm_values1 TO t_table.
vrm_values1-key = 'w'.
vrm_values1-text = 'September'.
APPEND vrm_values1 TO t_table.
vrm_values1-key = 'x'.
vrm_values1-text = 'October'.
APPEND vrm_values1 TO t_table.
vrm_values1-key = 'y'.
vrm_values1-text = 'November'.
APPEND vrm_values1 TO t_table.
vrm_values1-key = 'z'.
vrm_values1-text = 'December'.
APPEND vrm_values1 TO t_table.
t_table1[] = t_table.
delete t_table1 where text+0(1) <> p_char.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'p_month'
values = t_table1
EXCEPTIONS
ID_ILLEGAL_NAME = 1
OTHERS = 2.
do 10 times.
add 1 to w_year.
vrm_values1-key = sy-index.
vrm_values1-text = w_year.
APPEND vrm_values1 TO t_year.
enddo.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'p_year'
values = t_year
EXCEPTIONS
ID_ILLEGAL_NAME = 1
OTHERS = 2.
start-of-selection.
write: p_month.
<b>Reward points for useful Answers</b>
Regards
Anji

Similar Messages

  • 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

  • Webdynpro " How to add values in Drop down list By Key"

    Hi experts ,
    i want to create a drop down list by key, i don't know how to assign values to it ( i.e. add list entries ) . Please help me on this ..
    With regards ,
    James..
    Valuable answers will be rewarded ....

    Hi,
    To fix values to the drop down key at runtime in the webdynpro application you can use the following code:
    DATA:
    lr_node_flightinfo TYPE REF TO if_wd_context_node,
    lr_nodeinfo_flightinfo TYPE REF TO if_wd_context_node_info,
    l_scarr type scarr,
    lt_value_set TYPE TABLE OF wdr_context_attr_value,
    lw_value_set like line of lt_value_set.
    get nodeinfo of node flightinfo
    lr_node_flightinfo = wd_context->get_child_node( name = 'FLIGHTINFO' ).
    lr_nodeinfo_flightinfo = lr_node_flightinfo->get_node_info( ).
    get value set (VALUE = CARRID , TEXT = CARRNAME)
    select carrid carrname from scarr into table lt_value_set.
    clear lw_value_set.
    lw_value_set-value = 'AI'.
    lw_value_set-text = 'Air India'.
    append lw_value_set to lt_value_set.
    sort the value set by the describing TEXT
    SORT lt_value_set BY text.
    set value to context attribute
    lr_nodeinfo_flightinfo->set_attribute_value_set(
    name = 'CARRID' value_set = lt_value_set ).
    Here CARRID is a drop down by key field on the screen.
    in The context it is an attribute in the node FLIGHTINFO.
    Please give Reward Points if this piece of code helps
    Regards,
    Manish

  • How to add values in the combobox that I have added in the Grid?

    Hi all,
    I have added a combobox to a Grid, i need to add values to that Combobox, how can i do it, Can anybody help
    Regards
    Cool Ice

    Hi Cool Ice,
    I'm use this code to add value to my combobox in my grid :
    string sQuery = "SELECT CRD1.Address FROM CRD1 WHERE CRD1.AdresType='S' AND CRD1.CardCode='" + oGrid.DataTable.Columns.Item("U_IFC_PP").Cells.Item(pVal.Row).Value.ToString() + "'";
                                        SAPbobsCOM.Recordset oRec;
                                        oRec = (SAPbobsCOM.Recordset)SBO_Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset);
                                        oRec.DoQuery(sQuery);
                                        SAPbouiCOM.ComboBoxColumn oCBB;
                                        oCBB = (SAPbouiCOM.ComboBoxColumn)oGrid.Columns.Item("U_IFC_ADR");
                                        oCBB.DisplayType = SAPbouiCOM.BoComboDisplayType.cdt_Value;
                                        while (!oRec.EoF)
                                            oCBB.ValidValues.Add(oRec.Fields.Item("Address").Value.ToString(), "");//, oRec.Fields.Item("Address").Value.ToString());
                                            oRec.MoveNext();
    Hope it's help you
    Regards
    Michael

  • How to populate values in listbox of a field?

    HI all,
    My requirement is : i have one filed , for that i have five values,
    i want to display those five values in the list box. then i have to select one of them  and based on this field i have to display few fields in table control .
    here i am able to display the values in listbox but even i select any value , it showing the first vale only !!!!!!
    please help me in this regard.

    This is the way........
    DATA: DYNFIELDS TYPE TABLE OF DYNPREAD WITH HEADER LINE.
      DATA : L_PSPNR  TYPE PROJ-PSPID,
             L_WBSE   TYPE PRPS-POSID.
    PARAMETERS : P_BPO TYPE CKIS-EXTNR
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_BPO.
    DATA : BEGIN OF IT_BPO OCCURS 100,
             BPO LIKE ZCKIS-BPO,
             END OF IT_BPO.
      DYNFIELDS-FIELDNAME = 'P_PSPNR'.
      APPEND DYNFIELDS.
      CLEAR DYNFIELDS.
      DYNFIELDS-FIELDNAME = 'P_WBSE'.
      APPEND DYNFIELDS.
      CLEAR DYNFIELDS.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          DYNAME               = SY-CPROG
          DYNUMB               = SY-DYNNR
          TRANSLATE_TO_UPPER   = 'X'
        TABLES
          DYNPFIELDS           = DYNFIELDS
        EXCEPTIONS
          INVALID_ABAPWORKAREA = 1
          INVALID_DYNPROFIELD  = 2
          INVALID_DYNPRONAME   = 3
          INVALID_DYNPRONUMMER = 4
          INVALID_REQUEST      = 5
          NO_FIELDDESCRIPTION  = 6
          INVALID_PARAMETER    = 7
          UNDEFIND_ERROR       = 8
          DOUBLE_CONVERSION    = 9
          STEPL_NOT_FOUND      = 10
          OTHERS               = 11.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ELSE.
    Rewards if satisfied
    Thanks

  • How to add value in service header

    Hi,
    Following is the portion of service header which I am sending to my Trading Partner-
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ServiceHeader SYSTEM "ServiceHeaderPartMessageGuideline.dtd">
    <ServiceHeader>
    <ProcessControl>
    <ProcessIdentity>
    <GlobalProcessCode></GlobalProcessCode>
    <GlobalProcessIndicatorCode>3A4</GlobalProcessIndicatorCode>
    <initiatingPartner>
    I want to add value "Request Purchase Order" in tag "GlobalProcessCode". So this portion of service header should be like this-
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ServiceHeader SYSTEM "ServiceHeaderPartMessageGuideline.dtd">
    <ServiceHeader>
    <ProcessControl>
    <ProcessIdentity>
    <GlobalProcessCode>Request Purchase Order</GlobalProcessCode>
    <GlobalProcessIndicatorCode>3A4</GlobalProcessIndicatorCode>
    <initiatingPartner>
    Can anyone tell that where exactly I should add "Request Purchase Order" value in my B2B configuration so that I get the required service header value?
    Thanks & Regards,
    Anuj Dwivedi

    Hi Anuj,
    Guess you are using RNIF 1.1.
    Please ensure to provide the collaboration code while creating collaboration.
    Regards,
    Dheeraj

  • How to Add Values in INVOICE SUB-TYPE field at the Invoice Header Forms

    Hello,
    Does any body knows how could I add/modify values in the INVOICE SUB-TYPE field at the Invoice Header Forms?. This values are related to the Globalization, in this case for the Chilean Localizations.
    Thanks,
    Alejandro R.

    It gives any error or just does nothing?
    Have you tried making another simple form with just one block and one or two items?
    You can do this type of testing in these conditions.
    Which version of forms are you using?

  • How to add value in standard table

    Hi
    i need to add one field in standard table VBAK  so i have added one field ( for eg i have added  status as field in VBAK ) in that standard table through append structure
    than i used one user exit USEREXIT_SAVE_DOCUMENT_PREPARE in program MV45AFZZ
    in this i get values in the structure XVBAK
    than i moved the 'X'  in that status field shown below
    XVBAK-STATUS = 'X' .
    after that sales order get generated
    but when i open table VBAK and enter that VBELN or sales order no. i dont find any value in that status
    so pls tell how can i find value  of that field in table VBAK .
    Thanks
    Taran

    after moving the value did u append the table.
    Check it.

  • How to add Value Table or Search Help for a field which is on Standard SAP?

    Hi All,
        I have a field HERST (tcode IE01) which doesnt have any value table or search Help. I have the same field in a Z table which I should display for the standard screen field in tcode IE01. So Pls suggest me on this.
        Thanks in advance.
    Regards
    Jaker.

    Hi, Tamas,
    I found the reason. The function Z_WEBRFC_READ_DATA_SH had a string concatenation error.
    CONCATENATE '{"results":[{"key": "shlpname", "value": "' l_shlp '"},"key": "fieldname", "value": "' l_field '"}]}' INTO htmldoc-line.
    The correct code is like:
    CONCATENATE '{"results":[{"key": "shlpname", "value": "' l_shlp '"},{"key": "fieldname", "value": "' l_field '"}]}' INTO htmldoc-line.
    Another question is, I can't get any words in Chinese from WebRFC. It returns error when I try it. How can I configure it?
    Xin

  • How to add values of checkboxs to a numeric field?

    I have 5 checkbox which I assigned values to: Excellent 5 , Satisfactory 4, Needs Improvement 3 , and so on. When I check a check box , lets say the Excellent one, I want it to put the value 5 in another numeric field. How do I do this?

    Hi,
    For the checkboxes you can set the On value and the Off value. See the Object > Binding palette. You would just set the Excellent check box to an On value of 5. Then it is just a matter of adding the checkboxes together.
    See a few examples here: http://assure.ly/omsURE, http://assure.ly/uiKS6f and http://assure.ly/iitzNJ.
    Niall

  • How to get value from listbox?

    I have a listbox in the form part where user can select more than one values. ie i have a list of districts where people can choose more than one district at once. When this value is submitted, i need to display the name of this district in the jsp page.
    In other words, in the next page i need the value as:
    district = "12,15,16,14,11,10";
    Can anybody help me out with this?

    Thank u for the reply, but
    I mean that,
    i have a page in html as:
    <select name="district[]">
    <option value="1" selected>District1</option>
    <option value="2" selected>District2</option>
    <option value="3" >District3</option>
    <option value="4" selected>District4</option>
    </select>
    Here only three districts are selected. SO in the next page after submitting this page, i need the id of selected districts only so that i can make it in the following string format.
    district = "1,2,4";
    I have tried with
    district = request.getparameter("district");
    and it returned only the last id (ie 4). not all the selected districts.
    I think, u got my problem. getID is the function of javascript, it doesnot return value in jsp.

  • How to Add values to dropdown list in runtime

    Hi All
    I wanted to add the items to the dropdown list in the plugin.
    The SDK Example WriteFishPrice shows the items are hard coded in the .fr file.
    i am looking for a similar concept, but not adding the items in the .fr file, i wanted to add the items in the .cpp or .h files and add the items to the dropdownlist.
    DECLARE_PMID(kWidgetIDSpace, kWFPDropDownListWidgetID, kWFPPrefix + 2)
    The declaration is done in WFPID.h file
    #define kWFPDropDownItem_1Key kWFPStringPrefix "kWFPDropDownItem_1Key"
    defining the string is done in WFPID.h
    I wanted to add the items in the same header file, is there any way that i can add the items in the header files instead of adding in .fr file
    Please guide me
    Thank you
    -Srinivas

    Hope this will help you a bit with both threads ; )<br />I'm not sure what you are trying to accomplish with defining the strings in an header or cpp file and not in the fr file(s). Usually you sort of predefine strings in the main fr file and then give a "final" translation definition for each string in the corrosponding language file. If you don't need or want to translate you can define string constants almost wherever you like and add them at runtime e.g. during dialog initialization. In this case you'd have to make each string not to be translateable with PMString.SetTranslatable(kFalse).<br />If you want to add items to a listbox or text edit during runtime you just have to get the interfaces and call their methods. Below is a small example taken from a dialog with a dropdown listbox, a text edit field and a button widget. In the DialogObserver I implemented the Update function to the following functionality:<br />- when the button (Insert Button) is pressed the content of the edit field is read and inserted into the listbox<br />- when something in the listbox is selected, the selection is shown/inserted into the text field<br /><br />void VSPDialogObserver::Update<br />(<br />     const ClassID& theChange,<br />     ISubject* theSubject,<br />     const PMIID& protocol,<br />     void* changedBy<br />)<br />{<br />     // Call the base class Update function so that default behavior will still occur (OK and Cancel buttons, etc.).<br />     CDialogObserver::Update(theChange, theSubject, protocol, changedBy);<br /><br />     do<br />     {<br />          InterfacePtr<IControlView> controlView(theSubject, UseDefaultIID());<br />          ASSERT(controlView);<br />          if(!controlView) <br />               break;<br />          <br />          InterfacePtr<IDialogController> dialogCtrl(this, UseDefaultIID());<br />          if (!dialogCtrl)<br />               break;<br /><br />          InterfacePtr<IPanelControlData> panelControlData(this, UseDefaultIID());<br />          if (!panelControlData)<br />               break;<br /><br />          //get currently selected/active widget<br />          WidgetID theSelectedWidget = controlView->GetWidgetID();<br />          <br /><br />          // is it the drop down list?<br />          if (theSelectedWidget== kVSPDropDownWidgetID) <br />          {<br />               TRACE("ListBoxAction");<br />               //insert selected string into edit field<br />               PMString strSelection =     dialogCtrl->GetTextControlData(kVSPDropDownWidgetID);<br />               strSelection.SetTranslatable(kFalse);<br />               dialogCtrl->SetTextControlData(kVSPTopEditBoxWidgetID, strSelection);<br />               break;<br />          }<br /><br />          // ist it the text edit field?<br />          if (theSelectedWidget == kVSPInsertButtonWidgetID && theChange == kTrueStateMessage)<br />          {<br />               TRACE("Insert Button pressed");<br />               IControlView* listView = panelControlData->FindWidget(kVSPDropDownWidgetID);<br />               InterfacePtr<IStringListControlData> listControlData(listView, UseDefaultIID());<br /><br />               //Insert the string into listbox<br />               PMString strText = dialogCtrl->GetTextControlData(kVSPTopEditBoxWidgetID);<br /><br />                        // obviously there can't be a translation for text entered by user<br />               strText.SetTranslatable(kFalse);<br />               listControlData->AddString(strText,kVSPTopEditBoxWidgetID);<br />          <br />               //"clear" the text edit field<br />               dialogCtrl->SetTextControlData(kVSPTopEditBoxWidgetID, "");<br />               break;<br />          }<br />     } while (kFalse);<br />}

  • How to add values in a List item using code

    Hi all,
    I want to populate a list item at run time with the values of my choice.
    im using this
    add_list_element('list34',1, 'Name','Smith');
    or
    add_list_element('list34',1, 'Name',:emp.txtname);
    where emp is my data block and txtname is a text field on this emp block.
    noen of them is working, whether i try adding a string or the value in a text item.
    please help.

    It gives any error or just does nothing?
    Have you tried making another simple form with just one block and one or two items?
    You can do this type of testing in these conditions.
    Which version of forms are you using?

  • How to add values dynamically for custom property during design time?

    I am trying to create a user control with custom properties. I have a property named Server.
    And Values for this property is system dependent. I have the code that can generate the values and is working fine.
    During the design time, when I include this control in my application, and type the property name, I want Visual Studio to prompt for the values. Like it
    does for Alignment property for some controls shows Left, Right, Center.. during design time.
    If the Values are static, I can use an enum and it works fine. I need help with dynamic values.

    You can't, afaik.
    It's either an enum or you don't get that functionality of values.
    There is no right left centre, "Towards the top right but just off centre" - which I just thought of... option for example.
    Hope that helps.
    Recent Technet articles: Property List Editing;
    Dynamic XAML

  • How to add value to Root node in message mapping i.e. ns1:sObjects to ns1:sObjects xsi:type="Account"

    Hi Experts,
      please provide me any  UDF or Java or XSLT maaping code to add text into the root node of the payload i.e. my target Payload will be like
    <ns1:sObjects>
    <ns2:Id>123</ns2:Id>
    <ns2:name>Test message <n/s2:name>
    </ns1:sObjects>
    and i have to get it like
    <ns1:sObjects xsi:type="Account">
    <ns2:Id>123</ns2:Id>
    <ns2:name>Test message <n/s2:name>
    </ns1:sObjects>
    Regards,
    Yugandhar

    HI Yugandhar,
    In case of sales force, the can team will provide you a WSDL, In that WSDL you can manually edit the type:Account and can use the same while mapping.
    pls find the below screen shot, it will give you a better idea,
    pls let me know if you any further issues regarding.
    Pls Mark it as a correct answer if it is.
    Thanks,
    Prasad.

Maybe you are looking for

  • I can't copy iTunes media files from one external hard drive to another.

    Hi, I am running the latest iTunes and Mavericks software on my MacBook Pro. My iTunes library is stored on an external Seagate 2tb hard drive and it is almost full. I want to transfer the files to a WD Elements 3tb external hard drive and have made

  • Adobe Photoshop Elements 8 - Create package

    I have some issues with Photoshop elements 8, why do i have to use the setup.exe to install? I just want to use MSI file with setup.ini OR switches, and with a *.mst file(wich i want to edit before use, but do not know how..) This is a packeage i'm g

  • Sansa MP3 device

    I just pruchased a Sansa Fuze MP3 player. It won't work on my computer but will on my wife's Macbook. Sansa tech support says that there may be a problem with my USB port but every other device works with those ports. The Fuze icon doesn't show up on

  • Smart Form for CRM-Quotation

    Hi, My requirement is to Enhance the Quotation header screen in CRM backend system to add ‘Print Language’ field. It should be 1 character long field with dropdown option in CRM QUOTATION transaction screen. & also am not finding the Print button in

  • Text Generator button won't work

    I am in the middle of getting a project done for this Monday. Last night, I was able to use the text generator button in the viewer. Today, it won't work. What have I done to disengage it? Help is needed quickly. Thanks.