Setting the value of dropdown according tio 1st dropdown values

Hi All,
I have a requiremnt.
My code is like this.
DATA: LV_GROUP               TYPE QCODEGRP,
          LV_CODE                TYPE QCODE,
          LV_GROUP_FIELDNAME(30) TYPE C,
          LV_CODE_FIELDNAME(30)  TYPE C.
§ 4.The event DOUBLE_CLICK provides parameters for row and column
  of the click. Use row parameter to select a line of the
  corresponding internal table.
    "  break-point.
    FIELD-SYMBOLS  TYPE LVC_T_MODI.
    DATA: LS_MODI TYPE LVC_S_MODI.
    CASE E_FIELDNAME.
      WHEN 'PART_CODE'     OR 'PART_GROUP'.
        PERFORM F4_GET_CATALOG_SELECTION USING    TQ80-OTKAT
                                         CHANGING LV_CODE
                                                  LV_GROUP.
        LV_GROUP_FIELDNAME = 'PART_GROUP'.
        LV_CODE_FIELDNAME  = 'PART_CODE'.
      WHEN 'JOB_CODE'      OR 'JOB_GROUP'.
        PERFORM F4_GET_CATALOG_SELECTION USING    TQ80-FEKAT
                                        CHANGING  LV_CODE
                                                  LV_GROUP.
        LV_GROUP_FIELDNAME = 'JOB_GROUP'.
        LV_CODE_FIELDNAME  = 'JOB_CODE'.
      WHEN 'ACTIVITY_CODE' OR 'ACTIVITY_GROUP'.
        PERFORM F4_GET_CATALOG_SELECTION USING    TQ80-MFKAT
                                         CHANGING LV_CODE
                                                  LV_GROUP.
        LV_GROUP_FIELDNAME = 'ACTIVITY_GROUP'.
        LV_CODE_FIELDNAME  = 'ACTIVITY_CODE'.
      WHEN OTHERS.
        EXIT.
    ENDCASE.
FORM F4_GET_CATALOG_SELECTION USING     P_CATALOG
                              CHANGING  P_CODE
                                        P_GROUP.
  DATA:
    LV_CATALOG                     LIKE QKAT-KATALOGART,
    LV_H_CODE                      LIKE VIQMFE-FECOD,
    LV_PICK                        TYPE C,
    LV_RETN                        TYPE C,
    LV_DISP                        TYPE C,
    W_NOTIF_CATALOG                LIKE LINE OF G_NOTIF_CATALOG,
    I_CODEGRP                      LIKE QPK1CODEGRP OCCURS 0 WITH HEADER LINE.
  DATA: BEGIN OF I_QPK1CD OCCURS 10.
          INCLUDE STRUCTURE QPK1CD.
  DATA: END   OF I_QPK1CD.
  LV_CATALOG = P_CATALOG.
  LV_H_CODE  = '*'.
LV_PICK    = 'X'.
LOOP AT G_NOTIF_CATALOG INTO W_NOTIF_CATALOG WHERE QKATART = LV_CATALOG.
    MOVE W_NOTIF_CATALOG-QCODEGRP TO I_CODEGRP-CODEGRUPPE.
    APPEND I_CODEGRP.
  ENDLOOP.
  CALL FUNCTION 'QPK1_GP_CODE_SELECTION'
    EXPORTING
      I_KATALOGART           = LV_CATALOG
     I_CODEGRUPPE           = CDGRP
      I_CODE                 = LV_H_CODE
      I_SPRACHE              = SY-LANGU
      I_PICKUP_MODE          = LV_PICK
      I_DISPLAY_MODE         = LV_DISP
      I_RETURN_IF_ONE        = LV_RETN
    TABLES
      T_QPK1CDTAB            = I_QPK1CD
      T_CODEGRPTAB           = I_CODEGRP
    EXCEPTIONS
      NO_MATCH_IN_RANGE      = 01
      NO_USER_SELECTION      = 02
      NO_AUTHORIZATION       = 03
      NO_SELECTION_SPECIFIED = 04
      OBJECT_LOCKED          = 05
      LOCK_ERROR             = 06
      OBJECT_MISSING         = 07.
  CHECK SY-SUBRC = 0.
  READ TABLE I_QPK1CD INDEX 1.
  P_CODE  = I_QPK1CD-CODE.
  P_GROUP = I_QPK1CD-CODEGRUPPE.
