Query:  Customer Exit variable not getting populated

Hello Experts,  I created a Customer Exit variable (ZPREV_MTH_OPS) in the query designer (7.0).  I also put the necessary code in the function module "Z_BWFI_QUERY_CELL_MANIPULTN", but the query variable is not getting populated when I run the query using RSRT.  The boxes for "Variable is ready for input" and "variable is without context" boxes when defining the variable.
This is my code in the exit:
case i_vnam.
    when 'ZPREV_MTH_OPS'.
     break-point.
      if i_step = 2.
        clear l_s_range.
        if sy-datum+4(2) = '01'.
          wa_prev_month = '12'.
          wa_prev_year = sy-datum+0(4).
          wa_prev_year = wa_prev_year - 1.
        else.
          wa_prev_month = sy-datum+4(2) - 1.
          wa_prev_year = sy-datum+0(4).
        endif.
        concatenate wa_prev_year wa_prev_month '01' into wa_datum.
        call function 'SLS_MISC_GET_LAST_DAY_OF_MONTH'
          exporting
            day_in            = wa_datum
          importing
            last_day_of_month = wa_datum2.
        concatenate wa_prev_year wa_prev_month '01' into wa_datum.
*        l_s_range-low = wa_datum.
*        l_s_range-sign = 'I'.
*        l_s_range-opt = 'BT'.
*        l_s_range-high = wa_datum2.
*        l_s_range-sign = 'I'.
*        append l_s_range to e_t_range.
        l_s_range-low = '20080901'.
        l_s_range-sign = 'I'.
        l_s_range-opt = 'BT'.
        l_s_range-high = '20080930'.
        l_s_range-sign = 'I'.
        append l_s_range to e_t_range.
      endif.
  endcase.
I also put a break point the exit, but it's not coming to the breakpoint. 
Any suggestions?
Thanks.

Josh,  the link you provided reminded me to include the code in the include ZXRSRU01 also, instead of just changing the function module.  Thanks for your help and all those who tried to help me.
case i_vnam.
   when 'ZREL12MTH' or 'ZPREV_MTH_OPS'.
     call function 'Z_BWFI_QUERY_CELL_MANIPULTN'
       EXPORTING
         i_vnam        = i_vnam
         i_vartyp      = i_vartyp
         i_iobjnm      = i_iobjnm
         i_s_cob_pro   = i_s_cob_pro
         i_s_rkb1d     = i_s_rkb1d
         i_periv       = i_periv
         i_t_var_range = i_t_var_range
         i_step        = i_step
       IMPORTING
         e_t_range     = e_t_range
         e_meeht       = e_meeht
         e_mefac       = e_mefac
         e_waers       = e_waers
         e_whfac       = e_whfac
       CHANGING
         c_s_customer  = c_s_customer.
endcase.

