How to modify F4 help of one parameter based on the value of another?

Hi,
My Query is as follows:
I have 3 select-options / parameters on the selection screen.
If I enter some value in the first parameter the values in the second parameter should reflect accordingly.
For example: The 3 selection-screen parameters are:
select-options: s_werks for pa0001-werks no intervals,
                      s_btrtl for pa0001-btrtl no intervals,
                      s_kostl for pa0001-kostl no intervals.
On exceuting the report, say I do a F4 and select '1000' for the first parameter (s_werks).
Now after selecting the value for the first parameter if I do a F4 on the second parameter (s_btrtl) then it should prompt me with a F4 help containing values only corresponding to '1000' entered in s_werks and not all the values maintainined for btrtl.
I have tried AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_BTRTL-LOW.
And then used the FM F4IF_INT_TABLE_VALUE_REQUEST.
But At Selection-Screen On Value Request the selection screen parameter s_werks does not show any value. It reflects the value only once it reaches Start-of-selection.
Can anyone please guide me how to go about it?

hi
Please do it in this way..
TABLES: pa0001.
select-options: s_werks for pa0001-werks no intervals,
s_btrtl for pa0001-btrtl no intervals,
s_kostl for pa0001-kostl no intervals.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_BTRTL-LOW.
  PERFORM sub_pop_btrtl .
*&      Form  sub_pop_btrtl
      text
-->  p1        text
<--  p2        text
form sub_pop_btrtl .
DATA :  l_wa_dynp TYPE dynpread,
        l_i_dynp TYPE STANDARD TABLE OF dynpread,
        l_wa_temp LIKE LINE OF S_werks.
REFRESH s_temp[].
  l_wa_dynp-fieldname = 'S_WERKS-LOW'.
  APPEND l_wa_dynp TO l_i_dynp.
Get the screen values of template
  CALL FUNCTION 'DYNP_VALUES_READ'
    EXPORTING
      dyname               = sy-repid
      dynumb               = sy-dynnr
    TABLES
      dynpfields           = l_i_dynp
    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.
Do Nothing
  ENDIF.
Put the screen value in the select-options
  READ TABLE l_i_dynp INTO l_wa_dynp INDEX 1.
  l_wa_temp-sign = 'I'.
  l_wa_temp-option = 'EQ'.
  l_wa_temp-low = l_wa_dynp-fieldvalue.
Now you use l_wa_temp as plant field
endform.                    " sub_pop_btrtl

