Cust Exit Query Err

I have a query that takes a dept_no=10 as the default value and then displays as follows:
dept_no, hrs, tot_hrs
I have another query from the same infocude that has a variable like my_var with the characteristic dept_no. In this query my_var is defined as a customer exit referencing dept_no with the details single value and optional.
For this query the customer exit the i_step=1 and I used the following code:
     <snip>
      l_s_range-low = '10'.
      l_s_range-sign   = 'I'.
      l_s_range-opt    = 'EQ'.
      APPEND l_s_range TO e_t_range.
Value "10" for user-exit variable MWHTEST1 is invalid
Variables contain invalid values.
System error in program CL_RSR_OLAP_VAR and form INIT-02- (see long text)
What I am trying to do is simulate the first query and trying to programitically populate the defualt value.
I am missing something!!!
Any help is appreciated.

That did it for me .... awesome. I had tried this
      l_s_range-low = '10'.
      l_s_range-low = 10.
This ultimately worked for me:
       DATA:  mydept(4) TYPE c.
      mydept = '0010'.
      l_s_range-low = mydept.
      l_s_range-sign   = 'I'.
      l_s_range-opt    = 'EQ'.
      APPEND l_s_range TO e_t_range.
and then i made the change to multiples as was suggested and did the following:
      mydept = '0014'.
      l_s_range-low = mydept.
      l_s_range-sign   = 'I'.
      l_s_range-opt    = 'EQ'.
      APPEND l_s_range TO e_t_range.
      mydept = '0016'.
      l_s_range-low = mydept.
      l_s_range-sign   = 'I'.
      l_s_range-opt    = 'EQ'.
      APPEND l_s_range TO e_t_range.
In the debugger I looked at e_t_range and saw all 3 value lines.
I'm going to try to call a table and get a range of values, and append them.
Thanks for your help.

