Exit Function not writing data to InfoCube

Hi All,
I created a planning function where i have defined a exit function. This is just adding 5 KFs and storing that in another KF of the Infocube.
When I execute that it gives me mesg that 11 records read, 0 of them changed and 0 generated. When i check the contents of the infocube I find nothing being changed.
Can you please let me know why it is not writing it into infocube. I debugged and find the code in the function module getting executed and it is stopping at the break point but not writing to the infocube.
An early response is appreciated.
Tapan
00 44 7951998123

The code is given below. let me know if there is something wrong in this.
FUNCTION Z_BPS_FGE01.
""Local Interface:
*"  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
This example describes how to add a value to a keyfigure
  DATA:    ls_exitp TYPE upf_ys_exitp.
  DATA:    ls_mesg  TYPE upc_ys_mesg.
  FIELD-SYMBOLS:  <ls_data>  TYPE ANY.
read first parameter
if there is no parameter raise error message
  READ TABLE it_exitp INTO ls_exitp INDEX 1.
  IF sy-subrc NE 0.
  problem occured
    ls_mesg-msgty  = 'E'.
    ls_mesg-msgid  = 'upf'.
    ls_mesg-msgno  = '001'.
    ls_mesg-msgv1  = 'Exit-Parameter is missing.'.          "#EC NOTEXT
    APPEND ls_mesg TO et_mesg.
    exit.
  ENDIF.
  LOOP AT xth_data ASSIGNING <ls_data>.
now <ls_data> points to a line of xth_data and can
be used to reference each characteristic and/or
keyfigure contained within.
  in the form 'modify_param_value' you can see how a keyfigure
  can be manipulated.
    PERFORM modify_param_value USING ls_exitp
                               CHANGING <ls_data>
                                          et_mesg.
  ENDLOOP.
ENDFUNCTION.
      FORM modify_param_value                                       *
FORM modify_param_value USING ls_para TYPE upf_ys_exitp
                     CHANGING xs_data TYPE any
                              lt_mesg TYPE upc_yt_mesg.
  DATA: ls_mesg  TYPE upc_ys_mesg.
  DATA:    lw_target type f.
  FIELD-SYMBOLS: <ZTACSPND> TYPE ANY,
                 <ZPOSFEE>  TYPE ANY,
                 <ZLISTFEE> TYPE ANY,
                 <ZFEAFEE>  TYPE ANY,
                 <ZDISFEE>  TYPE ANY,
                 <ZTOTFIX>  TYPE ANY,
                 <struct>   TYPE ANY.
<ls_data> and therefore xs_data contains two structures
1.  S_CHAS : Characteristics
2.  S_KYFS : key figures
choose second structure which contains the keyfigures
  ASSIGN COMPONENT 'S_KYFS' OF STRUCTURE xs_data TO <struct>.
choose the keyfigure
  ASSIGN COMPONENT 'ZTACSPND' OF STRUCTURE <struct>  TO <ZTACSPND>.
  ASSIGN COMPONENT 'ZPOSFEE'  OF STRUCTURE <struct>  TO <ZPOSFEE>.
  ASSIGN COMPONENT 'ZLISTFEE' OF STRUCTURE <struct>  TO <ZLISTFEE>.
  ASSIGN COMPONENT 'ZFEAFEE'  OF STRUCTURE <struct>  TO <ZFEAFEE>.
  ASSIGN COMPONENT 'ZDISFEE'  OF STRUCTURE <struct>  TO <ZDISFEE>.
  ASSIGN COMPONENT 'ZTOTFIX'  OF STRUCTURE <struct>  TO <ZTOTFIX>.
was the assignment succesful?
  IF sy-subrc = 0.
now <ratio> points at the first key figure, which can be
manipulated if you manipulate the field-symbol <ratio>
ls_para-chavl contains the parametervalue
   <ratio> = <ratio> + ls_para-chavl.
Sum up all five fixed spend InfoObjects and copy the value into another InfoObject ZTOTFIX,
If the five InfoObjects are empty (zero) then do not copy any thing into the total fixed spend field.
    clear : lw_target.
    lw_target = <ZTACSPND> + <ZPOSFEE> + <ZLISTFEE> + <ZFEAFEE> + <ZDISFEE>.
    IF lw_target  > 0.
