How to give a value range in export parameter (global class)

hi all,
I have created a class-method called get_po_date. In this i had export parameter as qmfe-qmnum. If i give qmfe-qmnum in import parameter in class, i am able to give only one value at one time, but i need a range of values at a time. Instead of qmfe-qmnum in associated type, i have given 'LXHME_RANGE_C12' ( a range table for char 12 ). the thing is i wanted to select this range in select-options. but still iam getting <b>not type compatible syntax error</b>. can any body solve my problem,
feel free to ask if any confusion with my question.
Best Regards,
abhilash.

Hello Abhilash
Instead of using a specific range (where field LOW and HIGH are of type QMNUM) you can use a <b>generic </b>select option (of type <b>RSDSSELOPT</b>). Have a look at the following sample report <b>ZUS_SDN_SELOPTIONS</b>.
*& Report  ZUS_SDN_SELOPTIONS
REPORT  zus_sdn_seloptions.
TABLES: qmfe.
DATA:
  gt_data          TYPE STANDARD TABLE OF qmfe,
  gt_data_x        TYPE STANDARD TABLE OF qmfe,
  gt_selopt        TYPE rseloption,  " generic table type for selopts
  gs_selopt        TYPE rsdsselopt.
START-OF-SELECTION.
  SELECT        * FROM  qmfe INTO TABLE gt_data
         WHERE ( qmnum BETWEEN '000000000001' AND '000000000500' ).
  gs_selopt-sign   = 'I'.
  gs_selopt-option = 'BT'.
  gs_selopt-low    = '000000000001'.
  gs_selopt-high   = '000000000500'.
  APPEND gs_selopt TO gt_selopt.
  SELECT * FROM qmfe INTO TABLE gt_data_x
    WHERE ( qmnum IN gt_selopt ).
  IF ( gt_data = gt_data_x ).
    WRITE: 'Selected data are equal.'.
  ELSE.
    WRITE: 'Selected data are NOT equal.'.
  ENDIF.
END-OF-SELECTION.
Since RSDSSELOPT and RSELOPTION are global DDIC objects they can be used in <i>public </i>methods.
Regards
  Uwe

