BPS variables and API_SEMBPS_GETDATA

Hi, everybody!
I've faced with the following issue.
I have two planning levels. I have three variables: ZVPYEAR "Year of planning" (based on 0CALYEAR),
ZVPRESP "Responsible person" (based on ZRESP) and ZVPWBS "WBS-element" (based on 0WBS_element), as well.
Data in the plevel1 is restricted by variable ZVPYEAR and presented like this:
0WBS_ELEMENT 0CALYEAR 0RESP_PERSON 0START_DATE 0FINISH_DATE
        WBS1     2006        RESP1  01/01/2006   12/31/2006
        WBS2     2006        RESP1  03/01/2006   05/31/2006
        WBS3     2006        RESP2  04/01/2006   07/31/2006
        WBSN     2006        RESP3  08/01/2006   12/31/2006
Data in the plevel2 is restricted by variable ZVPYEAR, ZVPRESP and ZVPWBS. Moreover, list of available WBS-elements for
ZVPWBS I read from plevel1 using the following FM.
FUNCTION ZMZ_WBS_LOAD.
*"  IMPORTING
*"     VALUE(I_AREA) TYPE  UPC_Y_AREA
*"  EXPORTING
*"     REFERENCE(ETO_CHARSEL) TYPE  UPC_YTO_CHARSEL
  DATA: area      TYPE  upc_y_area             VALUE 'PAREA',
        plevel    LIKE  upc_plevel-plevel      VALUE 'PLEVEL',
        package   LIKE  upc_package-ppackage   VALUE 'PPACKAGE',
        layout    LIKE  upp_param-param        VALUE 'PLAYOUT',
        read_only LIKE  upp_ys_flags-read_only VALUE 'X'.
  DATA: res LIKE sy-subrc,
        res_mess TYPE bapiret2 OCCURS 0.
  DATA: lt_head  TYPE upc_ys_api_head OCCURS 0,
        ls_head  TYPE upc_ys_api_head,
        lt_col   TYPE upc_ys_api_col  OCCURS 0,
        ls_col   TYPE upc_ys_api_col,
        lt_row   TYPE upc_ys_api_row  OCCURS 0,
        ls_row   TYPE upc_ys_api_row,
        lt_rates TYPE upc_ys_api_data OCCURS 0,
        ls_rates TYPE upc_ys_api_data.
  DATA: ls_varsel TYPE upc_ys_charsel.
  DATA: BEGIN OF lt_select OCCURS 0,
        /BIC/ZWBS  TYPE /BIC/OIZWBS,
  END OF lt_select.
  DATA: ls_select LIKE LINE OF lt_select.
  DATA: lr_variable TYPE REF TO cl_sem_variable.
  DATA: lt_values   TYPE upc_yto_charsel.
  DATA: ls_values   LIKE LINE OF lt_values.
  CLEAR lt_values[].
  FREE lr_variable.
reading data from planning level
  CALL FUNCTION 'API_SEMBPS_GETDATA'
    EXPORTING
      i_area      = area
      i_plevel    = plevel
      i_package   = package
      i_layout    = layout
      i_read_only = read_only
    IMPORTING
      e_subrc     = res
    TABLES
      etk_head    = lt_head
      etk_row     = lt_row
      etk_col     = lt_col
      etk_data    = lt_rates
      etk_return  = res_mess.
  IF sy-subrc <> 0.
   RETURN.
  ENDIF.
getting value of ZVPRESP
  CALL METHOD cl_sem_variable=>get_instance
    EXPORTING
      i_area       = area
      i_variable   = 'ZVPRESP'
    RECEIVING
      rr_variable  = lr_variable
    EXCEPTIONS
      not_existing = 1
      OTHERS       = 2.
  IF sy-subrc <> 0.
    RETURN.
  ENDIF.
  CALL METHOD lr_variable->get_value
    EXPORTING
      i_user     = sy-uname
      i_restrict = 'X'
    RECEIVING
      rto_value  = lt_values
    EXCEPTIONS
      error      = 1
      OTHERS     = 2.
  IF sy-subrc <> 0.
    RETURN.
  ENDIF.
