User-exit in sem-bps

In SEM-BPS, I have a layout for manually entering data. The purpose is to enter values for a list of cost centers. This list
of cost centers should change according to a SKF (statistical key figure) entered in the layout's header.
The list of cost centers linked to a given SKF is read from a database table.
This whole process is achieved with the use of a variable of type user-exit.
However, I have two problems:
1) If I change the SKF in the layout's header, I'm not beeing able to force another read to the database table, in order to
refresh the cost center list;
2) I'm not being able to detect the SKF selected in header, altough I'm using the function API_SEMBPS_VARIABLE_GETDETAIL to
do so, wich returns all the SKF's (statistical key figures)
Can anybody help me ?
Thank you,
Ricardo
PS: Here is the exit, in its present state:
<b>FUNCTION ZLACT_SFK_CC.
""Interface local:
*"  IMPORTING
*"     VALUE(I_AREA) TYPE  UPC_Y_AREA
*"     VALUE(I_VARIABLE) TYPE  UPC_Y_VARIABLE
*"     VALUE(I_CHANM) TYPE  UPC_Y_CHANM OPTIONAL
*"     VALUE(ITO_CHANM) TYPE  UPC_YTO_CHA
*"  EXPORTING
*"     REFERENCE(ETO_CHARSEL) TYPE  UPC_YTO_CHARSEL
  DATA: ls_charsel TYPE upc_ys_charsel,
        seqno type i,
        tab_val_sel LIKE UPC_YS_API_VARSEL occurs 0 with header line,
        tab_val_sel_all LIKE UPC_YS_API_VARSEL occurs 0 with header line,
        head like UPC_YS_API_HEAD occurs 0 with header line.
  CLEAR:
  eto_charsel, eto_charsel[] ,
  tab_val_sel, tab_val_sel[] ,
  ls_charsel, char_value, seqno,
  t_ccusto, t_ccusto[],
  t_iest, t_iest[].
  case i_variable.
    WHEN 'PRVCCIE'.
Get value of statistical key figure entered in layout's header****
CALL FUNCTION 'API_SEMBPS_VARIABLE_GETDETAIL'
   EXPORTING
     I_AREA                   = 'PRRVS'
     I_VARIABLE               = 'PRVSK'
   TABLES
     ETK_VARSEL              = tab_val_sel.
select cost center list from database table ***********************
    select
      from ZPR_CC_IE_CG
      appending corresponding fields of table t_ccusto
      where iest = tab_val_sel-low.
      clear:seqno.
      loop at tab_val_sel.
        ADD 1 TO seqno.
        ls_charsel-low   = tab_val_sel-low.
        ls_charsel-seqno = seqno.
        ls_charsel-opt   = 'EQ'.
        ls_charsel-sign  = 'I'.
        ls_charsel-chanm = '0STKEYFIG'.
        INSERT ls_charsel INTO TABLE eto_charsel.
      endloop.
      loop at t_ccusto.
        ADD 1 TO seqno.
        ls_charsel-low   = t_ccusto-ccusto.
        ls_charsel-seqno = seqno.
        ls_charsel-opt   = 'EQ'.
        ls_charsel-sign  = 'I'.
        ls_charsel-chanm = i_chanm.
        INSERT ls_charsel INTO TABLE eto_charsel.
      ENDLOOP.
  when others.
*do nothing
  ENDCASE.
endfunction.</b>

Hello,
I use the exit in the planning level and I link the exit to a variable for "0FISCPER".  I copy the data from a "Non-transactional Cube" to a "Transactional Cube" derictly of the period end closing.  I still need the data in previous month for calculations in BPS.  Maybe, I can use your code.
Thanks and best regards
Constant

