Table look up using value from customer exit variable

I have a customer exit variable, CURRMON, which the user enters in the format MM/YYYY. From this entry, I would like to do the following to calculate and display the number of business days in the selected month:
Do the following to get Business Days in month.
Use the KF "FBA Day"  (CTAFBAD) from the CTA_M01 infocube and write ABAP routine.
1. Based on user entry cal month get the last calendar day .
2. Do a master data look up (CTAFBAC is the master data object), using the last calendar day from step 1.
3. CTAFBAD is the attribute of CTAFBAC so move the value of CTAFBAD to the result, and display this result
Can anyone help me with this?

Hello,
You can use i step = 1 in SMOD transaction and write the code there.
l_s_range-low = sy-uname.
append ls_range to e_t_range.
regds,
Shashank

Similar Messages

  • Passing multiple single values in Customer Exit Variables

    Hi,
    I have one requirement to Pass multiple single values in Customer Exit Variable.
    If the user gives 2010 i need to get value previous fisacal year(2009),if its 2009, we need to get 2009.
    Just requirement is like how to pass multiple single values?
    Thanks.

    Hi..
    For this create a variable- Types of variable= Characteristics Value> Processing type as Customer Exit-->Reference Char as Fiscal year..
    Try this code..
        when 'xxxx'.
          DATA: lv_zp0003_month(2) TYPE n,
                  lv_zp0003_year(4) TYPE n.
          CLEAR: lv_zp0003_month, lv_zp0003_year.
          lv_zp0003_month = sy-datum+4(2).
          lv_zp0003_year = sy-datum(4).
    If the month is January the year is set to previous year
          IF lv_zp0003_month = '01'.
            lv_zp0003_year = lv_zp0003_year - 1.
           l_s_range-low = lv_zp0003_year.
    Else the year is set to actual
          ELSE.
            l_s_range-low = lv_zp0003_year.
          ENDIF.
          IF l_s_range-low = l_s_range-high.
            l_s_range-opt = 'EQ'.
          ELSEIF l_s_range-high IS INITIAL.
            l_s_range-opt = 'EQ'.
          ELSEIF l_s_range-low LT l_s_range-high.
            l_s_range-opt = 'BT'.
          ENDIF.
          l_s_range-sign = 'I'.
          APPEND l_s_range TO e_t_range.
    Hope this helps.
    Regards.
    AKG

  • Current filter values in Customer Exit variables

    Hi!
    I have a pretty hard question here that I would be impressed if someone has an answer to:
    The scenario is:
    I have a customer exit variable that should de dependent on the current filter setting in the query. Is it possible from within the customer exit code get information about the current filter(s)?
    I know that I can access other variables values, but in this case I would like to know which values that has been filtered on within BEx (after the popup screen).
    Regards
    Marty

    You asked for:
    1. In the field I_S_RKB1D-COMPUID (or GENUNIID I'm not quite sure) you get the internal query name.
    2. Look in RSZELTXREF with SELTUID = I_S_RKB1D-COMPUID.
    3. The filter values have LATYP = FIX (if they are in the filter box).
    4. Search table RSZRANGE with ELTUID = RSZELTXREF-TELTUID.
    5. Don't wonder if this doesn't work anymore after an upgrade
    Best regards
    Dirk

  • How to use value from Custom Select tag

    Hi,
    I have made a custom tag for html element select. It is a very basic tag with the selection of one vaule. I am able to populate the list using custom tag in JSP but i am not able to optain the value from that. Kindly see my jsp code.
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Expenses Report</title>
    </head>
    <body>
    <center>
    <table summary="layout">
    <tr>
    <td>Month:</td>
    <td>
    <tt:Select name="month" from="${ExpensesDBO}"/>
    </td>
    </tr>
    </table>
    <c:if test="${fn:length(param.month) > 0}">
    <table summary="layout" border="1">
    <tr>
    <td align="center">Year</td>
    <td align="center">Month</td>
    <td align="center">Shopping</td>
    <td align="center">Groceries</td>
    <td align="center">Fixed Expenses</td>
    <td align="center">Transportation</td>
    </tr>
    <tt:Expenses var="exp" username="${sessionScope.user}" from="${ExpensesDBO}">
    <tr>
    <td>${exp.year}</td>
    <td>${exp.month}</td>
    <td>${exp.shopping}</td>
    <td>${exp.groceries}</td>
    <td>${exp.fixedExpenses}</td>
    <td>${exp.transportation}</td>
    </tr>
    </tt:Expenses>
    </table>
    </c:if>
    </center>
    </body>
    </html>
    Basically based on the selected value I want to show the same page with the details including page with the default value in select list.
    I have made a generic select custom tag to be used within the application.
    Regards,
    Rahul.

    If both tables come from the same data source, join the two tables in one data set rather than two as shown. If they are from different data sources, use a 'join data set'

  • Excluding values in Customer exit variable

    Hi,
    I need to excludes some values, but should have a option to include these values in variable screen depends on different users requirement.Default this values will be excluded.Please help me writing this code.
    Will assign points,
    VJ

    Hi,
    You can try using a select option variable without writing any code.
    There you can specify default values as exclusion and if user enters their own values those will be included automatically.
    Else you need to create a dummy variable (user input) to get the user input and other variable (customer exit) to include the values if user enters / exclude default values. If you still need some code sample let me know.
    hope this helps.
    regards
    rajesh

  • Naming an ArrayList using value from a String variable

    I am trying to name an ArrayList the value of a String variable in this code:
    public void addstudent(String name)
    ArrayList //i need a name here// = new ArrayList();
    I want to use the String //name// that will be used when the method is called. What do I do? I tried using:
    ArrayList (String.valueOf(name)) = new ArrayList();
    That didn't work.
    Thanks in advance for any help.

    Its suppossed to allow the user to input the student's name, grades for 4 specific subjects. Then take that and organize the students by name alphabetically. It is also suppossed to allow the user to search for users by grades, like find everybody with a GPA of 3.7 or higher or find everybody with a GPA of 3.5. This was a project asigned by my intro computer science teacher. I was suppossed to make it with 2D arrays but that was lousy because you were then limited to a specific number of students without editing the code. I'm not familiar with all the different ways of doing this. My computer science teacher said that I could do it with a HashSet.
    Okay. You have a String. Let's suppose it contains "fred" or something like that -- you didn't say what was in it so we have to speculate. Next, you want to create an ArrayList from that? What does that mean? You want to end up with an ArrayList that contains one entry, that string? Or what?
    In your example I would want to start by giving the method "fred" as the name parameter. So right now the String (name) has the value of "fred". I then wanted to make an ArrayList for that student named fred. This ArrayList would have 4 grades for that student fred. This ArrayList for fred would be part of a HashSet for the whole group of students. That way when I wanted to search alphabetically, I would just sort the HashSet. My computer science teacher said this would work.
    Thanks

  • How to use customer exit variable in the report

    Dear All,
    i want to use a standard customer exit variable in the report properties.
    In the Bex Query Designer right hand bottom you will find two buttons "Properties" and "Task". Click on task you will get different option. Choose properties from there and then select "variable sequence tab".
    I need to add a standard variable there. How can i achieve it?
    Appreciate your early help.

    You need to add variable to corresponding charctertic then you can get that varaible for sorting the sequence....
    If 0CUST is the varaible then you need to assign it 0CUSTOMER then 0CUST will be available for the sequence.
    Edited by: shanthi bhaskar on Apr 2, 2009 5:41 PM

  • 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

  • Customer exit variables using the Table

    Hi Experts,
    I'm having the following scenario.
    I have created the below table
    OGVERSION   Fiscal Year1  OGVERSION1  Fiscal Year2   OGVERSION2
        001                   0                   100                  -1                  100
        002                   0                   100                    2                  200
          007                  3                     200                 1                   300   
    Now i need to create four customer exit varibles by using the OGversion value which is  the variable by fillign with manula input.  Here Fiscal year1 & Fiscalyear 2 fields having the values like 0,1,2,-1 means 0 -->  Current Year, 1 --> CurrentYear +1 , 2 --> Current Yr +2, -2 --> Current Yr-2...like that.
    Please let me know If anybody knows  the ABAP for create these customer exit variables.
    Regards,
    Navin Achanta

    Thanks for the reply. following is the code that is used in the exit.
    does the code below affect the performance.
    select FIELD1 from TABLE into table INT_TABLE
                                           where TCTUSERNM = SY-UNAME.
          if sy-subrc eq 0.
            loop at INT_TABLE into WA_INT_TABLE.
              l_s_range-LOW = WA_INT_TABLE-field1.
              l_s_range-SIGN = 'I'.
              l_s_range-OPT = 'EQ'.
              append l_s_range to e_t_range.
            endloop.
          endif.

  • From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?

    From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?

    Hi,
    Use NVL or COALESCE:
    NVL (col_a, col_b)
    Returns col_a if col_a is not NULL; otherwise, it returns col_b.
    Col_a and col_b must have similar (if not identical) datatypes; for example, if col_a is a DATE, then col_b can be another DATE or it can be a TIMESTAMP, but it can't be a VARCHAR2.
    For more about NVL and COALESCE, see the SQL Language manual: http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions119.htm#sthref1310
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002

  • Error Message : " No value could be determined for Customer Exit Variable "

    Hello BI Experts ,
    I have created a "ZYTD_PERIOD" Customer Exit Variable  Interval  Mandatory and ready for input check mark removed.
    The reference character is '0FISCPER' .
    I want to have YTD figures when the user enter single Fiscal Year Period for variable 0P_FPER.
    So I have written below code in SE37 : EXIT_SAPLRRS0_001 and include program : ZXRSRU01
    ==================================================================
      case i_vnam.
                  WHEN 'ZYTD_PERIOD'.
                  IF I_STEP = 2.
                  LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE WHERE VNAM = '0P_FPER'.
                  CLEAR L_S_RANGE.
                  L_S_RANGE-LOW0(4) = LOC_VAR_RANGE-LOW0(4).
                  L_S_RANGE-LOW+4(3) = '001'.
                  L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW.
                  L_S_RANGE-SIGN = 'I'.
                  L_S_RANGE-OPT = 'BT'.
                  APPEND L_S_RANGE TO E_T_RANGE.
                  EXIT.
                  ENDLOOP.
                  ENDIF.
    ===================================================================
    After that I use this 'ZYTD_PERIOD' variable in the query .
    Also I have used the variable 0P_FPER in another structure.
    When I execute the query by entering the value of 0P_FPER as 010.2009 or any other value ,
    I am getting below error message ,
    *No value could be determined for variable ZYTDPERIOD*_
    Below is details of this Error message ,
    Note that I have proper Master and Text data for 0CO_AREA and 0COMP_CODE loaded into BI.
    =======================================================================
    Diagnosis
    This error diagnosis is specific only to the variables 0P_FVAEX or 0P_CTPCA !
    Termination message BRAIN 632 appears:
    Could not determine value for variable 0P_FVAEX (or 0P_CTPCA).
    System Response
    1. Operation method of SAP-Exit-Variables 0P_FVAEX or 0P_CTPCA
    With queries from the CO application, both SAP-Exit-Variables look for an entry for 'controlling area'. With this controlling area from the selection screen, the SAP-Exit-Variables program reads the attributes for InfoObject 0CO_AREA (controlling area).
    With queries from the FI application, the SAP Exit Variable 0P_FVAEX looks for an entry for 'company code'. With this company code from the selection screen, the SAP Exit Variables program reads the attributes for InfoObject 0COMP_CODE (Company Code).
    0P_FVAEX determines the fiscal year variant (attribute 0FISCVARNT) from the attributes for 0CO_AREA (CO queries) or 0COMP_CODE (FI queries). 0P_CTPCA determines the currency type of the profit center local currency (attribute 0CURTP_PCA) from the attributes for 0CO_AREA.
    2. Cause of Error
    The attributes for the controlling area (InfoObject 0CO_AREA) or company code (InfoObject 0COMP_CODE) were not loaded into the BW system, or the attributes for the controlling area are not active in the BW system.
    Check whether this is the cause of the error in your BW system. Display the contents of table /bi0/mco_area or /bi0/mcomp_code using transaction se16.
    Application CO:
    Check whether the attributes 'fiscal year variant' (field FISCVARNT) and 'profit center local currency currency type' (field CURTP_PCA) are filled in the 'A' version (field OBJVERS) for the selected controlling area. If the fiscal year variant in the OBJVERS = 'A' is empty, then the error is with variable 0P_FVAEX. If the currency type of the profit center's local currency in OBJVERS = 'A' is empty, then the error is with variable 0P_CTPCA.
    Application FI:
    Check whether or not the attribute 'fiscal year variant' (field FISCVARNT) is filled in the 'A' version (field OBJVERS) for the selected controlling area. If the fiscal year variant is empty in OBJVERS= 'A', then the error is with variable 0P_FVAEX.
    Procedure
    Using InfoSource 0CO_AREA, load the attributes for the controlling area or company code into your BW system.
    Afterwards, activate the attribute changes in your BW system. To do this, use transaction rsa1, path 'Tools > Hierarchy/Attribute changes', functions button 'InfoObject list'. Choose InfoObject 0CO_AREA or 0COMP_CODE from this list, and activate the attribute changes.
    =====================================================================================
    Is there any special settings needed before writing BEx Customer Exit ?
    I have already created a project in CMOD and assinged a proper RSR00001
    and EXIT_SAPLRRS0_001 and project is active.
    Any help please ....
    Regards ,
    Amol

    My Code is as below ,
              case i_vnam.
                  WHEN 'ZYTD_PERIOD'.
                  IF I_STEP = 2.
                  LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE WHERE VNAM = '0P_FPER'.
                  CLEAR L_S_RANGE.
                  L_S_RANGE-LOW0(4) = LOC_VAR_RANGE-LOW0(4).
                  L_S_RANGE-LOW+4(3) = '001'.
                  L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW.
                  L_S_RANGE-SIGN = 'I'.
                  L_S_RANGE-OPT = 'BT'.
                  APPEND L_S_RANGE TO E_T_RANGE.
                  EXIT.
                  ENDLOOP.
                  ENDIF.
                  ENDCASE.

  • 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

  • Restricting Charecterstic using customer Exit variable

    Hi Experts,
    Please adivise how can I restrict values of a charectersitc  Infoobject using a customer exit variable.
    I have a InfoProvider which has a authorisation values from which I have to retrieve the authorisation values.
    Regards,
    Koka.

    Thanks for the reply Bhawani, I have a function module to fill the Customer exit variable with the values retrieved from DSO.
    Can you please explain me the second step mentioned or can I direclty call my FM in the Include ZXRSRU01..
    WHEN 'XXXX '. ( customer Exit varaiable)
          CALL FUNCTION 'ZBI_LOAD_AUTH'
            EXPORTING
              I_AUTHVALTYPE = 'auth value'
            TABLES
              E_T_RANGE     = E_T_RANGE.
    Regards,
    Koka.

  • Passing messages from BW customer-exit variables to WebI

    Hi
    Is it possible to pass messages from a BW customer-exit variable to WebI?
    We have a scenario where we have some validation done on a customer-exit variable, and under certain conditions a message should be returned to the user running the WebI report. Ideally, then report should stop executing at this time.
    The ABAP is in place, and I can return an error message. If the query is run in RSRT / Web Template, the error message is correctly displayed and processing stops.
    However, in WebI, if the error condition is met, a rather messy looking generic error message is displayed. In this case, the error number I've used in the ABAP is 000, which WebI then interprets as somthing to do with query dimensions could not be retrieved, or a null pointer exception.
    I am not interested in the WebI error message that is being generated ... I know why it is being generated.
    All I'd like to know is whether it is possible to pass an error message from within the customer exit code back to WebI.
    Any ideas?
    Regards,
    Andrew

    Hi,
    I think that the problem is the User Exit is called anew for every query, so the global tables you declared will be empty for the query2.
    One way to do this is create a table using the SE11 and populate it with the Variable from Query1, and use this data to populate the Variable2 of Query2.
    Hope it helps.

  • Customer exit variable - internal table in BEX

    Hi,
    i am running a report and using variables in it.
    The report runs over a info cube. There are few challenges in it.
    One of the variable is posting date, and when user enters posting date i need to negate it with current system date.
    If the negated value is greater than 28 then i need to exclude documnet type 'YG' and display the query, else i need to include the dcumnet type 'YG' and document type '  '.  The above logic can be well implemented via a customer exit variable(for posting date) using an internal table. We have internal tables like C_T_DATA which is used in data source enhancement, which help us to implement our own desired logic.
    Do we have such kind of internal tables, based on which the report output (result set) is derived?
    i know that we have l_t_range and e_t_range, but dont know their usage, some one can explain in detail about them?
    Thanks in advance.

    Hi Selva & Lakshmin,
    The code given by Selva is almost correct . If my understanding is clear , you also wanted to include  document type ' ' when the negated value is less than 28 .
    Modification in Selvas Code :
    Variable 'V_DOCTYP' must be of type Multiple Single Values.
    DATA : V_DATE LIKE SY-DATUM.
    DATA : V_DAYS TYPE I.
    if i_step = 2.
    when 'V_DOCTYP'.
    READ TABLE i_t_var_range INTO loc_var_range WITH KEY vnam = 'ZV_PDATE''.
    IF SY-SUBRC = 0.
    V_DATE = loc_var_range-low.
    ENDIF.
    V_DAYS = SY-DATUM - V_DATE.
    IF V_DAYS > 28.
    l_s_range-low = 'YG'
    l_s_range-sign = 'E'.
    l_s_range-opt = 'EQ'.
    APPEND l_s_range TO e_t_range.
    ELSE.
    l_s_range-low = 'YG'
    l_s_range-sign = 'I'.
    l_s_range-opt = 'EQ'.
    APPEND l_s_range TO e_t_range.
    clear l_s_range.
    l_s_range-low = ' '.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'EQ'.
    APPEND l_s_range TO e_t_range.
    ENDIF.
    ENDIF.
    Hope the above reply was helpful.
    Kind Regards,
    Ashutosh Singh

Maybe you are looking for

  • Printing problem with DocFlavor.SERVICE_FORMATTED RENDERABLE_IMAGE

    Does anyone use javax.print for printing ? I wanted to print the content of a JPanel, so a created a RenderableImage implementation, but my problem is that my EPSON Stylus Color C60 seems to not support this DocFlavor ! So I had to use a PRINTABLE, t

  • Insufficient bandwidth with ios8.3

    Ios8.3 has made my iPad (purchased 2012) think that there is insufficient bandwidth, which isn't the case for others I live with. What's wrong with the iPad? How do I fix it?

  • Adobe Reader XI stopped working in Windows 7

    I recently installed the aforementioned, and now cannot open and work with any files.  Each time a file opens, I get the message that Adobe Reader has stopped working.  Does anyone know why, or more importantly, what I can do about it?

  • Howto deploy applications to clustered 10gAS

    Hi All, I have a 10g Application Server which is clustered on 2 nodes. I need to deploy a ear file in this environment. Can someone guide me on how do we do the deployment on a clustered environment. I have been doing this in a standalone environment

  • 60G iPod 'Resets' itself sporadically... What's Up with that?

    I have a 60G iPod that has about 2800 songs loaded (+ about a dozen jpg images). Loaded from a WIN2K based PC using iTunes 6.0.4.2 and the latest iPod Update software. When playing, the unit will sporadically 'Reset' itself (Run through shutdown/star