How to make required parameter dynamically?

Hello,
I have 3 parameters for a report:
1st parameter (mandatory): Run Report has 2 values: By Department, By Country
2nd parameter: Department
3rd parameter: Country
If user selects By Department, then I want Deparment becomes mandatory with asterisk next to it.
If user selects By Country, then I want Country becomes mandatory with asterisk next to it.
How can this be achieved?
thanks
Lei

Why not have only one parameter as a dropdown list box with the choice of running by department or by country. The user will only be able to pick one or the other.
Assuming you call the parameter pSORTBY you can then have your SQL look like this.
ORDER BY :pSORTBY

Similar Messages

  • How to make selection parameter gray out, not changeble mode

    Hi Experts,
      Selection screen having parameters, I am putting default values in that parametrs.
    How to make this parameter gray out, not changeable mode.
    Thanks in advance
    mahahe.
    See comments below
    Edited by: Rob Burbank on Jul 1, 2009 12:43 PM

    Hi,
    For the parameters required, while declaring them use the MODIF ID, lets say you have choosen the modif id as SC1.
    i.e. parametes: p_mat type matnr DEFAULT '100' MODIF ID SC1.
    Then in the initialization event, code as below.
        LOOP AT SCREEN.
          IF screen-group1 = 'SC1'.
            screen-input = '0'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
    It will work.
    Regards,
    Nangunoori.

  • How to make required field on selection screen in Query

    i'm now working with query(SQ01).
    but don't know how to make required field on selection screen in Query.
    thanks in advance

    i'm now working with query(SQ01).
    but don't know how to make required field on selection screen in Query.
    thanks in advance

  • How to lock a customer master and how to make a parameter checkbox as defau

    how to lock a customer master and how to make a parameter checkbox as default checked?

    The Account Groups is the one which maintains the field status for the customer master. In case you want to change the field status (i.e. changage the mandatory field to optional field) you need to maintain the same (i.e. changage the mandatory field to optional field) by navigating to the field status screen and then to the general data tab. Here you can change the status of the your field by selecting the 'OPTIONAL' radio button for the respective field and then save the transaction.
    Reward Points if useful.

  • How to make links in dynamic text?

    Hi All,
    I need to know how to make links in dynamic text. I have
    created a
    table to hold the dynamic copy, and the copy is added through
    a CMS page
    that I created. This Admin page is accessed through a
    browser, and I
    don't know how to attach a link to selected text within a
    browser. Can
    anyone point the way? It's probably so easy I'll feel dumb.
    Thanks,
    Brett

    "Brett" <[email protected]> wrote in message
    news:fpf7j6$23m$[email protected]..
    > Thanks Hunter,
    >
    > Yes, I suppose a legend on the admin page would provide
    a solution. And
    > ultimately, if the client doesn't feel confident doing
    writing the HTML
    > they would have to pay me to do it for them. OK, that
    works for me.
    The only other thing might be to use something like FCK (or
    one of the many
    others... ContentSeed, I think is one Murray mentions often)
    for the CMS,
    that would give an easier option for the end user. WebAssist
    has an
    FCK-based plug-in called iRite that can give a more
    wordprocessing-like feel
    to the field (i.e., they could just highlight the text and
    then click a
    button to add the link).

  • How to make a parameter grey

    How to make a parameter(text box) uneditable by enduser.

    Hhi,
    SELECTION-SCREEN COMMENT [/]pos(len) comm [FOR FIELD f]
                                              [MODIF ID key].
    This statement writes the comm comment on the selection screen. For comm, you can specify a text symbol or a field name with a maximum length of eight characters. This character field must not be declared with the DATA statement, but is generated automatically with length len. The field must be filled before the selection screen is called. You must always specify the pos(len) addition. Only if there are several elements in one line can you omit pos.
    The text comm  will be displayed, starting in column pos, for a length of len. If you do not use a slash (/), the comment is written into the current line; otherwise a new line is created.
    You use FOR FIELD f to assign a field label to the comment. f can be the name of a parameter or a selection criterion. As a result, if the user requests help on the comment on the selection screen, the help text for the assigned field f is displayed.
    Regards
    Sudheer

  • How to make a parameter base report?

    I am making a report on employees and departments but i want to choose employees for some required departments for that i need to use parameter, and i need help that how will i make a parameter in reports builder 10g.
    I am able to do it by writing a where clause in query but now i want to do it from user parameters. Seek help here.
    Maz

    Here is a list of things to do. Let me know if anything is not clear.
    1) In your main query create a lexical parameter at the very end of you where clause ( dont put and &p_where just &p_where)
    &p_where
    2)Create a user parameter with datatype character and width 200
    ex: P_departments
    3) Create a field on the Paper Parameter Form
    4) Click on that field and go to the List of Values (if you want a lov...) and insert the following
    Ex:
    select 'All',' All Departments' from dual
    union
    select to_char(department),to_char(department)||' - '||department_name
    from departments
    order by 1
    5) Go to Report Triggers > After Parameters and insert the following
    Ex:
    begin
    :p_where := null;
    if :p_departments not like '%All%' then
    :p_where := :p_where ||' and table.department = '||:p_departments;
    end if;
    return (true);
    end;
    This will allow you to select a department or leave it at the default of all departments. It will also allow you to remove the hardcoded statement in your where clause such as
    where department = 'HR'
    Edited by: DOUBLE U on Aug 3, 2011 3:32 PM

  • How to make a form dynamic so that it displays different logos at runtime

    I am working on some assignment wherein I would like to make a form dynamic so that in it's designated image holder it displays different logos/pictures at run time? First of all is there such a possibility?? I am still very new to this forum and also trying to understand the logic/bindings/heirarchy etc. in LCD. Any input would be highly appreciated.
    Thanks in advance

    LC 7 or 8 does not help load logs at runtime. However you can associate all your logs at design time and control their visibility property based on the events. This may help fulfill the requirements you have to an extent however adding number of images at design time will increase the size of the template.

  • How to make a form Dynamic(Serious Issue)

    Hi,
    I have a problem.
    How to make an Interactive form Dynamic while saving it in NWDS(NetweaverDeveloperStudio).
    Helpful answer is highly rewarded and Highly Appreciated.

    Hello Sankar,
    Do the following:
    1) In your Adobe Livecycle Designer, Select, Edit > Form Properties, in the Default tab, set u201CPreview Typeu201D to u201CInteractive formu201D
    2)
    Assuming you are using Web Dynpro application, then do the following also:
    Place the following code in the wdDoModifyView method of the View where the form is placed.
              IWDInteractiveForm iForm1 = (IWDInteractiveForm) view.getElement("<name of your form here");
              iForm1.setDynamicPDF(true);
    Hope this helps,
    Harman

  • How to make a graph dynamic data driven? Plus some XML basics for Illustrator?

    I need to make some graphs that are linked to a series of data through XML files (originally Excel) and create an indvidual document for each data set. They will be used for the web and print. Please advise.

    Tis is what you can do you create say your chart or your data say in Excel and you export ast Tab Delineated Text.You can then import that data for a chart with the import chart feature it is the first icon on top of the chart data window then you can make the chart dynamic asa variable and capture the data set then import another chart's data as txt as you did before then capture that as a data set abnd so on if you have then ten data sets each one will correspond to the one you need you can name the data sets so you can easily call up the one you need.
    I never made a chart in excel or imported such data before a few minutes ago nor have I a=ever made a variable of a chart but this all works pretty reasonably.
    More advance than this I would have to experiement but you can export the variable libraries and open them in Illustrator and figure it out for a way to load or export the excel info so it opens as a chart in Illustratorbut Illustrators charts are kind of primitive so donot expect much without a script to help you.
    Perhaps you can figure out an actiopn toautomate the process?

  • How to make Required Fields in WDA  Dynamic Table

    Hello all,
    I have a WDA Dynamic Table and want to make some fields as mandatory fields.
    can you please show me how to do this?
    thank you very much

    Hi,
    Write the below code:
    DATA: lr_table          type ref to cl_wd_table,
          lr_table_column    type ref to  cl_wd_table_column,
          lr_input            type ref to cl_wd_input_field.
       lr_table ?= view->get_element( id = 'TABLE' ). " TABLE id ID of Table UI
    * Get column
       lr_table_column ?= lr_table->get_grouped_column( id = 'TABLE_COL' ). TABLE_COL is the ID of table Column
    *Get Cell Editor
       lr_input ?= lr_table_column->get_table_cell_editor( ).
    *Set Required
       lr_input->set_state( cl_wd_input_field=>e_state-required ).
    hope this helps u,
    Regards,
    Kiran

  • Based from my selection-screen, how can I make the parameter dynamic?

    Hi experts,
    Based from my code below and logic, I have to modify the loop at screen without removing the original IF condition in such a way that the parameter p_code will only be available for input if the radiobutton pr_edit is clicked by the user.
    Again, thank you guys and have a great day!
    SELECTION-SCREEN BEGIN OF BLOCK box1 WITH FRAME TITLE text-001.
    PARAMETERS: pr_upld RADIOBUTTON GROUP grp MODIF ID id3.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 03(30) text-a11 FOR FIELD p_flnme MODIF ID id3.
    PARAMETERS: p_flnme LIKE rlgrap-filename DEFAULT 'C:\' MODIF ID id3.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(32) text-002 FOR FIELD p_dcode MODIF ID id1.
    PARAMETERS: p_dcode LIKE vbak-kunnr MODIF ID id1,
                p_name1 LIKE kna1-name1 MODIF ID id1.
    SELECTION-SCREEN END OF LINE.
    PARAMETERS: pr_list RADIOBUTTON GROUP grp MODIF ID id4,
                pr_add  RADIOBUTTON GROUP grp MODIF ID id2,
                pr_edit RADIOBUTTON GROUP grp MODIF ID id5.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 03(30) text-a12 FOR FIELD p_code MODIF ID id2.
    *PARAMETERS: p_kunnr LIKE zts0001-kunnr.
    PARAMETERS: p_code LIKE zts0001-cdseq MODIF ID id6.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK box1.
    IF v_compflag EQ space.
        LOOP AT SCREEN.
          IF screen-group1      = 'ID1'.
            screen-input        = '0'.
            screen-output       = '1'.
            MODIFY SCREEN.
          ELSEIF screen-group1  = 'ID2'.
            screen-active       = '1'.
            MODIFY SCREEN.
          ELSEIF screen-group1  = 'ID3'.
            screen-active       = '0'.
            MODIFY SCREEN.
          ELSEIF screen-group1  = 'ID4'.
            screen-active       = '1'.
            MODIFY SCREEN.
          ELSEIF screen-group1  = 'ID5'.
            screen-active       = '1'.
            MODIFY SCREEN.
         ELSEIF screen-group1  = 'ID6'.
            screen-active       = '1'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ELSEIF v_compflag NE space.
        LOOP AT SCREEN.
          IF screen-group1      = 'ID1'.
            screen-active       = '0'.
            MODIFY SCREEN.
          ELSEIF screen-group1  = 'ID2'.
            screen-active       = '0'.
            MODIFY SCREEN.
          ELSEIF screen-group1  = 'ID3'.
            screen-active       = '1'.
            MODIFY SCREEN.
          ELSEIF screen-group1  = 'ID4'.
            screen-active       = '1'.
            MODIFY SCREEN.
          ELSEIF screen-group1  = 'ID5'.
            screen-active       = '0'.
            MODIFY SCREEN.
          ELSEIF screen-group1  = 'ID6'.
            screen-active       = '0'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.

    Write the below code in  selection Screen Output Event
    AT SELECTION-SCREEN OUTPUT.
      IF pr_edit EQ 'X'.
        LOOP AT SCREEN.
          IF ( screen-group1 = 'ID6' ).
            screen-input = 0.
            screen-invisible = 1.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
    ENDIF.
    Enjoy Coding.
    Thomas.

  • How to make item references dynamic in my trigger [SOLVED]

    Hi. I have a Key-List-Item trigger on my form for a date item named bundle_exceptions.actual_dt. This trigger code is displaying a calendar when the user performs a key-list-item action on this date item. Throughout this code there are hardcoded references to my item in two different ways:
    1) :bundle_exceptions.actual_dt
    2) 'bundle_exceptions.actual_dt'
    Since I have multiple date items on my application I would like to know if I can make this code more dynamic. Since the cursor is sitting on the item at the time, I thought I could reference :system.current_block and :system.current_item. But I can't seem to get the syntax correct. And to complicate things, I'm even more confused as to how I could get these system variables to match the two difference ways the item is referenced in the code (see above).
    I would love some help or advice on solving this issue. I really don't like the idea of copying and pasting this code to every date item I have on my form. Thanks in advance.
    ========= CODE =============
    date_lov.get_date (nvl(:bundle_exceptions.actual_dt,sysdate),
    'bundle_exceptions.actual_dt',
    (get_item_property('bundle_exceptions.actual_dt',x_pos) - x_adjust),
    (get_item_property('bundle_exceptions.actual_dt',y_pos) - y_adjust),
    'Calendar',
    'OK',
    'Cancel',
    TRUE,
    FALSE,
    FALSE);

    Here's what I ended up with. I never could get the Name_In and Copy built-ins to compile because of syntax errors. I'm sure this was my own doing...but I just couldn't do it.
    Anyhow, this code is working for me know. Thanks so much for all the input.
    ========= CODE =========
    PROCEDURE Call_Calendar_Popup (for_this_item in varchar2) IS
         y_adjust number := 1.6; -- this is the height of the popup box
         x_adjust number := 1.8; -- this is the width of the popup box
    begin
    -- Depending on whether this proc is called from the item itself (say a key-list-item trigger) or
    -- from another item (say a when-button-pressed trigger) the cursor may first need to be moved to the
    -- item we want to populate from the calendar
    if upper(:system.current_block||'.'||:system.current_item) <> upper(for_this_item) then
         go_item(for_this_item);
    end if;
    -- if the items xpos (horizontal) is closer to the edge than the pop ups width push it over to the right.
    if get_item_property(:system.current_block||'.'||:system.current_item,x_pos) < x_adjust then
         x_adjust := to_number(get_item_property(:system.current_block||'.'||:system.current_item,x_pos));
    end if;
    -- if the items ypos (vertical) is closer to the edge than the pop ups height push it down.
    if get_item_property(:system.current_block||'.'||:system.current_item,y_pos) < y_adjust then
         y_adjust := to_number(get_item_property(:system.current_block||'.'||:system.current_item,y_pos));
    end if ;
    -- popup the calendar so the user can populate the date text-item
    date_lov.get_date (nvl(Name_In(':'||:system.current_block||'.'||:system.current_item),sysdate),
    'bundle_exceptions.actual_dt',
    (get_item_property(:system.current_block||'.'||:system.current_item,x_pos) - x_adjust),
    (get_item_property(:system.current_block||'.'||:system.current_item,y_pos) - y_adjust),
    'Calendar',
    'OK',
    'Cancel',
    TRUE,
    FALSE,
    FALSE);
    end;

  • How to make fields invisible dynamically in standard transaction?

    When we visit T-Code FB60 there are tabs like Basic data, Payment , Details ,Tax ,Notes ,Local Currency.
    In the Tax tab there are fields like Tax code, Rep. Date etc.
    The Rep.Date has value from BKPF-VATDATE and value for tax code from RTAX1U12-MWSKZ.
    The requirement is that in Tax tab if value for tax code is not selected then the Rep. Date field should become invisible i.e., if  tax code value is empty then the Rep. Date field should become invisible dynamically.
    Is there any BADI/Enhancement Spots  to achieve this requirement?

    1.In designer on tools menu  you have level security. Add what you want objects or groups or users level security.
    2.In CMS Select the option universes then provide the security for the object level.
    3. you create the below variables :
    if CurrentUser()="@Varaible(BOUSER)" then " " else [Dimension]
    Hope this is what you are looking out for.

  • How to make the fields dynamic read only in live cycle designer

    hi folks
    I have created a form in Adove livecycle es. Some fields should be read only from the start. So i have set the property .access 'open'. In versions of Adobe 8 this works, but in the latest version  it won't so i think it should be done via another solution. Does anybody know how?
    kind regards,
    Anton Pierhagen

    May be the below code may help.. It loops thru all the pages in the PDF form and make them protected. So the user can not change any value in the form.
    for (var i = 0; i < xfa.host.numPages; i++)
    var oFields = xfa.layout.pageContent(i, "field");
    var nodesLength = oFields.length;
    //set the access type to be protected for all fields
    for (var j = 0; j < nodesLength; j++)
    var oItem = oFields.item(j);
    oItem.access = "protected";
    Thanks
    Srini

Maybe you are looking for