Similar Messages

  • Merge an SEM-BPS System to BW System

    Hi,
    actual SEM-BSP is installed on an own system and the planning area is linked via a rfc-connection to the BW System. Now we want to update the BW to 3.5 and migrate the BPS System to the BW system.
    Can I transport the BPS customizing from the SEM system to the BW system and the change from rfc-connection to an InfoCube? How?
    Does anyone have any experience with this.
    Thanks in advance,
    Matthias

    Hello Matthias,
    well, in general Alberto is right. However, also he says that he has done it several times, he was a bit lucky
    There are limitations. SEM-BPS has 10 more planning functions than BW-BPS. If you used any of those 10, then you the application will not work on BW-BPS. You can implement them using FOX or exit functions.
    Have you implemented any exits in SEM-BPS? If yes, you will have to transport the ABAP things as well. How about custom tables? There could be conflicts and/or differences between the two systems.
    Are the global customizing settings the same on both systems? Exchange rates? Fiscal year variants?
    Have you thought about authorizations and roles?
    Are you using STS?
    That's probably not all... In summary, it's just not as easy as it sounds.
    Regards
    Marc
    SAP NetWeaver RIG
    PS: We are working on a consolidated list in the RIG. Please send me any feedback about the merge process.

  • SEM-BPS: Variables of type hierarchy node user exit

    Hi,
    I read the "How to.." document "Variables of Type Exit".
    This document has example for variable type caracteristic.
    I need to use this kind of solution for global variables:
    I have the same variables in several planning areas. I have defined one ‘leading’ area containing the variable that should automatically set/adjust the corresponding variables in the other planning areas.
    I've created a SEM variable of type hierarchy node and with the replacement type user exit. There is a standard function module API_SEMBPS_VARIABLE_GETDETAIL which has to provide the selected hierarchy node in leading area to other areas.
    The function works ideally in test mode, but it doesn't work as the SEM user exit.
    Does anyone have experience in this problem?
    Thanks

    Your function module shall follow the expected interface (required for exit type). Function API_SEMBPS_VARIABLE_GETDETAIL is not for such usage.
    To see an example FM that is fit for a 'user exit' processing for hierarchy node, have a look at FM UPF_VARIABLE_USER_EXIT_HIER. There is inline documentation in the source code that shall help you create your own FM if required.
    cheers,

  • How to create an user input variable in SEM-BPS?

    Hi,
    anyone please guide me how to create an user input variable in SEM-BPS? I want to utilized user input variable to udpate characteristic with repost function.
    I tried to create in planning folder, variables right-click create, but the system said 'operation cannot be executed here'...
    please help....
    thanks.

    Hi Bindu,
    would you give me one more help,
    I want to use the variable created for a repost process, how do I achieve that?
    My scenario:
    - There will be a repost function on the planing folder
    - User can select a row or many rows then click the repost function button, then a popup window will appear for user to input the value for the variable
    Is it possible with the scenario? Please advise if I can use standard repost function or should i create a FOX or exit function for this purpose.
    thanks.

  • Create new BPS documents from "COPY DOCUMENTS" user exit.

    Hi Gerd,
    thank you so much for your reply.
    I'm continuing other thread here. (Copy "document icon" to new sheet from "SEM-BPS 1" sheet)
    <b> We've a layout that doesn't use macros. </b>
    We'd like to attach a document for each line that is entered on this layout. All the document attribute characteristics are included in this layout.
    Document contents & technical name can be any thing.
    Should I be able to do this?
    This ensures that users be able to edit documents on other layouts which is crucial.
    I tested this For couple of lines and I was successful.
    Before I'd like to start implementing this, I appreciate your inputs on the prcoess that I follow if this is an effective way of doing?
    Any concerns from the performance side?
    any other hidden issues/concerns that you might be familiar with?
    1) I'm reading all document attribute characteristic values of the layout new lines from the user exit.
    2) I've created one variable for each "document attribute characteristic"
    3) I've created "COPY DOCUMENTS planning function" and included variables in the parameter group
    4) user exit in step 1 fills all variables (fills only 1 value at a time) & passes to "COPY DOCUMENTS parameter group"
    4) due to restriction of only single entry variables usage in
    "COPY plannig funciton", I'm using "API_SEMBPS_FUNCTION_EXECUTE" and executing "COPY DOCUMENTS planning funciton" as many times as number of new lines
    5) if there are 6 new lines, user exit in step 1 loops 6 times & calls "API_SEMBPS_FUNCTION_EXECUTE" 6 times which inturn executes "COPY DOCUMENTS planning funciton" 6 times
    Am I on the right & effective path?
    Is there any better approach?
    Appreciate your inputs

    Hi,
    This is one way you can do that. The bad side of your implementation is that the planning function is called 6 times. It would be better to copy the coding of the planning function and modify it in such a way that you can do all of the steps in one go. If the performance is all right I would still leave it the way it is as then you do not have to change to coding.
    Best regards,
    Gerd

  • User Exit for reading data from a hierarchy in BW-BPS

    Hello Forum,
    How can i fetch all the records from a particular node in a Hierarchy using a user exit in a variable in BW-BPS,
    Plz Help,
    Regards,
    KK

    Hi,
    This is a sample code that may help you.
    DATA: BEGIN OF wa_val,
            from TYPE rsleaffrom,
            to   TYPE rsleafto,
          END OF wa_val,
          tb_val LIKE wa_val OCCURS 0 WITH HEADER LINE,
          tb_grpval_ce LIKE wa_val OCCURS 0 WITH HEADER LINE,
            tb_ce_val   TYPE rshi_t_hienode,
            tb_ce_intervl TYPE rshi_t_interval,
            wa_hiedirkey TYPE rshi_s_rshiedirkey,
            tb_node_val TYPE rshi_t_hienode,
            tb_interval TYPE rshi_th_interval,
            wa_interval TYPE rshi_s_interval,
    SELECT SINGLE hieid objvers FROM /bi0/haccount
                    INTO wa_hiedirkey
                    WHERE nodename = group-name.
      CALL FUNCTION 'RSSH_HIERARCHY_READ'
        EXPORTING
          i_rshiedirkey     = wa_hiedirkey
          i_date            = sy-datum
        IMPORTING
          e_t_rsnodes       = tb_node_val
          e_th_rsinterval   = tb_interval
        EXCEPTIONS
          invalid_hierarchy = 1
          name_error        = 2
          iobj_not_found    = 3
          OTHERS            = 4.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    thanks
    pratyush

  • 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

  • BPS Attribute as Variable filled with User-Exit

    Hello,
    how is it possible to set a variable from the type "attribute" in BPS with an User-Exit?
    Example: Characteristic = Material, Attribute = Material class
    How can I set valid entries for Material class in a User-Exit?
    Thanks for help in advance
    Eckhard

    Eckhard,
    You can solve this by using characteristic relationship type exit. there you can put a function where you can find the values for the attribute material class.
    greets,
    Jeroen

  • BPS User exit Allocations

    Hi Experts,
    I am brand new to BPS and I have to write code for BPS user exit for allocations.
    i have to read the ods to obtain the rule for sender cost center. for each sender cost center exit needs to determine net posted values for cost elements by referencing postings made in BPS cost center planning area. and this updates needs to made in cost center planning area.
    the same thing i have to do for receiver side.  each of receiver's receives proportion of corresponding sender assessment amount and this should be posted against specified characteristic like sub-region, profit center etc which are obtained from ODS.
    is any one of you have any sample code ? please guide me.
    thanks in advance

    Hi Ravi,
    What i have to is, I have to read one ODS table (a rule table ) which has key fields like allocation, start date and segment number and data fields like sequence number, rule, sender percentage,assessment / distribution rule, field group, version, sender cost center, sender cost element low and high, company code, receiver profit center, primary lc, sub lc, sub-region, controlling area and cost element.
    Now for each sender cost center in ODS, i have to write BPS User Exit, that will determine net posted values for cost elements listed in ODS, by referencing postings made in BPS cost center planning area(PACCA) and updates is made to PACCA.. The amount field is there in the list of "Fields to be Changed" in the planning level where this Exit will trigger.
    On Receiver side, receiver postings is based on referencing ODS sender cost center. Each receiver receives proportion of corresponding sender assessment amount (based on percentage) and this is posted to the specified value field to the specified receiver characteristics like sub-region, profit center, sub LC and/or LC which will be obtained from again ODS. The weighting that each receiver gets is determined by the exit referencing the dta in BPS COPA planning area (PAREVCOG) for specified plan version and value field (as listed in rules stored in ODS) and determining the weighting that each receiver should get. This updates will made to PAREVCOG.
    Ravi, This is high level requirement.
    Now, it would be great, if you have something similar or you can guide me how exactly I have to proceed step by step. I am really new to BPS so some sample code it would be great help.
    Regards,
    SKS

  • Ugrent help. User exit- Read data from BW BPS layout and write to ODS

    Hi,
    I am new to BW BPS and have a req. where i need to read data from BPS layout (EXCEL) and write it to ODS.
    Is there any function module or user exit which read data from excel layout and upload it to ODS. Or can any one help me out how can i write a code for this.
    It is urgent and i need your help.
    Appreciate any kind of input.
    Thanks
    Mamatha

    Dear Mamatha,
    read following documents. i hope it will work for you.
    [http://www.geocities.com/cynarad/reference_for_bps_programming.pdf]
    [Accessing BW Master Data in BPS Functions using ABAP ( Exit Function )|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d3dcc423-0b01-0010-4382-aa3e0784b61e]
    Regards,
    Malik
    Give me points if its helpful for you.

  • BW-BPS Variables of type hierarchy node - user exit

    Hello,
    I created a variable SEM of type hierarchy node and with the replacement type "user exit". So I created a function to fill this variable and I don't find the right type for import and export parameters of my function. I have a dump : CALL_FUNCTION_CONFLICT_TYPE in the method GET_HIE_NODES
    Thank you for your help.
    Catherine Bellec

    Hello,
    For your information :
    the input parameter has the type UPC_YS_HIE_KEY and
    the export parameter the type UPC_YT_HIESEL
    Catherine Bellec

  • Problem with execute User-exit  in BPS

    hi all.
    I made user-exit for BPS, the function is validate values in master tables.
    the user insert datas in layout and the response time is very slow.
    We analyzed and the program called the user-exit  the same number of times exist in the layout.
    there was any way to make the process into data packets and not data by data or to make it faster processing
    Thanks
    Francisco.

    put filters wrapping your user -exit code so that the latter is accessed only for the necessary cases.

  • BPS Allocations User Exit

    Hi Gurus,
    I am new to the world of BPS and as being a developer I need to write User Exit for Allocations.
    Is any one of you have developed User Exit for BPS Allocations? if any does, it would be great if you can pass the code, for User Exit BPS Allocations.
    Your help is highly appreciated.
    Thanks and Regards,

    Hi Ravi,
    What i have to is, I have to read one ODS table (a rule table ) which has key fields like allocation, start date and segment number and data fields like sequence number, rule, sender percentage,assessment / distribution rule, field group, version, sender cost center, sender cost element low and high, company code, receiver profit center, primary lc, sub lc, sub-region, controlling area and cost element.
    Now for each sender cost center in ODS, i have to write BPS User Exit, that will determine net posted values for cost elements listed in ODS, by referencing postings made in BPS cost center planning area(PACCA) and updates is made to PACCA.. The amount field is there in the list of "Fields to be Changed" in the planning level where this Exit will trigger.
    On Receiver side, receiver postings is based on referencing ODS sender cost center. Each receiver receives proportion of corresponding sender assessment amount (based on percentage) and this is posted to the specified value field to the specified receiver characteristics like sub-region, profit center, sub LC and/or LC which will be obtained from again ODS. The weighting that each receiver gets is determined by the exit referencing the dta in BPS COPA planning area (PAREVCOG) for specified plan version and value field (as listed in rules stored in ODS) and determining the weighting that each receiver should get. This updates will made to PAREVCOG.
    Ravi, This is high level requirement.
    Now, it would be great, if you have something similar or you can guide me how exactly I have to proceed step by step. I am really new to BPS so some sample code it would be great help.
    Regards,
    SKS

  • BPS Help with user exit.----- Quick one for Marc.B?

    Hi All,
           I'm using an user exit to prefix the GL/account with '2' to make it a stat account.In the fields to be changed , i have included all the characteristics like gl account,region,line of business...key fig name..etc.However when i run the exit, my key figure amount is doubling up.Need a quick fix or a second pair of eyes..also found that xth_data cannot be used in MODIFY statement because of hash table .so I'm using a collect.But as soon as i exit out of the loop, the key figure amount doubles....any pointers????
    Here is the code.................................
    FUNCTION Z_SEM_PREFIX_2ACCOUNTS.
    ""Local interface:
    *"  IMPORTING
    *"     REFERENCE(I_AREA) TYPE  UPC_Y_AREA
    *"     REFERENCE(I_PLEVEL) TYPE  UPC_Y_PLEVEL
    *"     REFERENCE(I_PACKAGE) TYPE  UPC_Y_PACKAGE
    *"     REFERENCE(I_METHOD) TYPE  UPC_Y_METHOD
    *"     REFERENCE(I_PARAM) TYPE  UPC_Y_PARAM
    *"     REFERENCE(IT_EXITP) TYPE  UPF_YT_EXITP
    *"     REFERENCE(ITO_CHASEL) TYPE  UPC_YTO_CHASEL
    *"     REFERENCE(ITO_CHA) TYPE  UPC_YTO_CHA
    *"     REFERENCE(ITO_KYF) TYPE  UPC_YTO_KYF
    *"  EXPORTING
    *"     REFERENCE(ET_MESG) TYPE  UPC_YT_MESG
    *"  CHANGING
    *"     REFERENCE(XTH_DATA) TYPE  HASHED TABLE
      DATA:
        ls_data   TYPE t_s_alloc,
        lth_data  TYPE t_th_alloc.
    *Loop thru the data and check if its a valid GL account.
    *If its a valid GL account, Prefix '2' to the beginning of the
    *account and also add 'DDD' to the transaction type in order to
    *identify the record.once the prefixing is over , you will have the  old as well as the new set of records.
    *records as they will not have the 'LOB' flag in the transaction type.
      lth_data = xth_data.
      LOOP AT lth_data INTO ls_data.
        if ls_data-s_chas-0gl_account
                                    is not initial.
           if ls_data-s_chas-0gl_account+3(1) = '0' AND
             ls_data-s_chas-0gl_account+4(1) <> '0'.
              concatenate '000' '2'
              ls_data-s_chas-0gl_account+4(6)
              into ls_data-s_chas-0gl_account.
              ls_data-s_chas-zoctrtype = 'LOB'.
           endif.
       endif.
      collect ls_data into lth_data.
      ENDLOOP.
    DELETE Lth_data
            where s_chas-0gl_account+3(1) <> '2' and
                  s_chas-zbpsflag = 'C'.
      xth_data = lth_data.
    ENDFUNCTION.

    Hi Sudz,
    you got it almost right. If you do the collect the system will add the changed records to the exiting ones since you start with lth_data = xth_data. So use the following logic:
    start with empty table
    refresh lth_data.
    now process all exiting data
    LOOP AT xth_data INTO ls_data.
    if ls_data-s_chas-0gl_account is not initial.
    if ls_data-s_chas-0gl_account+3(1) = '0' AND
    ls_data-s_chas-0gl_account+4(1) <> '0'.
    concatenate '000' '2' ls_data-s_chas-0gl_account+4(6)
    into ls_data-s_chas-0gl_account.
    ls_data-s_chas-zoctrtype = 'LOB'.
    endif.
    endif.
    and collect the new data
    collect ls_data into lth_data.
    ENDLOOP.
    return only the new data
    xth_data = lth_data.
    Regards,
    Marc
    SAP NetWeaver RIG

  • BPS Variable for hierarchy type User-Exit

    I try to make this type of variable.
    The variable is NCSTOPU, hierarchy is
    NHSTOPU like
    NHMAIN
    -- 4
        -- 401
        -- 402
        -- 403
      -- 5
         -- 501
         -- 502
         -- 503
    So The ABAP is
    FUNCTION ZCCB_AHR_VAR_HIER.
    *"*"Ëîêàëüíûé èíòåðôåéñ:
    *"  IMPORTING
    *"     REFERENCE(I_TYPE) TYPE  UPC_Y_VAR_TYPE
    *"     REFERENCE(I_AREA) TYPE  UPC_Y_AREA
    *"     REFERENCE(I_VARIABLE) TYPE  UPC_Y_VARIABLE
    *"     REFERENCE(IS_HIE_KEY) TYPE  UPC_YS_HIE_KEY
    *"  EXPORTING
    *"     REFERENCE(ET_HIE_NODES) TYPE  UPC_YT_HIESEL
    DATA ZHIER type upc_ys_hiesel.
    *CHANM  UPC_Y_CHANM
    *HIENM     UPC_Y_HIENM
    *HIEVER     UPC_Y_HIEVER
    *DATETO     UPC_Y_DATETO
    *NODENAME     UPC_Y_NODENAME
    *HIECHA     UPC_Y_CHANM
    *DUMMY_LEAF     UPC_Y_DUMMYLEAF
    *TO_CHADEP     UPC_YTO_CHADEP
    ZHIER-CHANM      = 'NCSTOPU'.
    ZHIER-HIENM      = 'NHSTOPU'.
    ZHIER-NODENAME   = '5'.
    ZHIER-HIEVER     = 'A'.
    ZHIER-HIECHA     = '5'.
    ZHIER-DUMMY_LEAF = ''.
    ZHIER-DATETO     = '99993112'.
    INSERT ZHIER INTO TABLE ET_HIE_NODES.
    ENDFUNCTION.
    But it doesn't work.
    The mistake is
    Selected node 5 does not exist
    The node 5  selected as the start value for characteristic 5 with the specified compound table does not exist in hierarchy NHSTOPU.
    What is the problem?

    Configuration of the variable:
    Variable Type - Hierarchy node,
    Characteristic - NCSTOPU,
    Hierarchy - NHSTOPU,
    Replacement type - user-exit,
    FUNCTION MODULE NAME - ZCCB_AHR_VAR_HIER.
    In the planning level the characteristic NCSTOPU is set with this variable.
    In the Layout  1) the characteristic NCSTOPU - Lead Column,
                         2) Hierarchy in the lead column -  Hierarchical Data Model, BW Hierarchy