Similar Messages

  • How to pass a value to the export parameter for a method (public instance)?

    Hello,
      I am trying ABAP OO newly. How to pass a value to the export parameter for a method (public instance) called in a report? This *export parameter has a reference type of structure.
    Thanks in advance,
    Ranjini

    Hi,
    "class definition
    class lcl... definition.
      public section.
        method m1 imporitng par type ref to data.  "now you can pass any reference to the method, but this way you have to maintain this reference dynamically inside the method (you can't be sure what that reference is really "pointing" at)
    endclass.
    "in program
    data: r_lcl type ref to lcl...
    create object r_lcl.
    call method r_lcl
      exporting
         par    =  "pass any reference variable here
    Regards
    Marcin

  • How to define a Value for an Attribute of an Class

    Hi,
    How to define a Value for an Attribute of a Class ...
    ( I need to change the value of an Attribute of a class in standard program ....
    Ex...
       cl_hrce_masterswitches=>infotype_framework_is_active
    Here infotype_framework_is_active is the attribute .. its value in standard program is 'X'... Now i need to change it as '  '.
    How to define it and set value as ' '.

    Hello Surendar
    The static attribute INFOTYPE_FRAMEWORK_IS_ACTIVE is read-only and there is not SETTER method to manipulate its value.
    However, the attribute is filled in the CLASS_CONSTRUCTOR:
    METHOD class_constructor.
        IF ce_is_active                 = true OR
           global_payroll_is_active     = true OR
           mngmt_global_empls_is_active = true.
          infotype_framework_is_active = true.
          perid_infotype_is_active     = true.
        ELSE.
          infotype_framework_is_active = false.
          perid_infotype_is_active     = false.
        ENDIF.
    ENDMETHOD.
    Thus, you need to analyze how attribute CE_IS_ACTIVE, GLOBAL_PAYROLL_IS_ACTIVE and MNGMT_GLOBAL_EMPLS_IS_ACTIVE are filled in the CLASS_CONSTRUCTOR.
    For sure you will find customizing settings that are responsible for this.
    Regards
      Uwe

  • Export of global class

    Hi everybody.
    I want export a global class (SE24, Object Builder) to a local class in a INCLUDE, but unfortunally the Object Builder has no export function.
    Does anybody know a way to change a global class to a local class?
    Thx.

    There's no easy way.  I'm at a bit of a loss why you'd want to replace a global class witha  local class that you include in your programs.  What do you gain?
    But if you insist, you can always cut and paste the public/private/protected sections of your class (making suitable modifications and assuming you're not on an old SAP version), and then you'd have to cut and paste the method implementations in as well.
    Printing a class to a the spool is a fairly good way of getting all its details.  Another alternative is to search these forums for where the includes that actually make up the class are - it should be fairly simple to write a program that would take that source code and construct local classes from it.   But I still don't see the point.

  • How to give pernr in range using LDB PNPCE

    I am using LDB PNPCE and in report category i want to give select option for pernr that will accept pernr in ranges also.So Please tell me how to give ranges of pernr.
    Thanx in advance.

    Hi,
    You mean that you want to set a range of personnel numbers as default on selection screen when running the report?
    If so, you can do that. That field is PNPPERNR, it is a select-option, set default values for it in event INITIALIZATION of your report.
    pnppernr-sign = 'I'.
    pnppernr-option = 'BT'.
    pnppernr-low = ....
    pnppernr-high = ...
    append pnppernr.
    Thanks

  • HOW TO ACESS DOMAINS VALUE RANGE PROGRAMTICALLY

    DOMAIN IS WITHOUT VALUE TABLE, BUT WITH FIXED VALUES,
    HOW CAN WE ACCESS THESE VALUES PROGRAMTICALLY,
    WELL NOT FOR VALUE REQUEST TO SEE THE VALUES BUT TO DISLPAY ALL THE VALUES ENTRED IN THE VALUE RANGE OF DOMAIN , WITHIN THE PROGRAM
    REGARDS

    Using the FM is probably the best way to go.
    report zrich_0001.
    data: idd07v type table of  dd07v with header line.
    start-of-selection.
    call function 'DD_DOMVALUES_GET'
         exporting
              domname        = 'RFBSK'    "<<--- Supply domain name here
              text           = 'X'
              langu          = sy-langu
         tables
              dd07v_tab      = idd07v
         exceptions
              wrong_textflag = 1
              others         = 2.
    loop at idd07v.
      write:/ idd07v-domvalue_l, idd07v-ddtext.
    endloop.
    Regards,
    Rich Heilman

  • How to give level value 'unknown'

    Hi there,
    When creating a dimension with OWB, we get for every level also a row with empty values voor de levels underneath.
    E.g.: Dimension customer: Level Total, level customer group, level customer.
    I get:
    =====================================
    Level_total customer_group customer
    Total NULL NULL
    Total Group1 NULL
    Total Group2 NULL
    =====================================
    This is generated by OWB automatically.
    Anybody any idea how to fill in 'Unknown' instead having it blank? I've looked if i can fill somewhere a property, but could not find.
    Any help is appreciated.
    Thanks
    Sandra

    hii vishal,
    this selct option i already taking from database.
    only i want to give constant value to this field ..
    u mean to write selection-screen  select-option in coding part of query/infoset?
    for this field?
    n give const value in this code/.?

  • Can we give where condition while db polling, if yes how to give the value

    Hi,
    We are polling a db table, can we give where condition in polling query. If we can give this then where to pass the value for the condition.
    eg:
    select * from xxtable wherexxname=#xxname;
    If above is the db polling query then how to pass #xxname value to db adapter.
    After polling we are deleting the row in the table.
    Thanks,
    Ra

    You can add where condition , but the value should be passed while configuring DB Adapter itself. You can't pass dynamic values to it as it is polling and gets activated once the process is deployed.
    Thanks,
    Satish
    http://soadiscovery.blogspot.com

  • How to configure axis value range in combo charts

    I am trying to create a combo chart, where one value axis contains values in the millions, and the other contains values less than ten. When I create the chart, it appears that I can only define one range that applies for both axis.
    Does someone know how I can configure the range for the second axis?
    Thanks in advance...

    Hi Dwayne,
    if you need to value axis, then you need two charts.
    You can create a second chart and make it transparent, then overlay the first chart. Maybe it works, but I'm not sure, because I didn't try it. But I suggest you to use two charts if the values are so drastically different.
    Best Regards,
    Marcel

  • How to fill Domain Value range Programatically?

    Hi Experts,
    I like to fill the domain range values from 'ZTABLE' ..
    so please help me how to fill the domain range values programatically .
    Thanks
    Banu.

    Hi Banu,
    You can update these values for Domain using Table *DD07L*.
    DOMNAME " Domain Name
    AS4LOCAL
    VALPOS
    AS4VERS
    DOMVALUE_L " Lower Limit
    DOMVALUE_H " Upeer Limit
    APPVAL
    So in program
    Fill your Work Area and update
    modify table DD07L where DOMNAME = 'YOUR_DOM_NAME'.
    Cheerz
    Ram

  • How to Pass Multiple Value Range From Query ?

    Hi,
    I have searched over SDN to find about how do we pass multiple value ranges from Query to SAP ODATA?
    But I have not found suitable answers so I am posting it here.
    If we need to pass a date parameter in Query which has a multiple range like  sales orders created date between 03/02/2014 to 05/07/2014.
    How do we phrase it in Query ?
    I tried as below but the IT_FILTER_SELECT_OPTIONS of /IWBEP/IF_MGW_APPL_SRV_RUNTIME~GET_ENTITYSET does not get filled up with the parameters
    How do we pass multiple values in Query?
    http://ctnhsapapp16.corp.ken.com:8000/sap/opu/odata/sap/ZCHAKRABK_MAINT_ORDERS_SRV/Maint_Orders?$filter=Maint_Plant eq 'US19' and B_st_dt gt datetime'2015-02-01T00:00:00' and B_st_dt lt datetime'2015-02-28T00:00:00'
    Thanks in Advance.
    KC.

    Hi,
    I Have Found solution to the Query posted above.
    Please find the URL's below for more clarifications.
    Revert for any suggestions please.
    http://ctnhsapapp16.corp.ken.com:8000/sap/opu/odata/sap/ZCHAKRABK_MAINT_ORDERS_SRV/Maint_Orders?$filter=Maint_Plant eq 'US19' and ( B_st_dt ge (datetime'2015-02-01T00:00:00') or  B_st_dt le (datetime'2015-02-27T00:00:00'))
    http://ctnhsapapp16.corp.ken.com:8000/sap/opu/odata/sap/ZCHAKRABK_MAINT_ORDERS_SRV/Maint_Orders?$filter=Maint_Plant eq 'US19' and ( B_st_dt ge (datetime'2015-02-01T00:00:00') and  B_st_dt le (datetime'2015-02-27T00:00:00'))
    Thanks KC.

  • How to give two values of same field in read Statment

    Hi,
    Please Tell me how to give the two values of same field in read statements Condition.
    i.e
      Read table it_tab with key matnr = '1' or matnr = '2'.
    With Regards
    Kesavaperumal

    Hi Kesavaperumal,
    <li>You can not use OR operator with READ TABLE statement.
    <li>You have to use different fields of the internal table in where condition.
    <li>If you want to compare with two values, you need to use LOOP statement.
    LOOP AT it_mara WHERE matnr = '1' or matnr = '2'.
    "Write code
    ENDLOOP.
    Thanks
    Venkat.O

  • How to get ATINN value based on material number and Class Type ?

    I have below SELECT stmt code which gives the correct value of atwrt based on materil no and ATINN.
    However in quality system, it is failing because in quality system "atinn" value is not 0000000381. It is different.
    So how can I get ATINN(Internal characteristic) value based on material number and Class Type?
    -Obtain the batch characterstic value for the Material******************
      SELECT atwrt
        UP TO 1 ROWS
        INTO v_charvalue
        FROM ausp
       WHERE objek = mcha-matnr
         AND atinn = '0000000381'   " 'US80_FRENCH_ON_LABEL'
         AND klart = '001'.
    THANKS N ADVANCE.

    Hi SAm,
    use the Below function module to get the Atinn for Atwrt for thr Class and MAterial combination..
    CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'
          EXPORTING
            classtype          = '023'       "Class type
            object             = w_object  "Material number with Leading zeros
            no_value_descript  = 'X'      "Default X
            objecttable        = 'MCH1'    "Table name Mara or MCH1 or MARC
          TABLES
            t_class            = t_class   "It return the Batch class available for the above combination
            t_objectdata       = t_char  "Return Batch characteristics(ATWRT) and their value ATINN in this table
          EXCEPTIONS
            no_classification  = 1
            no_classtypes      = 2
            invalid_class_type = 3
            OTHERS             = 4.
    Regards,
    Prabhudas

  • How to pass input value to the IN parameter in a function

    Hi ,
    I'm new to pl/sql programming.
    The below function is used inside a package and the package is invoked in visual studio.
    The function uses 2 input parameters.
    Out of which 'in_report_parameter_id' value comes thru job processor service 's job request.
    The second IN paramter values are hard coded in the function.
    I'm not able to understand this.
    If the values are hard coded , how to make sure that only the hard coded values are the right ones?
    Please anyone could explain to me?
    I really dont have good idea about how to pass INPUT parameter to the functions or procedure
    Is there any nice document which could give me good understanding about what are the ways or types we could pass values to the input parameter in subprograms?
    thanks in advance.
    CREATE OR REPLACE FUNCTION get_class_text_str
         in_report_parameter_id IN NUMBER,
         in_which                IN VARCHAR2 DEFAULT 'SELECT'
    RETURN VARCHAR2
    IS
             end_text            VARCHAR2 (50)   := '';
             my_class_text_str  VARCHAR2(10000) := '';
             my_class_value_str VARCHAR2(10000) := '';
         CURSOR class_text(c_1_text VARCHAR2, c_2_text VARCHAR2) IS
         SELECT c_1_text || report_parameters.report_parameter_value
                               || c_2_text
                               || report_parameters.report_parameter_value
                               || '" '
          FROM report_parameters
         WHERE report_parameters.report_parameter_id     = 3690
           AND report_parameters.report_parameter_group  = 'CLASS'
           AND report_parameters.report_parameter_name   = 'CLASS'
    GROUP BY report_parameters.report_parameter_value
    ORDER BY CAST(report_parameters.report_parameter_value AS NUMBER);
    BEGIN
         IF (in_which = 'SUM') THEN     
              OPEN class_text ( 'SUM(NVL("Class ', '", 0)) "Class ' );
         ELSIF (in_which = 'PERC')THEN
              OPEN class_text ( 'ROUND((("Class ', '" / "Total") * 100), 2) "Class ' );
              end_text := ', DECODE("Total", -1, 0, 100) "Total" ';
         ELSE
              OPEN class_text ( 'SUM(DECODE(bin_id, ', ', bin_value, 0)) "Class ' );
         END IF;
         LOOP
              FETCH class_text INTO my_class_value_str;
              EXIT WHEN class_text%NOTFOUND;
              my_class_text_str := my_class_text_str || ', ' || my_class_value_str;
         END LOOP;
         CLOSE class_text;
         my_class_text_str := my_class_text_str || end_text;
         RETURN my_class_text_str;
    END get_class_text_str;
    /Edited by: user10641405 on Nov 19, 2009 8:16 AM
    Edited by: user10641405 on Nov 19, 2009 8:30 AM

    This is not a design I would use, but should work if coded properly. I would probably build a reference cursor query as text and use one open fetch and close.
    You have 2 input parameters, in_report_parameter_id and in_which. I could not find where in_report_parameter_id was used in the program, but the value passed in for in_which is being used in IF logic to decide how to open the cursor. After the cursor is open rows are being fetched and eventually the cursor is closed.
    The values in_which are compared to are hard-coded. It is the programmer's job to make sure the values listed are the right values and the actions taken are also correct. Your program is assuming that if the first 2 values are not encountered the third one listed is the one you want.
    To pass input values to a procedure you merely provide the values as a literal or variable in the call, something like
    whatever := get_class_text_str(1,'SELECT');

  • How to pass multiple values to a single parameter in BW report URL

    Hi Experts,
    I am new to EP and learning .... i am stuck at one point where we need to pass multiple parameters to a BW report URL, this is the URL that we launch from BSP.... Suppose i have to pass different multiple values to a single parameter, how to do it....
    i m getting many answers to pass parameters to iviews, reports, but not specific to my case.. can u plz help me....
    Thanks in advance
    Priya Rai

    What is the prolem you are facing if you split the single date param as two parameters say startdate and enddate?
    If you pass as single string then you might have to split the same at reciever end.
    Are you trying any thing specific?

Maybe you are looking for

  • Charts: fixed series formatting

    Hi there, following scenario: I use a column chart in order to display 12 months rolling values (ACT, BUD, PY). Initially only one column (ACT) is shown per month. I have got three checkboxes (ACT (always checked), BUD, PY) that allow the user to dis

  • Where do I go to delete old messages and not SAVE any?

    Where do I go to delete old messages and not save any?

  • D110a Not Printing

    I have the D110a printer.  When I initially bought it and configured it, it worked.  Then a few months afterwards it stopped printing when I'd send print jobs from my Android phone (Droid X) via the assigned email address.  As recently as a couple of

  • Migrate emails between user accounts

    Hi there, I have a problem i need solve on my new Imac. I have migrated my emails from old imac to new imac and that worked ok. So i have my email folders now on the new imac in a separate user account. I now want to move my email folders on the new

  • How do I get the erase and sync message?

    I want to sync a new library from my iTunes into my iPhone 4 but I accidently clicked not to erase and sync, so now I want to know how to get the message of erase and sync to come back up. Does anyone know how to get the erase and sync message? Tons