Retrieve input values from the selection screen

I have a requirement to retrieve the variable value or values inputed from the selection screen and label the worksheet tab to replace the tab name 'Sheet1' from the Excel. The only way to do this would be to write a macro to label the sheets but how would I retrieve the value(s) from the selection screen criteria? Is the value of the selection screen entered by the user stored in some table? How would I write the macro to retrieve this value?
For example, I want to retrieve the company code entered from the selection screen and lets say the company code entered as 10; I would want to replace the worksheet from 'Sheet1' to '10' . Texts would be more recognizable.

Use the option Layout->Display Text Elements->Variables from the BEx toolbar. This will display Variable screen user input on your workbook in a fixed location. Then you can use your macro to name the worksheet with the cell reference.
Thanks
Vineet

Similar Messages

  • Issue In Providing 255 Charcters From The Selection Screen Select-Option

    Dear Guru,
    I am searching for table field with having length = 255 character.
    which i want to use in select-option for proving data from the selection screen.
    I have found the table myhlp and it associated field allvals which is having length = 255.
    I am using it as below in my selection screen for the value to be provided 255 character long.
    SELECTION-SCREEN : BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
    SELECT-OPTIONS   : s_mlbody FOR myhlp-allvals  NO INTERVALS.
    SELECTION-SCREEN : END OF BLOCK b3.
    Now when i am going for the multiple selection option --> It is providing me the Multiple selection popup and giving me the provision of provide multiple line .
    But the issue is that --> For a particular single value line in the popup i am able to enter only 45 charcters not 255 character.
    But i need to put 255 charcter for particular line in a single value..
    Please give me some guideline how resolve this or any other alternative way of reading the 255 charcter from the selection screen
    Thanks & regards
    Saifur Rahaman

    Hi,
         As said by A@s selction screen with table control will be a good option.
    design a custom screen with SUBSCREEN as screeen attribute using tcode se51.
    For table control sample - go through Tcode ABAPDOCU - abap user dialogs-screens-complex screen- table control
    Try Following,
    REPORT Zsample .
    controls: tc type tableview using screen 200.
    parameters: p_user type myhlp-username.
    data: begin of itab occurs 50,
          field1(255) type c,
          end of itab.
    data: i_out type standard table of myhlp.
    SELECTION-SCREEN BEGIN OF TABBED BLOCK MAX FOR 22 LINES.
    SELECTION-SCREEN TAB (25) TABS1 USER-COMMAND UCOMM1
             DEFAULT SCREEN 200.
    SELECTION-SCREEN END OF BLOCK MAX.
    start-of-selection.
    select * from myhlp into table i_out for all entries in itab
              where username eq p_user
                    and allvals = itab-field1.
    MODULE READ_ITAB INPUT.
    insert itab index tc-current_line.
    ENDMODULE.                 " READ_ITAB  INPUT

  • How to display the sort value in the selection screen in the report title

    Dear All,
    How to display the sort value in the selection screen in the report title? I have selected a value in the selection screen for sorting , but i need that values by which i have sorted with in the report title. Can you please throw some light on this!!
    Good day,
    Thanks and regards
    Arun S

    Hi Arun,
    Try this.
    1, Set one dynamic parameter,
    2, Drag and drop that parameter into  your report title.
    3, Pass the value(sort value) dynamically from your application,
    4, Cheers..
    Other wise Try with Dataset, create a dataset and fill thev alue into that.. Then  set the data source from CR designer. and darg and drop that data column into the report.
    Hope this will work,
    Regards,
    Salah
    Edited by: salahudheen muhammed on Mar 25, 2009 11:13 AM

  • Choosing a directory from the selection-screen

    Hi,
    regarding: select-options
    There is a function module to choose a file (on value request F4) from the harddisc =>KD_GET_FILENAME_ON_F4
    I want the user to choose his path(folder) from the selection screen.
    Is there any function module to choose only the <b>directory(path) not the file</b>?
    Thanks and Regards.

    Hi Ashok,
    You can alternatively do the following. Call the method of class CL_GUI_FRONTEND_SERVICES as follows.
    Call Method CL_GUI_FRONTEND_SERVICES-->DIRECTORY_BROWSE
         Exporting
          WINDOW_TITLE    =
          INITIAL_FOLDER  =
          SELECTED_FOLDER =
    Hope this helps.
    Please reward some points if it helps you.
    Regards,
    Amit M. Mishra

  • Getting Tag and value from the selected Xml element value

    Hi All,
    I have an xml file which i import to the Indesign CS3 .From the structure view , i drag and drop the root node on to the page. Now i select an xml value from the page. Now i need to get the element tag and value from the selected value.
    For example
    File Name : sample1.xml
    <Root>
    <employeeName> A</employeeName>
    <employeeEmail>[email protected]</employeeEmail>
    </Root>
    Now i import this sample.xml in my indesign CS3 and from the structure view i drag the Root  tag and drop it on the page.Now the values of the element tag are displayed.
    Now i select "[email protected]" from the page and i have a menu "Get Selected XML" on clicking which  i should get element tag with value.(i.e <employeeEmail>[email protected]</employeeEmail>)
    How to go about it.?
    Thanks
    Sakthi

    Hi Steve,
    If you haven't already done so, I recommend posting this question in the LivCycle Forms forum.
    Jared

  • Urgent: How to exclude a particular value from the selection in the infopac

    How to exclude a particular value from the selection in the infopackage.
    Ex: not load for cost center 10000
    Thank you,
    sam

    Hi Sam,
    You cannot do this directly as exclusion, but you can include all other values, even as ranges and thus exclude the particular value, else you can also try to do this by writing a routine.
    Hope this helps...

  • Passing the values from one selection screen to another report

    Hi all,
    This is my requirement...
    I need to hav a selection screen with various input parameter along with 3 radio buttons...
    If i enter the values and select say first radiobutton the corresponding called program needs to be executed .
    NOTE :
    1)The called program selection screen needs to be skipped
    2) the values entered in the calling program needs to be passed to the called program and the output of the called program needs to be displayed.
    3)the selection screen is the same for both calling and called program
    Can anyone plz help in this regard?
    Regards,
    Gowri Shankar

    Hi...
    Use the statement
    <b>SUBMIT zps_called_report WITH SELECTION-TABLE seltab.</b>
    see the following link....
    <b>http://help.sap.com/saphelp_nw04s/helpdata/en/9f/dba51a35c111d1829f0000e829fbfe/frameset.htm</b>
    Hope it helps you...
    Let me know if u have any more doubt...
    Reward points if useful......
    Suresh.......

  • Select option values disappearing from the  Selection screen

    Dear experts
    I have a selection screen in a report which has push button in the Application toolbar . When I press the button in the application toolbar it should get the count of the output just like in se16 and display it as message.
    I have added the button and I am processing the same in the AT-SELECTION_SCREEN event
    ie
    AT SELECTION-SCREEN.
      IF sscrfields-ucomm = 'FC01'.
        PERFORM get_query_count.
      ENDIF.
    FORM get_query_count .
      CREATE OBJECT g_model.
    l_query_count  = g_model->get_query_count(
      MESSAGE s078  WITH l_query_count .
    ENDFORM.
    Here the problem is I am getting the message but the selection screen values are disappearing after the same .Now the strange thing I just hardcoded the l_query_count without going in to the class method , but then the selection screen values  are not disaapearing?
    Is there any limitation for using classes at AT SELECTION SCREEN event

    Hi,
        Try to write changing in perform.
    AT SELECTION-SCREEN.
    IF sscrfields-ucomm = 'FC01'.
    *PERFORM get_query_count changing p_count.*
    ENDIF.
    *FORM get_query_count changing l_query_count .*
    CREATE OBJECT g_model.
    l_query_count = g_model->get_query_count(
    MESSAGE s078 WITH l_query_count .
    ENDFORM.
    Regards,
    Srini.

  • How do we validate input fields on the selection screen

    How do we validate input fields on the selection screen

    hi balram,
    u can validate input fields using <b>AT SELECTION-SCREEN</b>  Event.
    PARAMETERS : p_werks TYPE marc-werks.
    AT SELECTION-SCREEN ON p_werks.
    SELECT SINGLE *
    FROM t001w
    WHERE werks = p_werks.
    IF sy-subrc <> 0.
    MESSAGE 'Invalid Plant' TYPE 'I'.
    ENDIF.
    Like this, we can validate user input for plant.
    check this link:
    http://help.sap.com/saphelp_nw04s/helpdata/en/9f/db9a2e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/56/1eb6c705ad11d2952f0000e8353423/content.htm
    Reware me if useful......
    Harimanjesh AN

  • Compare the input filename in the selection screen

    In the selection screen input field
    there is an option of selecting the directory and file name and not the extension .
    This is used to download the datas
    Extension can be selected by using the option button
    rtf
    csv.
    the user has to give only  the filename and not the extension.
    suppose if the user input is C:\temp\file1.rtf.
    Either i should take only the filename
    or i should display the message give only the filename and not the extension . its already been selected!!!!
    I want to compare the input string contains  .doc
    how to do the comparison and to get the above results mentiond
    Thanks in advance

    Because the requirment is there are two option buttion for selecting the download file format
    But unknowingly if the user gives the filename along with the extension. I need to handle that error
    giving some error message or information message
    By comparing the last 4 letters of the filename.. either.doc or rtf or csv or watever
    so how to do that
    then after comparing that i should give the user a msg doc type is already selected give only the filename
    I hope u understand my req

  • Changing of default values on the selection screen dynamically

    Hi,
          I have 2 radiobuttons R_A & R_B and i have one text field like P_TEXT. Based on selection of radio button i have to change the default values in P_TEXT on the selection screen. like if i select R_A i have to display P_TEXT = 'A'. if i select R_B then it has to display P_TEXT = 'B'. I tried like as below
    in AT SELECTION-SCREEN OUPUT EVENT.
                 IF R_A = 'X'
                   P_TEXT = 'A'.
                 ELSEIF R_B= 'B'.
                   P_TEXT = 'B'.
                 ENDIF.
            But it's not working. it is working only for first radio button. when i select second radio button it is not giving the second value. can any one tell the sol.
    Tks in advance.

    Hi Pammi,
    Use this code, its working:-
    PARAMETERS : r_a RADIOBUTTON GROUP gp1 DEFAULT 'X' USER-COMMAND rb,
                 r_b RADIOBUTTON GROUP gp1,
                 p_text(20).
    "we use user command with the radiobutton so that some event is occured in order to call AT SELECTION-SCREEN OUTPUT.
    AT SELECTION-SCREEN OUTPUT.
      IF r_a = 'X'.
        p_text = 'Hello'.
      ELSEIF r_b = 'X'.
        p_text = 'Hi'.
      ENDIF.
    In the above case 'AT SELECTION-SCREEN OUTPUT' will act as PBO of the selection screen and will change value of selection text as per condition.
    Hope this solves your problem.
    Thanks & Regards,
    Tarun Gambhir

  • Comapare the string value in the selection screen

    In the selection screen input field
    there is an option of selecting the directory and file name and not the extension .
    This is used to download the datas
    Extension can be selected by using the option button
    rtf
    csv.
    the user has to give only  the filename and not the extension.
    suppose if the user input is C:\temp\file1.doc.
    Either i should take only the filename
    or i should display the message give only the filename and not the extension . its already been selected!!!!
    I want to compare the input string contains  .doc
    how to do the comparison and to get the above results mentiond
    Thanks
    ABAPer

    hi,
    I have already done using the method given by you.
    Because the requirment is there are two option buttion for selecting the download file format
    But unknowingly if the user gives the filename along with the extension. I need to handle that error
    giving some error message or information message
    By comparing the last 4 letters of the filename.. either.doc or rtf or csv or watever
    so how to do that
    then after comparing that i should give the user a msg doc type is already selected give only the filename
    I hope u understand my req
    thanks

  • How to Remove the underline from the selection screen parameter

    How to remove the underline from a selection screen parameter ?

    >
    Anoop Menon wrote:
    > hi Avinash,
    >
    > I am not able to understand the use of the 'comment line properly.
    >
    > The last part of the statement which says modif id is confusing.
    >
    > Please clarify..... I am unable to activate my code when I put the selection screen commebnt statement.
    Use this and update it to your requierement !
    SELECTION-SCREEN begin of line.
    SELECTION-SCREEN COMMENT 1(30) comm.
    PARAMETERS test(1) type c.
      SELECTION-SCREEN end of line.
    INITIALIZATION.
      comm = 'test'.

  • How to get the variant name from the Selection Screen

    Hi Friends,
                       I have a Selection Screen with Variants.In the Report which is classical,i need to get the <b>name</b> of the variant which is used in the selection screen..Can anyone help me in this?

    You can use system variable
    SY-SLSET
    Thanks
    Seshu

  • How to retrieve values from Dynamic Selection screen while using LDB  - PSJ

    I am having problem in PSJ Logical database. In a custom report which is using PSJ LDB, we are using PROJ and PRPS_R tables.
    When I run program it displays one dynamic selection screen, there we are giving selection criteria for PRPS (Master data WBS element) - Created on (giving some range like 2011/01/01 to 2011/01/31).
    So I want to display all WBS element which are created during the period (2011/01/01 - 2011/01/31).
    How do I retrieve the select-option low and high value of the field Created on Of WBS element if we Select data from any table based on this condition.
               Please help me.
    Thanks.

    in fact you don't have to get the values, you only need to tell to the program to take them into account :
    GET PRPS.
      CHECK SELECT-OPTIONS.

Maybe you are looking for