Maybe you are looking for

  • HP deskjet 3050 no longer connects to wireless since changing the router

    The printer no longer prints to wireles or when connected via USB for that matter. Recently changed routers and now it doesn't pick up the printer. I have tried to reinstall the software and that hasn't made a difference. Help please!!

  • Downgrading from Final Cut Pro Studio to Final Cut Express

    Will Final Cut Express let me use the Boris Title 3D Video Generator effect that I now use in Final Cut Pro Studio? Does it have an outline text video generator effect? Since I have DVDSP 4.1.2, will I be able to drag my exported non self-contained q

  • I have problems with Itunes Match on my Iphone4, It doesnt played any song and is allways on infinite skip!

    Please I need help I cant find anyway to deactivate IMatch on my Iphone 4. Its stucked on a loop of skipping songs on the cloud and even when the music its on the Iphone still doesnt played it. Driven me crazy, because I already turn off  Imatch on t

  • Clean up itunes folders in windows7

    Hello all,  I have recently uninstalled and reinstalled itunes to the computer a few times.  There are now multiple "Previous itunes library", "album artwork" and "itunes media" folders on the computer. I like to keep things organized.  In the left t

  • I don't see Libraries in my Options

    Hi everyone, i was trying to set up the "libraries" option to sync up assests and logos and such - but it's not an option in either of my downloads of Illustrator CC or Photoshop CC. I was attempting to follow this tutorial: Sync preferences and sett