Common SELECTION-SCREEN in reports for reuse

Dear ABAPERS,
I have a number of ABAP reports with similar but complicated customized selection screen (i.e. implemented using SELECTION-SCREEN statement). I would like to "package" the codes for SELECTION-SCREEN in a common routine in an include program, so that all my reports can just use it (instead of all reports duplicating the same selection screen codes). Any changes to the selection screen can be made through the single source.
However, an error :
Within FORM routines and function modules, the SELECTION-SCREEN statement is not allowed.
Is there any other way to accomplish this goal ? Thank you.
Regards
KC

Hello Kir,
The only way to be able to re-use a screen, selection-screen or otherwise, is when the screen is a subscreen.
Have one report program where you have got the selection screen defined as follows -
report  ztest.
selection-screen begin of screen 1010 as subscreen.
  parameters : test like t001-mandt.
selection-screen end of screen 1010.
Have a second program with normal screen, which has a subscreen area.
report ztest1.
data : repid type syrepid,
       dynnr type sydynnr.
repid = 'ZTEST'.
dynnr = '1010'.
call screen 100.
Screen 100 has a subscreen area and its flow logic will be something like this -
PROCESS BEFORE OUTPUT.
  call subscreen subscreen_area_name including repid
                                               dynnr.
PROCESS AFTER INPUT.
  call subscreen sub1.
Now, each time you make a change to the selection-screen's definition in program ZTEST, the change will always be reflected in all the other programs which are using it as their subscreen.
Regards,
Anand Mandalika.

