BPS Variable Exit issue - input variable is not hardcoded

Hi SDNer
I have a problem in derivation of 3 variables from one variable. The scenario is like this..
Curr Year - Hard coded in one Pl Area and all other Area get the same value by using a FM
Planning for year : User Input variable in Layout
We are planning for Projection ( Ver - p) Budget ( Ver - B) and 3 Forecast (Ver - F)
Now based on the planning for year and current year variable,system should calculate these three versions.Curr Ver  Next Ver Prev Ver which are in layout at present and entered by user manually
Example:
For  Curr Year 2008 and Plan Year 2008
Curr Ver - P Next Ver - B and Prev Ver - A
For  Curr Year 2008 and Plan Year 2009
Curr Ver - B Next Ver - F and Prev Ver - P
Thanks
Saurabh

Hi Kirill
Still no luck...here is my code
I am populating Variable ZVAR which is based on 0VERSION. With help of plan year ZFISCYEAR and Current year ZPLYEAR
I assigned this FM to ZVAR variable in plan area.
Also i am using this variable along with these 2 time variable in the planning folder......
I am getting error ZVER can't be computed ????
FUNCTION VERSION_AUTOMATION_TEST_KAMAL.
""Local Interface:
*"  IMPORTING
*"     VALUE(I_AREA) LIKE  UPC_AREA-AREA OPTIONAL
*"     VALUE(I_VARIABLE) LIKE  UPC_VAR-VAR OPTIONAL
*"  EXPORTING
*"     REFERENCE(ETO_CHARSEL) TYPE  UPC_YTO_CHARSEL
Data: lp_subrc type sysubrc.
Data: lc_subrc type sysubrc.
Data: lpt_varsel type table of upc_ys_api_varsel.
Data: lps_varsel type upc_ys_api_varsel.
*Data: l_plan_year type upc_ys_api_varsel.
Data: ls_chasel type upc_ys_charsel.
Data: l_VERSION TYPE C.
Data: l_plan_year type i.
Data: l_curr_year type i.
data: lcto_varsel   TYPE upc_yto_charsel.
DATA: lcs_varsel TYPE upc_ys_charsel.
Data: DIFF TYPE i.
Data: l_area type upc_y_area.
Data: l_variable type upc_y_variable.
if i_variable = 'ZFISCYR'.
*Read Planning For Year Variable.
call function 'API_SEMBPS_VARIABLE_GETDETAIL'
      Exporting
       i_area = i_area
       i_variable = i_variable
      Importing
       e_subrc = lp_subrc
       tables
       etk_varsel = lpt_varsel.
    if lp_subrc = 0.
      clear lps_varsel.
      read table lpt_varsel into lps_varsel index 1.
      l_plan_year = lps_varsel-low.
    endif.
Read Current Year Variable.
*data: l_buffer_call TYPE boole-boole           VALUE 'X'.
    Fix value of current year from below FM
  CALL FUNCTION 'Z_VAR_GET_DETAIL'
        EXPORTING
          i_area     = 'ZPLBSCF1'
          i_variable = 'ZPLYEAR'
        IMPORTING
          e_subrc    = lc_subrc
          eto_varsel = lcto_varsel.
      if lc_subrc = 0.
        clear lcs_varsel.
        read table lcto_varsel into lcs_varsel index 1.
        l_curr_year = lcs_varsel-low.
      endif.
DIFF = l_plan_year - l_Curr_year.
        IF l_plan_year = l_Curr_year.
             l_VERSION = 'P'.
             ELSEIF ( DIFF = 1 ).
                  l_VERSION = 'B'.
                  ELSEIF ( DIFF = 2 ).
                       l_version = 'F'.
                       ELSE.
                            l_VERSION = 'F'.
     ENDIF.
ls_chasel-chanm = '0VERSION'.
ls_chasel-opt = 'EQ'.
ls_chasel-low = l_VERSION.
insert ls_chasel into table eto_charsel.
Endif.
ENDFUNCTION.
Thanks alot
Saurabh