Similar Messages

  • Display an exception on one keyfigure based on the value of another key fig

    Hello all,
    How to run a exception based on some condition i.e
    i want to highlight the sales(key figure) which r less than the  average sales..
    where sales and average sales r keyfigures...
    i also created a cal key fig which has has value 1 if sale > avg sale...
    i.e How do i display an exception on one keyfigure depending on the value of another keyfigure??
    plz reply its urgent...
    thnx in advance...

    Hello Ajay, did you got an answer for your problem? I'm interested...
    Thx Masen
    Edited by: Masen-Fuad Marei on Nov 25, 2009 6:26 PM

  • How to get search help for 2nd  parameter based on the 1st parameter value

    Hi all!
       I have 2 parameters (material no, revision level). I have created a search help for revision level. It has an importing parameter :material no. and one exporting parameter : revision level.When I checked it, it's giving the revision values only for the specified.
    In my report , I have kept these 2 materials in my selection screen.For revision level , I have added the matchcode object which I have created. When I  pressed F4 for revision level, it's giving all the values irrespective of the material no. in the first parameter. How to solve it? Please suggest.

    Hi,
    Try this code filling internal table fields,
    DATA: BEGIN OF values,
            OID TYPE ZCL_OBJECT-OBJECTID,
            ODEC TYPE ZCL_OBJECT-OBJECT_DESC,
           END OF values,
           W_FIELD(10).
    DATA: ZCL_PROJECT-PROJECTID type zcl_project-projectid,
          ZCL_OBJECT-OBJECTID(5).
    DATA: progname TYPE sy-repid,
          dynnum   TYPE sy-dynnr,
          dynpro_values TYPE TABLE OF dynpread,
          field_value LIKE LINE OF dynpro_values,
          values_tab LIKE TABLE OF values.
    CALL SCREEN 100.
    *&      Module  VALUE_PROJECTID  INPUT
          text
    *MODULE VALUE_PROJECTID INPUT.
    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
          EXPORTING
               tabname     = 'ZCL_PROJECT'
               fieldname   = 'PROJECTID'
               dynpprog    = progname
               dynpnr      = dynnum
               dynprofield = 'ZCL_PROJECT-PROJECTID'.
    *ENDMODULE.                 " VALUE_PROJECTID  INPUT
    *&      Module  VALUE_OBJECTID  INPUT
          text
    MODULE VALUE_OBJECTID INPUT.
       CALL FUNCTION 'DYNP_VALUES_READ'
           EXPORTING
                dyname             = progname
                dynumb             = dynnum
                translate_to_upper = 'X'
           TABLES
                dynpfields         = dynpro_values.
      READ TABLE dynpro_values INDEX 1 INTO field_value.
    W_FIELD = FIELD_VALUE-FIELDVALUE.
      SELECT  OBJECTID
              OBJECT_DESC
        FROM  ZCL_OBJECT
        INTO  (VALUES-OID,
               VALUES-ODEC)
    WHERE PROJECTID = FIELD_VALUE-FIELDVALUE.
       APPEND VALUES TO VALUES_TAB.
    ENDSELECT.
       CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                retfield    = 'OID'
                dynpprog    = progname
                dynpnr      = dynnum
                dynprofield = 'ZCL_OBJECT-OBJECTID'
                value_org   = 'S'
           TABLES
                value_tab   = values_tab.
    ENDMODULE.                 " VALUE_OBJECTID  INPUT
    *&      Module  INIT  OUTPUT
          text
    MODULE INIT OUTPUT.
      progname = sy-repid.
      dynnum   = sy-dynnr.
      CLEAR: field_value, dynpro_values.
      field_value-fieldname = 'ZCL_PROJECT-PROJECTID'.
      APPEND field_value TO dynpro_values.
      IF SY-UCOMM = 'BACK'.
        LEAVE program.
    ENDIF.
    IF SY-UCOMM = 'ANS'.
       LEAVE  TO SCREEN  '0'.
    ENDIF.
    ENDMODULE.                 " INIT  OUTPUT
    START-OF-SELECTION.
    WRITE: / field_value-fieldvalue,
             W_FIELD.
      LOOP AT VALUES_TAB INTO VALUES.
        WRITE / VALUES.
      ENDLOOP.
      if sy-subrc <> 0.
        WRITE / field_value-fieldvalue.
      endif.
    Plzz reward points if it helps

  • How do I display an image in Numbers based on the value of another cell?

    Here is the situation. I have a list of names in one table. I then have a table of pictures of corresponding to each name. I then have a drop down list in a cell with each of the names in it. I would like to be able to click the drop down list, select a name, and then have the corresponding picture be displayed in a cell. How would I go about doing this?
    Late 2013 rMBP with fully up to date software.

    not possible.  I have wanted to do this myself.  You can post feedback to Apple using the menu item "Numbers > Provide Numbers Feedback"

  • Conditionally Formatting One Column Based On The Value of Another Column

    I have the following requirement:
    I have 2 columns in a report showing Actual Sales & Budget Sales each year. I am using a bar chart to show the different values for these 2 columns.
    I need to conditionally format the column "Actual Sales" so that if it is less than the "Budget Sales" it will appear in red, and green if "Actual Sales" is greater than "Budget Sales." So in a nutshell,
    CASE WHEN "Actual Sales" < "Budget Sales" THEN
    RED
    ELSE
    GREEN
    END
    Thoughts anyone?

    CASE WHEN (COL1 - COL2) < 0 then Red else Green end
    regards
    John
    http://obiee101.blogspot.com

  • How to Visible/Hide an Item based on the value of another Item

    Hi
    I need to visible and hide a textitem based on the value of another item.This form has 3 blocks, and the both item is in the first Master Block.
    My code is:
    if :RECORDTYPE=7 then
         Set_Item_Property('BLOCK.ITEM',VISIBLE,PROPERTY_TRUE);
         Set_Item_Property('BLOCK.ITEM',ENABLED,PROPERTY_TRUE);
    ELSE
         Set_Item_Property('BLOCK.ITEM',VISIBLE,PROPERTY_FALSE);
    Set_Item_Property('BLOCK.ITEM',ENABLED,PROPERTY_FALSE);
    :BLOCK.ITEM:=NULL;
    end if;     
    I wrote the code in the Validate Trigger, but not working when moving Next Record & Previous Record
    Thanks in advance
    Rizly

    Read the 'Propagation of Property Changes' section towards the end of the page for Set_Item_Property in the online help. I'm not sure what you mean by locking automatically but perhaps it's because of this.
    You should also ensure the item you're setting to invisible is not the current item (check :system.cursor_item and go to a different item if necessary).

  • Populate one text field on a form based on the value in another

    I am new to APEX and building my first application.
    When a user enters a value in one field, I would like to run a SQL command and then display a value in another field based on the value in the first field. For instance, if a user enters a part number in one field, when they tab off of the field, I would like to display the name of the part in the part name field.
    Thanks

    Thanks. That put me on the right track. I used that link to find the link http://htmldb.oracle.com/pls/otn/f?p=11933:11:2890374750690437 and then using the two was able to put together a solution.
    I am down to one last issue. I am able to return the name back from the process and display it with an alert statement. Unfortunately, I am unable to display the value on the form.
    I am doing the following.
    <script language="JavaScript1.1" type="text/javascript">
    function f_getCustomerName(id)
    var v_id = id;
    var get = new htmldb_Get(null,$v('pFlowId'),'APPLICATION_PROCESS=getCustomerName',$v('pFlowStepId'));
    get.addParam('x01',$v('P2_CUSTOMER_ID'));
    gReturn = get.get();
    get = null;
    gReturn = (!gReturn)?'null':gReturn;
    /* The below do not work
    $s('P2_CUSTOMER_NAME',gReturn);
    document.getElementById('P2_CUSTOMER_NAME').value = gReturn;
    document.getElementById('P2_CUSTOMER_NAME').value = 'TEST';
    alert(document.getElementById('P2_CUSTOMER_NAME').value );
    alert(gReturn);
    //-->
    </script>
    Process: getCustomerName
    declare
    l_customer_id customer.customer_id%type;
    l_customer_name customer.customer_name%type;
    begin
    l_customer_id := to_number(wwv_flow.g_x01);
    select customer_name
    into l_customer_name
    from customer
    where customer_id = l_customer_id;
    htp.p(l_customer_name);
    end;

  • Update one column while getting the value in another column

    Is it possible to in one single SQL statement update two columns in a table while at the same time obtaining the value of another column, on the same row, in the same table, and independently (that is, the update of the columns has nothing to do with the data that I want from another column)*?* Of course, I can do this in two operations, one being a "select" and the other one being an "update", but since I am in the same table and even on the same row, is it really necessary to make TWO database calls? That's why I want to combine the the two SQL-statements, for reasons of presumed effiency.

    jsun wrote:
    Is it possible to in one single SQL statement update two columns in a table while at the same time obtaining the value of another column, on the same row, in the same table, and independently (that is, the update of the columns has nothing to do with the data that I want from another column)*?* Of course, I can do this in two operations, one being a "select" and the other one being an "update", but since I am in the same table and even on the same row, is it really necessary to make TWO database calls? That's why I want to combine the the two SQL-statements, for reasons of presumed effiency.Two statements != two database calls.
    At least not in terms of SQL.
    JDBC requires a 'statement' but in SQL (depending on the data source) that can include multiple statements. An obvious example of this is a stored proc but there are other ways as well.

  • How do i show a button based on the value of another button (value is greater then 0)

    I'm am building a form in indesign, and just want to add a visual icon next to buttons when they are filled out... check mark next to a drop down list... so the list have values and i want the check mark (button) to show only when the value of the drop list is greater then 0... can this be done?... easily?....
    thank you!

    Hey Gilad D,
    its been a while since i have been back to this project…..
    now i have time to dedicate to this to get it done….
    if you don't mind i really could use a little help..
    i want to start again and give you the full scope of what i am trying to do, i don't have any real hard files yet...
    its pretty simple (in theory)..
    So i don't know what you do for work, but i work in an environment that has some pretty lazy sales people,
    so i want to create a pdf that steps them through a bunch of questions that they have to answer...
    my thought was, lets break this out into sections…
    so section one has three questions, if they answer all three, then they get a checkmark and section 2 appears
    which would have a few questions in it… etc….
    there would be some easy cross referencing and excel type calculations,… and a few, if you answer yes then another field gets auto filled..etc….
    can acrobat handle this?… or am i wasting time thinking it can?...
    i primarily work on mac's but we do have a PC with live cycle...
    thoughts?….
    thank you,
    ely

  • Transaction BP: Using data in one screen to change the value in another

    Is there any way to take the data on one tabbed page of the BP transaction screen and use that data to update a field in another tabbed page?
    BR,
    Tony.

    Short answer: no.

  • Using javascript to populate one menu based on the choice in another menu

    I have several menus which are dynamically populated (with PHP and MYSQL). The information is category based. How do I dynamically populate the second menu based on the choice the user makes in the first menu (without having to submit and refresh the page-- i.e. I need to use javascript instead of the server-side PHP).
    Example:
    Main Categories: 1) Numbers     2) Letters
    Sub Categories:        1                      a
                                   2                      b 
                                   3                      c
                                  etc.                  etc.
    the first menu contains the two main categories. I want the second list to be populated with only the sub categories of the main category the user chooses in the first menu (i.e. 1,2,3 etc. if he chose the main category 'Numbers' and a,b,c, etc. if he chose the main category 'Letters')
    Is there an easy way to do this in Dreamweaver?
    Thanks,
    YWSW

    How many items do you have in each dropdown? If it's a small number, you can download all of the options for the second dropdown and use client side javascript to filter based on the choice of the first dropdown. If the number is large, you'll need to use AJAX to dynamically pull the related items from the database.
    Search the web for "dependent dropdown" or "cascading dropdown" for some technical details.

  • How to calc sum of one column, based on the condition of another column?

    I would like to create a formula that adds up the total cost from column F for each specified service in column D. For example, the result for PM (project management) would be $495. Any ideas?

    I think you could use this formula, using your cell references:
    =SUMIF(D4:D21,"=CM",F4:F21)
    Then, change the "=CM' to "=PM", etc. for each service.
    Like JaxJason, I can't test this in Numbers right now, but it works in Excel, and the functions are identical.
    SUMIF(test-range, "condition", [sum-range]):
    * test-range: A reference to the range of cells containing values to test. Must be the same dimensions as sum-range.
    * "condition": Any comparison statement that results in a logical TRUE or FALSE value.
    * sum-range: Optional; a reference to the range of cells containing the numbers to be added. Must have the same dimensions as test-range. If omitted, test-range is used.
    I hope this helps.
    - Michael
    Message was edited by: Apple fan Michael

  • Create a column on one sheet based on unique value in another

    Hello,
    I'm running Excel 2013 and I have one workbook with two sheets - sheet1 and sheet2. Sheet1 has 24 columns and 26K rows. Column "A" is titled "id" and contains
    id numbers that are also, some, found in column "A" of Sheet2 - which is also titled "id".
    Sheet1 has no "description" column. Sheet 2 only has 2 columns - "A" is the "id" column and "b" is the "description" column.
    A B
    ID Description
    58749651 a bunch of text
    How can I create a description column on sheet1 (it would be column "U") and populate it with the description from sheet2 only where the "id" values from column "A" match?
    Thanks!
    Rob

    Hi Rob,
    Utilize the VLOOKUP function and this should resolve it. 
    For example, in a new column on sheet 1 (Y) a formula like this should suffice assuming ID is in column A:
    =VLOOKUP(A1,Sheet2!A:B,2,FALSE)
    Or more elegant:
    =IFERROR(VLOOKUP(A1,Sheet2!A:B,2,FALSE),"")
    More information on VLOOKUP can be found here: VLOOKUP Function

  • Changing content of one label, based on the content of another

    Hello all,
    I need some advice on how to go about doing something that should be simple.
    Basically, I have two labels, that will be used in a marquee animation. When label one gets changed, I want label two to mimic label one's content. Since there is no ContentChanged Event for labels, I have been relying on the SizeChanged event of label one
    to do the job.
    However, the issue arises when label one's content extends past that of its parent container, thus no longer firing SizeChanged.
    When label one's supposed length is equal to or greater than that of its container, is when I would start the marquee animation.
    Basically, I need a sure fire, reliable, 100% accurate way to update label two's content to match that of label one's despite its length.
    I have read the following: Label.Content Changed Event
    However this does not solve the issue, as the event fires for "all" custom label classes, due to the ContentProperty being declared Static/Shared.
    Thanks in advance!

    <UserControl x:Class="CustomControls.UserControls.ValidationUserControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    mc:Ignorable="d" Height="36" Width="120">
    <Grid x:Name="z">
    <TextBox x:Name="txtBase" Text="TextBox" Margin="0,0,0,13"/>
    <Label x:Name="lblStatus" Content="Status" HorizontalAlignment="Left" Margin="5,0,0,0" VerticalAlignment="Bottom" FontSize="10" Foreground="#FFE12828" FontWeight="Bold">
    <Label.Effect>
    <DropShadowEffect BlurRadius="5" ShadowDepth="1"/>
    </Label.Effect>
    </Label>
    <Label x:FieldModifier="Friend" x:Name="lblMarquee" Content="{Binding ElementName=lblStatus, Path=Content}" HorizontalAlignment="Right" Margin="0,23,-29,0" FontSize="10" Foreground="#FFE12828" FontWeight="Bold" Background="Transparent" Height="13" VerticalAlignment="Top">
    <Label.Effect>
    <DropShadowEffect BlurRadius="5" ShadowDepth="1"/>
    </Label.Effect>
    </Label>
    </Grid>
    </UserControl>

  • Create a variable in one table based on a value on another.

    I have two existing tables, say TABLE1 and TABLE2.  I need to create a key variable in TABLE2 and insert values for that  variable from TABLE1 i.e. create an explicit relationship between the tables using a key variable.  There exists a relationship
    between the tables in that for each record in TABLE1 there are 28 records in TABLE2 and the records are arranged in sequential order. So:
    TABLE1 TABLE2
    REQUIREMENT
    RECORD 1 -->
    RECORDS 1 to 28 Copy key variable from RECORD1 in TABLE1 into RECORDS 1 to 28 in TABLE2
    RECORD 2 -->
    RECORDS 29 to 56 Copy key variable from RECORD2 in TABLE1 into RECORDS 29 to 56 in TABLE2
    RECORD 3 -->
    RECORDS 57 to 84 Copy key variable from RECORD3 in TABLE1 into RECORDS 57 to 84 in TABLE2
    RECORD n--> RECORDS (n-1) * 28 + 1 to n * 28
    Copy key variable from RECORD n in TABLE1 into RECORDS (n-1) * 28 + 1 to RECORDS n * 28 in TABLE2
    Please help if you can.  I am prepared to give any additional information when asked.

    TABLE1:
    USE [LFS_APRIL_2015]
    GO
    /****** Object:  Table [dbo].[HOUSING37854]    Script Date: 04/30/2015 15:52:37 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    SET ANSI_PADDING ON
    GO
    CREATE TABLE [dbo].[HOUSING37854](
    [BatchNo] [float] NULL,
    [District] [float] NULL,
    [URBAN_RURAL] [float] NULL,
    [HHNUM] [float] NULL,
    [Cluster] [float] NULL,
    [Final_Result_Code] [float] NULL,
    [zBarcode] [float] NULL,
    [Person_NUMBER] [float] NULL,
    [HH1] [float] NULL,
    [HH2] [float] NULL,
    [HH6] [float] NULL,
    [HH4] [float] NULL,
    [HH3] [float] NULL,
    [HH5] [float] NULL,
    [HH7] [float] NULL,
    [HH8] [float] NULL,
    [HH9a] [float] NULL,
    [HH9b] [float] NULL,
    [HH9c] [float] NULL,
    [HH9d] [float] NULL,
    [HH9e] [float] NULL,
    [HH9f] [float] NULL,
    [HH9g] [float] NULL,
    [HH9h] [float] NULL,
    [HH9i] [float] NULL,
    [HH9j] [float] NULL,
    [HH9k] [float] NULL,
    [HH9l] [float] NULL,
    [HH9m] [float] NULL,
    [HH10a] [varchar](1) NULL,
    [HH10b] [varchar](1) NULL,
    [HH10c] [varchar](1) NULL,
    [ED_Number] [float] NULL
    ) ON [PRIMARY]
    GO
    SET ANSI_PADDING OFF
    GO
    TABLE2:
    USE [LFS_APRIL_2015]
    GO
    /****** Object:  Table [dbo].[LISTING37854]    Script Date: 04/30/2015 15:47:15 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[LISTING37854](
    [HL1] [float] NULL,
    [HL3] [float] NULL,
    [HL4] [float] NULL,
    [HL5] [float] NULL,
    [HL6] [float] NULL,
    [HL7] [float] NULL
    ) ON [PRIMARY]
    GO
    Essentially The Housing table, TABLE1, lists households and the Listing table, TABLE2, lists members of the household and there are always 28 lines in the Listings although most of them may be just a number since almost no household will have 28
    members.  The Listings that is jut a number will be deleted,  but to know where the listing for the next household starts I need to create the linking variable in Listings table.  The is absolutely no doubt that the relationship that I specified
    in the first post above is as specified.

Maybe you are looking for