Similar Messages

  • Cust Exit variable- refresh option is not working

    Hi Experts,
    My requirement is:
    I am passing a value from manual i/p variable to cust exit variable based on certain condition. The functionality is working fine. But when I changed the value of my manual i/p variable using change variable value option of BEx analyzer the new value is not getting reflected in customer exit variable.
    BR,
    /venu.

    Hi ,
    CODE:
    DATA: l_s_range TYPE rsr_s_rangesid,
    loc_var_range LIKE rrrangeexit,
    v_period1(3) TYPE n,
    v_period2(4) TYPE n,
    zktansw TYPE /bic/oigwktansw.
    clear: zktansw,l_s_range,loc_var_range.
    IF i_step = 2.
    loop at i_t_var_range into loc_var_range where vnam eq 'GFA_CONACC'. --- Manual input var
    IF loc_var_range-low+0(5) = '00160'.
    CONCATENATE loc_var_range-low+0(6) '9999' INTO zktansw.
    l_s_range-low = loc_var_range-low.
    l_s_range-high = zktansw.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'EQ'.
    APPEND l_s_range TO e_t_range.
    ENDIF.
    endloop.
    ENDIF.
    Kindly suggest your inputs.
    BR,
    Venu

  • Exiting "Query Mode"

    Hi,
    When my form is loaded it is set to query-mode, however when I click the exit button, the form won't close. I have to manually press Ctrl-Q to exit query-mode and then re-click exit.
    If at all possible I would like to change this so that query-mode is aborted programatically.
    I have read through the documentation but struggled to find a procedure that would do it for me. Abort-Query doesn't work until a SELECT statement is being processed.
    Any ideas guys?
    Reason for wanting it to exit programatically is if the user enters the form by accident and clicks exit immediately they will soon become annoyed using Ctrl-Q every time.

    Try creating an ON-Message trigger which does nothing if the message code is 40353.
    Take care not to override ALL messages
    do something like that:
    declare
    v_message_code number := MESSAGE_CODE;
    v_message_type varchar2(3) := MESSAGE_TYPE; -- e.g. frm
    v_message_text varchar2(50) :=
    substr (MESSAGE_TEXT,1,50);
    begin
    if v_message_code = 40353 then
    null;
    else
    --display the message
    message( v_message_type || '-' ||
    TO_CHAR (v_message_code) || ': ' ||
    v_message_text);
    end if;
    end;
    Hope this helps.
    Regards,
    AA

  • Simple report query err

    hai friends
    i got an error on the following report. please mention how to rectify the error ERR: COMMA WITHOUT PRECEDING COLON(AFTERSELECT)
    thanks & regards
    vallamuthu
    REPORT ZREP_PURCHASE_ORDER .
    TABLES: EKKO, EKPO.
    DATA: BEGIN OF IT_PURORDER,
    EBELN LIKE EKKO-EBELN, "STO NUMBER
    BEDAT LIKE EKKO-BEDAT, "DOCUMENT DATE
    BSART LIKE EKKO-BSART, "DOCUMENT TYPE STO/PO.
    LIFNR LIKE EKKO-LIFNR, "VENDOR NAME
    WERKS LIKE EKPO-WERKS, "SUPPLYING PLANT
    END OF IT_PURORDER.
    SELECT-OPTIONS
    S_EBELN FOR EKKO-EBELN.
    START-OF-SELECTION.
    SELECT ABEDAT ABSART ALIFNR BWERKS
    FROM EKKO AS A INNER JOIN EKPO AS B ON AEBELN = BEBELN
    INTO ( IT_PURORDER-BEDAT, IT_PURORDER-BSART,
    IT_PURORDER-LIFNR, IT_PURORDER-WERKS )
    WHERE A~EBELN = S_EBELN.

    Declare IT_PURORDER as internal table then use following code
    REPORT ZREP_PURCHASE_ORDER .
    TABLES: EKKO, EKPO.
    DATA: BEGIN OF IT_PURORDER <b>occurs 0</b>,
    EBELN LIKE EKKO-EBELN, "STO NUMBER
    BSART LIKE EKKO-BSART, "DOCUMENT TYPE STO/PO.
    LIFNR LIKE EKKO-LIFNR, "VENDOR NAME
    BEDAT LIKE EKKO-BEDAT, "DOCUMENT DATE
    WERKS LIKE EKPO-WERKS, "SUPPLYING PLANT
    END OF IT_PURORDER.
    SELECT-OPTIONS
    S_EBELN FOR EKKO-EBELN.
    START-OF-SELECTION.
    SELECT ABEDAT ABSART ALIFNR BWERKS
    FROM EKKO AS A INNER JOIN EKPO AS B ON AEBELN = BEBELN
    INTO CORRESPONDING FIELDS OF TABLE IT_PURORDER
    WHERE A~EBELN IN S_EBELN.
    else remove the space IT_PURORDER-WERKS in select query.
    SELECT ABEDAT ABSART ALIFNR BWERKS
    FROM EKKO AS A INNER JOIN EKPO AS B ON AEBELN = BEBELN
    INTO ( IT_PURORDER-BEDAT, IT_PURORDER-BSART,
    IT_PURORDER-LIFNR, <b>IT_PURORDER-WERKS)</b>
    WHERE A~EBELN <b>IN</b> S_EBELN.

  • Customer Exit query question

    Hello Experts -
    I have a characteristic which has the text: "04 Parts 25%".
    I need to use the 25% part in a calculation.
    Can I use a customer exit to parse out the 25% and use the exit in a formula variable and use the formula variable in my calculation?
    If yes, which customer exit should I use? EXIT_SAPLRRS0_001 is for Global Variables. Can I use this same exit? I'm confused about the I-Step part also.
    Can someone please help?
    Thanks a lot in advance.

    Hey its simple
    Create your project in CMOD and assign component EXIT_SAPLRRS0_001
    doublen click on this and put your code in ZXRSRU01
    If you know ABAP then its very easy here you put your code in 3 events
    1. I_step1 : suppose your variable name is A and you wann populate F4 help just append values in i_val.
    Code : CASE i_vnam.
    WHEN 'ZICCALDAY'.
    IF i_step = 1.
    LV_CALDAY = SY-DATUM - 1.
    ls_range-low = '00000000'.
    ls_range-high = LV_CALDAY.
    ls_range-opt = 'EQ'.
    ls_range-sign = 'I'.
    APPEND ls_range TO e_t_range.
    ENDIF.
    2. I_step2 :Put your code here
    CASE i_vnam.
    WHEN 'ZVCPREYRCAL'.
    IF i_step = 2.
    READ TABLE i_t_var_range INTO LS_T_VAR_RANGE
    WITH KEY vnam = 'ZICCALDAY'.
    LV_CALDAY = LS_T_VAR_RANGE-high.
    CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
    EXPORTING
    I_DATE = LV_CALDAY
    I_MONMIT = '00'
    I_PERIV = 'V3'
    IMPORTING
    E_BUPER = LV_POSTPER
    E_GJAHR = LV_FISCYEAR.
    LV_FISCYEAR = LV_FISCYEAR - 1.
    ls_range-low = LV_FISCYEAR .
    ls_range-opt = 'EQ'.
    ls_range-sign = 'I'.
    APPEND ls_range TO e_t_range.
    ENDIF.
    WHEN 'Variable1
    3. I_step3 :
    Thats it
    If any query revert back
    Need any doc give your id will send u the same
    Regards
    Ankit

  • Simple sql query err

    HI all,
    with the below query i want to update status of outer table jo_orders to FF ...
    where select query returns status as UF(all 284 rows it returns with status UF)
    i want all the matching as FF in outer jo_orders status to FF
    Kindly help
    update jo_orders set
    status='FF' where (select jii.status from jo_orders jii, picking_lists pil where jii.jo_id=pil.ext_sys_ref_no
    and pil.status='FF'and jii.status in('UF') and Jii.created_on
    between to_date('21-MAY-2006') and to_date('30-MAY-2006')) ='UF';
    ERR--i get is ----single row subquery return more than one row..

    Hi,
    Don't you need to join your subquery with the main updating table ?
    I would try this :
    update jo_orders jii
    set jii.status='FF'
    where jii.status = 'UF'
    and Jii.created_on between to_date('21-MAY-2006')and to_date('30-MAY-2006')
    and exists (select 1
                from picking_lists pil
                where jii.jo_id=pil.ext_sys_ref_no
                and pil.status='FF')Nicolas.

  • Material Master User-Exit Query?

    Hi..
    I want to implement a change pointer for a material master in my system.
    Can I use the already existing message type / IDOC type or do I need to create a new IDOC type.
    And if yes, please tell me the step by step procedure in short:-)
    I was thinking of using a user-exit EXIT_SAPLMGMU_001 wherein I will fill a customised Z-Table on the basis of Plant ie. if it is my plant then I'll capture that material in my Z-table(Used a simple If-Endif)
    And later I will create a customised report to run BD10 with those materials and then I will delete all those records from my Custom report.
    But now I am facing a strange problem, that if the user changes only the basic data(first and second views in the material master screen) then , I can't capture that material in my Z-table because, I am using Plant key in my IF-Endif condition(that coding is done in the user-exit itself) and the plant is coming from the Structure WMARC which is one of the import parameter in the user-exit-->EXIT_SAPLMGMU_001.
    So, I think unless and untill the user makes changes in the views related to Plant, we wont be able to capture those materials.
    So, I want to know that is there any alternative to it?
    Thank you.

    Hi,
    The plant and all the plant dependent data for a material will be in importing parameter WMARC. If this table is not being populated is becouse you are creating only the basic material views, otherwise, that table should contain data.
    Regards,
    Jose

  • Customer exit query

    Hi Experts
    I have a requirement, which says as below.
    As in report we have input date to enter , when user enters input date for instance oct 2010, the next column should show previous year oct 2009 results too. Can anyone has a document to create customer exit variable.
                      Thank you.

    Hi Srini,
    You can achieve this by creating a replacement path variable of type customer exit with off set of -12 so that it will display the previous years values as you want.
    OR
    directly if you have a standard variable for the date filed set an offet of -12 for and restrict the date fields with the KF to get the values of previous year.
    Regards
    KP

  • Can we Pass two variable values in to one Varaible which is Cust Exit?

    Hi all,
    Can we pass two Variable values to a Variable which is Custexit?(For Example posting Period and the fiscalyear in to the FicalPeriod )
    Regards
    Kiran

    Hello,
    For that example you had to "convert" both post period and fiscalyear into fiscalperiod, and yes it is possible, but not throwing up the two values, you had to do it yourself in the user exit code.
    Diogo.

  • User exits query

    Please send me some documents on User Exits based scenarios in SD.
    You can forward the scripts to [email protected]
    Thanks
    Adi

    Hello Aditya,
    Could you please fwd the mail to
    [email protected]
    [email protected]
    Thanks n advance
    Regards
    innova

  • Pass Cust exit var to BADI

    Dear all,
    Can anyone please let me know how to pass the result of customer exit variable to BADI METHOD IF_EX_RSR_OLAP_BADI~COMPUTE .
    Regards..
    Bala

    Hi,
    You can do that using the shared memory concept. i.e. Import and Export values in the shared memory. Just make sure that while importing the values in your BADI you will have to use the same name on which you are exporting the values.
    Regards,
    Durgesh.

  • Cust Exit Help

    Gurus,
       I have Variable "Month/Cal Year" which is required,
       that variable is filled with field "Settle Date", when
       user enters 07/2003 report will display all
       "settle dates" that fall in that month/year.
      now the  new requirement is i have another field
      "trade date" which will take the same variable
      "Month/Cal Year" value and report all matching
      "trade date" values. user doesn't want to add another
      variable for trade date and enter the same value.
      i was asked to do this in Customer Exit.
      can someone please help me the coding...
    Thanks a ton.

    Hi,
    Wid your new requirement basically you need MTD (from first date to current date)
    Go to Columns area in BEx and Create a Structure-> Under that Create a New Formula and Inside that In Formula Area
    1) Create a Customer Exit variable (wid formula value) say ZVARCEP on Calendar Date with Mandatory and not ready for input
    And write this code.
    DATA: First_day like sy-datum.
    DATA: current_period(6) like char.
    WHEN 'ZVARCEP'.
    CLEAR L_S_RANGE.
    IF I_STEP = 2.
    current_period = sy-datum+0(6).
    CONCATENATE current_period '01' INTO l_s_range-low(8).
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'EQ'.
    APPEND L_S_RANGE TO E_T_RANGE.
    ENDIF.
    2) Create a Customer Exit variable say ZVARCEP2 on Calendar Date with Mandatory and not ready for input
    And write this code.
    DATA: today like sy-datum.
    WHEN 'ZVARCEP2'.
    CLEAR L_S_RANGE.
    IF I_STEP = 2.
    l_s_range-low = sy-datum.
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'EQ'.
    APPEND L_S_RANGE TO E_T_RANGE.
    ENDIF.
    For screen shot...refer this link
    http://www.sd-solutions.com/documents/SDS_BW_Replacement%20Path%20Variables.html
    Regards,
    San!
    if helpful, assign points

  • Using cust. exit: IHCL0001

    Hello all,
    I would like to know when the customer exit runs.
    We need to replace class type and class number of equipment master data when a production order is released or GI and the system make materials having serial numbers.
    Reading the help document of the customer exit, it seems to do as I expect.
    When I set break-point and made a production order released and save, I could not see a debug screen and it did not come to break-point.
    Could you advice us?

    Hi,
    It is not harmful but as As long as the exit is not replaced by SAP there is no need to convert a CMOD exit to a BADI.
    But same time not all BW CMOD enhancements have been converted to BADIs.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/biw/a-c/customer%20enhancements%20and%20userexits%20in%20bw%20-%20sap%20netweaver%20%20know-how%20network%20webinar.pdf
    Regards,
    San!
    if helpful, assign points

  • Customer Exit Variable Period 000 is not valid in financial year variant Z2

    Hi all,
    I am trying to get the week number from a particular posting period. But I get this error when I execute the Query:
    Error Group
    RFC_ERROR_SYSTEM_FAILURE
    Message
    SYST: Period 000 is not valid in financial year variant Z2
    I checked in "FIRST_DAY_IN_PERIOD_GET" FM and it is not accpting period 000 for PERIV Z2. It works fine for all other periods.
    Does anyone have an idea on this?
    Thanks.

    Simon,
    So do you think that there is a problem in my Query restrictions? You ask me to restrict from 0 - 12, but this period is calculated based on the SY_DATUM in a cust. exit variable. And this period is being used to pull week number. So, do I need to change the code?
    But I already have another query which is similar to this, only ready for input options are missing in the new one. The older one is working fine but the I have problem with this.
    Any more ideas?
    Thanks!!

  • Query Run Issue

    Hi Gurus
    We have developed queries across areas like SD, FI, CO etc....
    most of them are running fine...but a few of them get stuck...even when we open them in query designer and try to save the query into a new one, the saving activity goes into a loop....also when i add a break point in the exit (some use cust exit variables), at rsrt2, on clicking execute and debug, the next screen doesnt open.
    Surprising thing is that till yesterday the queries were running just fine. And we havent made any new changes on them!!!
    Any help is appreciated (with points)
    Prakash

    Hello,
    Does it give some errors? Maybe you have deleted some global objects like variables or RKF, CKFs etc while changing some other query....
    Please check the same.
    thanks,

Maybe you are looking for

  • Can I Upgrade Directly to OS 10.4 from OS 9.2.2. on a Power Mac G4 400Mhz?

    If not, way is the shortest path? I have 1.12 GB RAM and 4.6GB of HD free space and would also like to run OS 9.2 applications for a short while. Please help. Thank you.

  • Media Browser does not load photos

    iWeb media browser does not load photos. iTunes and Movies panels do work however. I do have multiple iPhoto libraries, maybe that has something to do with it?

  • Move my photos from Aperture 2 to LR3

    Snow Leopard. I once used Aperture 2 (I don't know why) and I would like to get my photos from there and import them into LR3.  I have about 2000 or so photos in A2.  I don't know how to do this, as the Aperture Library just shows up as an icon and w

  • Some problems

    Some problems I have just upgraded my computer to an AMD 64 3000+. I am having some problems: My computer reboots sometimes. My second hard drive does not always get detected. And is a result of 5800 points on 3dmark03 good? My specs are: AMD 64 3000

  • Will a dead spot reduce the value of my iphone 3gs

    right seen as in a month or two the new iphone 5 is coming out i will decide to sell my phone on ebay around september. i have had a little dead strip at the  very top of the screen which it only seems to effect the top search bar on safari. you can