My requirement is that I want to set the values of job_group and activity_group equal to values of part group drop down. I want to just select the value of part_group from the f4 option  and other values should auto populate with same values.
Please help.
Thanks in Advance,
Hariom.

Hi Hari,
Check the below thread
populate drop down menu based on entry in another field
Cheerz
Ram

Similar Messages

  • HCM F&P - How to set the field as Required based on drop down values

    Hi Experts,
    I have a requirement to set the Date field as mandatory when a particular value is selected in drop down list. I have already tried with MessageBox though it displays the error message but process moves further i.e. on clicking Check & Send button it throws an error message but still it moves further and i can see only Send button. Ideally it should halt there itself.
    Thanks & Regards,
    Jitesh Talreja

    Thanks for your valuable inputs
    Chintan
    I have already tried this. It only highlight the field with the red border but still allow to move further.
    Mukesh
    Yes, we can definately control this from the backend but that would be the last option i should execute. Ideally, this is something to be controlled in front end itself
    Poornima
    By setting the field attrbiute Required will set the field mandatory as a whole irrespective of drop down values or any other UI element.
    Regards,
    Jitesh Talreja

  • How to set the size of JTextPane according to the size of text??

    hello
    how can i set the size of JTextPane according to the size of text it would contain in such a way that JTextPane should not have ScrollBar.

    StanislavL wrote:
    width should be defined for your container width. suppose you have a very long row of text. Widht full screen widht it wraps into 2 lines but if you set widht of your window to half screen widht there should be 4 lines.
    But you can use the same code and get preferred widht as well.u mean like this :
    objTextPane.getParent().getWidth();Edited by: 811243 on Sep 6, 2011 5:32 AM

  • How 2 Set the logic for report 2 run 1st of everymonth......

    Hi Experts,
    i ve developd a HR-ABAP report in that Some part of code will Mon-Fri, Excluding Public holidays and sat & sundays...( i.e no public holidays and no sat & sundays)
       and some part of should Run on 1st of everymonth.... but 2 parts of code should be in same report..
    How can set the logic to run the report respective times....
    Thanks in Advance....
    sudeer.

    you can code this but need some good expertise on fm's  , date handling techniques and subroutine call coding.
    1.
    to make the code run only on 1st of every month
    capture the rundate of ur prog .. take value of  sy-datum
    ex.. 01.xx.yyyy
    or date std will be yyyymmdd so check for dd = 01 ..
    so per logic first two chars show that its first of any month in any year ..
    if yes
    execute the logic for the first of every month ..
    endif.
    2.
    where the code needs to be run on mon-fri and not on public holidays / sun / sat ..
    first fetch the day based on date .. like mon or tue or wed .. except sat and sun..
    second check whether if m-t-w-th-fr if any of them is  a holiday or not
    u need to check the date in the calender list like tholi thoc and .. to check whether that is a holiday or not ..
    coming to sat and sundays .. u need to check the day for date using function modules and build the logic ...
    br,
    vijay..

  • How do i set the multiplicity between two entities to any custom value?

    Hello people,
    is there a way to set the multiplicity of a relation to custom values instead of only 1 or * in the logical model?
    I really need to set it to "1..2" but can't find an option to set own numbers. What should i do? Shall I just create a note saying "1..2" and stick it to the corresponding entity? I'm used to do models in UML (visual paradigm - where you can change such things easily) but now i have to use the SQL Developer 3.2
    I would appreciate any help.
    Thanks
    Edited by: 961075 on 24.09.2012 15:54

    Hello,
    it's not possible.
    Philip

  • How to set the iterator on a particular row by a value?

    Hi all,
    What I'm trying to do is:
    Duplicate a row by a database function and setting the iterator on the duplicated row.
    The first part works fine, but I've got no idea on how to set the iterator on the new row.
    The function returns the primary key for the new row.
    Has anybody got an idea how to find out where the new row is inserted into the iterator?
    Thanks alot in advance
    Sebastian Lorenz

    Take a look at the documentation. You should be able to build a complex key as an array of the key values.
    Key public Key(java.lang.Object[] keyValues)Constructs a Key from a set of key values.
    A key may be constructed to identify a row or a set of rows. If it is to identify a unique row, the key values must match the row's key attributes exactly.
    A partial key (where some key values are null) may be used to locate a set of partially matching rows. This is applicable only for oracle.jbo.RowIterator's findByKey(Key) method. See oracle.jbo.RowIterator.findByKey(Key) for details.
    The key values should be ordered as in the defintion for the given row (that of the Entity or the View Object).
    Parameters:keyValues - an array of key values.
    Hope this helps

  • Is there any way to set the height of choice list or list of values?

    Hello Everyone,
    (Jdeveloper: 11.1.2.1.0)
    I recently created a page with some fields as choice lists and some as list of values. Somehow the choice list when opened it is not displaying data properly (I have 3 rows, it is showing only 2 rows and have to scroll to see third row) . I would like to see if there is any way to set this so that I can see all three rows or set the height of choice list as a fixed height?
    Thanks,
    Ravi Nuka.

    Hi Manish,
    sorry for the delay, here the code for the list binding from vo.xml
      <ListBinding
        Name="LOV_SetOfBooks"
        ListVOName="NfSetOfBooksRVO1"
        ListRangeSize="-1"
        NullValueFlag="none"
        MRUCount="0"
        ComboRowCountHint="10">
        <AttrArray Name="AttrNames">
          <Item Value="SetOfBooks"/>
        </AttrArray>
        <AttrArray Name="ListAttrNames">
          <Item Value="SetOfBooksName"/>
        </AttrArray>
        <AttrArray Name="ListDisplayAttrNames">
          <Item Value="SetOfBooksName"/>
        </AttrArray>
        <DisplayCriteria/>
      </ListBinding>
    <ViewAttribute
        Name="SetOfBooks"
        PrecisionRule="true"
        EntityAttrName="SetOfBooks"
        EntityUsage="EdContractsEO"
        AliasName="SET_OF_BOOKS"
        LOVName="LOV_SetOfBooks">
        <Properties>
          <SchemaBasedProperties>
            <DISPLAYWIDTH
              Value="30"/>
            <CONTROLTYPE
              Value="combo_lov"/>
          </SchemaBasedProperties>
        </Properties>
      </ViewAttribute>Thanks,
    Ravi Nuka

  • Error: Setting the record status to 'NEW' after assigning a  value

    Hi everyone,
    The user name is assigned programatically( like an Initial value) to a field in When New Form Instance and the record status is set back to NEW STATUS using set_record_property.
    The value is seen in the field and the moment you enter into any of the fields in the form the value disapears. when you key in something and do a 'clear_form' you get a message 'You cannot create records here'.
    Almost a similar problem with QUERY_STATUS for the records queried.
    Can anyone help me out to overcome this problem?
    Thanks.
    Brijesh

    Hi,
    I think I went through similar problems some time ago.
    Be careful with FORM STATUS (Query or Normal Mode) and RECORD STATUS (there are 4, as you know).
    You cannot create new records in the Query mode. Find some descriptions about Form Status
    in your online help.
    I too had to think about it some time to understand it =)
    Hope this helps.
    Jan

  • Is it possible to set a port number for a server as a value from env ?

    Hello,
    I'm using the version 6.1 - sp8 and I'd like to set the port number of a server as a value returned by an environment variable. Will this be achievable somehow through the admin console?
    In fact, I have an environment variable called '$WEB_SERV_PORT'. I'd need this value to be assigned as the port number for a server. The reason why I am trying to do this is coz I have multiple instances running as different batch accounts and each batch account would be having its own '$WEB_SERV_PORT' which would be the port on which iplanet would be running for that batch account.
    I'd appreciate if anyone could help.
    Thank you,
    Presley.

    Hello Sriram,
    Thanks for the info that you have provided. I do agree that what you said would be a better approach.
    However I've got a couple of questions on the approach that you have suggested (Sorry that its a bit off from the main topic). Just wanted to clarify if what I thought is in sync with the approach that you suggested.
    1. As you said, I could setup multiple virtual server within an instance (https-<hostname>) - Does this mean that I am creating "Virtual Server Classes" for each server and through the web-applications tab, assigning the corresponding war file to each Virtual Server Class?
    2. Another approach that came upto my mind is that I could create different instances like (https-virtual server1, https-virtual server2, https-virtual server3 etc..). I am assuming that if I follow this approach, I could have each server allocate memory indiviually to the virtual servers. for eg, I could allocate
    1024 MB to each virtual server where as in the first approach, I would have to make the 1024 MB to share between all the Virtual Server Classes. And also, in the case theres an issue with one server, I could handle the start/ stop etc individually, where as in the 1st approach, all the virtual classes would be affected by the start/stop. Am I assuming it correctly ?
    I'd appreciate if you could let me know.
    Thank you,
    Presley.
    Edited by: pressley on Mar 26, 2008 7:04 AM

  • How do you dynamically set the flat file name

    Within my process flow I call a mapping. Within this mapping I have a flat file operator (which creates and writes to a .csv file). All working great.
    From this process flow I want to be able to pass a parameter to the mapping (which I can do), and use the value of this parameter as the file name of the .csv file. But I can’t seem to be able to dynamically set the ‘Default physical file name’ to this parameter value within the mapping.
    Does anyone have any ideas?
    Thanks
    Ansel

    Hi Ansel
    Check out the blog entry here;
    http://blogs.oracle.com/warehousebuilder/newsItems/viewFullItem$154
    You can use an expression.
    Cheers
    David

  • How to set the WebDynpro application title (IE windows title)?

    Hello all,
    I would like to set the WebDynpro application title according to the current transaction ID. This title is the IE windows title that is shown on the upper left-corner of the IE browser.
    Rule: [Object Instance Information] u2013 [Application Title] u2013 [Browser Title]
    For example: Trans. <No.> - <My App> - Windows Internet Explorer
    I would like to set <No.> dynamically on run-time according to my current transaction number.
    I have this piece of code that gets a reference to the application info:
    data: lr_app_info TYPE REF TO if_wdr_rr_application.
    lr_app_info ?= wdr_task=>application->application_info.
    And there is lr_app_info->get_description() method to have the description of the application, but there is no set method.
    The application description can be hardcoded in:
    tx. SE80, opening the WebDynpro component, then accessing its WebDynpro application. In the properties tab, there is a description field. I need to append transaction ID to it.
    Do you know any way to implement this? This issue is for WebDynpro ABAP.  
    Best regards and thanks in advance,
    Fouad.

    Hello Satra,
    Thanks for your reply. I already had a look into that thread, but my question is not related to the windows title of the WebDynpro  component.
    My question is related to the title of the Internet Explorer that we all see on the top left-corner. For WebDynpro , this is the WebDynpro  application title. How can we change it?
    I hope my question is clear now, and I wish someone can help me soon.
    With kind regards,
    Fouad.

  • PreparedStatement set date sometimes sets the date one day behind

    I have a PreparedStatement that sometimes sets the date a day behind. I am saving to a MSSQL DB with a field datetime. I have two identical PreparedStatments, one for insert and one for update. When either is executed, it will sometimes set the date back one day. It's not everytime. Every other or every third one, but it's not consistent. Any help would be appreciated.
    ps.setDate(1, Util.parseSqlDate(getParam("CHARGED")));
    public class Util {
         public static java.sql.Date parseSqlDate(String datestr) {
              DateFormat sdf = null;
              if (datestr == null)
                   return null;
              if (datestr.length() > 8) {
                   sdf = new SimpleDateFormat("MM/dd/yyyy");
              else {
                   sdf = new SimpleDateFormat("MM/dd/yy");
              java.util.Date d = null;
              try {
               d = sdf.parse(datestr);
              } catch (ParseException e) {
                   return null;
              if (d != null) {
                   Calendar cal = Calendar.getInstance();
                   cal.setTime(d);
                   return new java.sql.Date(cal.getTimeInMillis());
              return null;
            protected String getParam(String name) {
              return (getParamArray(name)== null) ? null : getParamArray(name)[0];
         protected String[] getParamArray(String name) {
              return (String[])params.get(name);
         }

    traigo wrote:
    The database is a datetime field. Then you should be using the appropriate java jdbc time/date methods to access it rather than strings.
    We are only storing the date portion. Saving with today's date should produce '2009-12-28 00:00:00.000'.
    I just want to set the date to an absolute date (no time value) provided without timezones.Impossible. Since the database datatype is datetime that means that a timezone is always involved.
    And java always uses timezones. Ignoring the problem doesn't make it go away.

  • IMAQ 1394 version 2.0 - setting the shutter integration time

    I am using IMAQ 1394 version 2.0 with a CCDdirect firewire camera.  I am trying unsuccessfully to set the shutter attribute  in absolute mode to a value of several seconds.  I cant seem to get an integration time greater then .13 seconds to be accepted, even when I try to set it in MAX.  Any suggestions would be appreciated.  I am also using Labview 7.1 Developers suite
    thanks,
    Ronen

    Hello Ronen,
    I'm not familiar with CCDdirect cameras.  Is there a particular model that you are using?
    What happens when you set the value greater than 0.13 seconds?
    Some cameras that I have worked with in the past require that the camera be placed in an "extended" shutter mode in order to use long integration times.  Does your camera offer any additional shutter modes that will allow you to increase this value? 
    What shutter/integration time attributes show up in MAX?  These attributes and there values/ranges are read directly in from the camera.  I have also worked with some cameras in the past that have additional attributes that do not show up in MAX.  Typically these are attributes/features that are not part of the DCAM compliance.  MAX and the IMAQ 1394 driver only access DCAM specific features.  If the correct values do not show up, perhaps the camera manufacturer can show you how to set these attributes.
    Let me know the answers to the above questions if you are still unable to accomplish what you need.  I would be more than happy to help out in any way possible.
    Best Regards,
    Jesse D.
    Applications Engineering
    National Instruments

  • Parameter to set the negative sign as prefix

    Hi...
         Can anybody tell me if there is any parameter setting to set the negative sign '-' as a prefix in any value??
    like generally in abap the negative sign is diaplyed like this 12245- and i need it to be set as -122344..
    is there any parameter to set it like this...w/o any programmimg??

    Hi Slesha
    Use this FM : CLOI_PUT_SIGN_IN_FRONT
    DATA: LV_VALUE(6) TYPE C VALUE '12345-'.
    CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT'
    CHANGING
    value = LV_VALUE.
    WRITE: / LV_VALUE.
    HOPE THIS MAY HELP YOU OUT

  • Populating the 2nd dropdown based on value selected on 1st dropdown

    Hi,
    I know that there is a similar post about this in the forum but it doesn't actually show how an event for the dropdown is created. I believe this would be a script that is done within the form (transaction SFP) itself, but could I please have an example please?
    I did try to take a look at the standard ISR_FORM_SPTD form but there doesn't seem to be any scripts in this form.
    Thanks and regards,
    Adeline.

    Hi,
    Am not so sure, how were unable to locate this script. Click on the dropdown and check in the Script editor. You will get the same script. Anyways, here is the script.
    <i>// If the display value is used in the data DOM,
    // re-assign the corresponding data value
    if (this.rawValue != "" ) {
         if (this.boundItem(this.rawValue) != "") {
              this.rawValue = this.boundItem(this.rawValue);
    // START OF CODE - TO RUN AFTER SELECTION HAS BEEN MADE
    xfa.record.CONTROL_PARAM.ISR_EVENT.value = "CHECK";
    app.eval("event.target.SAPSubmit(false);");
    // END OF CODE - TO RUN AFTER SELECTION HAS BEEN MADE
    data.RequestPromotion[0].PCR_PAGE1.PCR_DE.PCRDEContent.NewScaleLevelDDL::ready:form - (FormCalc, client)
    //     START OF XFO CODE - DO NOT REMOVE OR MODIFY
    // If this object exists, then we are not being rendered by the XML Form Agent
    if ((Exists(xfa.host.appType)) and ($.bind.ref <> "")) then
         // Note the rawValue and try to set the selection if it is present
         // As soon as you add items the rawValue will be lost
         var CurrValue = ""
         //  Check for a null - an empty XML node will return a null
         if ($.rawValue <> null) then
              CurrValue = $.rawValue
         endif
         var Found = 0
         // the data binding may contain "$data.<root data name>" instead of $record
         var DataBinding = replace($.bind.ref,Concat("$data.",xfa.record.name),"$record")
         DataBinding = replace(DataBinding,"[*]")
         for i=0 upto xfa.record.enum_list.nodes.length - 1 step 1 do
              // Find the match.  The binding value may contain "[*]"
              // so remove them first
              var ListBinding = replace(xfa.record.enum_list.nodes.item(i).binding.value,"[*]")
              if (DataBinding == ListBinding) then
                   // the first two items are the name and binding attributes, then the list starts
                   if (xfa.host.version < 7) then  // add a dummy item to work around a bug in A6
                        $.addItem("a","-1")
                   endif
                   $.clearItems()
                   for j=2 upto xfa.record.enum_list.nodes.item(i).nodes.length - 1 step 2 do
                        // The order is assumed to be display and then data
                        // if the value is null, then add the empty string
                        if (xfa.record.enum_list.nodes.item(i).nodes.item(j+1).value == null) then
                             $.addItem(xfa.record.enum_list.nodes.item(i).nodes.item(j).value,"")
                        else
                             $.addItem(xfa.record.enum_list.nodes.item(i).nodes.item(j).value,xfa.record.enum_list.nodes.item(i).nodes.item(j+1).value)
                        endif
                        if (xfa.record.enum_list.nodes.item(i).nodes.item(j+1).value == CurrValue) then
                             Found = 1
                        endif
                        if ((xfa.record.enum_list.nodes.item(i).nodes.item(j+1).value == null) and (CurrValue == "")) then
                             Found = 1
                        endif
                   endfor
                   // Now set the selection - omitting this step means there will be no selection
                   // if there is only one item in the list and no default value, we have to select the first item - Bug in Acrobat 6.02 (fixed in Acrobat 7)
                   if ((xfa.record.enum_list.nodes.item(i).nodes.length <= 4) and (CurrValue == "") and (xfa.host.version < 7)) then
                        $.rawValue = xfa.record.enum_list.nodes.item(i).nodes.item(3).value
                   else
                        // if available, set the selection to the default value
                        if (Found) then
                             $.rawValue = CurrValue
                        else
                             // otherwise: set the selection to the first item
                             $.rawValue = xfa.record.enum_list.nodes.item(i).nodes.item(3).value
                        endif
                   endif
                   // START OF CODE - TO RUN AFTER LIST HAS BEEN FILLED
                   // END OF CODE - TO RUN AFTER LIST HAS BEEN FILLED
                   break
              endif
         endfor
    endif
    //     END OF XFO CODE - DO NOT REMOVE OR MODIFY</i>
    This should solve your problem.
    Regards
    <i><b>Raja Sekhar</b></i>

Maybe you are looking for