To select the Range exclusive option in variable

Hi SAP Gurus,
  I want to create a variable with range exclusive. ie i want to exclude a value. can any one tell me the correct procedure for this process.
Thanks in advance,
sandy

Do you mean excluding a value from a range or selection option?
report zrich_0001.
tables: t001.
select-options: s_bukrs for t001-bukrs.
initialization.
<b>  s_bukrs-sign = 'E'.     "E = Exclude, I = Include
  s_bukrs-option = 'EQ'.
  s_bukrs-low    = '0010'.
  append s_bukrs.</b>
Regards,
Rich Heilman

Similar Messages

  • When i select the Full Screen option in video streams (like youtube, veoh, anything like that) i can do that 1 time 2nd time the screen goes blank and can only exit it with the Esc button and then i have to restart firefox and again i have my one Full ...

    When i select the "Full Screen" option in video streams (like youtube, veoh, anything like that) i can do that one(1) time second(2nd) time the screen goes blank and can only exit it with the escape(Esc) button and then i have to restart firefox and again i have my one "Full-screen Ticket"

    I have had a similar problem with my system. I just recently (within a week of this post) built a brand new desktop. I installed Windows 7 64-bit Home and had a clean install, no problems. Using IE downloaded an anti-virus program, and then, because it was the latest version, downloaded and installed Firefox 4.0. As I began to search the internet for other programs to install after about maybe 10-15 minutes my computer crashes. Blank screen (yet monitor was still receiving a signal from computer) and completely frozen (couldn't even change the caps and num lock on keyboard). I thought I perhaps forgot to reboot after an update so I did a manual reboot and it started up fine.
    When ever I got on the internet (still using firefox) it would crash after anywhere between 5-15 minutes. Since I've had good experience with FF in the past I thought it must be either the drivers or a hardware problem. So in-between crashes I updated all the drivers. Still had the same problem. Took the computer to a friend who knows more about computers than I do, made sure all the drivers were updated, same problem. We thought that it might be a hardware problem (bad video card, chipset, overheating issues, etc.), but after my friend played around with my computer for a day he found that when he didn't start FF at all it worked fine, even after watching a movie, or going through a playlist on Youtube.
    At the time of this posting I'm going to try to uninstall FF 4.0 and download and install FF 3.6.16 which is currently on my laptop and works like a dream. Hopefully that will do the trick, because I love using FF and would hate to have to switch to another browser. Hopefully Mozilla will work out the kinks with FF 4 so I can continue to use it.
    I apologize for the lengthy post. Any feedback would be appreciated, but is not necessary. I will try and post back after I try FF 3.16.6.

  • When I try to upgrade to Mountain Lion OS, after I select the "Buy App" option I get this "We could not complete your purchase. The product distribution file could not be verified. It may be damaged or was not signed" message, how can I upgrade?

    When I try to upgrade to Mountain Lion OS form Lion OS, after I select the "Buy App" option I get this "We could not complete your purchase. The product distribution file could not be verified. It may be damaged or was not signed" message, what is causing this problem, how can I find a solution, is someone else having this problem?

    The only thing that worked for me was to boot in safe mode.
    Power down.  Then press power button and hold 'shift' key until grey screen with progress bar appears... Once booted and logged in just open safari and browse to applestore. 
    No trouble at all once I did this.
    Reminder: create full backup before you upgrade OS
    Hope it helps.

  • Updated "Selecting the Best Compiler Options" now available

    The technical article "Selecting the Best Compiler Options" by Darryl Gove has been updated for Sun Studio 12 Update 1 and is now available at:
    http://developers.sun.com/sunstudio/documentation/techart/compiler_flags/
    Here's the abstract:
    +This article suggests how to get the best performance from an
    UltraSPARC or x86/EMT64 (x64) processor running on the latest Solaris
    platforms by compiling with the best set of compiler options and the
    latest compilers. These are suggestions of things you should try, but
    before you release the final version of your program, you should
    understand exactly what you have asked the compiler to do.+

    Ok sorry I've taken so long to respond.  The reply button wouldn't pop up for me to reply!
    There was never a dialog box asking for me to select the program from installed programs when I open the pdf from outlook express.  But when I opened a pdf from my desktop it asked that question and I had it "always use this program to open this type of file." So I assumed that it was would work when opening from outlook express.  But it doesn't.
    I've tried unclicking the protected mode button under the preferences general section.  And finally I'm not sure how to post screenshots of the attachment thumbnail and dialog.  I'm looking all over my keyboard for a button to push I don't have a clue as to what to do!  I do have a print Scr button but when I click on it nothing happens.  I've tried holding down the shift key and the button and the alt key and print scr button but nothing happens.
    Could it be that somehow it's not recognizing ARCO.EXCH.DOCUMENT as that's what it thinks the type of document is?
    I've already created an association for pdf files and it'll open them on my desktop, just not in outlook express.

  • Why cant i use the filer gallery option in photoshop

    Is there any reason as to why I cannot select the Filter Gallery option in photoshop cc. I noticed it is not with all my images.

    What do you mean, "not with all my images?"
    The menu needs to be made visible via the Preferences - Plug-ins panel.
    After that, your image needs to be 8 bits/channel RGB in order to use the Filter Gallery features.  Adobe has not updated all these filters to handle deep data (16 bits/channel or higher) images directly.
    -Noel

  • How do I turn off the print receipt option on word 2011 for mac?

    My word 2011 has just started printing off a sheet of document details after every document I print. I'm using a macbook and have been unable to find a way to turn this option off. Obviously I clicked something by mistake, but I have no idea what it could
    be.

    In the Print dialog box in the third drop-down (under Printer and Presets)
     - select the Cover Page option and check that "After Document" is not checked
     - select the Microsoft Word option, click Word Options... and ensure that nothing is "included with document" such as Document Properties. You can also adjust this setting (bit not the "Cover Page" one) via Word->Preferences-Print
    If that does not help, then I suggest you post in http://answers.microsoft.com/en-us/mac/forum/macword where you are likely to find more people who can help with your question -
    i.e., it's generally a better place to post questions related to the Mac version of the product.
    Peter Jamieson

  • How to deselect the "close network" option with Time Capsule?

    After selecting the "close network" option in the settings I lost connection.  When I check the Utility AirPort the machine looks for wireless devices but finds nothing because it's hidden.    How do I deselect  the "close network" option and see my network again?   Tks!!!

    Temporarily, connect an Ethernet cable from your computer to one of the LAN <--> ports on the back of the Time Capsule and turn off the wireless on the computer.
    Open AirPort Utility and click Manual Setup
    Click the Wireless tab below the row of icons
    Click the Wireless Network Options button
    Remove the check mark next to "Create a closed network"
    Click Update to save your settings and allow 25-30 seconds for the Time Capsule to restart.

  • Selecting particular range of style using script

    HI All,
    Can anyone suggest me that how we can select the range of text using script.
    I am having some different para styles say for eg., PS1, PS2, PS3, PS4...........
    I may applyed these styles in some jumping order but except PS1, now I want to select paragraphs with applied style PS1 to stop before the next appearence of PS1 style.
    Like: In a document Para 1, 10, 14, 25 were applied with PS1, so the selection should go in the way like 1-9, 10-13, 14-24 and so on
    Regards,
    love_all

    "The" index of a paragraph is nothing special, it's the index of the first character of that paragraph inside its parent story. In particular, it does NOT tell you "this is the 5th paragraph" or something like that.
    This is because "Paragraph" is an artificial construct inside "Text", not a truly existing first class object. Same as "Line", "Word", "Character", and indeed, any text selection at all.
    Since you already have a "found text" array, "the index" of the nth entry's paragraph -- with the constraint described above -- can be simply found by using foundText[n].paragraphs[0].index (the index of the first character of your foundText is foundText[n].index).
    If you DO need to know the nth number of the paragraph, search this forum. I think Peter Kahrel answered to a post to answer that exact question.

  • SELECT-OPTIONS for variables that cannot have a range

    Hi all,
    There is an option to show only one input-field for a select-options declaration by using the 'no intervals' option. But it is still possible for the user to specify ranges when doing multiple selections (i.e. specify intervals for the variable).
    However, if I have a variable that implicitly does not have ranges, (e.g. 'Arjun' TO 'Shankar' makes no sense at all), I want to let the user do multiple selections for it, without allowing him/her to enter ranges for it.
    Can I do this in a selection screen in any way (even if it involves not using select-options)? And if yes, how?

    Use this:
    SELECT-OPTIONS xxxx FOR yyyy NO INTERVALS
                                               NO-EXTENSION.

  • How to get all values in the range of select option into internal table?

    Hi,
    I need to capture all entries coming in the range of select option into one internal table.
    How to do get that?
    For E.g
    select-options: matnr for mara-matnr.(select option)
    IF I enter G0100013507892 as lower value of matnr and G0100014873947 as higher value
    and if there are 10,000 materials in the above range, then I want to capture all theses 10000 materails in one internal table. How to do that?
    Regards,
    Mrunal

    Hello Mrunal Mhaskar  ,
    What i understand you can do one thing  go in debug mode
    Try this code : -
    LOOP AT s_matnr_ex.
      IF s_matnr_ex-low IS NOT INITIAL.
        i_matnr-matnr = s_matnr_ex-low.
        i_matnr-option = s_matnr_ex-option.
        APPEND i_matnr.
        CLEAR : i_matnr.
      ENDIF.
    ENDLOOP.
    LOOP AT s_matnr_ex.
      IF s_matnr_ex-high IS NOT INITIAL.
        i_matnr-matnr = s_matnr_ex-high.
        i_matnr-option = s_matnr_ex-option.
        APPEND i_matnr.
        CLEAR : i_matnr.
      ENDIF.
    ENDLOOP.
    In the i_matnr table high and low values are there.
    Regards,
    Vandana.

  • Hide the Range Option in Multiple Selection screen

    Hai,
    I Give the values In single Values In Selection Option Screen.
    I want to need Hide the Range Option Include or Exclude In Multiple selection screen.
    Regards,
    Geetha

    just check this it may help you
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/840ad679-0601-0010-cd8e-9989fd650822">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/840ad679-0601-0010-cd8e-9989fd650822</a>
    here restricting the selection screen
    regards
    shiba dutta

  • Disabling the Ranges option in Select options

    Hi,
    I have a requirement where I have to remove the possibility of entering the ranges for select-options on the selection screen (eg: FROM ‘xyz’ TO ‘xyz’ ).. For this I used SELECT OPTIONS ……… NO INTERVALS.
    Now the range option doesn’t appear on the main selection screen. However, when I click on the ‘Multiple Selection’ screen button next to this field.. here again I find an option to enter the ranges. Is there a way to disable this option on the ‘Multiple Selection’ screen.
    Could anyone please help me in this.
    Regards,
    Harsha

    chk this program
    REPORT TESTREP.
    * Include type pool SSCR
    TYPE-POOLS SSCR.
    * Define the object to be passed to the RESTRICTION parameter
    DATA RESTRICT TYPE SSCR_RESTRICT.
    * Auxiliary objects for filling RESTRICT
    DATA OPT_LIST TYPE SSCR_OPT_LIST.
    DATA ***      TYPE SSCR_***.
    * Define the selection screen objects
    * First block: 3 SELECT-OPTIONS
    SELECTION-SCREEN BEGIN OF BLOCK BLOCK_0 WITH FRAME TITLE TEXT-BL0.
      SELECT-OPTIONS SEL_0_0 FOR SY-TVAR0.
      SELECT-OPTIONS SEL_0_1 FOR SY-TVAR1.
      SELECT-OPTIONS SEL_0_2 FOR SY-TVAR2.
      SELECT-OPTIONS SEL_0_3 FOR SY-TVAR3.
    SELECTION-SCREEN END   OF BLOCK BLOCK_0.
    * Second block: 2 SELECT-OPTIONS
    SELECTION-SCREEN BEGIN OF BLOCK BLOCK_1 WITH FRAME TITLE TEXT-BL1.
      SELECT-OPTIONS SEL_1_0 FOR SY-SUBRC.
      SELECT-OPTIONS SEL_1_1 FOR SY-REPID.
    SELECTION-SCREEN END   OF BLOCK BLOCK_1.
    INITIALIZATION.
    * Define the option list
    * ALL: All options allowed
      MOVE 'ALL'        TO OPT_LIST-NAME.
      MOVE 'X' TO: OPT_LIST-OPTIONS-BT,
                   OPT_LIST-OPTIONS-CP,
                   OPT_LIST-OPTIONS-EQ,
                   OPT_LIST-OPTIONS-GE,
                   OPT_LIST-OPTIONS-GT,
                   OPT_LIST-OPTIONS-LE,
                   OPT_LIST-OPTIONS-LT,
                   OPT_LIST-OPTIONS-NB,
                   OPT_LIST-OPTIONS-NE,
                   OPT_LIST-OPTIONS-NP.
      APPEND OPT_LIST TO RESTRICT-OPT_LIST_TAB.
    * NOPATTERN: CP and NP not allowed
      CLEAR OPT_LIST.
      MOVE 'NOPATTERN'  TO OPT_LIST-NAME.
      MOVE 'X' TO: OPT_LIST-OPTIONS-BT,
                   OPT_LIST-OPTIONS-EQ,
                   OPT_LIST-OPTIONS-GE,
                   OPT_LIST-OPTIONS-GT,
                   OPT_LIST-OPTIONS-LE,
                   OPT_LIST-OPTIONS-LT,
                   OPT_LIST-OPTIONS-NB,
                   OPT_LIST-OPTIONS-NE.
      APPEND OPT_LIST TO RESTRICT-OPT_LIST_TAB.
    * NOINTERVLS: BT and NB not allowed
      CLEAR OPT_LIST.
      MOVE 'NOINTERVLS' TO OPT_LIST-NAME.
      MOVE 'X' TO: OPT_LIST-OPTIONS-CP,
                   OPT_LIST-OPTIONS-EQ,
                   OPT_LIST-OPTIONS-GE,
                   OPT_LIST-OPTIONS-GT,
                   OPT_LIST-OPTIONS-LE,
                   OPT_LIST-OPTIONS-LT,
                   OPT_LIST-OPTIONS-NE,
                   OPT_LIST-OPTIONS-NP.
      APPEND OPT_LIST TO RESTRICT-OPT_LIST_TAB.
    * EQ_AND_CP: only EQ and CP allowed
      CLEAR OPT_LIST.
      MOVE 'EQ_AND_CP'  TO OPT_LIST-NAME.
      MOVE 'X' TO: OPT_LIST-OPTIONS-CP,
                   OPT_LIST-OPTIONS-EQ.
      APPEND OPT_LIST TO RESTRICT-OPT_LIST_TAB.
    * JUST_EQ: Only EQ allowed
      CLEAR OPT_LIST.
      MOVE 'JUST_EQ' TO OPT_LIST-NAME.
      MOVE 'X' TO OPT_LIST-OPTIONS-EQ.
      APPEND OPT_LIST TO RESTRICT-OPT_LIST_TAB.
    * Assign selection screen objects to option list and sign
    * KIND = 'A': applies to all SELECT-OPTIONS
      MOVE: 'A'          TO ***-KIND,
            '*'          TO ***-SG_MAIN,
            'NOPATTERN'  TO ***-OP_MAIN,
            'NOINTERVLS' TO ***-OP_ADDY.
      APPEND *** TO RESTRICT-***_TAB.
    * KIND = 'B': applies to all SELECT-OPTIONS in block BLOCK_0,
    *             that is, SEL_0_0, SEL_0_1, SEL_0_2
      CLEAR ***.
      MOVE: 'B'          TO ***-KIND,
            'BLOCK_0'    TO ***-NAME,
            'I'          TO ***-SG_MAIN,
            '*'          TO ***-SG_ADDY,
            'NOINTERVLS' TO ***-OP_MAIN.
      APPEND *** TO RESTRICT-***_TAB.
    * KIND = 'S': applies to SELECT-OPTION SEL-0-2
      CLEAR ***.
      MOVE: 'S'          TO ***-KIND,
            'SEL_0_2'    TO ***-NAME,
            'I'          TO ***-SG_MAIN,
            '*'          TO ***-SG_ADDY,
            'EQ_AND_CP'  TO ***-OP_MAIN,
            'ALL'        TO ***-OP_ADDY.
      APPEND *** TO RESTRICT-***_TAB.
    * KIND = 'S': Applies to SELECT-OPTION SEL_0_3
      CLEAR ***.
      MOVE: 'S'        TO ***-KIND,
            'SEL_0_3'  TO ***-NAME,
            'I'        TO ***-SG_MAIN,
            'N'        TO ***-SG_ADDY,
            'JUST_EQ'  TO ***-OP_MAIN.
      APPEND *** TO RESTRICT-***_TAB.
    * Call function module
      CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
           EXPORTING
                 RESTRICTION                = RESTRICT
    *           DB                          = ' '
           EXCEPTIONS
                 TOO_LATE                   = 1
                 REPEATED                   = 2
                 NOT_DURING_SUBMIT          = 3
                DB_CALL_AFTER_REPORT_CALL  = 4
                SELOPT_WITHOUT_OPTIONS     = 5
                 SELOPT_WITHOUT_SIGNS       = 6
                 INVALID_SIGN               = 7
                REPORT_CALL_AFTER_DB_ERROR = 8
                  EMPTY_OPTION_LIST          = 9
                 INVALID_KIND               = 10
                 REPEATED_KIND_A            = 11
                 OTHERS                     = 12.
    * Exception handling
      IF SY-SUBRC NE 0.
      ENDIF.
    Message was edited by: Sekhar

  • How to populate the ranges using FM for the SELECTs

    Hi,
    I am still working on the FM to create a generic extractor. I went through the debugger but I am still unable to determine how the ranges are populated. RSA3 always gives me zero values for the results.
    There is a RANGE statement in the sample FM and the following statements for SELECTs
      RANGES: L_R_CARRID  FOR SFLIGHT-CARRID,
              L_R_CONNID  FOR SFLIGHT-CONNID.
    and...
          LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'CARRID'.
            MOVE-CORRESPONDING L_S_SELECT TO L_R_CARRID.
            APPEND L_R_CARRID.
          ENDLOOP.
          LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'CONNID'.
            MOVE-CORRESPONDING L_S_SELECT TO L_R_CONNID.
            APPEND L_R_CONNID.
          ENDLOOP.
    My question is how is L_R_CONNID and L_R_CARRID populated with low and high values for the SELECT statements? I tried to find the DS 0SAPI_SFLIGHT_SIMPLE to run and see how it is set up but there is no such DS.
    Would someone take the time to say something about this in  several sentences? I have my own code and it seems that it is not populating the values for the SELECTs when I debug from RSA3 when I provide the low and high values.
    Would I normally populate the low and high values from the InfoPackage 'Data Selection' tab once I have implemented in BW or ready to test in BW? That would mean I have to choose those fields as selections from RSO2. Anyway, I think I have asked about this but I am hoping to get an answer to get this going...
    Appreciate any replies.

    Hi
    Here is an example of an extractor that uses
    both method's, if the InfoPackage selection exist's
    it overrides the TVARV selection (which is the default).
    FUNCTION ZBW_TC_FORECAST_SO_EXTRACTOR.
    ""Local interface:
    *"  IMPORTING
    *"     VALUE(I_REQUNR) TYPE  SBIWA_S_INTERFACE-REQUNR
    *"     VALUE(I_DSOURCE) TYPE  SBIWA_S_INTERFACE-ISOURCE OPTIONAL
    *"     VALUE(I_CHABASNM) TYPE  SBIWA_S_INTERFACE-CHABASNM OPTIONAL
    *"     VALUE(I_MAXSIZE) TYPE  SBIWA_S_INTERFACE-MAXSIZE OPTIONAL
    *"     VALUE(I_INITFLAG) TYPE  SBIWA_S_INTERFACE-INITFLAG OPTIONAL
    *"     VALUE(I_UPDMODE) TYPE  SBIWA_S_INTERFACE-UPDMODE OPTIONAL
    *"     VALUE(I_DATAPAKID) TYPE  SBIWA_S_INTERFACE-DATAPAKID OPTIONAL
    *"     VALUE(I_PRIVATE_MODE) OPTIONAL
    *"     VALUE(I_CALLMODE) TYPE  ROARCHD200-CALLMODE OPTIONAL
    *"  TABLES
    *"      I_T_SELECT TYPE  SBIWA_T_SELECT OPTIONAL
    *"      I_T_FIELDS TYPE  SBIWA_T_FIELDS OPTIONAL
    *"      E_T_DATA STRUCTURE  ZBW_TC_FORECASTING_EXT_STR OPTIONAL
    *"  EXCEPTIONS
    *"      NO_MORE_DATA
    *"      ERROR_PASSED_TO_MESS_HANDLER
    *"      HIERARCHY_NOT_FOUND
    Change History                                                      *
    Mod. #  |  Date    |  Developer     |  Description                  *
    *RD3K915762|06/21/2005| SRangaraj      | Change selection of open SO   *
             |          |                | data to include deleted matls *
             |          |                | and obsolete items too        *
    RD3K915888|06/29/2005| SRANGARAJ      | Add ext matl grp and lab offce
             |          |                | filters for data-selection    *
    The input parameter I_DATAPAKID is not supported yet !
    Auxiliary Selection criteria structure
      DATA: L_S_SELECT TYPE SBIWA_S_SELECT.
    Maximum number of lines for DB table
      STATICS L_MAXSIZE TYPE SBIWA_S_INTERFACE-MAXSIZE.
    Parameter I_PRIVATE_MODE:
    Some applications might want to use this function module for other
    purposes as well (e.g. data supply for OLTP reporting tools). If the
    processing logic has to be different in this case, use the optional
    parameter I_PRIVATE_MODE (not supplied by BIW !) to distinguish
    between BIW calls (I_PRIVATE_MODE = SPACE) and other calls
    (I_PRIVATE_MODE = X).
    If the message handling has to be different as well, define Your own
    messaging macro which interprets parameter I_PRIVATE_MODE. When
    called by BIW, it should use the LOG_WRITE macro, otherwise do what
    You want.
    Initialization mode (first call by SAPI) or data transfer mode
    (following calls) ?
      IF I_INITFLAG = SBIWA_C_FLAG_ON.
    Initialization: check input parameters
                    buffer input parameters
                    prepare data selection
    The input parameter I_DATAPAKID is not supported yet !
    Invalid second initialization call -> error exit
        IF NOT G_FLAG_INTERFACE_INITIALIZED IS INITIAL.
          IF 1 = 2. MESSAGE E008(R3). ENDIF.
          LOG_WRITE 'E'                    "message type
                    'R3'                   "message class
                    '008'                  "message number
                    ' '                    "message variable 1
                    ' '.                   "message variable 2
          RAISE ERROR_PASSED_TO_MESS_HANDLER.
        ENDIF.
    Check InfoSource validity
        CASE I_DSOURCE.
          WHEN 'ZBW_TC_SO_EXTRACT'.
          WHEN OTHERS.
            IF 1 = 2. MESSAGE E009(R3). ENDIF.
            LOG_WRITE 'E'                  "message type
                      'R3'                 "message class
                      '009'                "message number
                      I_DSOURCE            "message variable 1
                      ' '.                 "message variable 2
            RAISE ERROR_PASSED_TO_MESS_HANDLER.
        ENDCASE.
    Check for supported update mode
       CASE I_UPDMODE.
         WHEN 'F'.
         WHEN OTHERS.
           IF 1 = 2. MESSAGE E011(R3). ENDIF.
           LOG_WRITE 'E'                  "message type
                     'R3'                 "message class
                     '011'                "message number
                     I_UPDMODE            "message variable 1
                     ' '.                 "message variable 2
           RAISE ERROR_PASSED_TO_MESS_HANDLER.
       ENDCASE.
    Check for obligatory selection criteria
       READ TABLE I_T_SELECT INTO L_S_SELECT WITH KEY FIELDNM = 'PGMID'.
       IF SY-SUBRC <> 0.
         IF 1 = 2. MESSAGE E010(R3). ENDIF.
         LOG_WRITE 'E'                    "message type
                   'R3'                   "message class
                   '010'                  "message number
                   'PGMID'                "message variable 1
                   ' '.                   "message variable 2
         RAISE ERROR_PASSED_TO_MESS_HANDLER.
       ENDIF.
        APPEND LINES OF I_T_SELECT TO G_T_SELECT.
    Fill parameter buffer for data extraction calls
        G_S_INTERFACE-REQUNR    = I_REQUNR.
        G_S_INTERFACE-ISOURCE   = I_DSOURCE.
        G_S_INTERFACE-MAXSIZE   = I_MAXSIZE.
        G_S_INTERFACE-INITFLAG  = I_INITFLAG.
        G_S_INTERFACE-UPDMODE   = I_UPDMODE.
        G_S_INTERFACE-DATAPAKID = I_DATAPAKID.
        G_FLAG_INTERFACE_INITIALIZED = SBIWA_C_FLAG_ON.
    Fill field list table for an optimized select statement
    (in case that there is no 1:1 relation between InfoSource fields
    and database table fields this may be far from beeing trivial)
        APPEND LINES OF I_T_FIELDS TO G_T_FIELDS.
    Fill range tables for fixed InfoSources. In the case of generated
    InfoSources, the usage of a dynamical SELECT statement might be
    more reasonable. BIW will only pass down simple selection criteria
    of the type SIGN = 'I' and OPTION = 'EQ' or OPTION = 'BT'.
        LOOP AT G_T_SELECT INTO L_S_SELECT.
          CASE L_S_SELECT-FIELDNM.
            WHEN 'PRDHA'.
              WGF_PRDHA_LENGTH = STRLEN( L_S_SELECT-LOW ).
              IF WGF_PRDHA_LENGTH = 6.  "PARTIAL PRDHA
                 WGF_PRDHA = L_S_SELECT-LOW.
                 CONCATENATE WGF_PRDHA '%' INTO WGF_PRDHA.
              ELSEIF WGF_PRDHA_LENGTH = 12.  "FULL PRDHA
              MOVE-CORRESPONDING L_S_SELECT TO L_R_PRDHA.
              APPEND L_R_PRDHA.
              ENDIF.
            WHEN 'MATKL'.
              MOVE-CORRESPONDING L_S_SELECT TO L_R_MATKL.
              APPEND L_R_MATKL.
          ENDCASE.
        ENDLOOP.
    reset the index of where we are in the gt_header table
      g_tabix = 0.
      perform populate_default_variables.
      perform get_data.
      perform build_detail.
        EXIT.
      ENDIF.                 "Initialization mode or data extraction ?
    Data transfer: First Call      OPEN CURSOR + FETCH
                   Following Calls FETCH only
    First data package -> OPEN CURSOR
       IF G_COUNTER_DATAPAKID = 0.
    Determine number of database records to be read per FETCH statement
    from input parameter I_MAXSIZE. If there is a one to one relation
    between InfoSource table lines and database entries, this is trivial.
    In other cases, it may be impossible and some estimated value has to
    be determined.
      DESCRIBE TABLE LT_DATA LINES l_count.
      IF g_tabix GE l_count.
        RAISE no_more_data.
      ENDIF.
    *CLEAN UP THE OUTPUT TABLE
      refresh E_T_DATA.
      LOOP AT LT_DATA FROM G_TABIX INTO LS_DATA.
        APPEND LS_DATA TO E_T_DATA.
    Set global counter
        g_tabix = g_tabix + 1.
      ENDLOOP.
       G_COUNTER_DATAPAKID = G_COUNTER_DATAPAKID + 1.
    ENDIF.              "Initialization mode or data extraction ?
    ENDFUNCTION.
    Forms
    ***INCLUDE LZBW_TC_FORECAST_SO_EXTF01 .
    *&      Form  populate_default_variables
          text
    -->  p1        text
    <--  p2        text
    FORM populate_default_variables.
      data: wlf_name like tvarv-name.
      clear: R_prdh3[], wlf_name.
    *get the exclusion range from tvarv for the product hierarchy in
    *question
      concatenate 'ZBW_EXL_' WGF_PRDHA(6) INTO WLF_NAME.
    SELECT LOW FROM TVARV INTO R_prdh3-low WHERE
                                 NAME = WLF_NAME.
      move:  'I'    to R_prdh3-sign,
             'EQ'   to R_prdh3-option.
      append R_prdh3.
      clear R_prdh3.
    ENDSELECT.
    {Start of insert by SRangaraj on June 29, 2005 >>RD3K915888
    CLEAR L_R_LABOR[].
    SELECT LOW FROM TVARV INTO L_R_LABOR-Low WHERE
                                 NAME = 'ZBW_TC_FORECAST_LAB_OFF'.
      move:  'I'    to L_R_LABOR-sign,
             'EQ'   to L_R_LABOR-option.
      append L_R_LABOR.
      clear L_R_LABOR.
    ENDSELECT.
    }End of insert by SRangaraj on June 29, 2005 >>RD3K915888
    ENDFORM.                    " populate_default_variables
    *&      Form  get_data
          text
    -->  p1        text
    <--  p2        text
    FORM get_data.
      data: wlf_lmeng like vbep-lmeng.
    *get all deliveries for date range for either a range of product hrchy
    *or a like value
      refresh int_records1.
      if wgf_prdha ne space.
        select ivbeln iposnr iKLMENG jvkorg i~werks
               imatnr imeins mprdha mmatkl
        from vbap as i
           INNER JOIN VBAK AS j
           ON ( jvbeln = ivbeln
                and j~vbtyp = 'C' )
           INNER JOIN vbuk AS k
           ON ( kvbeln = ivbeln
                and k~lfgsk <> 'C'
                and k~gbstk <> 'C' )
           INNER JOIN vbup AS l
           ON ( lvbeln = ivbeln and
                lposnr = iposnr
                and l~lfgsa <> 'C'
                and l~gbsta <> 'C' )
           INNER JOIN mara AS m
           ON ( mmatnr = imatnr
    {Start of insert by SRangaraj on June 21, 2005 >>RD3K915762
                and m~lvorm eq ' '
                and m~mstae ne '99'
    {Start of insert by SRangaraj on June 29, 2005 >>RD3K915888
                and m~extwg = '080' )
    }End of insert by SRangaraj on June 29, 2005 >>RD3K915888
           INNER JOIN marc AS n
           ON ( nmatnr = imatnr
                and nwerks = iwerks
                and n~lvorm eq ' ' )
    }End of insert by SRangaraj on June 21, 2005 >>RD3K915762
        into table int_records1 where ( i~abgru = '  '
                                     and i~klmeng > 0
                                     and m~prdha like wgf_prdha
                                     and m~matkl in l_r_matkl
    {Start of insert by SRangaraj on June 29, 2005 >>RD3K915888
                                     and m~labor in l_r_labor ).
    }End of insert by SRangaraj on June 29, 2005 >>RD3K915888
      elseif not l_r_prdha[] is initial and wgf_prdha = space.
        select ivbeln iposnr iKLMENG jvkorg i~werks
               imatnr imeins mprdha mmatkl
        from vbap as i
           INNER JOIN VBAK AS j
           ON ( jvbeln = ivbeln
                and j~vbtyp = 'C' )
           INNER JOIN vbuk AS k
           ON ( kvbeln = ivbeln
                and k~lfgsk <> 'C'
                and k~gbstk <> 'C' )
           INNER JOIN vbup AS l
           ON ( lvbeln = ivbeln and
                lposnr = iposnr
                and l~lfgsa <> 'C'
                and l~gbsta <> 'C' )
           INNER JOIN mara AS m
           ON ( mmatnr = imatnr
    {Start of insert by SRangaraj on June 21, 2005 >>RD3K915762
                and m~lvorm eq ' '
                and m~mstae ne '99'
    {Start of insert by SRangaraj on June 29, 2005 >>RD3K915888
                and m~extwg = '080' )
    }End of insert by SRangaraj on June 29, 2005 >>RD3K915888
           INNER JOIN marc AS n
           ON ( nmatnr = imatnr
                and nwerks = iwerks
                and n~lvorm eq ' ' )
    }End of insert by SRangaraj on June 21, 2005 >>RD3K915762
        into table int_records1 where ( i~abgru = '  '
                                     and i~klmeng > 0
                                     and m~prdha in l_r_prdha
                                     and m~matkl in l_r_matkl
    {Start of insert by SRangaraj on June 29, 2005 >>RD3K915888
                                     and m~labor in l_r_labor ).
    }End of insert by SRangaraj on June 29, 2005 >>RD3K915888
    endif.
        sort int_records1 by vbeln posnr.
        delete adjacent duplicates from int_records1 comparing
        vbeln posnr.
    *remove unnecessary records
        if not r_prdh3[] is initial.
        DELETE INT_RECORDS1 WHERE PRDHA+6(3) IN r_prdh3.
        endif.
    *get the schedule lines for all of the above records and
    *get the lowest schedule line date per so line item
         if not int_records1[] is initial.
         refresh int_records3.
         select vbeln posnr etenr mbdat into table int_records3
         from vbep for all entries in int_records1
                           where vbeln = int_records1-vbeln and
                                 posnr = int_records1-posnr and
                                 lmeng > 0.
         sort int_records3 by vbeln posnr etenr mbdat ascending.
         loop at int_Records1.
           loop at int_records3 where vbeln = int_records1-vbeln
                                  and posnr = int_records1-posnr.
             int_records1-mbdat = int_records3-mbdat.
             modify int_records1.
             exit.
            endloop.
         endloop.
         refresh int_records3. free int_records3.
         refresh int_records2.
    *get the deliveries and calculate the open quantities
        select vbelv posnv vbeln posnn rfmng plmin
                    from vbfa into table int_records2
                                  for all entries in int_Records1
                                  where vbelv = int_records1-vbeln
                                    and posnv = int_records1-posnr
                                    and VBTYP_N = 'J'. "Dels
    *calculate open quantities next
         loop at int_records1.
           clear wlf_lmeng.
           clear int_records2.
           loop at int_records2 where vbelv = int_records1-vbeln
                                    and posnv = int_records1-posnr.
           case int_records2-plmin.
             when '-'.
              wlf_lmeng = wlf_lmeng - int_records2-rfmng.
             when others.  "just add
              wlf_lmeng = wlf_lmeng + int_records2-rfmng.
            endcase.
           endloop.
           int_records1-klmeng = int_records1-klmeng - wlf_lmeng.
           int_records1-vbeln_dl = int_records2-vbeln.
           int_records1-posnr_dl = int_records2-posnn.
           modify int_records1.
        endloop.
        endif.
        delete int_records1 where klmeng le 0.
        refresh int_records2. free int_Records2.
    ENDFORM.                    " get_data
    *&      Form  build_detail
          text
    -->  p1        text
    <--  p2        text
    FORM build_detail.
        LOOP AT int_records1.
    *DO INDIVIDUAL MOVES - ITS FASTER THAN MOVE-CORRESPONDING
        move: int_records1-vkorg    to LS_DATA-VKORG,
              int_records1-werks    to LS_DATA-WERKS,
              int_records1-matnr    to LS_DATA-MATNR,
              int_records1-klmeng   to LS_DATA-KLMENG,
              int_records1-mbdat(6) to LS_DATA-YEARMONTH,
              int_records1-meins    TO LS_DATA-MEINS,
              int_records1-vbeln    TO LS_DATA-VGBEL,
              int_records1-posnr    TO LS_DATA-VGPOS,
              int_records1-vbeln_dl TO LS_DATA-VBELN,
              int_records1-posnr_dl TO LS_DATA-POSNR,
              int_records1-mbdat    to LS_DATA-WADAT_IST,
              int_records1-PRDHA    to LS_DATA-PRDHA,
              int_records1-matkl    to LS_DATA-MATKL.
        APPEND LS_DATA TO LT_DATA.
        clear: LS_DATA.
        ENDLOOP.
    ENDFORM.                    " build_detail

  • Report writer/Report painter - How to define the range on the selection scr

    Hi,
    I want to use one field "Fiscal year for CG breakdown" in my customized report in which user can select the year in range ie FROM - to - TO range.
    Can anybode tell me how do we define the range in the selection screen?
    I have tried using the General data selection.. but its not working.
    Edited by: Seema Nakhale on Oct 7, 2008 11:13 AM

    Hi,
    Create a variable for the Fiscal Year field in tcode GS11. While creating the variable for the field, use the option "Value Entry Only".
    Thereafter refer the variable in the "General Data Selection" for the field with the options "Set" and "Variable" both ticked for the fiscal year. Also enter the variable name created above in the field in General Data Selection.
    This will allow you to enter the fiscal year as range while executing the report.
    Regards,
    Ramanand

  • Bex Exclusion as per variable selection

    Hello SDN experts,
    We have a requirement where we need to filter(exclude) by some values (Example GL Account) when user selects previous month or any other historical months but we should include these values when user selectes current month. Is it possible with Bex?
    Also, If in the same report it is not possible we can create two , one for current month without exclusion and one with exclusion for historical month selection. But for the historical month we need to show only until previous month for month selection...Can any body suggest how to achieve this?
    thanks

    create RKF1 as
    your KF  restrict it with gl account values ( exlcude ) and  0calmonth ( cal year month )  characteristic infoobject with variable 0CMONTH.
    0CMONTH is sap defined user exit which return current month.
    STEP 2: right click on the variable 0CMONTH select value range OPERATOR LESS THAN and transfer it to right side ->.
    create RKF2
    your KF  restrict it  with  0calmonth ( cal year month )  characteristic infoobject with variable 0CMONTH.
    0CMONTH is sap defined user exit which return current month.
    CREATE CKF1 = RKF1 + RKF2.
    CKF1 will give u the desired result.

Maybe you are looking for