Similar Messages

  • Customer Exit Variable not working in BO-Webi Report

    Hi All,
    I have created a universe based on Bex Query.
    Bex query consists of a customer exit variable on Calendar year/month where in it will populate current calendar year month by default while executing the query. It works fine while executing in SAP BI Bex Analyser.
    I have created a universe based on the query. For Calender year/Month i got L00, L01, LOV values in universe.
    Based on the universe I have created a Webi report. I did not specify calendar year/month as query filters. While directly executing the Webi report, I get the calendar year/month variable screen. But the value for it not populated based on customer Exit code written in BI.
    What has to be done to get the customer exit values in variable screen.
    Thanks for your understanding.
    -- Selva

    Since you have customer exit variable in your bex query, it will be like a global filter in your universe.
    Execute the webi report and check whether you are getting only current month data.
    --- Thanks

  • Default value of BeX customer Exit variable not Displayed in WeBI??

    Hello Experts,
    We are stuck with a problem where WeBI report is created on top of BeX query and we are not able to see the default value of Bex Customer exit variable in WeBI run. Here is the complete scenario:
    1. One restricted KF is created in BeX, restricted with Customer exit variable on net Due date. And this variable is mandatory, ready for input, and Default value in calculated is user exit as current Week's Monday.
    2. So, by default KF data should be restricted to Monday of current week, if user does not change this value.
    3. Now, WeBI report is created on top of this Bex query, and all is working fine, i.e. we are getting variable as Prompt in WeBI, but Default value is not shown while Running the Webi Report.
    So, need your inputs on the same, if default values from BeX in WeBI is supported or not? If yes, why this is happening, and how to resolve it?
    Please notice, the restrcition is in KF only, it is not a separate restrcition on Net Due date in Filter area or in Defualt area of BeX
    and we are on SAP BW 7.1 and BOXI 3.1 SP4.
    Regards,
    Vipul
    Edited by: VIPUL GOYAL on Nov 23, 2011 9:44 PM

    Hi,
    See 1285993 - Support of Customer Exit Variables from BEx query into WebIntelligence via OLAP universe
    WebI will prompt when executed, but the default values calculated by the user exit  - do not appear.
    Note: If the BEx variable has property 'ready for input' set / enabled, then its WebI prompt shows ok, but no default value appears.
    Cause
    This behaviour expected 'by design' (in the context of the product's current limitations) as explained in the online guide below:
    Please refer to Chapter 7, page 44, document link here: http://help.sap.com/businessobject/product_guides/boexir3/en/xi3_sap_olap_universes_en.pdf
    Characteristic variable > processing type > Customer Exit  is "Supported, without user entry"                                                                               
    -->  This should be understood as meaning "User will not be shown a prompt"
    regards,
    H

  • Custome Exit Variable Not prepopulating Parameter of CRE Report

    Hi
    I am using a customer exit varibale to pre populate a parameter in a Bex query I have created.  When I run the bex query the customer exit variable populates the parameter just as it is supposed to.  However when I use the bex query in Crystal Reports for enterprise the customer exit variable does not pre populate the parameter.  Is there something I need to do to make sure that CRE recognises the customer exit variable or does CRE not recognises them?  If it doesn't recognise them is it possible to create CRE level Customer Exit Variable?
    Many Thanks in advance
    Neil

    Hi Alun
    Thanks but I'm in BW so Stored procedures are not really an option on this one.  I suppose my primary question is, is there a reason that Customer Exit Variable is not working as it is creating a lot of difficulties by not populating the parameters in the same way it does in the bex query I am using to develop my Crystal report.
    Thanks
    Neil

  • Customer exit variable to get weekly report

    Hi All,
    I have a requirement as following. there are 2 user selection variables.
    Selection variables  are v1: start date: Period Range (d1-d2)
    V2: Period : Values should be 1month, 3 months, 6months (these values should be populated from Customer exit variable itself)
    The report layout shoud show:
    Actual sales by week (for period selected in v1)
    Plan sales by week (for period value selected in v2)
    Can you please reply with the abap?
    Quick replies are much apprciated.
    Thanks
    Suman

    Hello,
    You can try with the following way:
    1) Create a new infoobject with  master data tick on and load it via flat file with the needed values like 1 month, 2 months etc.
    2) Now include this infoobject in the MPRO along with the other infoprovider. If not using MPRO please create and use one.
    3) IN the MPRO include and assign this infobject in one of the dimension.
    4) Now in the query include this infoobject in the filter and create an user entry variable and in its default value include #
    5) Now include calmonth in the query and create a variable of type user exit not ready for input and include iit for calmonth.
    6) Now create a user exit for variable on calmonth at i_step = 2.
    7) The logic can be simply reading the value from the i_t_var_range table for variable on the new infobject and based on the selection write routine to populate the months needed.
    8) Here note that while writing routine please make sure you read i_t_var_range for all values NE #.
    9) The only disadvantage is that we need to always include # entry along with other entries.
    Hope it helps!!
    Regards,
    Shashank

  • Alert variable not getting populated

    Hi ,
    I have configured alerts in my PI interface. I am getting alerts messages in my alert inbox(RWB), if there is some application error. But thr container variable ERRORMESSAGE is not getting pupulated. In Moni, I could see the trace where all the variables are populated. But, in my inbox, I am getting alert text empty.
    Please help.
    Thanks

    Hi,
    I think you you should use SXMS_ERROR_CAT, SXMS_ERROR_CODE while creating alert category. I am not able to find the variable ERRORMESSAGE in alert category creation.
    Regards
    Aashish Sinha

  • Character variable not getting populated

    Hi,
    I am facing  a strange situation in the below piece of code.
      CLEAR:g_ltx, g_letter_dated, g_s_data-letter_dated.
      SELECT SINGLE ltx FROM t247 INTO g_ltx
             WHERE spras = 'EN' AND
                   mnr = g_month.
      CONCATENATE g_date g_ltx g_year INTO g_letter_dated
              SEPARATED BY space.
      g_s_data-letter_dated = g_letter_dated.
    Both g_s_data-letter_dated  and g_letter_dated are charcater of 255 length.
    The value '01 September 2009' of g_letter_dated is not getting assigned to g_s_data-letter_dated.
    Can anybody tell me the reason and how to rectify it.
    Thanks & Regards,
    Soumya.

    My code is like this::
    START-OF-SELECTION.
    Populate pnpwerks based on MOLGA specified
      PERFORM populate_pnpwerks.
      g_mail = s_mail-low.
    *Letter generated date.
      g_year = sy-datum+0(4).
      g_month = sy-datum+4(2).
      g_date = sy-datum+6(2).
      CLEAR:g_ltx, g_letter_dated, g_s_data-letter_dated.
      SELECT SINGLE ltx FROM t247 INTO g_ltx
             WHERE spras = 'EN' AND
                   mnr = g_month.
      CONCATENATE g_date g_ltx g_year INTO g_letter_dated
              SEPARATED BY space.
      g_s_data-letter_dated = g_letter_dated.
    GET pernr.
    g_year, g_month and g_date are declared in a top include globally as:
    DATA:    g_year(4) TYPE c,
          g_month(2) TYPE c,
          g_date(2) TYPE c,
          g_ltx TYPE t247-ltx,
          g_letter_dated(255) TYPE c.
    Regards,
    Soumya.

  • Behavior of customer exit variables (used as prompt) in a workbook

    Hi All,
    We are on NW2004s. I am using a customer exit variable in the prompt for my query then saved the query as a workbook.
    1. When I run the query the customer exit routine/program is called and the selection screen variable is populated with the correct value.
    Ex. Calendar year variable is a prompt variable defined as customer exit variable that gets the current year.
    when you run the query the prompt for calendar year shows "2007" as default value. this is correct.
    2. when I run the workbook using this same query, it looks like it is not executing the customer exit program. The value in the calendar year prompt is whatever the last value used when the workbook was last ran.
    I also placed a breakpoint in the customer exit program (EXIT_SAPLRRS0_001) to check if it is being called and it looks like it isn't.
    Is there a configuration/property that I should enable/check to make sure that customer exit variables used as prompts works in workbooks? Is this a bug? Anybody else have issues with using customer exit variables as prompts in their workbooks?
    Thanks in advance,
    Malou

    Hello Marilou,
    See the abswer I got from the 1st response on my question
    Save and reuse variable option in 7.0
    It may be a good help.
    Variables seem to be an understated item in the documents.
    Kind regards
    Message was edited by:
            BI developer

  • Error creating Customer Exit variable, please help

    Hi Experts,
    This is the scenario, I need to obtain the convertion rate from the table TCURR in order to convert several currencies to USD, so I created a Customer Exit variable that gets the Period and based on that obtains the conversion rate for the last day of the given month from TCURR, the problem is when I created the Formula Variable to get the value from the Customer exit variable I got the following error:
    'ZVARREGEXIT' ALREADY EXISTS; SELECT A DIFFERENT NAME.
    But in not using that name anywhere on my variables creation, Im doing something wrong? How can I check wheres is that variable being used.
    Ideas, comments are always welcome and appreciated.
    Regards.

    Hi Ed,
    Open Admin Workbench (RSA1) and choose Transport Connection --> Object Types --> Query Elements --> Variable --> Select Objects. Find the variable of interest and transfer it back to the main screen, then right-click and choose 'Display Description'. That will show you a "where used" list of queries, workbooks, etc.
    Next, you can use the previous technique to open one of the queries, find the variable in the query, and determine which InfoObject it is associated with.
    Hope this helps!
    Regards,
    Saurabh

  • Concatination of Two dates in customer exit Variable

    HI Expert ,
    I am writting customer Exit Variable to get Records from user entered Dates .
    Eg. In Variable Screen of Bex report i have 2 Variable LYDate & TY Date both of them are As "Mutiple Single Value" & "Mendetory".
    If we give LYDATE and TYDATE Date range as,
    LYDate - 01/2013 - 06/2013
    TYDate - 01/2014 - 12/2014
    So I need ABAP Code which will get Value Range from 01/2013 from LYDATE and 12/2014 From TY DATE . So Query will Get data for 01/2013 TO 12/2014 (2 Years Data).
    ZCALYEAR (Cusomer Exit)  = LYDATE (01/2013)  TO TY DATE(12/2104).
    Please provide step by step ABAP Code to Achiev above issue. Points for Sure...
    Thanks,
    GB

    Hi,
    Some code like this will solve your issue:
    CASE I_VNAM.
       WHEN 'NEWVARIABLE'.
       IF I_STEP = 2.
          READ TABLE I_T_VAR_RANGE INTO LOC_VAR_RANGE WITH KEY VNAM = 'LYDate'.
          If sy-subrc =0.
              CONCATENATE LOC_VAR_RANGE-LOW(4) INTO L_S_RANGE-LOW.
              READ TABLE I_T_VAR_RANGE INTO LOC_VAR_RANGE WITH KEY VNAM = 'TYDate'.
              If sy-subrc =0.
                   CONCATENATE LOC_VAR_RANGE-HIGH(4) INTO L_S_RANGE-HIGH.
                   L_S_RANGE-SIGN = 'I'.
                   L_S_RANGE-OPT = 'EQ'.
              APPEND L_S_RANGE TO E_T_RANGE.
            endif.
          endif.
        endif.
    endcase.
    Regards
    Yasemin...
    Just realized that you need the year. Message was edited by: Yasemin ULUTURK

  • Problem in transporting the Customer exit variable

    Hi all,
    i have careated a variable to capture the current date in my report, with the processing type, Customer Exit. and, its getting populated fine in my DEV environment. basically, i have to compute the number of days, in which net due date is being compared to the current date.  when i transport this to the QA environment, the values for number of days is gettting some junk value, wherein in DEV its showing the exact values. It seems i have to take cetain measures in transportation of the Customer Exit.
    please advice.
    Thanks in advance
    Sneel

    Hello ,
               In the Quality after you run the report check in the layout option>display text elements> variables and check what value is displayed for the use exit variable , if it is correct then problem may be in the selection you gave when you run the report if the user exit variable value is wrong , then set a break point in the code and run the report from rsrt and check where the error is.
    hope it is clear
    assign points if useful

  • How to change a customer exit variable in columns

    Hallo Experts,
    i have a query with two columns. In the first column is a customer exit variable, who get filled with the actual calyear. In the second column is the same variable with an offset -1.
    When i execute the query, in the first column i can see the year 2007 and in the second column i can see 2006. That´s ok.
    Now i want to change the year (dynamically) in a filter 2007 in 2005. The result should be in the first column 2005 and in the second column 2004.
    What can i do?

    Hi Jens,
    As I understand the scenario, you have two RKF or selections in column 1 and 2, one is restricted with variable ZYear, the other with the same variable, offset - 1 and variable ZYear provides current year.
    I think there is no way to change years dynamically in a filter, but you could solve the issue by refreshing the query and overwrite default value provided by customer exit.
    To achieve this, please change variable and check 'Ready for input' in change dialog..
    If this shouldn't work, please let me know details a variable definition and customer exit.
    Have a nice w/e
    Joe

  • Payment Terms not getting populated on Intercompany Invoice document(FB50L)

    Hi All,
    I am facing an issue with the Vendor and/or Customer payment term on the inter-company invoice posted via FV50L/FB50L.
    We have defined companies as vendors and customers so that we could do the inter-company posting. The inter-company processing is done by FV50L/FB50L with postings to the GL accounts in respective company codes directly. Once it gets posted, SAP automatically creates 2 document: Vendor invoice and Customer invoice. The vendor invoice document would have the credit line item created automatically and so is the debit line item for the customer invoice.
    However, the payment terms from the vendor and/or customer master is not getting populated on the credit / debit line items generated automatically.
    I have verified the payment terms on vendor and customer, OBYA config, field status group for posting key & the recon account, authorizations and these thing look good.
    Have anyone come across this issue before? Please let me know.
    Point will be assigned to valuable suggestions!!
    Thanks very much for your help.
    Anish

    Hi Nakula,
    Payment term gets populated correctly from the vendor/Customer master data in case of FB60/FB70 resp. The issue is only with the automatic Intercompany Vendor and Customer line items created where it does not populate the payment terms.
    regards,
    Shreya

  • Customer Exit variable of Query not working in View

    Hi,
    I have a customer exit variable in my query to calculate the last 6 month period on Calendar month. I have used 0CMONTH for the same and then using offset of 6 on its value range to get it.
    Now, I have many views based on this query, which should ideally be having the same filter condition for the calendar month, but it is not happening. Although, it is working fine for the query! The views do not seem to be catching the selection correct.

    Hi there,
    As far as I Know, yes they exist. The only difference here, is that you build a query with a selection screen, and  you execute the query with some selection parameters, and therefore all customer exit variables, offsets, etc, will be read and changed at the runtime execution of the query, and you can rearrange your query visualization drilling down free char., making filters, etc. and storing that visualization in a view.
    If you save your view and execute it afterwards, you'll get the same selection parameters to input, the same offsets, etc, that you have with the query, but with a visualization stored by you.
    So that should have been working.
    Diogo.

  • Query Drilldown does not Invoke Customer Exit Variables

    We have a problem with performing a drilldown in a BEx Analyzer reprot, basically the client is a Trading company and they have inter company trading. We are using the Profit Centre as one of thre u201CFree Characteristicsu201D in the query and hence we are able to drilldown on a Characterictc by Profit Centre.
    We are using a couple of BEx query variables (Customer Exit variables) to determine the inter-area and extrenal area profit centres and these profit centres will be different based on the level of Hieracry node selected when the query is initially executed. For example if we assume a hierarchy with has one root node, 3 children under the root node and 2 grand-children under each of the 3 child nodes, now if we are at the root Node of the Hierarchy then every profit centre is internal and there are no external profit centres,  similarly if we are at the 2nd node (i.e. one of the child nodes) then everything under that node is internal and everything in the other 2 child nodes is external and so on.
    This is where the issue starts for us, since on the report if we select the the node we want to see the results for at the query rumtime (i.e. the Customer Exit Variables are invoked at I_STEP=2 and they select the other nodes of the hierarcy if any and group them into either external or internal)  then the results are correct. Now if we were to drilldown, i.e. We selected the root node and we drilldown on to see for example of the child nodes then the result are not correct, this becomes apparent when we drilldown further to the grand-child nodes.
    One logical explaination is that when we are doing the drilldowns the customer exit variables are not being invoked in the BEx analyzer report and hence they are not grouping the sums for the internal and external profit centres relevent to node selected in the Drill down.
    Does anyone have any suggestions regarding how to make this query work properly or show the correct results in BEx Analyzer (ideally), I have considered the Workbooks option but the client does not want Workbooks.
    Please let me know if there is a program etc we can customise to ensure that the Customer Exit variables logic is used when the user does a drilldown in the query or any other way to make it work.
    Many Thanks
    Jack

    Hi
    Just to aid anyone who is thinking what to do in a similar situation, I am aware that RRI or using workbooks are a couple of good alternatives (just that these are currently not being considered by the client, hence I am asking here).. Also, if someone has Business Objects WEBI then we can satisfy the requirement by creating a new Webi Report for each of the nodes and displaying it (similar to Workbooks but much nicer and faster) or we can get the Webi to execute the variables again during the drilldown... Unfortunately the client is not using Webi either... So the solution has to be in BEx Analyzer / Query designer based...
    If you have any thoughts on how I might be able to do what I want to do then please feel free, I am quite confident that I am not the 1st person to come accross this issue and someone somewhere has solved this issue. 
    Thanks

