Drop down list of  values for a field in ALV rpt within a BADI

Hi,
I need help on this issue.
TCODE LI21 is used to clear the differences in IM.  The business now wants to prompt for a reason code before they can post a new material document for this clearing.  I have create an implementation in BADI LE_WM_INV_WM_IM, which display the field for user to enter the reason code.   However, I am trying to get a dropdown list which contain the possible values for reason code so the user can choose from this list.  There are sample codes to do this but I can't apply to the codes in the implementation because call screen is not allowed.  Has anyone done this before or can advise me of the solution?
Thanks.

Hi,
Use the Field Catalogue Properties
Ref_fieldname
Ref_Tablename
and assign the corresponding field & Table/Strucutre Name to the above fields....

Similar Messages

  • How can i redirect 5 choice options from a drop down list into 5 separate text fields?

    I have a number of drop down lists which push one of 5 choices to a text field on another page.
    I want to be able to push each choice from one drop down field to a separate field, so that it is not possible to duplicate the drop down choice.
    The resulting page is going to be locked.
    What script do I need to use to send each of the five choices specifically to five separate text fields?
    Thanks for the insight.

    Hi Paul,
    I've had a look at the sample script you posted. I'm not sure how to make it work with the form I'm creating. (I sent it to you earlier.) Would you mind setting one of the fields up on my form so that I can get an idea of how to then push the choices set up on the "visible on screen only" to the textfields which are locked on the visible page? Do i lock the fields in the same way?
    Will I need to create a new script for each of the arrays I'll be creating? for example, myScript1, myScript2, my Script3....
    Why do i need a reset button?
    Nellie

  • How to get drop down list  display values

    I have binded my drop down list with tabledataprovider. In the value field i have given customer id and in display field i have given customer name.
    I have reatrived cust id but
    how to reatrieve customer name.

    http://forum.sun.com/jive/thread.jspa?forumID=123&threadID=56515
    Also, if your dropdown list is bound to a data provider you can use something like this:
    RowKey rowkey = tripDataProvider.findFirst("PERSON.PERSONID", dropDown1.getSelected());
    String displayValue = (String)tripDataProvider.getValue("PERSON.NAME", rowkey);

  • Error while populating drop down list with values from a database

    Hi all,
    I have a JSP page with a drop down list that is to be populated with values from a database.
    This is the code in my JSP file:
         <!-- Form for picking the floor -->
             <!-- Get the available floors -->
             <% ArrayList<Integer> floornumbers = dataManager.getAllFloorNumbers();
                Iterator<Integer> iterator = floornumbers.iterator(); %>
             <!-- Create the form for users to select the floor -->
             <form id="floorselectionform">
                  <input type="hidden" name="action" value="floorselected"/> <!-- Guides the servlet to redirect to the appropriate page -->
                  Select floor | <select name="floorselector" id="floorselector">
                       <% while (iterator.hasNext()) { %>
                       <option value="<%=iterator.next().intValue()%>"> <%=iterator.next().intValue()%> </option>
                       <% } %>
                  </select>
                  <input type="submit" value="Go!"/>
             </form>   The DataManager.java class simply forwards this to its respective Peer class, which has the code shown below:
          package seatplanner.model;
        import java.sql.Connection;
        import java.sql.ResultSet;
        import java.sql.SQLException;
        import java.sql.Statement;
        import java.util.ArrayList;
        /* This class handles all floor operations */
         public class FloorPeer
         /* This method returns all the floor numbers */
         public static ArrayList<Integer> getAllFloorNumbers(DataManager dataManager) {
            ArrayList<Integer> floornumbers = new ArrayList<Integer>();
            Connection connection = dataManager.getConnection();
            if (connection != null) {
              try {
                Statement s = connection.createStatement();
                String sql = "select ID from floor order by ID asc";
                try {
                  ResultSet rs = s.executeQuery(sql);
                  try {
                    while (rs.next()) {
                      floornumbers.add(rs.getInt(1));
                  finally { rs.close(); }
                finally {s.close(); }
              catch (SQLException e) {
                System.out.println("Could not get floor numbers: " + e.getMessage());
              finally {
                dataManager.putConnection(connection);
            return floornumbers;
         }  The classes compile properly, but when I load this page up in Tomcat it just freezes and does not load the form. I tested the DB connection and it works fine.
    What am I doing wrong in the JSP code?
    Thanks for the help in advance.
    UPDATE: I commented out the form, and added <%=floornumbers.size()%> right above the commented code to check if the ArrayList is indeed getting populated with the values from the database (the values are of type integer in the database). The page still freezes like before. I'm puzzled now :confused: .

    Wrong usage of Iterator.
    <!-- Form for picking the floor -->
             <!-- Get the available floors -->
             <% ArrayList<Integer> floornumbers = dataManager.getAllFloorNumbers();
                Iterator<Integer> iterator = floornumbers.iterator(); %>
             <!-- Create the form for users to select the floor -->
             <form id="floorselectionform">
                  <input type="hidden" name="action" value="floorselected"/> <!-- Guides the servlet to redirect to the appropriate page -->
                  Select floor | <select name="floorselector" id="floorselector">
                       <% while (iterator.hasNext()) {
                                    Integer inte = iterator.next();
                            %>
                       <option value="<%=inte.intValue()%>"><%=inte.intValue()%></option>
                       <% } %>
                  </select>
                  <input type="submit" value="Go!"/>
             </form>or make use of enhanced loop as you are already using J2SE 5.0+ for avoiding confusions.
    <!-- Form for picking the floor -->
             <!-- Get the available floors -->
             <% ArrayList<Integer> floornumbers = dataManager.getAllFloorNumbers(); %>
             <!-- Create the form for users to select the floor -->
             <form id="floorselectionform">
                  <input type="hidden" name="action" value="floorselected"/> <!-- Guides the servlet to redirect to the appropriate page -->
                  Select floor | <select name="floorselector" id="floorselector">
                       <% for(Integer inte:floornumbers) {%>
                       <option value="<%=inte.intValue()%>"><%=inte.intValue()%></option>
                       <%}%>
                  </select>
                  <input type="submit" value="Go!"/>
             </form>and a lot better thing would be making usage of basic Taglib provided with JSTL spec or struts spec which make life easier and simple.
    something like usage of <c:forEach/> or <logic:iterate/> would be lot better without writing a single scriptlet code.
    Hope that might help :)
    REGARDS,
    RaHuL

  • 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 Lists and Value Change Events

    I have 4 drop down lists each with a set of values from the database.
    Based on the value of the first list(ValueChangeEvent only for list1) , I fetch data from the database and set the 'selected value' in the other lists.
    I have a Submit button which takes values from these 4 lists and puts it in the database.
    Problem:
    I change list 2 through list 4 and hit a Submit button which inserts all the values in the database.
    However,on Clicking the Submit button I never get the new selected values, it always refers to the previously fetched values.
    I tried to recreate this case in a Sandbox without a database , Here is the code:
    Page1.jsp
    <h:selectOneMenu id="list1" value="#{SessionBean1.selectedList1}" valueChangeListener="#{SessionBean1.list1ValueChangeListener}"  onchange="this.form.submit();" >
                   <f:selectItems id="dropdown1SelectItems" value="#{SessionBean1.list1}"/>
    </h:selectOneMenu>
      <h:selectOneMenu id="list2" value="#{SessionBean1.selectedList2}" >                           
                  <f:selectItems id="dropdown2SelectItems" value="#{SessionBean1.list2}"/>
       </h:selectOneMenu>
       <h:commandButton id="add" actionListener="#{SessionBean1.addActionListener}" value="Add"/>
        <h:inputText id="result" value="#{SessionBean1.result}" />SessionBean1
       public SessionBean1() {
            list1.add(new SelectItem("0","0"));
            list1.add(new SelectItem("1","1"));
            list1.add(new SelectItem("2","2"));
            list1.add(new SelectItem("3","3"));
            list2.add(new SelectItem("a","a"));
            list2.add(new SelectItem("b","b"));
            list2.add(new SelectItem("c","c"));
            list2.add(new SelectItem("d","d"));
            map.put("0", "a");
            map.put("1", "b");
            map.put("2", "c");
            map.put("3", "d");
        private void fetch_data(String value){
             selectedList2=map.get(value);
        public void list1ValueChangeListener(ValueChangeEvent vce){
                fetch_data(vce.getNewValue().toString());
        public void addActionListener(ActionEvent event){
            result=selectedList2;
        }I tried debugging and found that after the Value Change Event is fired only selectedList1 gets a new value during Update Model Values Phase and selectedList2 still has the old value.
    With this sand box project I cannot even get the second list to show the corresponding value.
    Any insight on this would be helpful

    Thank You Balus C,
    I just realized the reason why this is not working, I found the reason in your article Populating Child Menu's article, I am just
    putting it as a reference here.
    One concern is that the skipping of the UPDATE_MODEL_VALUES will also cause that the new values of the menu's which have immediate="true" set won't be set in the backing bean. This can partly be fixed by getting the new value from the ValueChangeEvent inside the valueChangeListener method and assign it to the appropriate property. But this won't work for other menu's of which the valueChangeListener isn't been invoked. This would cause problems if you select a child menu value and then select the parent menu back to null and then reselect it to same value again, the child menu which will show up again would remain the same selection instead of null while its child will not be rendered! To solve this we need to bind the menu's to the backing bean so that we can use UIInput#setValue() and UIInput#getValue() to set and get the actual values.+ The JSF lifecycle will set and get them in the RESTORE_VIEW and RENDER_RESPONSE phases respectively.+
    I am not sure I understand whether or not it is a limitation but the reason above is valid and I rolled back to binding my menus and getting to work with that.
    Is Binding UI components a wise idea because most of the attributes can be programmed using properties in Backing Beans unless you have to build new components?
    Thanks Again

  • Drop down list properties availble for user in card / document

    The need is to define some custom properties for documents in the document directory and to let the user fill up the properties using a drop down list (using the edit option for the card)For example we wuold like to add a properties name departmentwith the following values related to it : Department A , Department B ... so the user should be able to choose from a list. Plumtree offers in the main property setting to define a drop down type for the property and to assign values to it, but from our understanding/findings - these are not accessible to the user but only for admin purposes (defining properties to document types ).Is our understanding correct ?Perhaps someone has already addressed this issue and developed some connection between the drop down values and the edit card page to make the values available to the user ?

    Hello,
    Have you check that user permission on both lists? Also ask him to try in different browser or in different machine.
    It seems problem with user machine or browser or permission. Please check and let us know
    Hemendra:Yesterday is just a memory,Tomorrow we may never see<br/> Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • Is there a way to insert a drop-down list in Numbers for iOS?

    I created a spreadsheet in Numbers on my iMac and then transferred it to my iPad, but the iPad version gives me a message stating that drop-down lists are not supported? Is there any way around this?

    a] Yes.
    b] No.
    There is nothing in Rh but there is a method on my site and on htttp://wvanweelden.eu The same scripts, just different explanations.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • Drop down in the selection for the field from the table

    Hi.
    i want to put the drop down for the field from the table fo which i dont know the number of entries for the field zregion1 of the table zbwcntry.
    please tell me how to use the function module and what could be the line of codes.
    the drop down is for the select option on the slection screen of the classical report.
    please help .

    HI,
    Check below code..it may help you.
    REPORT Zbunu .
    TYPES :BEGIN OF STR ,
           MATNR TYPE MATNR ,
           END OF STR .
    DATA : ITAB TYPE TABLE OF STR WITH HEADER LINE,
           VAR TYPE MARA-MATNR .
    PARAMETERS : S_MATNR TYPE MATNR ,
                  P_MATNR TYPE MATNR.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_MATNR .
    SELECT MATNR FROM MARA INTO
    CORRESPONDING FIELDS OF TABLE ITAB UP TO 1000 ROWS.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
      EXPORTING
      DDIC_STRUCTURE         = ' '
        retfield               = 'MATNR'
      PVALKEY                = ' '
       DYNPPROG               = SY-CPROG
       DYNPNR                 = SY-DYNNR
       DYNPROFIELD            = 'S_MATNR'
      STEPL                  = 0
      WINDOW_TITLE           =
      VALUE                  = ' '
       VALUE_ORG              = 'S'
      MULTIPLE_CHOICE        = ' '
      DISPLAY                = 'X'
      CALLBACK_PROGRAM       = ' '
      CALLBACK_FORM          = ' '
      tables
        value_tab              = ITAB
      FIELD_TAB              =
      RETURN_TAB             =
      DYNPFLD_MAPPING        =
    EXCEPTIONS
       PARAMETER_ERROR        = 1
       NO_VALUES_FOUND        = 2
       OTHERS                 = 3
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Regards
    Ansumesh

  • Drop down in Dialog programming for a field on the screen

    Hi Friends !
    I have 2 screen fields  zfield1- Indicator and zfield- answer .
    The user wants a drop down for indicator as X or Blank to choose from and for answer  the user wants YES or NO as the dropdown .
    How do i create these dropdowns for the fields ?
    Do I need to create search help or does dialog give other options to add these dropdowns.
    Please advise .
    Thanks!!

    set zfield1 up where it's data element is using the domain YESNO.
    For answer I use this routine a lot.
      PERFORM get_dd07t_value USING 'ZLMCONTTYPE'
                                  out_rec-ctype
                                  out_rec-ctype_desc.
    *&      Form  get_dd07t_value
         -->P_DOMNAME  text
         -->P_KEY      text
         -->P_RESULT   text
    FORM get_dd07t_value USING    p_domname
                                  p_key
                                  p_result.
      CLEAR p_result.
      SELECT SINGLE ddtext INTO p_result
        FROM dd07t
        WHERE domname = p_domname
          AND ddlanguage = sy-langu
          AND domvalue_l = p_key.
      IF sy-subrc NE 0.
        p_result = 'None'.
      ELSE.
        p_result = dom_rec-ddtext.
      ENDIF.
    ENDFORM.                    " get_dd07t_value

  • Help values for a field in ALV GRID

    Hi !
    i have a field in a structure, whose field have a table of values in its domain. How does this table values can apear in the ALV, when i click the corresponding field?
    Best regards,
    Rui

    Hi,
    Use the Field Catalogue Properties
    Ref_fieldname
    Ref_Tablename
    and assign the corresponding field & Table/Strucutre Name to the above fields....

  • Drop-down list in one subform controls fields in other subform

    Hello,
    I am new to adobe livecycle. I haven't been spending time on creating a quite complex pdf fillable form.  It seems I rely heavily on this forum to find my answer.  You guys have been great.  Thank you. 
    I have a question on form and subform:
    I have a parent form which has subform1 and subform2.  Within subform1, I have subform1a and subform1b.  Same as subform2 with subform2a and subform2b.
    Parent form has a button called "Add".  As I click on 'Add', there is a new instance of subform1 added. 
    within subform1a, there is a drop-down1a.  Depend on the value selected for drop-down1a, certain fields in subform1b are visible.  Also, depend on the value selected for drop-down1a, button 'Add' can be visible or hidden.
    I find out that the above could only be accomplished if all the button and fields are in the same form.
    For instances, drop-down1a can't make button 'Add' visible or hidden because they are not in the same form. 
    Drop-down1a can't make fields in subform1b visible or hidden unless subform1b is nested inside subform1a. 
    Also, as I repeat subform, is there a way to control what fields in repeating subform be visible or hidden based on a certain selection?
    The last question: Is there a way to get a list of existing scripts that come with adobe livecycle and what they are useful for? 
    I want to upload my form so that you can see but I can't find a way to do so.
    Thank you very much for your help.  Truly appreciate your expertise on these subjects.
    Best regards,
    Sahra

    On the subform issue, there isnt any restriction on where you can add/hide objects from. It sounds like a scripting visibility issue where your hierarchy needs to be taken into account when you try and access an object through script. The objects are encapsulated inside a subform and are only visible if they are a child or on the same level as the current context. Outside that, you need to provide the correct path to an object, for example subform1a.dropdown1a would be visible to subform1b and so on.
    There are samples in the installed folder of designer under EN sub-directory and a few people have websites than do samples here. You can probably create a free account on Acrobat.com and publish forms there for people to see via link.

  • How can we provide list of values for input field?

    Hi Sap Experts plz respond this question

    we are all ready to help, but you should also spend sometime in explaining what you require. take sometime to explain your requirement.
    read this thread to understand what more details we would need to help you
    Please read this before you start a topic
    Raja

  • Displaying default value for a field in ALV table

    Hai all,
         I am having an ALV table in which I want to display Requisition number by default using a value which i generated randomly and it is stored in a variable.
    While displaying ALV table my req number field should display that value by default when ever user is inserting a row( all the coloumns n my alv are editable.
    Is it possible?? 
    Kindly give some suggestions.
    Thanks in Advance,
    Nalla.B

    Hai Kris,
        I took help from ur link and i declared a global attribute request_number.
    and i created an event handler ON_ALV_INSERT and did the follwing coding for giving default value wen ever am inserting new row.
    FIELD-SYMBOLS: <wa_row> LIKE LINE OF r_param->t_inserted_rows.
      DATA bill_details TYPE REF TO zdom_bill_detail.
      LOOP AT r_param->t_inserted_rows ASSIGNING <wa_row>.
        bill_details ?= <wa_row>-r_value.
        IF bill_details->REQ_NUMBER IS INITIAL.
      DATA lo_nd_bill_detail TYPE REF TO if_wd_context_node.
      DATA lo_el_bill_detail TYPE REF TO if_wd_context_element.
      DATA ls_bill_detail TYPE wd_this->Element_bill_detail.
    navigate from <CONTEXT> to <BILL_DETAIL> via lead selection
      lo_nd_bill_detail = wd_context->get_child_node( name = wd_this->wdctx_bill_detail ).
    lo_el_bill_detail = lo_nd_bill_detail->get_element( index = <wa_row>-index ).
          lo_el_bill_detail->set_attribute(
            EXPORTING
              name  = 'REQ_NUMBER'
              value = wd_comp_controller->request_number
    Wen am  setting the value of wd_comp_controller->request_number to my context attribute am getting NULL object ref error.
    lo_el_bill_detail->set_attribute(
        name =  `REQ_NUMBER`
        value = wd_comp_controller->request_number ).
    Pls give some suggestions,
    Thanks in Advance,
    Nalla.B

  • Decimal  values for a field in ALV

    Hi,
    I created an ALV report.
    It has a field which will display the calculated value as '103,839,389'. This should be dispalyed as '103,839,389.00' with decimal value, I mean with 2 decimal places, how can this be achieved?
    Thanks,
    Kumar

    hi check this..
    use these in populating the fieldcat..
    it_fieldcat-decimalsfieldname = fieldname
    it_fieldcat-decimalstabname   = tabname
    it_fieldcat- decimals_out   = 2.
    regards,
    venkat

Maybe you are looking for

  • Why aren't images I captured using acrobat on a mac visible in a word document on a PC?

    Hi guys this question has been asked before, but I can't find any answers that address the exact problem I'm having. I use a mac to create word documents that are read by other collaborators who use PCs.  Until recently, I had created these documents

  • WRT54G v1.1 DNS problems

    My WRT54G is not working properly. I have the latest firmware installed, and i am still getting DNS errors. My wired computers cannot access the internet, but my laptop CAN connect wirelessly. Also, programs like skype can connect to the internet, bu

  • Photoshop Touch 1.6 update requires smoothing.

    HI all, I have been a user of Photoshop Touch since the start and have got every update as they have become available. The new 1.6 (1.2 for phones) update looks to be an awesome update to the excellent app. However after using now for a couple of day

  • Camera Raw Profile for Nikon P7800

    Adobe Bridge CC Camera Raw CC Windows 7 Pro 64-bit In Camera Raw, using a Nikon P7800 created NRW raw file. Camera Calibration | Camera Profile Only Matrix is available. In Camera Raw, using a Canon G16 created CR2 raw file. Camera Calibration | Came

  • IWeb 2.0 MacWorld Keynote

    So does this mean that we can't expect any major updates to iWeb?