Exit function in BPS

Hello everyone
About my situation:
I need to use exit function in BPS.
I have Character 0VERSION with data 0, 1, 2, 3, 4, 5…LV.
The user can make a lot of version. But there will be the last version with ID for example LV.
I use copy function for coping data from version 0 to version 1 and so on. But now I need to make function for copping only data from last version which was made by user to my last version which was made by me. For example the last user version was 5. So I need to write program that should check that last version is really 5 not 2 or 4 and copy all data of 5 version to version LV. So I want to use exit function but I don know which standard functional module can do for my task. Can somebody tell me the name of suitable functional module?
Thanks for answers. (Points are guaranteed)

Hi Svet,
Try this link..
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d3dcc423-0b01-0010-4382-aa3e0784b61e
I hope it helps you.
Award points if useful.
Regards,
Archna.

Similar Messages

  • Parameters in exit functions

    Hello
    We have the need to build an exit function in BPS. I have defined the function module and I have also defined a parameter (which I access throuh IT_EXITP within the function module).
    The way we have implemented BPS here requires us to invoke BPS functionality through the API calls. So, for eaxample to call a planning function we use API_SEMBPS_FUNCTION_EXECUTE.  My problem is that there appears no where on this API top provide paramter information. Does anyone know if it is possible to call an exit planning function witht he API and give it a parameter ?
    Thanks
    Cameron

    Hi Cameron,
    unfortunately it's not possible to pass parameters to a planning function using the API. Try using BPS variables instead.
    Regards,
    Marc
    SAP NetWeaver RIG

  • How to write exit functions

    Hi
    i have to write exit functions in bps.can any body tell me how these are to be written.please explain the structure and flow of exit functions.please explain me in detail if posiible give me some links for exit functions.
    thanks and regards,
    sekhar reddy

    Hi Sekhar,
    Go through the below links
    Re: user exit
    https://websmp104.sap-ag.de/~sapidb/011000358700005475091999
    https://websmp104.sap-ag.de/~sapidb/011000358700005475101999
    Hope it helps
    Regards

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

  • How to access reference data in BPS Exit Function

    Hi Experts,
    Can any please tell me how to access reference data in BPS Exit function. I am creating a copy function using ABAP Exit Function (Std copy and fox formula doesn't work for my requirement).
    Please suggest,
    Thanks in advance,
    Shiwesh

    Hi Deepti,
    Thanks a lot for your reply. xth_data contains all the data based on package filteration. Let me explain you,
    Say, I have a characteristic char and whose value is 'A', I want to change it to 'B' in my copy function, while keeping the original record with 'A' as well. So now I want my xth_data to contain two records, one with A and other with 'B'. I mean to say from value is 'A' and to value is 'B'. Now my package contains 'B' (the to value) as the allowed value, but not A because in the package I am setting this using a BPS variable. There are two types of variables, one is to variables other is from variable. There could be two scenarios,
    1. If I set from varibale in the package: if I do so, I will have the data in xth_data containing 'A' as char value. But in this case when I change it to 'B' and try to save both the records, package won't recognize the record with value 'B' and reject it.
    2. If I set to variable in the package: In this case the xth_data itself will not contain anything and I can not loop over xth_data because there is no record with 'B'. Only record available in the system is with 'A' values.
    That is why I am thinking about having reference daya somewhere. I could loop over reference data and then pass it to xth_data. Package will contain to variable so it will allow all my modifications to get saved.
    Thanks and regards,
    Shiwesh

  • Change Data in BPS Layout: Exit Function

    Hello everyone,
    We are using BW-BPS and we need to make a sort of a certain characteristic in a Planning Folder. In the specific Planning Folder it was defined an exit function and it was assigned a function module.
    We implement the following code:
    FUNCTION Z_ORDENAR_CLASSIFICACAO_PLANO.
    ""Interface local:
    *"  IMPORTING
    *"     REFERENCE(I_AREA) TYPE  UPC_Y_AREA
    *"     REFERENCE(I_PLEVEL) TYPE  UPC_Y_PLEVEL
    *"     REFERENCE(I_METHOD) TYPE  UPC_Y_METHOD
    *"     REFERENCE(I_PARAM) TYPE  UPC_Y_PARAM
    *"     REFERENCE(I_PACKAGE) TYPE  UPC_Y_PACKAGE
    *"     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:
        lr_area TYPE REF TO cl_sem_planarea_attributes,
        wa_hash_table type ref to data,
        l_sortfield type STRING,
        lr_t_data TYPE REF TO data.
      FIELD-SYMBOLS:
        <lt_data> TYPE STANDARD TABLE,
        <ht_head> TYPE ANY TABLE,
        <xth_data> TYPE HASHED TABLE,
        <ls_data> TYPE ANY,
        <wa_data> TYPE ANY,
        <fundo> TYPE ANY,
        <eco> TYPE ANY.
      CALL METHOD cl_sem_planarea_attributes=>get_instance
        EXPORTING
          i_area = i_area
        RECEIVING
          er_instance = lr_area.
      CREATE DATA wa_hash_table LIKE LINE OF xth_data.
      ASSIGN wa_hash_table->* TO <ht_head>.
      <ht_head> = xth_data.
      LOOP AT <ht_head> ASSIGNING <ls_data>.
    This is the characteristic that we pretend to sort
        l_sortfield = 'S_CHAS-0CMMT_ITEM'.
        SORT <ht_head>
          BY (l_sortfield) DESCENDING.
      ENDLOOP.
      <xth_data> = <ht_head>.
      UNASSIGN: <ls_data>, <ht_head>.
    ENDFUNCTION.
    When execute this function, we get a DUMP (ASSIGN_TYPE_CONFLICT). Does anybody have any suggestion how to change a hash table or somehow make a sort in this hash table?
    Thanks in advance.
    Ilda

    Hi,
    After some changes in the code, it seems that xth_data table is assuming the “new content”. In debugging, we could see that the assignment was made and xth_data records are now in a different order. But when executing the BPS Layout assigned to this planning function, all the lines (records) still in the same place. The Layout doesn’t change.
    This is the code:
    FUNCTION Z_ORDENAR_CLASSIFICACAO_PLANO.
    ""Interface local:
    *"  IMPORTING
    *"     REFERENCE(I_AREA) TYPE  UPC_Y_AREA
    *"     REFERENCE(I_PLEVEL) TYPE  UPC_Y_PLEVEL
    *"     REFERENCE(I_METHOD) TYPE  UPC_Y_METHOD
    *"     REFERENCE(I_PARAM) TYPE  UPC_Y_PARAM
    *"     REFERENCE(I_PACKAGE) TYPE  UPC_Y_PACKAGE
    *"     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:
      lr_area TYPE REF TO cl_sem_planarea_attributes,
      l_sortfield type STRING,
      data_ref TYPE REF TO data,
      lr_t_data TYPE REF TO data.
      FIELD-SYMBOLS:
      <lt_data> TYPE ANY TABLE,
      <ls_data> TYPE ANY,
      <ls_data_copy> TYPE ANY.
      CALL METHOD cl_sem_planarea_attributes=>get_instance
        EXPORTING
          i_area      = i_area
        RECEIVING
          er_instance = lr_area.
      CREATE DATA lr_t_data TYPE (lr_area->typename_t_data).
      ASSIGN lr_t_data->* TO <lt_data>.
      <lt_data> = xth_data.
      CLEAR xth_data.
      l_sortfield = 'S_CHAS-0CMMT_ITEM'.
      SORT <lt_data> BY (l_sortfield) DESCENDING.
      MOVE <lt_data> TO xth_data.
    ENDFUNCTION.
    Does anybody understand this behavior, why the changes in the user-exit are not assumed in the BPS Layout?
    Thanks,
    Ilda

  • BPS Exit Function Error

    Hi Experts,
    I am new to BPS. I am developing FM for Unit Convertion. Can some body please direct me the procedure to correct the following error? This error is being generated at the time of execution. I am working on BI 7.0.
    Please let me know if this is not enough info.
    Thanks in advance.
    Regards,
    Nimesh
    Error generating the test frame
    Message no. FL819
    Diagnosis
    The system could not generate a syntactically correct test frame for function module Z_BPS_EXIT_UNIT_CONV. You therefore cannot test the function module using the test environment. You have probably used an ABAP feature in the interface definition that is not yet supported in the test environment.
    The error message is:
    "ANY TABLE" expected, not "HASHED TABLE".
    System Response
    Procedure
    Check whether you can change the interface of the function module so that it is possible to generate the test frame. If this is not possible,you will have to write your own utility for testing the function module.

    Nimesh,
    Welcome to the forum.
    You can not test an SEM exit function from ABAP workbench rather it has to be tested from BPS.
    Exit function requires hash table XTH_DATA which is supplied from BPS.
    I think you are testing funciton module from SE37 that leads to error message posted by you.
    Have some test data in the planning cube & test it from Planning function exit function.
    There is a How-To Document "How-To Loop over reference data in FOX formulas".
    Though this function doesn't explain about exit function but it depicts execution of a planning funtion which will give you some insights.
    Hope it helps.
    Hari Immadi
    http://immadi.com
    SEM BW Analyst

  • BPS-Exit function

    Hi experts,
    I am tring to load flat file in BPS using EXIT function.
    For that i am using two function modules where one is main function module
    and another one is Init.Function.In function moduled there is no errors but
    while upload flat file records are not get generated.
    Kindly give me some tips to resolve this.
    If i case anyone want that FM means i will attcah those FM.
    Regards,
    Kiruthika

    Nimesh,
    Welcome to the forum.
    You can not test an SEM exit function from ABAP workbench rather it has to be tested from BPS.
    Exit function requires hash table XTH_DATA which is supplied from BPS.
    I think you are testing funciton module from SE37 that leads to error message posted by you.
    Have some test data in the planning cube & test it from Planning function exit function.
    There is a How-To Document "How-To Loop over reference data in FOX formulas".
    Though this function doesn't explain about exit function but it depicts execution of a planning funtion which will give you some insights.
    Hope it helps.
    Hari Immadi
    http://immadi.com
    SEM BW Analyst

  • SEM-BPS Variable with exit function

    Hi,
    this is my problem. I use a variable for period and I increment the variable dinamically in a sequence of execution. When I try to read the variable with a exit function, the function is only called the first time and return ok the value, but the next time the function not called and the value is returned from the buffer (I think this, because always is the same value).
    How can I change this? I need to my function return the variable value, because is changed.
    Thanks.

    Hi,
    thanks for replys.
    I think the problem occurs after update the patch level to level 15. This is the code of class_constructor in class cl_sem_variable:
    method CLASS_CONSTRUCTOR.
    data ls_dark type upc_dark2.
    select single * from upc_dark2 into ls_dark
       where param = c_param_dark_buffer.
    if sy-subrc = 0 and ls_dark-value = 'X'.
        m_buffer = 'X'.
    endif.
    endmethod.
    The flag m_buffer is always X and for that reason my the value of the variable is read from the buffer and the exit function for read variable isn't called.
    What do yo think about this?
    Thanks.

  • BW-BPS and Exit function on a variable

    I have a variable that has 2 characteristics.  I have an exit function to fill the variable.  I am getting a short dump when executing the functional module.  Here is the code I am using and the error message.  Any help would be appreciated.
      ls_varsel-seqno = '0000'.
      ls_varsel-chanm = 'ZLOCBRAND'.
      ls_varsel-sign = 'I'.
      ls_varsel-opt = 'EQ'.
      LOOP AT lt_chavl INTO ls_chavl.
        if ls_chavl-/BIC/ZLOCBRAND <> ''.
          ls_varsel-seqno = ls_varsel-seqno + 1.
          ls_varsel-low = ls_chavl-/BIC/ZLOCBRAND.
          APPEND ls_varsel TO eto_charsel.
        endif.
      ENDLOOP.
      ls_varsel-chanm = 'ZBUS_UNIT'.
      ls_varsel-sign = 'I'.
      ls_varsel-opt = 'EQ'.
      LOOP AT lt_chavl INTO ls_chavl.
        if ls_chavl-/BIC/ZBUS_UNIT <> ''.
          ls_varsel-seqno = ls_varsel-seqno + 1.
          ls_varsel-low = ls_chavl-/BIC/ZBUS_UNIT.
          APPEND ls_varsel TO eto_charsel.
        endif.
    ENDLOOP.
    error : ITAB_ILLEGAL_SORT_ORDER
    \CLASS=CL_SEM_VARIABLE\METHOD=GET_VALUE\DATA=RTO_VALUE

    Hi Rich,
    looks like the table is defined as sorted table. Try to replace your two APPEND statements by INSERT ls_varsel INTO TABLE eto_charsel.
    Hope that helps
    Stephan

  • Parameter Exit Function in Planning Folder

    Hi all,
    I created the planning function in SEM BPS using exit function. And then I added the parameter exit function 0VERSION to this function. After that, I tried to put this function in the planning folder.
    Does anybody know how to put the parameter exit function to the planning folder?
    Because I need the user to fill the value of the 0VERSION before they run the function.
    I assume this should work as the selection screen.
    Currently, Every time I run this function, there is no selection screen or the place that I could fill the value for this field. So, the system always receives no value for this field.
    Or Maybe you have another approach to get the user's value without restrict the data before run the exit function.
    Thanks a lot for your help,
    -Martin Darmawi-

    This behaviour is quite normal. You should use different approach.
    Parameters in exit functions can be filled in parameter group only and only with fixed values.
    You should create a planning variable, put it to the folder and then read value of this variable in your exit function with 'API_SEMBPS_VARIABLE_GETDETAIL' for example.

  • Attribute value to exit function module

    Hello group,
    I'm working in a sem-bps project and I have a problem with an exit function, because
    I need the function module to read the value of a characteristic's attribute.
    I read the standard function module UPF_VARIABLE_USER_EXIT_ATTR: it retrieves the attribute value through the import parameters ITO_ATTR TYPE  UPC_YTO_ATTR.
    I put this attribute on my exit function but when I check the content of the attribute it’s always empty. Do you know how I can transmit the parameter from the exit planning function to the function module?
    Any input is appreciated, thanks Andrea

    Andrea, if you want to fill a variable with the characteristic's attribute of another variable look at the document "HowTo_BPS_VarOfTypeExit.pdf" (i send at your e-mail if you want). It Follows an extract in which it's filled the second variable with the characteristic's attribute of another variable: 
    Source code: Attribute values
    SELECT * FROM /bi0/mbps_produ INTO TABLE lt_chavl
    WHERE bps_prodl = ls_varsel-low.
    if sy-subrc <> 0.
    MESSAGE e026(upc) WITH ls_varsel-low '0BPS_PRODL'.
    attribute value not found
    exit.
    endif.
    ls_varsel-seqno = '0000'.
    ls_varsel-chanm = '0BPS_PRODU'.
    LOOP AT lt_chavl INTO ls_chavl.
    ls_varsel-seqno = ls_varsel-seqno + 1.
    ls_varsel-low = ls_chavl-bps_produ.
    APPEND ls_varsel TO eto_charsel.
    ENDLOOP.
    In the example above ls_varsel contains the attribute value to provide to eto_charsel (the output table in which you have the result).
    I suggest you to debug your application to see how ito_attr is passed to the FM.
    Hope it helps.
    Fabio

  • Simple exit function

    Hi All,
    I am new BPS planning functions, I am trying to write a simple exit function to manipulate amount.
    Example: For value type as Plan i.e. '020' , I want to added constant to existing values say '100'.
    like price = price + 100 (for all value types as '020').
    I know this can be done by formula function as well , I know that i need to build a function inorder to create a exit function. I need help in building the ABAP code.
    Any help greatly appreicated.
    Regards,
    Reddy.

    Hi Vachan,
    Thanks for the reply, you mentioned that XXX-value type.
    What XXX stand for? As i am new to SAP please can you be of more specific.
    Regards,
    Reddy.

  • Display message from exit function on web

    Hi all,
    Is there a way to display the output error message from Exit Function on web interface?
    Regards,
    Kadir

    Hi All,
    I have a similar problem - but for variable exits.
    The solution posted by Kadir works fine for an exit changing xthdata (bps exit function).
    I want to display a message in Web created within an bps variable exit. In this case the  solution does not work.
    Does anyone of you experts have an idea how to append a message to the message table used for the WebInterface?
    Thanks in advance and best regards
    Steffen

  • Exit function in Planning Folder

    We are using BPS and I have a request to do some modifications in a specific planning folder.
    When executing the folder, when the user introduces a new line, if a specific field is left empty they what me to change it to a constant, when user saves the folder.
    I’m an ABAP developer in R/3 and my help was requested to solve this issue using a planning function of exit type. The problems is that when I’m passing in the exit function I’m receiving only the values that were there before the user introduce some new information. I’m not getting the new lines.
    Like I said I’m an ABAP developer in R/3 and BW and BPS is all new to me, so I don’t know if this is the normal behaviour of the system or if I’m doing anything wrong.
    My question is then: it’s possible to get only the new information to get through the exit function or this isn’t possible and if it’s not is there another way to do this (when saving change the value of an empty field).
    Thanks in advance.
    Best regards
    Sónia Reis

    Hi Sónia,
    You should check with your colleagues what selection criteria they have in the Planning Level. There is a good chance that your new records do not satisfy this criteria and hence they aren't in your Exit function.
    There are two possible solutions to this issue:
    1. Adjust existing Planning level criteria so new records will satisfy it.
    2. Create a new Planning level with selection criteria that satisfies records you are looking for and put your Exit FM there.
    Which way to go depends of your particular case and perhaps your BPS colleagues could decide which option to select.
    If they can't make this decision please send me additional information of what selections you have in existing Planning level and what information is entered in new rows.
    Regards,
    Gersh

Maybe you are looking for

  • Database Construction Error

    I am new to Java and am having trouble figuring out why I am throwing this error when running the jar file. My code builds the jar file without error, but when I try to run the application from the jar file, I get the error in my code that reads, " U

  • How do you get your volume to work on video?

    Please help! I can't get my volume to work on video or listening to a video but it works every where else?

  • Mails phisically in the server but not appearing in webmail and reconstruct

    Hello: Solaris 10 8/07 s10x_u4wos_12b X86 Sun Java System Messaging Server 6.3 The user deleted every single mail from his mailboxes via webmail. Every folder appeared empty in the webmail, the inbox, recycle bean, sent mails... all of them (I checke

  • Slow Vi using analog I/O

    Hello, I'm having issues fixing my labview code to have an efficient response time. I tried multiple things to fix my issue, but can't seem to find a solution. I'm not as comfortable with LabVIEW as I am with other coding languages so troubleshooting

  • IOS 8 has made my iPad 2 a terror to use - is there a way to fix / downgrade back to iOS 7?

    Someone please help - my dad is mad that I updated our iPad 2 to iOS 8. He says - and I agree - that the third party apps are extremely laggy (especially Piano Tiles by Umoni and Scramble with Friends by Zynga) to the point that they are almost unusa