restrict WBS according to selected variable ZVPRESP
  LOOP AT lt_values INTO ls_values.
    AT NEW low.
    SELECT /BIC/ZWBS FROM /BIC/PZWBS
                           INTO ls_select-/BIC/ZWBS
                           WHERE /BIC/ZRSPNS = ls_values-low.
     IF sy-subrc = 0.
      APPEND ls_select TO lt_select.
     ENDIF.
    ENDSELECT.
    ENDAT.
  ENDLOOP.
    IF lt_select[] IS INITIAL.
     RETURN.
    ENDIF.
returns available WBS-eleemnts
    SORT lt_row BY chavlext.
    ls_varsel-seqno = '0000'.
    ls_varsel-chanm = 'ZWBS'.
    ls_varsel-sign  = 'I'.
    ls_varsel-opt   = 'EQ'.
    LOOP AT lt_row INTO ls_row.
      AT NEW chavlext.
       READ TABLE lt_select
            INTO  ls_select
            WITH KEY  /BIC/ZWBS = ls_row-chavlext.
        IF sy-subrc = 0.
          ls_varsel-seqno = ls_varsel-seqno + 1.
          ls_varsel-low = ls_row-chavlext.
          APPEND ls_varsel TO eto_charsel.
        ENDIF.
      ENDAT.
    ENDLOOP.
ENDFUNCTION.
At the first time everything works fine. But, when I try to change value of ZVPYEAR or ZVPRESP,
list of available values of WBS-elements for ZVPWBS is returned empty.
Perhaps, I should to add something in my FM?
I use
Softw. comp. |Release   |Level |Highest SP          |Description
--------++--
SAP_BASIS    |620       |0055  |SAPKB62055          |SAP Basis Component
SAP_ABA      |620       |0055  |SAPKA62055          |Cross-Application Component
SAP_BW       |310       |0022  |SAPKW31022          |Business Information Warehouse
PI_BASIS     |2004_1_620|0010  |SAPKIPYI5A          |Basis Plug-In (PI_BASIS) 2004_1_620
FINBASIS     |200       |0018  |SAPK-20018INFINBASIS|FINBASIS 200: Add-on installation reques
BI_CONT      |330       |0017  |SAPKIBICQ7          |Business Intelligence Content
SEM-BW       |350       |0018  |SAPKGS3518          |SEM-BW 3.2 : Installation.

