Customer Exit Problem in Bex

Hi Experts,
I don't know abap but as per our requirement I need to write a Customer Exit,
my requirement is
I have user input value variable(ex,10,15 etc upto 31) then I have another Char ZCHSTDATE so if user enters 01 or anyvalue the report result should be the start date plus the value which user enters in the varaible section,ex.if I enter 05 then the out should be startdate+5,so if the start date is 5th Nov then the out put should be 10th Nov.Can't use offset values since user can enter anyvalue between 1 to 31.The Variables I am using are zvuser(User Entered Days) and zvstdays(Customer Exit variable),please can any body help in providing the customer exit code.
Thanks in Advance,
Raga

hi Raga,
is ZCHSTDATE of type date and what is the type of zvstdays? if both are of type date then u can directly add the date and days to get the required date.
eg:
zvstdays = zchstdate + zvuser.
u can consult this thread also: Adding days to a Date
in the customer exit u have to write a case statement like
case <field that is catching the bex vars>.
when '<ur var name>'.
result = <put ur formula>.
endcase.
hope this helps you
regards,
Vaibhav

Similar Messages

  • Problem with customer exit variable in BeX Query

    Hi All,
    We have created a customer exit variable in a query and populated with few patterns in customer exit.
    My query has to bring all the records where the address line is containg the patterns passed through customer exit. Here the query is not working as expected.
    It is bringing the values where the address line is exactly same as the pattern and not bringing the records where the pattern is part of the address line.
    For example: Pattern passed in customer exit = 'HOSPITAL'
    The record where address line = 'HOSPITAL' is shown in the rpeort, where the record with address line = 'HOSPITAL ROAD' is not shown in the report.
    I would appreciate your help on this.
    Regards,
    Rakesh

    Hi Diogo,
    Below is the code I am using in the customer exit.
    SELECT * FROM zae_tt_pbuild INTO TABLE gt_pbuild.
          IF sy-subrc = 0.
            LOOP AT gt_pbuild INTO gs_pbuild.
              CONCATENATE '*' gs_pbuild-pbuild '*' into lv_pattern.
              ls_range-low = lv_pattern.
              ls_range-sign = lc_sign_i.
              ls_range-opt = 'CP'.
              APPEND ls_range TO e_t_range.
              CLEAR: ls_range,
                     lv_pattern.
            ENDLOOP.
          ENDIF.
         ENDIF.
    I have tried using '%' instead of '*' aswell but the result is same.
    Thanks,
    Rakesh

  • Customer Exit working in BEx but not in WAD

    Hi All,
    I am using SAP BW BI 7.0 and recently made a Customer Exit variable (single value) and wrote the appropriate code under a project in CMOD.
    When the query had been run through BEx Analyzer, it is giving desired result-proving that the code was properly written but when we try to see it in web page through WAD or "Execute" button in BExQD then it is giving an error in the web page called "apps.state.raised()"
    What can be the problem? Is it a problem with installtion or patch? Currently it is updated with patch 11.
    Please reply ASAP.
                                          ****Points assured****

    hi Raga,
    is ZCHSTDATE of type date and what is the type of zvstdays? if both are of type date then u can directly add the date and days to get the required date.
    eg:
    zvstdays = zchstdate + zvuser.
    u can consult this thread also: Adding days to a Date
    in the customer exit u have to write a case statement like
    case <field that is catching the bex vars>.
    when '<ur var name>'.
    result = <put ur formula>.
    endcase.
    hope this helps you
    regards,
    Vaibhav

  • Customer Exit Variable in BEx

    Hi,
    I have defined a query with a Structure in Row and Key Figures in column.
    The result of query should look like this:
    Fiscal/Year Period | Quantity per month | Quantity cumulative
    011.2010 (Variable Offset Value -3) | 5 | 5
    012.2010 (Variable Offset Value -2) | 6 | 11
    001.2011 (Variable Offset Value -1) | 7 | 7
    002.2011 (Variable Singel Value, Manual Input) | 8 | 15
    "Quantity cumulative" is defined as follows:
    Quantity cumulative (002.2011) = Quantity 001.2011 + Quantity 002.2011
    Quantity cumulative (001.2011) = Quantity 001.2011
    Quantity cumulative (012.2010) = Quantity 011.2010 + Quantity 012.2010
    Quantity cumulative (011.2010) = Quantity 011.2010
    "Fiscal/Year Period" and "Quantity per month" are OK. But I have problem to define the key figrue "Quantity cumulative".
    I have defined a Customer Exit Variable on Reference Characteristic "Fiscal/Year Period". The Quantity cumulative (002.2011)
    and Quantity cumulative (001.2011) are calculated correct. But it doesn't work for 012.2010 and 011.2010 (because of previous year).
    I would be helpful if you can give some hints.
    Thanks

    Hi,
    Create a formula "Cumulative Quantity" and add only "Quantity per Month" in the formula. Go to formula properties, Calculations tab, check the Cumulated option.
    This works for different years as well.
    Regards,
    Suzitha.

  • Query variable type Customer Exit problem

    Hi All,
    I need to set a Profit Center variable value by Customer Exit. My Exit has to results a Profit Center Hierarachy NODE value. The problem is that the Query handles my return value as a single Profit Center (10 char long) but my Profit Center Nodes are longer than 10 characters and they are truncated to 10 chars. Therefore I get an error message, namely 'XYZ... PC is not exists in PC Hierarchy ABC...'
    How can I set that the Query or the code to get my result value not as a Profit Center but a Profit Center Hierarchy NODE?
    Thanks in Advance,
    Dezso

    Hello,
    Yes, I have set the right Hierarchy. If I change the PC variable to 'Characteristic variable' and set it on the selection screen everything is OK so the Hierarchy is good.
    Thanks,
    Dezso

  • Customer exit problem

    hi to all experts,
    my requirement is to clear the exporting parameter . it is not getting populated in the source code of the exit it is blank but when i get out of the exit it is populated im clearing the input parameter too.

    Hi Khan,
    Please find the link below
    [Exit Problem|Re: Regarding Customer Exit]
    Hope this is helpful
    Thanks
    Kalyan.

  • Customer Exit variable in BEX Query

    Hello Guys,
    I need to write a custmer exit variable in which the requirement is user is provided with input selection of Posting Period, and user wants the output as sum (cumulative) of 0 i.e start to the period provided by user input.
    Consider a scenario, if user puts 06 as posting period in selection screen then keyfigure should sum all the values from 00 to 06.
    Now, I need to write the customer exit for this.
    Can anyone suggest me the same?
    your inputs will be heavily appreciated.
    Thanks,
    Saurabh

    Hi ,
    Here V1 refers to the selection variables used for user input as posting period .
    You can use the following code in CMOD :
    read table i_t_var_range into loc_var_range with key vnam = 'V1'.
        if sy-subrc = 0.
          WA_PERIOD = LOC_VAR_RANGE-LOW - 6
    "    If WA_PERIOD <= 6  " Take this condition in to consideration while using the code
      "  Endif .
           l_s_range-low  = WA_PERIOD
          l_s_range-sign = 'I'.
          l_s_range-opt  = 'BT'.
        l_s_range-high =  LOC_VAR_RANGE-LOW
          append l_s_range TO e_t_range.
        else.
        endif.
    Hope it helps .
    Thanks
    Kamal Mehta

  • 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

  • How to Write a CUstomer Exit for a variable in BEx

    Hi,
    How to write a customer exit variable in bex Query designer
    Do i need developers key for this (If so what type of key do i need so that i can ask basis tean to generate)
    Info Object: ZEXP_DTE (Expiry Date)
    Variable on ZEXP_DTE :
    ZEDTE
    Type: Customer Exit
    Can any one please tell me how to write a code in CMOD from this (Step-by Step)
    Expiry Date > Current Cal Day
    As arun said
    'l_s_range-low = SY-DATUM.
    l_s_range-opt = 'I'.
    l_s_range-sign = 'GT'.
    APPEND l_s_range TO e_t_range.'
    I want to insert the above code for the above customer exit but as i am new to BW as  ABAP please explain me what are the steps involved in CMOD
    Thanks

    Hi,
    To write customer exit for a variable, you require Access key.
    Contact your BASIS to get that.
    Access Key,BASIS?
    To write Customer exit,
    User Exits
    User Exit for Variable
    /thread/809285 [original link is broken]
    Hope these helps u...
    Regards,
    KK.

  • Customer exits in Bex

    Hello BW Experts,
    Could any one give me some pointers / web sites / materials / oss notes for Customer exits in Bex.
    Any help is highly appreciated.
    Thanks,

    Check Out service.sap.com/bw ... See under "SAP BW InfoIndex" there you find a section called "Exit".
    Let me warn you about Custome Exits usage in BEx ... be carefull about performances!
    Hope it helps
    GFV

  • Problem with Bex Customer Exit Variable

    Hi Friends,
    I have a customer exit variable which is getting filled based on the User Input.  I have written the code inside the If condition checking i_step = 2. The code is working as required.
    But the problem is when I try refreshing the query or change the user variable selection, the Customer exit variable is not changing.  I tried to debug the code and realized that the  values for the exit variable based on the previous selection is not cleared and the i_step = 2  is not being executed for the variable.
    While I close and reopen the query, the code is working fine.  
    Does anyone know why this is happening?  Please suggest..
    Thanks in advance..
    Regards,
    Priya

    Hi Binu,
    Here is the code sample.  I am trying to populate the month based on the input Week number '0I_WEKIN'
    .  For eg.  If I give 37.2011, the month value should be 08.2011.  If I give 39.2011, month should be 09.2011.
      WHEN 'ZC_MONTH'.
        IF i_step = 2.     "after the popup
            READ TABLE i_t_var_range INTO lw_var_range WITH KEY vnam =
        '0I_WEKIN'.
           IF lw_var_range-high IS NOT INITIAL.
              l_week  = lw_var_range-high.
              l_week = l_week - 3.
              CALL FUNCTION 'WEEK_GET_FIRST_DAY'
                EXPORTING
                  week = l_week
                IMPORTING
                  date = l_date.
              lw_range-low = l_date+0(6).
            ENDIF.
            lw_range-sign = 'I'.
            lw_range-opt  = 'BT'.
            APPEND lw_range TO e_t_range.
        ENDIF.
    Regards,
    Priya

  • Crystal Reports with BEx Query using Custom Exit Variable

    Hi,
    We have BW BEx Query using Customer User Exit variable to derive  the Fiscal Week for Last Year (called it VAR2) based on another user input variable Current Fiscal Week (called it VAR1).
    VAR2 is derived from VAR1 in CMOD via some codings and thus it DOES NOT have the "Variable is Ready for Input" flag ticked in the BEx. VAR1 is user input variable, so it has "Variable is Ready for Input" flag ticked in the BEx.
    When we create a Crystal Reports with the BEx Query using variable VAR2, and when we run it we got an error message saying "Failed to execute query; '[]<java.lang.UnsupportedOperationException: No Selection State Support!ZP_MI_LYPUBWEEK>'. Redesign your query or contact the data source maintainer to solve the problem".  (note: ZP_MI_LYPUBWEEK is VAR2 in this case).
    Could anyone please assist? Surely, CR supports BEx customer user exit variables like the above, right?. I also refer to the forum below as it seems to have a similar issue (except mine with an error message), but it does not provide a solution in it.
    Crystal Reports with BEx Query using Custom Exit Variable
    Thanks,
    Andy

    Hi Vibhav,
    We have the SAP Crystal Reports for Enterprise XI4.0 Version 14.0.0. Not sure if SP0 or other SP, got to check with Basis Team later.
    We tried that "mandatory" option and did not work either.
    Anyway, SAP has now come back again saying it is something they will fix it in next release/version. We got a phone call from them and a reply below to our OSS.
    23.08.2011 - 08:20:49 CET - Info for Customer by SAP  
    I have raised this issue on the Idea#s Place as an enhancement request
    on the below link:
    https://cw.sdn.sap.com/cw/ideas/5586
    This ER contains the information of including the customer exit
    variables in the report without checking the #input for ready# option.
    This ER can be considered for being implemented in the future
    versions. You can refer to SAP Note: 1515837 - How To: Enhancement
    Request Process - "Idea Place" for more information regarding the Idea
    Place.
    Cheers,
    Andy

  • Need clarification on BEX variable usage in customer exit.

    hi,
    i am an ABAP guy,i dont have any idea about BW,But here i got one problem,
    1)Variable has been craeted in BEX Report (processed by Customer exit).
    2)i am trying to write ABAP code in CMOD customer exit(ZXRSRU01),but when i am calling BEX variable it is not taking it is giving error(it should defined by data statment)so how to call the bex varible in Customer exit,if any body have sample code or any idea kindly let me know.

    Hi and welcome to SDN!
    there are a lot of examples and clarifications in these forums. For instance:
    Re: steps for a customer exit.
    Re: Regarding the Code for the Customer Exit
    Best regards,
    Eugene

  • Bex Formula using customer Exit

    Dear Friends,
    I am trying to resolve the below problem. Require your help.
    In one of the bex reports, the requirement is to provide a variable on Bill date. From the given bill date, the report should display data for 7 consecutive days.
    But the condition is that the from date should always be a saturday?
    What i have done is : In ROWS, i selected the required key figure columns
    and then, created a structure in which i created Seven New Selections and used offsets.
    so, if the user enters a specific date, the report displays seven days of the data from the given date. However, how do i restrict the user's choice to only saturdays.
    I suppose the solution lies in using customer Exit.. but could some one help me with the ABAP coding.
    I am also available on [email protected]
    Thanks for the anticipated support.

    Hi,
    You can get the Day from the current system date and put a case statement to substract 1 for sunday to get saturday
    2 for monday
    3 for tuesday
    etc
    Fuction Module : DATE_TO_DAY
    Can check this link : FM: DATE_TO_DAY

  • Fill BEx Variable with more than one value via Custom Exit

    Dear SDN comunity,
    I want to fill a BEx Variable via a custom exit. My problem is, I don't know how to fill this variable with more than one value.
    I try to give you some background info based on an exaple:
    <u><b>Variable-Details</b></u>
    <b>Type of Variable:</b> Characteristic Value
    <b>Variable Name:</b> ZCCD
    <b>Description:</b> Company Code Selection
    <b>Processing by:</b> Custom Exit
    <b>Characteristic:</b> Company Code
    <b>Variable Represents:</b> Multiple Single Values
    <u><b>This is the used ABAP code:</b></u>
    WHEN 'ZCCD'.
    CLEAR l_s_range.
    l_s_range-low = '2002;2004'.
    l_s_range-sign = 'I'.
    l_s_range-sign = 'EQ'.
    APPEND l_s_range TO e_t_range.
    <u><b>The system returns this message:</b></u>
    Value "2002;2004" is too long for variable ZCCD
    appreciate your help!
    //michael

    Eugene, Marcus
    it works now, thx a lot!
    Please find attached the final code:
    CLEAR l_s_range.
    l_s_range-low = '2002'.
    l_s_range-sign = 'I'.
    l_s_range-<b>opt</b> = 'EQ'.
    APPEND l_s_range TO e_t_range.
    CLEAR l_s_range.
    l_s_range-low = '2004'.
    l_s_range-sign = 'I'.
    l_s_range-<b>opt</b> = 'EQ'.
    APPEND l_s_range TO e_t_range.
    (Delta to Marcus's code is bold)

Maybe you are looking for

  • Error 1335 message when installing software

    When installing an update to my wireless software, I repeatedly get the Error 1335 message saying the cabinet file Data1.cab is corrupt or cannot be used. Any solutions

  • Converting PAYEXT idoc to MT100 format.

    Hi friends, I am working on bank scenario in XI and the current requirement is to send the payment instruction to bank in MT100 format wrap in XML through XI. For this I am using T.code F110 to generate idoc PAYEXT, now wan to convert it into MT100 f

  • Cannot load i915 module (drm_mm_get_block error)

    Hi all, I managed to get Arch up and running, however I've got some pretty bad UI lag (without compositing enabled).  I checked and it seems as if the module for my Intel 965GM chipset isn't being loaded... Whenever I do modprobe i915, I get the foll

  • My iPhone not recognizing SIM Card

    I Have an iPhone 4. Since few days my iPhone is not recognizing my SIM Card. I tried all the suggustions for the net but none worked out. How can I recover my iPhone from this problem?

  • How to delete old question forums?

    How do I delete old forums on here that my questions were answered and no longer need to post up?