*break-point.
      <ZTOTFIX> =  <ZTACSPND> + <ZPOSFEE> + <ZLISTFEE> + <ZFEAFEE> + <ZDISFEE>.
    ENDIF.
  ELSE.
  problem occured
    ls_mesg-msgty  = 'E'.
    ls_mesg-msgid  = 'upf'.
    ls_mesg-msgno  = '001'.
    ls_mesg-msgv1  = 'Can not assign component.'.           "#EC NOTEXT
    APPEND ls_mesg TO lt_mesg.
  ENDIF.
ENDFORM.                    "modify_param_value

Similar Messages

  • What's the FUNCTION to write datas an Infocube?

    Hello guys,
    I would like to upload datas in an Infocube directly by ABAP PROGRAM.
    Do you know what is the Function to upload the datas in an Infocube?
    Thanks,
    Carlos Eduardo

    Hi,
    Try to execute the below program. You will get options to enter the data directly to cube.
    CUBE_SAMPLE_CREATE
    Vivek

  • PSE10 not writing dates to files consistently

    I asked essentially this question on Elements Village a few days ago.  No responses as yet, so I thought I'd try here...
    In PSE10, I have many photos scanned to TIFFs. In the Organizer, I set the dates for these photos to match when the original photo was taken (which of course is not present in the automatic metadata for the scanned image). However, when I look at the actual photo files (either with exiftool, or looking at the metadata available in Windows Explorer on my Windows 7 machine), usually my added date is not present. If it is there, I see a "Date taken" in Explorer. In exiftool, it appears in a few places, including IPTC Date Created and XMP-xmp:Create Date. However, it only appears in about 5-10% of the files. The ones where it does appear seem random to me.
    I have this problem after doing Write Keyword Tags and Properties Info to Photos, although I'm thinking this isn't a factor with this problem.
    Does anyone know how to get these added dates to be written reliably to the files?  And why is it intermittent with PSE10?
    Thank you,
    Bill

    An update, and some more questions:
    I figured out which dates get written to files and which do not.  If my assigned date is only the year, or only month and year, it does not get written to the file.  It is necessary to have the day specified (but not the time) to have it written to the file.  So some new questions:
    If you only specify a year, or year and month in Lightroom, does it write it to the file?  What about other programs, such as Picasa?  Does it support year only dates?
    I remember in the past reading a John Ellis FAQ where he suggested when you only had the year to put in Jan 1st, etc.  I can see how this trick would solve my immediate problem, even tho it is misleading.  My question is the following.  Lets say I plan to convert to Lightroom in the near future.  If I added these artificial Jan 1st's, etc., would that mess up me up after importing into Lightroom?
    Thank you,
    Bill

  • Problem in writing data to flat file

    Hi,
    I have created an interface with table as source and file as target. My interface is running from long time but its not writing data into file. Any clue?
    -Chikk

    Hi,
    Please, take a look if the target file is locked.
    Try to delete it and put the "Truncate" option from IKM to yes.
    Cezar

  • 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

  • Figure not updated with exit function

    Hi,
    I have created a function module & have attached to an exit planning function, have create a planning folder that contains input layout from manual planning & this new exit function. but when test the planning folder, figure that have already calculated in the function not refreshed to the input layout, i do debug & the assignment value already correct.
    what should i do to make the assignment in function module get updated in the input layout? the figure used in the fm is in editable mode in the layout.
    Please kindly help.
    Thanks in advance.

    Hi,
    Can you tell how you have added this FM in Planning folder?
    For each function, you can define when the function is executed:
    1. Pushbutton: The user executes the function by clicking on a button.
    2. Execute before layout display: The function is executed before the planning layout is displayed. If the function changes data which is displayed in the layout, the changes are immediately visible in the layout.
    3. Execute before layout change: The function is executed when you exit the planning layout. If the function changes data which is displayed in the layout, the changes are not immediately visible after opening the layout.
    I guess you can use "Execute before Layout Display" mode for your planning function in the planning folder.
    Regards,
    Depti

  • Customer exit is not functioning after ECC upgrade/support package

    It seems our customer exit is not functioning after ECC upgrade/support package. I tried to activate the project again, no use. please help. Thanks! (see below for the enhancement info)
    COZF0002 Change purchase req. for externally procured component
    EXIT_SAPLCOZF_002
    INCLUDE ZXCOZU02
    *&  Include           ZXCOZU02
    CONSTANTS: lcc_eban(25)   TYPE c VALUE '(SAPLCOBC)EBAN'.
    FIELD-SYMBOLS: <fs_eban>   TYPE eban.
    DATA: l_fkstl TYPE prps-fkstl.
    Move values from the LUW to the Internal Table
    ASSIGN (lcc_eban) TO <fs_eban>.
    If the field symbol is "NOT' empty then proceed
    IF ( <fs_eban> IS ASSIGNED ).
    if WBS work order, get cost center from PRPS
      IF ( caufvd_imp-auart = 'ZM05' ).
        SELECT SINGLE fkstl INTO l_fkstl FROM prps
          WHERE pspnr = caufvd_imp-pspel.
        IF ( sy-subrc = 0 ).
          WRITE l_fkstl TO <fs_eban>-zzfistl.
        ENDIF.
    if not WBS WO, move cost center minus leading zeros to funds center
      ELSE.
        WRITE caufvd_imp-kostl TO <fs_eban>-zzfistl.
      ENDIF.
    ENDIF.

    Did you mean set a break point in the follow code?(Include ZXCOZU02), I tried set a break point in this code, but It didn't stop .
    *& Include ZXCOZU02
    CONSTANTS: lcc_eban(25) TYPE c VALUE '(SAPLCOBC)EBAN'.
    FIELD-SYMBOLS: <fs_eban> TYPE eban.
    DATA: l_fkstl TYPE prps-fkstl.
    Move values from the LUW to the Internal Table
    ASSIGN (lcc_eban) TO <fs_eban>.
    If the field symbol is "NOT' empty then proceed
    IF ( <fs_eban> IS ASSIGNED ).
    if WBS work order, get cost center from PRPS
    IF ( caufvd_imp-auart = 'ZM05' ).
    SELECT SINGLE fkstl INTO l_fkstl FROM prps
    WHERE pspnr = caufvd_imp-pspel.
    IF ( sy-subrc = 0 ).
    WRITE l_fkstl TO <fs_eban>-zzfistl.
    ENDIF.
    if not WBS WO, move cost center minus leading zeros to funds center
    ELSE.
    WRITE caufvd_imp-kostl TO <fs_eban>-zzfistl.
    ENDIF.
    ENDIF.

  • DELETION OF SPECIFIC COLUMN DATA IN INFOCUBE&ODS(not the datarecords)

    hai
    I loaded the data into ODS and InfoCube.Buti want to delete the 'year = 1900&1910" from the YEAR column of the Infocube and ODS.
    Is it possible to delete the specific column data from the InfoCube & ODS????
    If it is possible then how can i delete the particular specific data from the specific column of InfoCube and ODS.
    pls tell me
    i ll assing the points
    bye
    rizwan

    HAI Ronald
    I already loaded the data into the InfoCube and ODS. But i want to delete the 'year column=1900 , 1910' only (not the corresponding datarecords).
    IS it possible to delete that Year Column only from the loaded data of InfoCube .
    I think , it is possible by creating a new InfoCube and transferring my InfoCube data into newly created InfoCube and writing the start routine for Update Rules in between  my InfoCube & newly created InfoCube.
    So do you know the ABAP/4 code for that
    pls tell me
    i ll assing the points
    bye
    rizwan

  • Reading Data From a Different Planning Package in a Exit Function

    Hi,
    Is it possible to read data from a planning level / package other than the package that the exit function was executed with?  I want to read data into an internal table from another package and use that data in combination with the data in the current package to create new records.  If this is possible sample code for how to read data from a different package would be appreciated.
    Thanks!
    Mel Waldner

    Hi,
    As an example lets say you have restricted 0calmonth in your package to 6.2007. In the planning layout to fetch values for 5.2007 (read only), you can take 0calmonth in data columns, and for this column restrict it as 5.2007.
    Similarly in Planning functions, you can mark 0calmonth as field to be changed and fetch data for 5.2007.
    Hope this helps.

  • Reading manual planning function header data in exit function

    Hello all,
    I would like to know if is there a chance to read header data of a planning function. The planning function is determined by user selection (user choose which value will be in ) and in exit function I then modify the buffer by data which I get by calling RFC on another system.
    My problem is that buffer contain all the planning data for whole planning area (it seems) so there is many unnecessary call. How can I get in exit function value specified by user at start of a planning session?
    Thank you for your help

    Hi,
    There's some issue the planning funciton will only read the data specified by the users (variable values).
    Check the configuraiton once again.
    thanks

  • Exit button not functioning in MSS Team - Recruiting - Create new Candidate

    Hello Experts,
    Exit button not functioning in MSS Team - Recruiting - Create new Candidate Assessment iview
    Location of exit button :Create new Candidate Assessment iview we have next button when we click on we can see exit button in next iview
    any idea why it not functioning / help on this / or is it a bug from SAP
    Thanks,
    Regards
    Vijay

    Hi Krishore,
    Thanks for reply,
    The version of BP_ERP5ESS is 1.0 SP8 and The version of SAP_ESS is  600 SP8.
    do need to add extra patch for this.
    please help me on this issue. 
    Thanks,
    Regards
    Vijai

  • Simple Javascript date() function not executing.

    If I open the javascript input window from a button and enter a simple js date function:
    vDate = new Date();
    alert(vDate();
    This code executes flawlessly when the button is clicked.
    However,  if I place the exact same code in the Execute Advacned Actions javascript window "on enter frame" Action, the alert popup code not exdecute/appear, it will fail silently.
    I'm simple trying to get a javascript funtion to execute on... the On Enter Action.
    Any suggestions?
    Thanks

    Hello,
    I just tried the scenario and I can see that JS code is executing properly. I used the same JS as you have given (just corrected the syntax in the second line). So, I create an Advanced action that has this JS, and I assigned that to "On Slide Enter" action of the slide. Other thing that I did is that I chose "current" as the window in the Execute Javascript options.
    Ashish

  • Request (PSA) was NOT posted successfully to data target (InfoCube)

    In our daily load process chain I am getting an Error Message for "PSA to InfoCube" as:
    Request was NOT posted successfully to data target (InfoCube)
    Message no. RSMPC163
    Please what is the exact problem it means & what is the solution
    Rajesh Giribuwa

    Hello Rajesh,
    This requests fails when updating from PSA to Infocube.
    Pleaes check the update rules for errors.
    Try to find out the exact error message and explore the tabs in monitor for this job.
    Hope this helps..
    thanks,

  • ODI not writing group by function for xmlagg

    Hi all
    i have a requirement to create xml file the query is in the target columns are follows
    first column deptno
    second column xmlserialize(content
    xmlagg(xmlelement("emp", xmlattributes(empno as "id", ename AS "name" )
    )) as nclob indent
    i expect the out put query as
    select deptno
            , xmlserialize(content
                 xmlagg(
                   xmlelement("emp",
                     xmlattributes(empno as "id", ename as "name")
                 as clob indent
       from scott.emp
       group by deptno ;but ODI is not writing group by for xmlagg instead the code generated is
    select deptno
            , xmlserialize(content
                 xmlagg(
                   xmlelement("emp",
                     xmlattributes(empno as "id", ename as "name")
                 as clob indent
       from scott.emp;can any one help me how to put group by for the column. it should automatically write group by for aggregate columns like max min. not in case of xmlagg.

    Hi
    changed my Ikm settings
    <%=odiRef.getGrpBy()%>
    replaced with
    <% out.print("GROUP BY " + odiRef.getColList("", "[EXPRESSION]", ",", "", "UD1")); %>
    marked deptno as UD1 and insert/update and it worked....

Maybe you are looking for