Hi,
Before going through your coding, could you check following first:
Are you using web or GUI?
If you are using web, you can set that Var: ZVPYEAR or ZVPRESP shall be refreshed after change of certain variable.
Check out also, if there is entry in table UPC_DARK2 whether  the variable buffer is set (PARAM = 'VAR_BUFFER' VALUE = 'X' ?? )!
check also following notes:
720265, 888016, 629775.
Best Regards,
Suan Liono

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

  • Clear BPS variables values

    I wrote an ABAP program to clear BPS variables values defined for the user.
          DATA:
          lr_variable TYPE REF TO cl_sem_variable.
    * Get variable instance
          CALL METHOD cl_sem_variable=>get_instance
            EXPORTING
              i_area       = I_AREA
              i_variable   = 'ZPVDEP' "z_v_var
            RECEIVING
              rr_variable  = lr_variable
            EXCEPTIONS
              not_existing = 1
              OTHERS     = 2.
          IF sy-subrc <> 0.
    * do s.th., eg send a message
            EXIT.
          ENDIF.
    * delete the restrictions
          CALL METHOD lr_variable->set_user_restriction
            EXPORTING
              i_user   = sy-uname
              i_delete = 'X'
            EXCEPTIONS
              failed   = 1
              OTHERS   = 2.
    In BPS0:
    1. i restrict the variable with some values
    2. execute planning function to clear the variable values
        But the restriction remains.
    3. When i do /nBPS0 the variable restriction clears
    As far as i understand the problem is in buffer. How can i clear buffered values of the variable in ABAP program?
    i tried to call  method CL_SEM_VARIABLE=>RESET_BUFFER.
    but it doesn't work.
    Thanks

    Also i try such an ABAP code
          SELECT *
          FROM upc_var_cha_sel
          INTO CORRESPONDING FIELDS OF TABLE it_var_cha_sel
          WHERE    area    = I_AREA
               AND var     = ls_exitp-CHAVL
               AND varuser = sy-uname.
          IF sy-subrc = 0.
            DELETE upc_var_cha_sel FROM TABLE it_var_cha_sel.
            CALL FUNCTION 'DB_COMMIT'.
          ENDIF.
          REFRESH it_var_cha_sel.
          SELECT *
          FROM upc_var_cha_act
          INTO CORRESPONDING FIELDS OF TABLE it_var_cha_sel
          WHERE    area    = I_AREA
               AND var     = ls_exitp-CHAVL
               AND varuser = sy-uname.
          IF sy-subrc = 0.
            DELETE upc_var_cha_act FROM TABLE it_var_cha_sel.
            CALL FUNCTION 'DB_COMMIT'.
          ENDIF.
    But the problem is the same
    In BPS0:
    1. i restrict the variable with some values
    2. execute planning function to clear the variable values
    But the restriction remains.
    3. When i do /nBPS0 the variable restriction clears
    Thanks

  • 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 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.

  • Us Planning Function to Update BPS Variable

    I have read through several 'How To' papers on variables, but did not come across this.  Is it possible to develop a planning function (FOX or User Exit) to prgramatically read and then update a BPS variable?

    <FONT FACE = "Tahoma", Font Color = "Blue">
    Hi<br>
    --> You can write an ABAP Exit Variable and populate TO variable as From Variable + 1. You can then use both these variables in a Planning Level and use Normal BPS Copy to copy data from FROM version to TO version. You can include this Function in a Global Planning Sequence and later on include this Sequence in a process chainby creating variant on Standard Program UPC_BUNDLE_EXECUTE.<br><br>
    Let us assume that because of some reasons you don't want to write ABAP Exit. Then you can write a FOX Code to do copy for you. Choose Version as Field to be changed. You can use TMVL operator in FOX to increment your FROM variable and populate your TO variable. You would have to include all of your characteristics in your planning level to be safe. But please note that this is not a recommended way to do copy. You should use standard BPS Copy Function as far as possible.
    <br><br>
    Hope it helps.<br>
    Cheers Abhijit</FONT><FONT FACE = "Verdana", Font Color = "Red">
    Please assign Reward Points if I deserve them in your opinion
    </FONT>

  • 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

  • How to get BW-BPS variable value into Visual Basic?

    Hello,
    Scenario:
    Time characteristic 0FISCYEAR has a variable ZVFYEAR. In layout this time characteristic is defined as DATA COLUMN. When user changes VFYEAR variable’s value i want to get the value of variable into Visual Basic and to format header for table in the layout.
    How to get BW-BPS variable value into Visual Basic?
    Could you help me?
    Thanks in advance.
    Best Regards,
    Arunas Stonys

    Hi,
    If i understand your requirments correctly ,you need to read the value of the Variable and Put it on the layout. Here is how  i would solve this,
    Read the value of the variable using an ABAP program.The logic for this would be to read the variable value and post it on the layout on a cell.You can do this by calling the ABAP program on opening the layout.this can be done using LB_EXIT_FM  T-code. Now using the  SAP delivered SAPAfterDataPut  macro, read the cell in which you have placed the variable values and assign it to the necessary values you want to on the layout.All this will be done before the layout opens.
    Hope this helps.
    regards
    Sai Vishnubhatla

  • 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

  • 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

  • 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 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.

  • Texts in bps variable

    Hi gurus,
    I have a following problem:
    I work in BW 7.0. I have character1 (xkl_kv) with compounding with two characters (xrsk, xmrsk). I create a bps variable that is processed by user-exit.  After user-exit is executed in my bps variable I have not any texts. Instead of texts I see only character1u2019s  values.
    How can I display texts?
    Following is code of my user-exit:
    FUNCTION Y_OKB12.
    ""Eieaeuiue eioa?oaen:
    *"  IMPORTING
    *"     VALUE(I_AREA) TYPE  UPC_Y_AREA
    *"     VALUE(I_VARIABLE) TYPE  UPC_Y_VARIABLE OPTIONAL
    *"     VALUE(I_CHANM) TYPE  UPC_Y_CHANM
    *"     VALUE(ITO_CHANM) TYPE  UPC_YTO_CHA
    *"  EXPORTING
    *"     REFERENCE(ETO_CHARSEL) TYPE  UPC_YTO_CHARSEL
    *"     REFERENCE(ETO_ATTR) TYPE
    UPC_YTO_ATTR
      CONSTANTS:
      l_buffer_call TYPE boole-boole VALUE ' '.
      DATA: ls_varsel TYPE upc_ys_charsel,
            ls_chacmp type upc_ys_chacmp,
            ls_attr type UPC_Ys_ATTRSEL.
      CASE i_chanm.
        WHEN 'XKL_KV'.
          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_ys_charsel,
          lto_chanm TYPE upc_yto_cha,
          lt_chavl LIKE /bic/pxkl_kv OCCURS 1000 WITH HEADER LINE,
          ls_chavl LIKE lt_chavl.
    read source value
          CALL FUNCTION 'Z_VARIABLE_GET_DETAIL'
            EXPORTING
              i_area         = i_area
              i_variable     = 'XRSK'
              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.
          DATA: l_entries TYPE i.
          READ TABLE lto_varsel INTO lto_var 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_varsel LINES l_entries.
          IF l_entries <> 1.
    EXIT.
          ENDIF.
          SELECT * FROM /bic/pxkl_kv INTO TABLE lt_chavl
             WHERE ( /BIC/XNAP_KV = '1.' OR /BIC/XNAP_KV = '2.' ) and ( /BIC/XKL_KV <> '0,00000000000000000000001' ) and ( /BIC/XKL_KV <> '0,00000000000000000000002' )
                  AND /bic/xrsk EQ lto_var-low.
          IF sy-subrc <> 0.
            EXIT.
          ENDIF.
          types: begin of tkey,
             XKL_KV type /BIC/OIXKL_KV,
             TXTLG type RSTXTLG,
           end of tkey.
           types keys(60) type c.
          data: keystr type string,
          key type tkey,
          keytab type tkey occurs 10.
          ls_varsel-seqno = '0000'.
          ls_varsel-chanm = 'XKL_KV'.
          LOOP AT lt_chavl INTO ls_chavl.
            ls_varsel-seqno = ls_varsel-seqno + 1.
            ls_varsel-opt = 'EQ'.
            ls_varsel-sign = 'I'.
            ls_varsel-low = ls_chavl-/bic/xkl_kv.
            APPEND ls_varsel TO eto_charsel.
          ENDLOOP.
    Thank you for your advice.
    Regards,
    Veronika.

    up

  • Bps variable by authorization

    Dear Friends,
    I can tell a bps variable value is authorization-derived.
    How can  I know straightaway what is the authorization / object tied to this so that I can check / set the  authorization?
    Please can you give me some hints.
    regards
    H.C

    <FONT FACE = "Tahoma", Font Color = "Blue">
    Hi<br>
    In BW 3.x, you can even go to t-code SU01, Enter User ID (whose authorizations have to checked) and press the Display button at top to see User Profile.<br>
    In the next screen, you can navigate to different tabs like roles, profiles etc to get more details. If you double click on any role, system will display the specifics of that role.
    <br><br>
    Hope it helps.<br>
    Cheers Abhijit</FONT><FONT FACE = "Verdana", Font Color = "Red">
    Please assign Reward Points if I deserve them in your opinion
    </FONT>

  • 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

Maybe you are looking for

  • HT4623 Can I still upgrade to iOS 6?

    I never upgraded my iPhone 4S from iOS 5 to iOS 6. Now that iOS 7 is out, is it still possible to upgrade to iOS 6? How do I do it?

  • How do i colour a selection?

    Hi, I just recently purchased Adobe Photoshop CS4. I haven't used this program for many years and it's changed considerably. The last version i owned was Adobe Photoshop 7. In Photoshop 7, i believe there was a paintbucket tool. This tool doesn't see

  • Holiday calendars

    Hi all,                  I need your suggestion to solve this issue related to public holiday calendars. Jul 4th(paid) is a public holiday and that has been assigned as a fixed day/date when created. In the calendar where it is used, the validity dat

  • Connecting to phone through headset input

    I want to connect a microphone mixer to my Blackberry so I can 2 announcers do a radio broadcast from a High School sports event?  I think I have the right connections, but the phone seems to put some signal back through the headset and it interferes

  • Newest update did not work

    I tried twice to update to the new software on my Apple TV, and got the same error message that the update was unsuccessful.  Any suggestions?