Similar Messages

  • Creating Selection screen in Report Painter

    Good day everyone,
      Does anyone know how I could create a selection screen in Report Writer? Thanks!
    >Christian<

    Hi,
    Simple Parameters  or Selec-options statements will suffice.
    Eg : Parameters : p_matnr type mara-matnr.
           select-options : s_matnr for mara-matnr.
    In selection screen, you may have selec-options, parameters, check boxes, radio buttons etc.
    Regards,
    Sujatha.

  • Modification on selection screen of report

    Hello guys,
    I have a requirement where in i need to modify the initial selection screen as per clients requirement. The scenario is as follows:
    Suppose 'EMPLOYEE' and 'PORTFOLIO' are two of the fields of a cube on which the report will be run. Now suppose there are three employees as A, B and C and A handles portfolios X & Y, B handles portfolios W & Y while C handles portfolios X & Z.
    The initial selection screen of report will have two selection fields first as the employee and second as the portfolio.
    When we do F4 at employee it will display A, B and C. Now the requirement is if we F4 at portfolio it should display only the relevant one for that employee.
    For example: if i give employee as A and when i do F4 at portfolio screen it should give me only X and Y and not all the portfolios viz. W, X, Y & Z
    Is there a way to achieve the above scenario????

    Hi Chakradhar,
                             Refer this code :
    SELECTION-SCREEN BEGIN OF BLOCK BL2 WITH FRAME TITLE TEXT-456.
    PARAMETERS PO RADIOBUTTON GROUP RADI USER-COMMAND R.
    SELECTION-SCREEN END OF BLOCK BL2.
    AT SELECTION-SCREEN OUTPUT.
    CALL SCREEN 100.
    when user will click on this radio button , a pop up screen will appear dynamically.
    Reward points if helpful.
    Regards,
    Hemant

  • AT SELECTION-SCREEN stops report

    Hello,
    I run a report using the AT SELECTION-SCREEN stmt.
    Below AT SELECTION-SCREEN is an IF ... ELSE block. Within that block the report checks, whether the user input (made in a SELECT-OPTIONS) complies some requirements.
    I check for example, if that what the user types in matches a defined string...
    But if i use an AT SELECTION-SCREEN, the report does not continue after execution after that!
    It returns to the selction screen...
    How can I achieve, that the report continues with execution...?
    Thx,
    holger

    Hi Holger,
    1. This is the default behaviour.
    2. For report purpose execution,
       the event is
       START-OF-SELECTION ( and not at selection-screen)
    3. However u CAN ACHIEVE this by :
       after all validations , use the syntax
       LEAVE TO LIST-PROCESSING.
    4.  I tried the same at my end,
       its working fine.
    5. However, if u use step 3,
       there will be a problem :
       after the execution of report,
      it wil get HANG. ie. it won't then
      get back using the toolbar buttons.
      U may try it for yourself.
    6. Bottom line is:
       use
      START-OF-SELECTION (FOR FINAL EXECUTION OF THE REPORT)
    Regards,
    Amit M.
    Message was edited by: Amit Mittal

  • How to create multiple selection screens in reports

    How to create multiple selection screens in reports
    Thanks,
    Sridhar

    Ex: hope you will find an idea from the below example :
    SELECTION-SCREEN BEGIN OF BLOCK SEL1 WITH FRAME TITLE TIT1.
    PARAMETERS: CITYFR LIKE SPFLI-CITYFORM,
                CITYTO LIKE SPFLI-CITYFORM.
    SELECTION-SCREEN end OF BLOCK SEL1
    SELECTION-SCREEN BEGIN OF SCREEN 500 AS WINDOW.
    SELECTION-SCREEN INCLUDE BLOCKS SEL1.
    SELECTION-SCREEN BEGIN OF BLOCK SEL2 WITH FRAME TITLE TIT2 .
    PARAMETERS: AIRPFFR LIKE SPFLI-AIRPFROM,
                AIRPTO LIKE SPFLI-AIRPTO.
    SELECTION-SCREEN END OF BLOCK SEL2
    SELECTION-SCREEN END OF SCREEN 5000.
    INITIALIZATION.
    TIT1 = 'ITIES'.
    aT SELECTION-SCREEN.
    CASE SY-DYNNR.
    WHEN '0500'.
       MESSAGE W159(at) WITH 'SCREEN 500'.
    WHEN '1000'.
       MESSAGE W159(at) WITH 'SCREEN 1000'.
    ENDCASE.
    START-OF-SELECTION.
    TIT1 = 'CITIES FOR AIRPORTS'.
    TIT2 = 'AIRPORTS'.
    CALL SELECTION-SCREEN 500 STARTING AT 10 10.
    TIT1 = 'CITIES AGAIN'.
    CALL SELECTION-SCREEN 1000 STARTING AT 10 10.

  • How we can assign the customised selection screen to report category

    hai
    gurus
    how we can assign the customised selection screen to report category

    Hi Naresh,
    You can do like this.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECTION-SCREEN BEGIN OF BLOCK SELECTION WITH FRAME.
    SELECT-OPTIONS: S_FKART FOR VBRK-FKART.
    SELECT-OPTIONS: S_FKDAT FOR VBRK-FKDAT OBLIGATORY.
    SELECT-OPTIONS: S_VBELN FOR VBAK-VBELN.
    SELECT-OPTIONS: S_AUART FOR VBAK-AUART.
    SELECTION-SCREEN END OF BLOCK SELECTION.
    SELECTION-SCREEN END OF BLOCK B1.
    if you give me brief i can help you out more.
    Thank you .
    Regards
    Ram

  • Adding gsber in selection screen of report painter

    To gurus,
    I have a small requirement, I have to get business area  (GSBER) in  selection screen of report.
    I have developed the report using report painter  FGI1 --FAGLFLEXT which is having gsber field.
    In selection screen it self i want this GSBER FIELD .How to achieve it.
    kindly guide me.
    regards,
    padmaja.

    Hi
    What I understand from your question is you want bussiness area value on selection screen you can achive this by just using the by export/import parameter or by get/set  parameter id.
    Please elaborate what exactly you want.
    Regards
    Sagar.

  • FM to display Selection screen on report output??

    Hi Experts,
    Is there an FM to display Selection screen on report output.
    Thanks In Advance.

    Hi Ashwin,
    Refer to below link
    http://help.sap.com/saphelp_nw04/helpdata/en/2a/755b94ca5911d299af5c9604c10e27/content.htm
    or
    The easiest way is to define your selection screen in the TOP include of your module pool.
    Then call the selection screen.
    Selection Screen
    selection-screen begin of screen 1010 as window title text-001.
    selection-screen begin of block b1 with frame title text-002.
    parameters: p_vornr type resb-vornr,
    p_refno(20) type c,
    p_plnid type zplcfg-plnid as listbox visible length 20,
    p_sorts type c as listbox visible length 20.
    selection-screen begin of line.
    selection-screen comment (20) text-004.
    selection-screen position 33.
    parameters: p_order as checkbox default 'X'.
    selection-screen end of line.
    selection-screen end of block b1.
    selection-screen end of screen 1010.
    Now call the selection screen.
    call selection-screen 1010.
    if sy-subrc = 0.
    perform get_production_orders.
    perform process_orders.
    endif.
    Thanks!!

  • Calling the selection screen of report with data for the selection field

    I have the selection screen with 2 fileds.
    sales order and  payment terms.
    My requirement is to update the payment terms into the ztable for the given order.
    Sometimes the payment terms will be there ie already maintained ,in that case i need to show to the user the existing payment term ,so that he can modify and save that one.If the payment term is not existing then simply i can go inside the program and update the payment term.
    What I thought of doing is , writing a report program and then after the user inputs the selection screen ie order number , I Will check in the ztable and if the payment terms is found then i will use the key word leave list processing. But i dont know how to populate the payement term in the selection screen oncegaing from the program

    Hi shiva,
    when the user enters sales order number on screen, in parameter 1,
    you want to show payment term, on selection screen itself, in parameter 2.
    We can use the event
    AT SELECTION-SCREEN.
    Eg. PO Number <----
    > User
    Below is sample code for same.
    If you enter PO Number, the system will show the corresponding user in parameter2.
    Just copy paste.
    REPORT  YAM_TEMPA09.
    PARAMETERS : EBELN LIKE EKKO-EBELN.
    PARAMETERS : ERNAM LIKE EKKO-ERNAM.
    AT SELECTION-SCREEN.
    ERNAM = ''.
    SELECT SINGLE ERNAM
    FROM EKKO
    INTO ERNAM
    WHERE EBELN = EBELN.
    regards,
    amit m.

  • Selection Screen in Report Painter

    Dear Experts,
    I have an issue in the report painter. While executing the report from GRR2, selection screen is not displayed but report is coming as I expected.
    I want to create the selection screen for this report. I have created this report without copying from the standard report.
    Thanks in Advance.
    Regards,
    Aswimn

    Hi,
    Please refer following links.
    <Link farm removed by moderator>
    Regards,
    Renuka S.
    Edited by: Vinod Kumar on May 25, 2011 10:12 AM

  • Analysis Authorization : Selection screen not appearing for query

    Hi,
    I am facing an issue with analysis authorization. I have created the new roles and assigned to the users. For one user when I am executing the query, the selection screen is not coming up and it shows error message to specify the variables. Whereas its running for all other users.
    In S_RS_COMP I have selected Type of a reporting component as Query View, Query & Template structure. I also tried adding Variable in this field but that also did not help.
    Please let me know if you have faced similar issue.
    Regards,
    Manish

    Hi,
    Go to your query desinger opend your query and select your variable in that you have see first "Ready Input Query" Check box is selected or not. It's not selected you can select that check box.
    Your problem will be sloved.
    Thanks & Regards,
    venkat.

  • How to include text lable in Variable selection screen (Web Reporting)

    Hi Experts,
    I have created one query and in Web Report-->variable selection screen I have one Date field for that field I have to display a label stating that user to input date in the format YYYY.MM(like a text label).Actually I have created 10 to 12 report . I need u r suggestion such that a single change will reflect my requirement in all the reports and I have created all the reports for same multiprovider.
    Thanks in Advance
    Yours,
    Bala

    Bala,
    Prompts can originate from one of two places:  either via Designer and using the @prompt functionality or while creating the report building a prompt in the Query Filters panel.  If the prompt was built using the @prompt method, and all 10-12 reports are using that particular @prompt, then one change via Designer will cause all reports to reflect the new verbiage.  If you built the 10-12 reports using the prompt in the second scenario, then each individual report needs to be opened, modified and then saved.  If you must use the latter method, then you can open the first report, modify the prompt verbiage, then highlight the new verbiage with your mouse and hit Control-C (which copies that text to the Clipboard of your Windows system).  Then go to the second report, locate the verbiage that needs to be changed, delete it, then Control-V (which pastes), and voila, some keyboarding strokes are saved....
    Thanks,
    John

  • How to Modify the Selection Screen in Report Painter

    Hi All,
    I am working on Report painter and writer,
    can any body helpme how to change the selection screen i.e i want add some more  select options to the exisiting roport .
    how can i  add more select options to the exisiting one
    please let me know the Procedure and provide some relevent documents .
    Thanks and Best regards.
    uma

    Hello...
    In the program ...we can find the following chunk of code..
    selection-screen:begin of block B1 with frame title text-001.
    Parameters : ....
    select-options:.....
    selection-screen:end of block b1.
    if we need to add any more user inputs we can write the code inside the existing
    selection screen....end of block .
    or create a new block ..just the block name should be different...
    if we are using select options...we need to declare the table name using the key word for the field on which we are giving select options ....
    Tables : BSIK.
    Please see the following code:
    Imagine :- we have the current selection screen..
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETERS: P_BUKRS LIKE BSIK-BUKRS DEFAULT SPACE.
    SELECT-OPTIONS: S_LIFNR FOR BSIK-LIFNR.
    SELECTION-SCREEN END OF BLOCK B1.
    we need to add 2 more fields on the selection screen ..this we can do as the following
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETERS: P_BUKRS LIKE BSIK-BUKRS DEFAULT SPACE.
    SELECT-OPTIONS: S_LIFNR FOR BSIK-LIFNR,
                    S_HKONT FOR BSIK-HKONT.
    PARAMETER: P_DATE LIKE BSIK-BUDAT OBLIGATORY DEFAULT
               SY-DATUM.
    SELECTION-SCREEN END OF BLOCK B1.
    OR...create a new block...
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
    SELECT-OPTIONS:   S_HKONT FOR BSIK-HKONT.
    PARAMETER: P_DATE LIKE RFPDO-ALLGSTID OBLIGATORY DEFAULT
               SY-DATUM.
    SELECTION-SCREEN END OF BLOCK B2.
    there are many options available in selection screens..like creating check box,radio button etc..
    for more info press F1 help on the Selection screen in the ABAP editor
    Revert back if not clear and reward if helpful
    Regards
    Byju

  • How to configure selection screen in report

    Hi all,
          could anyone help me in configuring the selection screen in the report.
    Advance Thanks
    Regards
    Guhapriyan

    Here is some basic code to generate a selection screen.
    tables: afko.
    selection-screen begin of block b1 with frame title text-001 .
    select-options: s_gltrp for afko-gltrp.
    parameters: p_gltrp type afko-gltrp.
    selection-screen begin of line.
    selection-screen comment (25) text-005.
    selection-screen position 33.
    parameters: p_pln as checkbox default ' '.
    selection-screen end of line.
    selection-screen end of block b1.
    selection-screen begin of block b2 with frame title text-004 .
    selection-screen begin of line.
    selection-screen comment (20) text-002.
    selection-screen position 33.
    parameters: p_det as checkbox default 'X'.
    selection-screen end of line.
    selection-screen begin of line.
    selection-screen comment (20) text-003.
    selection-screen position 33.
    parameters: p_sum as checkbox.
    selection-screen end of line.
    selection-screen end of block b2.
    Regards,
    Rich Heilman

  • Query Selection Screen in Report Designer/WAD

    Hi Gurus,
    Please help. Iam try to copy two BEx queries into one report using Report Designer & Web Application Designer. Iam sucessfull in it, however when I execute the report either by report designer or WAD, the report does not populate the selection screen, it just gives you the output of the two queires into one page. Is there a pre-settings we need to perform to get the selection screen for each of this report?
    Thanks!

    Hi,
    Front-end upgrade will not help in this case. This feature "Display Variable Screen [VARIABLE_SCREEN]" was introduced in SP8 backend. You need SP8 backend to be able to use it.
    You will find this setting in "Properties" -> "Web Template" (in combo box) -> "Web Template Parameters" -> "Behaviour" -> "Display Variable Screen"
    This setting is defined in metadata and required an implementation on Java side (also SP8 required)
    Regards, Karol Kalisz
    SAP BI Development

Maybe you are looking for

  • Deleting invoices

    i want to remove,delete some paid invoices from my account

  • Failover Cluster Hyper-V Storage Choice

    I am trying to deploy a 2 nodes Hyper-V Failover cluster in a closed environment.  My current setup is 2 servers as hypervisors and 1 server as AD DC + Storage server.  All 3 are running Windows Server 2012 R2. Since everything is running on Ethernet

  • How to [ASM + GRID + DATABASE]

    hello Experts ... I need some help My plan this month is Learn how to installing grid infrastructure 11g then creating ASM disks group then installing oracle Database 11g R2 on Oracle Enterprise Linux 5 (not VM) for learning purpose In fact I have ta

  • Upgrading from Trial to registered version of Server 2012 Essentials

    I believe my Trial ran out. Arrived in the morning to see my server rebooting right after attempting to scan the registry. During the scan, it reads 0% and erorrs to "If you'd really like to know, it is a registry error". I'm able to restart in Safe

  • CHANGING THE FPS IN ELEMENTS 10?

    Recently i have been using Adobe Premiere elements 10 and have been planning on making a timelapse or stopmotion film i have about 1000 images and need to set the frame rate to around 15fps or 10 fps i have no found these options only options for vid