How to add ranges of selection screen

hi experts.
I have selection screen :
eg. SELECT-OPTIONS :SPLGL FOR BSID-UMSKZ,
ie. Special GL indicators. now if person enters A to Z in this  and 9 in single range on screen.
I want to store A,B,C...Z  and 9 in an internal table. , what would be the  the easiest way for doing it ?
Thanks in advance.
PD

Hello
Try this code:
select-options: splgl for bsid-umskz.
data: abcde like sy-abcde,
beg type i,
end type i,
div type i,
counter type i.
data: begin of itab occurs 0,
      splgl like bsid-umskz,
      end of itab.
abcde = sy-abcde.
loop at splgl.
  case splgl-option.
    when 'BT'.
      search abcde for splgl-low.
      if sy-subrc = 0.
        beg = sy-fdpos.
      endif.
      search abcde for splgl-high.
      if sy-subrc = 0.
        end = sy-fdpos.
      endif.
      div = end - beg + 1.
      counter = beg.
      do div times.
        itab-splgl = abcde+counter(1).
        append itab.
        counter = counter + 1.
      enddo.
    when 'EQ'.
      itab-splgl = splgl-low.
      append itab.
  endcase.
endloop.
In itab you will have all values from selection screen.

Similar Messages

  • How to Add field to Selection screen of Tx. FBL5N

    Hi All,
    In Tx. FBL5N, there is a field Customer number (on Customer selection screen).
    In addition to the above we need to add field Customer name in Selection screen.
    How do we go about it ?
    PS :- We have found steps to add fields to FBL5N output. But, we dont want it on output, we want to add it on Selection screen.
    Regards,
    Ashish

    Hi,
    Only certain table fields are allowed in dynamic selection, please see this sap note for detail :
    Sap Note 310886 - Line items: Dynamic selections ignored
    Permitted tables:
    SKA1: all fields
    SKB1: all fields
    BSIS: all fields
    So BKPF-CPUDT field is not allowed for dynamic selection.
    check this thread Add new Fields to Dynamic Selection FBL5n
    Or
    Enhancing Selection Views in the dynamic selection of some SAP transactions like FB03, FBL3N, FBL5N
    This enhancing related to SAP OSS Note: 188663 and 832997
    Requirement: The business requires the Doc. Header Text be added in the dynamic selection in SAP transactions FB03
    ■Execute Transaction code SE36. Click F4. Enter the SAP table name wherein you think the field could be found. In this case the SAP table is BKPF and the logical database is BRF
    ■From the initial screen of SE36, Choose from the path EXTRAS >> Selection Views
    ■Copy Selection View u201CSAPu201D to u201CCUSu201D
    ■Change the selection views u201CCUSu201D
    ■In the right corner, double click your table BKPF.
    ■In the right corner, check whether what functional groups does your field belong. If it is 01 then input it beside your field name.
    ■Then Save it afterwards.
    Prabhudas

  • Define ranges in selection screen

    hi all
    does anybody know how to declare ranges on selection screen
    i have to declare it for matnr
    thanks for your help

    Moderator message - Please do not ask or answer basic questions - thread locked
    This is your third warning. There won't be a fourth.
    Rob
    Edited by: Rob Burbank on Sep 22, 2010 10:04 AM

  • How to define our own selection screen for logical database  in abap-hr?

    Hi Friends,
    Can u please help me
    How to define your own selection screens for  logical database.
    we use to do like(goto->attributes-HRReportcatagerious ).but How to desin using  customer table like t599c, t599f and how to add to my logical database?
    Thanks in advance
    charan

    check out this online help
    http://help.sap.com/saphelp_erp2004/helpdata/en/9f/dba65c35c111d1829f0000e829fbfe/frameset.htm
    Regards
    Raja

  • How to Add a new Selection Field in COPA Report

    Hi Gurus
    I'm new on SAP COPA reporting and I don't know how to solve this problem.
    I need add a new Selection-screen field (char1), not connected with any characteristic.
    This is necessary becuase if the user flag this field, when teh report is running I'll replace some key-figure values using the EXIT  
    ZXYEXF05. I don't find any instruction how to define this simple kinfd of variable, and use it into a Report.
    Thank-you in advance for your help.
    Claudio

    Hi
    I'll try to explain better my need.
    I've 10 CO-PA Key-Figures used to Split in the Cost of a material in different Cost Items.
    Using the customizing I fill these key-figures using some rules.
    The new requirement is use SOMETIME the same KF, by displaying different Costs overwritting the original values using the exit ZXYEXF05. But I need to know when the user wants consider the original value of KF, and when he wants overwrite these values (when I have to run teh exit). So I thought to create a new Selection-screen field (Char1), to permit to the user to pass to some report this user request. I thought to define a global variable, and add it to several reports when this feature is required.
    Can you suggest a better solution ???
    I could create some empty KF and fill them using teh exit, but I would prefer not expand the CO-PA structure.
    Thanks for help.
    Claudio

  • How to add OBLIGATORY for SELECT-OPTIONS

    Hi experts,
    I can use OBLIGATORY for PARAMETERS
    PARAMETERS :s_WMno  TYPE LINK-LGNUM DEFAULT 'SCA' OBLIGATORY.
    I want to add OBLIGATORY for SELECT-OPTIONS. How to do this?
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME .
        SELECT-OPTIONS:  s_matnr FOR mara-matnr .
    SELECTION-SCREEN END OF BLOCK b1.
    Many thanks.

    Hi,
    TABLES spfli.
    SELECT-OPTIONS : carrid FOR spfli-carrid OBLIGATORY. " This makes only Low field Obligatory
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF screen-name = 'CARRID-HIGH'. " To make High field also obligatory
          screen-required = 1.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    Cheerz
    Ram

  • How to add image to webdynpro screen . ?

    How to add image to webdynpro screen . ?

    hi,
    right click ur application and then click on create mime object.
    with Mime Objects u cn upload doc , jpeg, or giff files from our local system into the webdypnpro system .
    You can even try creating the MIME objects in webdynrpo abap .
    Right click on ur component->mime object->import
    after importing you can see that image into your component as MIME object .Now insert a UI element image into your view layout .
    Go to the source property of IMAGE element and select F4 option , u will find a window is opening with some tabs
    Select tab COMPONENT IMAGES and component name select your component .
    You will find the image which you have imported into this section just select the image and save it.
    In the transaction sicf/bc/webdynpro , u cn check your component name there you can view the mime objects created by you .
    also refer the SAP online help :
    http://help.sap.com/saphelp_crm50/helpdata/en/46/bb182fab4811d4968100a0c94260a5/content.htm
    to knw more abt mime repositories.
    http://help.sap.com/saphelp_nw04/helpdata/en/f3/1a61a9dc7f2e4199458e964e76b4ba/content.htm
    regards,
    Amit

  • Ranges in Selection Screens

    Hi
    Can any body give the info regarding ranges in selection screens instead of selection-options.
    I want to use multiple selections
    Thanks & Regrads
    venkat

    Hi,
    Here both SELECT-OPTIONS & RANGES works for the same purpose.  They both are used for the range selection from selection screen.  The main diff. between them is, while we use SELECT-OPTIONS system implicitly creates the select options internal table which contains the fields of SIGN,OPTION,LOW & HIGH.  But in case of RANGES, this internal table should be defined explicitly.
    Eg. to SELECT-OPTIONS :
    REPORT YARSELECT.
    TABLES YTXLFA1.
    SELECT-OPTIONS : VENDOR FOR YTXLFA1-LIFNR.
    INITIALIZATION.
    VENDOR-LOW    =   1000.               " It specifies the range starting value.
    VENDOR-HIGH    =   2000.               " It specifies the range ending value.
    VENDOR-OPTION  =  'BT'.                " specifies ranges value is in between.
    VENDOR-SIGN      = 'I'.                     "specifies both inclussive.
    APPEND VENDOR.
    SELECT LIFNR LAND1 NAME1 FROM LFA1 INTO TABLE ITAB 
    WHERE LIFNR IN VENDOR.
    Eg. to RANGES:
    REPORT YARRANGE.
    TABLES YTXLFA1.
    RANGES: VENDOR FOR YTXFLA1-LIFNR.
    SELECT LIFNR LAND1 NAME1 FROM LFA1 INTO TABLE ITAB 
    WHERE LIFNR IN VENDOR.
    Here with RANGES  user has to design an internal table with fields - 
    SIGN,OPTION,LOW and HIGH EXPLICITLY.
    >
    Example:
    select-options: bukrs for zstock-bukrs.
    Should the user fill in 'ABFI' in BUKRS on the selection screen, BUKRS will look like this:
    IEQABFI
    This is because BUKRS is set as a table as follows:
    begin of bukrs occurs 0,
      SIGN(1)    type c,
      OPTION(2) type c,
      LOW         like bukrs,
      HIGH         like bukrs,
    end of bukrs.
    Now, when you create the following range, it will have the exact same fields set inside its table:
    Ranges: bukrs for zstock-bukrs.
    The difference is, because ranges doesn't show on the selection screen, you will have to fill it yourself, meaning you will have to fill bukrs-sign, bukrs-option, bukrs-low & bukrs-high all manually.
    Some tips:
    Sign is always I (for Include) or E (for Exclude)
    Option can be a whole range, which includes:
    EQ        (Equal) 
    BT        (Between)) 
    CP        (Contain Pattern)
    So let's say you want to have the range check for all company codes not starting with AB, you will set your code as follow:
    ranges: bukrs for zstock-bukrs.
    bukrs-sign = 'E'.             "Exclude
    bukrs-option = 'CP'.        "Pattern
    bukrs-low = 'AB*'.            "Low Value
    bukrs-high = ''.                "High Value
    append bukrs.
    Always remember to APPEND your range when you fill it, as the WHERE clause checks against the lines of the range table, not against the header line.
    Hope this explains it well enough.
    >
    What does SIGN "I" & "E" mean?
    The "I" stands for Include, and the "E" for Exclude.
    The easiest way to learn how the range selections work is, create the following dummy program:
    report dummy.
    tables: mara.
    select-options: matnr for mara-matnr.
    start-of-selection.
    loop at matnr.
    write: / matnr-sign,
               matnr-option,
               matnr-low,
               matnr-high.
    endloop.
    Run this program, and fill in a lot of junk into MATNR. Fill in some includes, some excludes, some ranges, etc., and you will soon realise how the system builds ranges (select-options). Once you know that, you can fill your own ranges quickly and efficiently.
    Regards,
    Sruthi

  • How i can show the selection screen input field in the top of page in alv

    hi ,
              how i can show the selection screen input field in the top of page in alv  grid output.
    tell me the process

    Hi,
    excample from my program:
    FORM topof_page.
      DATA: l_it_header   TYPE TABLE OF slis_listheader WITH HEADER LINE,
            l_info        LIKE l_it_header-info.
      DATA: l_it_textpool TYPE TABLE OF textpool WITH HEADER LINE.
      DATA: l_key LIKE l_it_textpool-key.
      READ TEXTPOOL c_repid INTO l_it_textpool LANGUAGE sy-langu.
      DEFINE m_selinfo.
        if not &1 is initial.
          clear l_it_header.
          l_it_header-typ   = 'S'.
          l_key = '&1'.
          translate l_key to upper case.
          read table l_it_textpool with key key = l_key.
          if sy-subrc = 0.
            shift l_it_textpool-entry left deleting leading space.
            l_it_header-key = l_it_textpool-entry  .
          endif.
          loop at &1.
            case &1-option.
              when 'EQ'
                or 'BT'
                or 'CP'.
                write &1-low to l_it_header-info.
              when others.
                write &1-low to l_it_header-info.
                concatenate &1-option
                            l_it_header-info
                       into l_it_header-info
                       separated by space.
            endcase.
            if not &1-high is initial.
              write &1-high to l_info left-justified.
              concatenate l_it_header-info
                          l_info
                     into l_it_header-info
                     separated by space.
            endif.
            if &1-sign = 'E'.
              concatenate ']'
                          l_it_header-info
                     into l_it_header-info.
            endif.
            append l_it_header.
            clear: l_it_header-key,
                   l_it_header-info.
          endloop.
        endif.
      END-OF-DEFINITION.
      m_selinfo: s_trmdat,
                 s_trmext,
                 s_trmint,
                 s_fkdat,
                 s_delno,
                 s_vbeln,
                 s_deact,
                 s_kdmat.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
           EXPORTING
                it_list_commentary = l_it_header[].
    ENDFORM.
    I hope, this will help you.
    Regards
    Nicole

  • How to create a variant selection screen

    Hi experts,
    Can you tell me " How to create a variant selection screen ".
    Please it's urgent.........
    Thanks
    Basu

    Hi ,
    Goto your selection screen
    Make entries in the fileds od the selection screen
    press save button, it will ask you for the mane of the Variant
    Give the name of  the Variant and save it
    Variant is now created for the selection screen.
    Reward if useful.
    Regards,
    Shilpi

  • How to create a new selection screen IN LOGICAL DATABASE PNPCE

    how to create a new selection screen LDBS PNPCE

    Hello Ankit,
    Do you want to create a new selection screen in LDB PNPCE, or do you want to create a new selection screen in one of your reports using LDB PNPCE?
    For later (which is more common), you can use HR Report Category.
    Hope this helps.
    Best Regards,
    Biraju Rajyaguru

  • How can i declare a selection screen in a DP program with transaction code.

    hi friends,
    How can i declare a selection screen in a DP program with transaction code. What are the events and flow logic..

    Search in SCN/Google for Module-pool programming basics.

  • How to can we do selection-screen modification for LDB?

    Hi All,
    I have custom field in my selection-screen of LDB PNP.
    Can you people please let me know how can I put the selection-screen modificaiton For ex:
    i have created
    parameters a as checbox.
    select-options: p_btrtl for p0001-btrtl no-intervals.
    now If the check box is selected then p_btrtl we can enter values or esle If check box is not selected then p_btrtl will be grayed out, ( I.e. SCREEN-INPUT = 0)
    This is simple from ABAP without LDB. But with LDB can we achieve?????????????
    Satish
    Edited by: Satish Vasireddy on Jun 23, 2010 4:05 PM

    you can use the following logic for the additional selection validation. I have done by using PNP LDB. Ex : I have done for one of the field in IT0377.
    SELECT-OPTIONS: s_bplan FOR p0377-bplan.
    *&      Form  check_selection_0377
      This subroutine is used to check the selection screen
    FORM check_selection_0377.
      LOOP AT p0377 WHERE pltyp  IN s_bplan
                     AND levl1 IN s_lti
                     AND   begda LE pn-endda
                     AND   endda GE pn-begda.
        CALL FUNCTION 'HR_CHECK_AUTHORITY_INFTY'
          EXPORTING
            tclas            = 'A'
            pernr            = pernr-pernr
            infty            = p0377-infty
            subty            = p0377-subty
            begda            = pn-begda
            endda            = pn-endda
            level            = 'R'
          EXCEPTIONS
            no_authorization = 1
            internal_error   = 2
            OTHERS           = 3.
        IF NOT sy-subrc IS INITIAL.
          DELETE p0377.
        ENDIF.
      ENDLOOP.
    selection not found and no value selected
      IF sy-subrc NE 0.
        READ TABLE s_bplan.
        IF sy-subrc EQ 0.
          REJECT.
        ENDIF.
        READ TABLE s_lti.
        IF sy-subrc EQ 0.
          REJECT.
        ENDIF.
      ENDIF.
    ENDFORM.                    " check_selection_0377
    Regards,
    Preetham

  • How to create a new selection screen LDBS PNPCE

    how to create a new selection screen LDBS PNPCE

    Hello Ankit,
    Do you want to create a new selection screen in LDB PNPCE, or do you want to create a new selection screen in one of your reports using LDB PNPCE?
    For later (which is more common), you can use HR Report Category.
    Hope this helps.
    Best Regards,
    Biraju Rajyaguru

  • How to make Label in selection screen?

    Hi friends.. can anybody explain how to make labels in selection screens and how to split the selection screen vertically? plz.. Thanks in advance

    Arun kumar,
    Check this program. you can put labels like this.
    REPORT  ZVENKAT_TEST1.
    SELECTION-SCREEN BEGIN OF BLOCK block.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(15) text1.
    SELECTION-SCREEN POSITION 17.
    PARAMETERS :p_pernr type pa0001-pernr.
    SELECTION-SCREEN POSITION 26.
    SELECTION-SCREEN COMMENT 27(30) text2.
    SELECTION-SCREEN end OF LINE.
    SELECTION-SCREEN end OF BLOCK block .
    at SELECTION-SCREEN OUTPUT.
      text1 = 'Personal number'.
      SELECT SINGLE ename FROM pa0001 INTO text2 WHERE pernr = p_pernr.
    Regards,
    Venkat.O

Maybe you are looking for

  • URGENT: How to read the content of a PDF-file in Java?

    Hello What I need are some classes which can read a pdf and translate it in normal Text, so that I can write the content of the pdf in my database. Where can I find those classes? Or how else could I get there?

  • How Can I Create an Event Link to a Page Tab?

    I have a portlet in one tab that generates an event. I want to be able to send this event to the same page but to another tab where another portlet resides. Here's the code snippet that creates the link. This code is part of a custom JSP tag. // Atte

  • Custom DB authentication to an application from Oracle Portal not working.

    Hi All, We have a Portal customized and integrated to LDAP for SSO. From the portal, we have a link that takes to another custom application that requires another level of authentication. We have implemented this authentication as custom Database bas

  • Set-up Airport Extreme 6thG

    How do I set-up my Airport Extreme 6th generation with AT&T U-verse ARRIS NVG589 router? Would this be a difficult task? Any help appreciated! Thanks

  • InDesign PDF prints greyed and not crisp

    InDesign file print solid and crisp but when converted to PDF it is greyed and faded. Created PDF with "Press QUlaity PDF preset" and also tried it through Distiller. Color settings are "North American Prepress 2" in Indesign and U.S. Web Coated (SWO