Maybe you are looking for

  • Upgrade from Snow Leopard to Lion, not Mountain Lion

    Hey there, I have a MacBook from 2007 that I have recently added RAM and harddrive space to. I picked up the computer today from the store and went to download Mountain Lion, but my computer isn't compatible. Fair enough, it's old. So I want to upgra

  • Multu Year purchase orders or overlapping year Pos

    Hi, we are on ECC 6 , EHP4 and implementing funds managment but only BCS part. We will go live on 1st April 2015. We have a scenario, whereiin we issue purchase orders for more than one year that is mostly for 3 years. Now How do I handle this scenar

  • Multiple malfunctions on my iPad mini

    My iPad mini has taken on a life of its own.  Apps open and close on their own, components of games either move on their own or lock and won't move at all, (i.e. jigsaw puzzle pieces in Magic Puzzle app spin and move in and out of puzzle area without

  • How can I get Encore CS6 back after CC Cleaner tool removed it?

    I was working on a project on my home computer using CC and now that I'm back at the office, the CS6 and CC stuff doesn't play nice. I was going to upgrade the Creative Cloud but it kept popping up the A12E1 error. So I followed Adobe's 4-step fix wh

  • PlaceMultipagePDF script - another page size

    I'm trying to use the PlaceMultipagePDF.jsx script to place a pdf into InDesign CS4. It always places using standard letter size with the upper left corner of the frame at zero zero on the ruler. But the PDF I'm placing, and the InDesign document I n