Similar Messages

  • Issue in BPS Variables....Please anybody reply...this is really urgent(SOS)

    <b>Hi dear friends, This is really a urgent problem and crucial Please anybody can share their ideas or atleast some inputs/ clues to clear the cobwebs in my understanding.</b>
    I am facing problem in BPS Variables.
    I created the variables 1.zqbs- employee responsible --->Userentry/default value.
    2. zconpar-- contact partner----
    > Replacement type is user exit(Function Module)
    3. zconpar-- contact partner----
    > Replacement type is user exit(Function Module)
    ZCONPAR: I am using the zqbs, planing area, characterstic name as a import parameters and i am exporting the output value to 0BP_ACTIVIT through zconpar
    ZCONPER: I am using the zqbs, planing area, characterstic name as a import parameters and i am exporting the output value to 0BP_CONTPER through the zconper.
    These two variable info objects are calling in the planning layout lead column.
    based on contact partner it should display contact persons for the contact persons we are applying the conditions(bp_reltype = bur001,bp_reldir = 2) to filter the contact persons.
    In my case i am getting 3 values for the contact partner like 1000, 2000, 3000.
    i am getting 2 values for the contact persons if i run the variables individual.
    note: if i run BPS0 its going into loop and displaying multiple data means for 1 contact partner its applying all contact persons. at final it showing records like contact persons X contact partners means it showing more unvalid records.
    how to avoid this situation.
    contact partner contact person bp_reltype bp_reldir
    1000 xxxx bur001 2
    2000 yyy bur002 2
    3000 zzz bur001 2
    it should display like this
    1000 xxx
    2000
    3000 yyy
    but it showing
    1000 xxx
    1000 yyy
    1000 zzz
    2000 xxx
    2000 yyy
    2000 zzz
    3000 xxx
    3000 yyy
    3000 zzz
    Please anybody who have even a vague idea of solution can respond to this immediately.----SOS----
    Even your smallest hint is greatly appreciated.
    Yours truly,
    your friend Bharath.

    Thanks for the reply and I would trying these consistency check out again as a background job but I have already done these checks and have not been able to find any inconsistencies in the planning area or the master planning object structure. the problem is this as I have put in the SAP message:
    "We have generated CVCs from a text file using the load work list functionality  Due to some internal formatting issues few erroneous CVC were generated. On going through the concerned notes we have come to the conclusion that we would have to delete the erroneous CVC and recreate new CVC.
    The issue that we are facing is that we are not being able to delete the erroneous CVC from the MPOS as they are not visible in the display mode. On other hand we do see the erroneous CVC in the planning book, which is not at all understandable because if there are no CVC then why are we seeing them in the planning book."
    Please let me know if this is a problem that has been faced by anybody in SCM 5.0
    Thanks

  • User exit variable do not receive values in a view.

    I have query with customer exit variable
    variable entry is optional
    Ready for input
    can be change in query navigation
    in the cmod I have case on i_vnam with the variable name.
    When I run the query the i_vnam receive the name of the variable and act as expected.
    When I run a view on this query the i_vnam do not receive nothing and because of this, the variable do not receive any value.
    Do any one know why and how to fix this problem?
    Thanks in advanced
    Hagai

    log into your sbcglobal mail using your browser and see if they are putting it in a spam folder before Thunderbird ever get a chance to see it.

  • BPS Variable-Cost Element is not displaying Text

    Dear Team,
    We have a peculiar issue one of the BPS Variable defined for Cost Element is not displaying text in one of the Planning Layouts.
    Another variable is displaying text in another layout.
    Surprisingly...when I reused the old variable in the new layout it is also not displaying the text.
    Am I missing something....appreciated your quick support.
    Thanks & Best Regards
    Srinivas

    Have you check the layout Lead-Column setting? Is it set to 'Key/Description'?

  • BPS variables exit F4 help

    Hi,
       I am having a BPS variable exit which is listing all the records from the master data table in the F4 help screen but  i want to see only those values which are populated by my exit .
    Did any one faced the same problum? Do we have a note or patch to fix this.
    Thanks,
    Ramkumar

    Hi Ramkumar,
    Check the ABAP code behind the variable.Make sure that it is fetching the right records based on the logc in the code.Check the select statement in the ABAP.
    Debug the code and find out if its fetchin the right values into the export parameter  ETO_CHARSEL.
    hope this helps.
    regards
    Sai Vishnubhatla.

  • BPS variable exit takes more execution time

    Hi,
        I am having a BPS variable of type exit in the planning level and it is taking very long time to execute the layout even though my planning cube is having very little data.
    Can any one tell me how to reduce the excution time of the layout .
    Thanks,
    Ramkumar.

    Hi Ravi,
            I excuted the FM in se37 with a SQL Trace and it was working fine . there are no expensive statements .
    The same FM performs well if the output record count is less say 10, but taking more time when the output record count is more say 8000.
    Is there any way to increase the performance of the BPS layout . or do i need to apply any notes for it.
    if any one faced the same problum kindly let me know how to resolve this . your help is greatly appreciated.
    Thanks
    Ramkumar

  • BPS Variables of Type Exit (How To Document)

    Hello,
    I'm trying to restrict entries for (say) variable #2, based on the selection of variable #1. 
    I've just realised characteristic relationships cannot be used and need to use a user exit.  I've gone through the "How To" on BPS Variables of Type Exit and have gotten the function modules to working properly. 
    However when the function module attempts to pass the data to BPS Variable #2, BPS gives an ERROR saying that in order to write new values into variable #2, the variable must have a replacement path "USER DEFINED VALUES".
    However this is not possible as the replacement path must be set to "USER EXIT" so the function module can be activated.
    The only way around this is to tell the function module which BPS Variable it should choose to write the data to, if so does anyone the ABAP to store values into a BPS Variable.
    Right now would appreciate any comment on this.
    Kind regards,
    Marinos

    Hi Marc,
    Yes, the How To paper answers my problem, and when I run the program via se37 the correct variable selections are being populated in table ETO_CHARSEL.  However when values are passed to the BPS Variable, the first information message read "The Conditions were Adapted"  but no values are passed to the variable.  Then a second error message "Entry not possible, var does not have replacement type user-spec vals."  This seems to be a conundrum as the variable needs to be set as user-exit.
    Any thoughts?
    Marinos
    My Z_SIMPLE_RELATION code is
    FUNCTION Z_SIMPLE_RELATION.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(I_AREA) TYPE  UPC_Y_AREA
    *"     VALUE(I_VARIABLE) TYPE  UPC_Y_VARIABLE
    *"     VALUE(I_CHANM) TYPE  UPC_Y_CHANM
    *"     VALUE(ITO_CHANM) TYPE  UPC_YTO_CHA
    *"  EXPORTING
    *"     VALUE(ETO_CHARSEL) TYPE  UPC_YTO_CHARSEL
    Change constant according to your needs
    TABLES: /BIC/MTASSTCAT.
    CONSTANTS:
    l_source_var TYPE upc_y_variable VALUE 'TCAPASST',
    l_source_area TYPE upc_y_area VALUE 'TCAP001P',
    l_use_restricted_values TYPE boole-boole VALUE 'X',
    l_buffer_call TYPE boole-boole VALUE 'X'.
    DATA:
    l_subrc LIKE sy-subrc,
    ls_return LIKE bapiret2,
    l_type LIKE upc_var-vartype,
    lto_varsel_all TYPE upc_yto_charsel,
    lto_varsel TYPE upc_yto_charsel,
    lto_var TYPE upc_yto_charsel,
    lt_chavl TYPE /bic/PTASSTCAT occurs 0,
    ls_chavl like line of lt_chavl,
    lto_chanm type upc_yto_cha.
    read source value
    CALL FUNCTION 'Z_VARIABLE_GET_DETAIL'
    EXPORTING
    i_area = l_source_area
    i_variable = l_source_var
    i_buffer = l_buffer_call
    IMPORTING
    e_subrc = l_subrc
    es_return = ls_return
    e_type = l_type
    eto_varsel_all = lto_varsel_all
    eto_varsel = lto_varsel
    eto_chanm = lto_chanm.
    IF l_subrc <> 0.
    MESSAGE i136(upc_fw) WITH l_source_var.
    Values of variable &1 cannot be determined
    EXIT.
    ENDIF.
    now, you are free to determine the logic on how to
    derive the values based on the source values.
    Example 1: determine the next year
    Assumptions:
    - we have only a single year in the selection
    - the variable is of type characteristic
    DATA: ls_varsel TYPE upc_ys_charsel,
    l_next_year(4) TYPE n,
    l_entries TYPE i.
    We have a single value for the year and only one characteristic
    => our value is stored in the first line
    IF l_use_restricted_values IS INITIAL.
    lto_var = lto_varsel_all.
    ELSE.
    lto_var = lto_varsel.
    ENDIF.
    READ TABLE lto_var INTO ls_varsel INDEX 1.
    check prerequisites:
    - record found?
    IF sy-subrc <> 0.
    MESSAGE i147(upc_fw) WITH l_source_var.
    Variable &1 does not contain any values
    EXIT.
    ENDIF.
    - exactly one record and characteristic?
    DESCRIBE TABLE lto_var LINES l_entries.
    IF l_entries <> 1.
    MESSAGE i534(upc) WITH l_source_var.
    Variable &1 must be restricted to a value
    EXIT.
    ENDIF.
    SELECT * FROM /BIC/PTASSTCAT INTO TABLE lt_chavl
      WHERE asset_clas = ls_varsel-low.
      if sy-subrc <> 0.
        MESSAGE e026(upc) WITH ls_varsel-low '0ASSET_CLAS'.
    Attribute value not found
      exit.
    endif.
    ls_varsel-seqno = '0000'.
    ls_varsel-chanm = '/BIC/TASSTCAT'.
    LOOP AT lt_chavl INTO ls_chavl.
    ls_varsel-seqno = ls_varsel-seqno + 1.
    ls_varsel-low = ls_chavl-/BIC/TASSTCAT.
    APPEND ls_varsel TO eto_charsel.
    ENDLOOP.
    ENDFUNCTION.

  • Issue in BPS Variables

    Hi Guys,
    I am facing problem in BPS Variables.
    I created the variables 1.zqbs-  employee responsible --->Userentry/default value.
    2. zconpar-- contact partner----
    > Replacement type is user exit(Function Module)
    3. zconpar-- contact partner----
    > Replacement type is user exit(Function Module)
    ZCONPAR:  I am using the zqbs, planing area, characterstic name  as a import parameters and i am exporting the  output value to 0BP_ACTIVIT through zconpar
    ZCONPER:  I am using the zqbs, planing area, characterstic name  as a import parameters and i am exporting the  output value to 0BP_CONTPER through the zconper.
    These two variable info objects are calling in the planning layout lead column.
    based on contact partner it should display contact persons for the contact persons we are applying the conditions(bp_reltype = bur001,bp_reldir = 2) to filter the contact persons.
    In my case i am getting 3 values for the contact partner like 1000, 2000, 3000.
    i am getting 2 values for the contact persons if i run the variables individual.                              
    note: if i run BPS0 its going into loop and displaying multiple data means for 1 contact partner its applying all contact persons. at final it showing records like contact persons  X contact partners means it showing more unvalid records.
    how to avoid this situation.
    contact partner        contact person          bp_reltype     bp_reldir
    1000                        xxxx                          bur001            2               
    2000                        yyy                            bur002            2
    3000                         zzz                            bur001           2
    it should display like this
    1000                  xxx            
    2000                 
    3000                  yyy
    but it showing
    1000      xxx
    1000       yyy
    1000      zzz
    2000      xxx
    2000      yyy
    2000      zzz
    3000      xxx
    3000      yyy
    3000      zzz
    Regards,
    Anu..
    BW Consultant.

    Hi David,
    I have the coding up and running. I have not seen this error before and don't know how to resolve it. If you cut&paste it from the PDF, then maybe some special characters got pasted into the ABAP editor. Try to delete the line and type it in manually.
    Regards
    Marc
    SAP NetWeaver RIG

  • How to access BPS variables in ABAP Exit Function

    Hi Experts,
    I am using a Exit Function. My BPS variables contain multiple values. I want to trasfer then (may be directly read) to an internal table from where I can loop over then.
    Could you please suggest me the code for this?
    Points will be awarded.
    Thanks in advance,
    Shiwesh

    Did you try using the FMs API_SEMBPS_VARIABLE_GETDETAIL or Z_VARIABLE_GET_DETAIL for this?

  • Presentation variable is not supported in "SQL Issued"

    hi, there is a presentation variable called @{ps_var} from a prompt
    and I have written a custom sql and typed in "SQL Issued"
    !http://img31.imageshack.us/img31/8673/customsql.jpg!
    I found that the presentation variable is not supported in "SQL Issued" (exception flows when I clicked the "Set SQL" button.)
    (in the captured screen, it is hardcoded as 'REPLACED_BY_PRESENTATION_VARIABLE', no error occurs when I clicked the "Set SQL" button. the result is correct.
    however, when 'REPLACED_BY_PRESENTATION_VARIABLE' is replaced by @{ps_var}, exception flows when I clicked the "Set SQL" button.
    is there an alternatives to avoid the error ? or any ways to assign the selected value from the prompt to this sql ?
    thank you very much!

    Just set your presentation variable with an other method.
    Check here you will find how you can set a presentation variable for a filter
    http://gerardnico.com/wiki/dat/obiee/presentation_service/obiee_presentation_variable_area

  • BPS User Exit Variable based on Planning Package Selection

    Hi,
    I'm implementing a SAP BW-BPS planning layout to be integrated into the CRM we user interface.
    Most of the characteristic selections come from the CRM fields that need to be filled by the user when creates a trade promotion.
    The charcteristic selections work (as standard) just if in the planning level I flag "Selection in Package", then in package these selections are dinamically defined from what the user select in the CRM fields at runtime.
    My problem is that I have to build a BPS User Exit variable to filter, in the planning level, the proper Planning Area based on the CRM Sales Organization value.
    The characteristic CRM Sales Organization belongs to whose chararcteristic the value is determined dinamically in the planning package.
    Is it possible for a BPS user exit variable, set in the planning level, to catch the value of a characteristic selection made at planning package?
    Many thanks for your help.
    Alessandro

    Hi Indu,
    Many thanks for your answer.
    I have already took a look at the document posted by you but I didn't find the solution to my problem.
    This because i have to create a user exit variable that need to get the value of the characteristic selection in package.
    I mean in the planning level I will have the user exit variable that restrict the planning area and, his function module, need to read, at runtime, what is the value of the characteristic CRM Sales Organization restricted in package by CRM.
    So I don't have any idea to which BPS internal table I have referred to in my funcion module to catch the value of the CRM Sales Organization dinamically filtered by CRM.
    Many thanks,
    Alessandro

  • How To ... BPS Variables of type exit

    Dear All,
    I am reading the How To ... BPS Variables of type exit sap document.
    On chapter 3.3.1 step 10 to 12 it's explain how to populated variable, and check user exit action to display one value in fonction of an other one.
    Unfortunately on step 11, when I click on F4 I got nothing. I can't enter value.
    Would you please let me know if the system should be configured in a particular way ?
    Thanks

    Hi Luminy,
    If you have followed Step 2 with 2002 then you would have got that at f4
    regards
    Happy Tony
    <b>Points == Thanks</b>

  • BPS variables in IP

    Dear experts,
    we face the following problem: We want to migrate from BPS to IP, but have trouble with our BPS variables. We have user-defined variables and variables which are centrally maintained (e.g. 2 versions which shall be available for planning). When the user executes an input-ready query, F4-help should be restricted to the centrally maintained values.
    I know there are two ways, which are recommended:
    .) user-exit variable, which reads information from some table; problem with that, all values, which are read from the table are proposed in the variable screen (shown in the input line); so if you have 10 values, all of them will be preselected; if the user doesn't delete them from the input line all 10 values will be locked on the server; moreover F4-help is not restricted
    .) use authorizations; unfortunately we have different authorizations for planning and reporting; e.g. 2 versions for planning, but all for reporting; so in the F4-help we have all values available not just the 2 versions for planning
    Does anybody have an idea how to solve this issue?
    Best regards
    Michael

    Hello,
    Only way to restrict the values in F4 help in IP is via authorization. However, in BW7.3 we would be able to do so using BAdI.
    Regards
    Deepti

  • BPS Variables

    Hi there
    May somebody help me with the following problem: I have two variables in a BPS package and I want the second variable to show only these entries/values which are possible to select according to the combinations which are in the cube or maybe in the reference data. eg. i have the two variables, controlling area and cost center. so when I select a controlling area, I want the cost center variable only to give me these cost centers for selection which are in the selected cost area. as it's possible in BEX.
    Thank's
    Message was edited by:
            Martin Studer

    Hi Ravi
    First thanks.
    If my understanding of the How To BPS Variables of Type Exit is right, then what I'm looking for is descript in chapter 1.4 / 3.6 "One variable restricts the selection of another variable". But therefore in my exemple controlling area had to be a master data attribute of cost center. But my problem is that one costcenter can be in different controlling areas, so i can't define the controlling area as a master data attribute of costcenter. So can i still use this exit variable? May someone is working with the BI-content in this issue and can give me an input from there?
    Thanks again.
    Martin Studer
    Message was edited by:
            Martin Studer

  • BPS variable F4 help

    Hi,
       I am having a BPS Variable of type exit and if the output records are less ,say 10 iam getting the correct records in F4 help but if the record count is high like 8000 it is returning all values in the F4 help.
    Can any one tell me how to rectify this error.
    Thanks,
    Ramkumar

    Hi Ravi,
            Depending upon the planner my exit will return records. If the manager logs into the system them my exit will return 8000 records where as if a sales rep logs into the system then my exit will return 10 records and assume the records in the master data tables as 15000.
    The problum is that when the output record count is 10 iam getting all the 10 values in the F4 help. if the out put record count is 8000 then i am getting all the values from the master data tables (15000 records ) irrespective of the 8000 record what exactly the exit is populating .
    Even in the secound case also i want to see only the 8000 records in the F4 help not all the 15000 records.
    Is there any note that had to be applied to this issue. or did i missed any thing .
    Thanks,
    Ramkumar

Maybe you are looking for

  • File Not Found after soket transfer

    I have code written to upload a file to the server. the file uploads fine when i dont specify the dir. It uploads to the server current dir, but when i try to upload it to directory "tmp/uniqueDir/filename" that i create in my code i get filnotfound

  • PowerBook will not boot up

    Hi, I've recently been experiencing a problem with my PowerBook intermittently failing to startup and would appreciate any help in narrowing down the source of the problem. When I press the silver powerkey, I do not hear the startup chime, and there

  • English Language Screen Graphics?

    I am an American in Sweden and we are using inDesign in our office.  Although I have my Mac set up in English, the inDesign software is in Swedish.  Is there some sort of English "cheat sheet" that I could print out and use? This cheat sheet would ha

  • How to resolve error message "This patch is not applicable for you" on updating to v31/32?

    I'm attempting to update InDesign CS6 DPS v29 to v31/32 without any joy. Updates under the Help menu doesn't acknowledge that the update is required and both installers give the error message above.

  • How the **** do I authorize this macbook to my itunes?

    I have read the FAQ, but it says "go to the menu in the store" ummm, there is no menu, what do I do so I can download my purchases on my new macbook