Planning function getting called in ABAP

dear all,
I have a requirement to call the reposting planning function from some other ABAP program and then suqsequently take the same data and update one more real time cube.
I have the repost function well working in IP. Need to embed it into my custom abap code.
In BPS, there used to be a function module for executing planning function.
How ab the IP in this case?
thanks,

hi bindu,
Thanks.
How about the variables? My planning function has variables for manual input. Now these values will be supplied from ABAP code. Is variable variants to be used here?
Also, how about copying the data into another cube?  Should RSDRI_CUBE_WRITE_PACKAGE be used?
Regards.

Similar Messages

  • How to indicate a message by a planning function type in an ABAP-OO-Class

    Hello,
    I integrated a message with following statement " MESSAGE i003(upf1) WITH v1 v2." in an ABAP-OO-Class, which is used by a Planning Function Type. The function type works but it´s not indecated after executing the Planning Sequence, neither from web template nor in the planning modeller.
    Does anybody know this problem/behavior?
    Thank for response
    Andreas

    Hi Joerg,
    how about this:
    data: l_dummy type char100.
    MESSAGE i003(upf1) WITH v1 v2  into l_dummy.
    i_r_msg->add_msg( ).
    You do not need to take special care about the variables. Just raise the message as you want it to be raised. The only thing you need to do is to raise the message into a string (..into l_dummy). The interface IF_RSPLFA_MSG and the implemetation of add_msg is going to read the standard message variables (SY-MSGNO, SY-MSGID, SY-MSGTY, MSGV1 ...). You just need to throw the message
    and call  i_r_msg->add_msg( ) e.g. in the execute method of your customer planning function.
    Please give it a try and take a look at it in the debugger.
    Hope this helps.
    Matthias Nutt
    SAP Consulting Switzerland

  • Printing function gets called twice..!

    The following is my class that prints a string array which sometimes goes into multiple pages.. The code in which i create the multiple pages is below this class.. the problem is each time i append a new page to the book the print function in the class PaintC is called twice.. so if I write some additional code inside the print function to edit the strings .. it ends up running twice and the formatting i try to do gets messed up.. !! do you guys know why this is happening..? Please help.. ive been trying to find out since a very long time..!!
    The code in which i call this function is also shown below
    CLASS FOR PRINTING
    class PaintC
        implements Printable {
      String ad[];
      public PaintC(String ac[]) {
        System.out.println("Print Class Called 1");
        this.ad = ac;
      public int print(Graphics g, PageFormat pf, int pageIndex) throws
          PrinterException {
        System.out.println("Print Function Called 1");
        Graphics2D g2 = (Graphics2D) g;
        g.setFont(new java.awt.Font("Trebuchet MS", Font.PLAIN, 8));
        int xo = 60;
        int yo = 36;
        for (int y = 0; y < 76; y++) {
          try {
            g2.drawString(ad[y], xo, yo);
            yo += 9;
          catch (Exception r) {
            y = 76;
        return Printable.PAGE_EXISTS;
    CODE FOR CREATING MULTIPLE PAGES USING ABOVE CLASS
    void dotheprint() {
        PrinterJob printerJob = PrinterJob.getPrinterJob();
        PageFormat format = new PageFormat();
        Printable painter1;
        format = printerJob.defaultPage(format);
        Paper paper = format.getPaper();
        paper.setImageableArea(60, 36, 500, 756);
        format.setPaper(paper);
        // try storing in a string array each line
        Book bk = new Book();
        String ab = jTATRRep.getText();
        int i, j, lc = jTATRRep.getLineCount();
        String ac[] = new String[lc + 3];
        String ad[] = new String[78];
        ac = ab.split("\n");
        //System.out.println("Number of Lines = " + lc);
        //setting up pages as string arrays..
        // setting up first page
        //Assuming 76 lines per page
        for (i = 0; i < 76 && i < lc; i++) {
          try {
            ad[i] = ac;
    catch (Exception ex) {
    bk.append(new PaintC(ad), format);
    ad = null;
    // setting up second page if neccessary
    // //System.out.println("Number of Lines /76= "+lc/76);
    int pagec = lc / 76;
    int modul = lc % 76;
    int k;
    if (modul > 0) {
    pagec++;
    // //System.out.println("Number of pages : "+pagec);
    j = 76;
    while (pagec > 1) {
    ad = new String[76];
    k = 0;
    for (i = j; i < (lc - 1) && k < 76; i++) {
    // //System.out.println("ac[i]= "+ac[i]);
    ad[k] = ac[i];
    k++;
    bk.append(new PaintC(ad), format);
    ad = null;
    j += 76;
    pagec--;
    printerJob.setPageable(bk);
    boolean doPrint = printerJob.printDialog();
    if (doPrint) {
    try {
    System.out.println("Print Called 1");
    printerJob.print();
    System.out.println("Print Called 2");
    catch (PrinterException exception) {
    System.err.println("Printing error: " + exception);
    CODE IN WHICH THE PRINT FUNCTION IS CALLED
    void jBPrint_actionPerformed(ActionEvent e) {
        dotheprint();
    class ContactManager_jBPrint_actionAdapter
        implements java.awt.event.ActionListener {
      ContactManager adaptee;
      ContactManager_jBPrint_actionAdapter(ContactManager adaptee) {
        this.adaptee = adaptee;
      public void actionPerformed(ActionEvent e) {
        adaptee.jBPrint_actionPerformed(e);

    You might want to check out the [url http://forum.java.sun.com/thread.jsp?forum=57&thread=500687&tstart=0&trange=15]crosspost in the swing forum before spending your time answering this question.

  • All functions getting called upon start up.

    I'm experiencing a really annoying problem, it appears that
    upon start up of my Flex application, all of the functions in the
    script tags are getting called, even the ones that have nothing
    calling them. For example: if I add the function:
    private function foo():void
    and set a break point in the first line of the function. The
    break point gets hit every time on start up. This is annoying as it
    is causing many problems with my webservice.
    If anyone has any ideas, please let me know.
    Thanks

    This is causing problems with the webservice because I have a
    method that calls the webservice which is getting called when the
    application initializes and before the webservice has time to load.
    This scenario happens even when the web service is taken out
    entirely. I actually believe this has something to do with a Model
    that I'm binding an xml file to. I have a custom xml configuration
    file for my application which is the source of a Model. Different
    parameters in that configuration are bound in different places.
    When I debug on one of these methods, I notice that the
    configuration model is near the top. I think this is causing my
    problem, but I can't be certain at this point. Does this sound
    right? Would the Model binding have anything to do with this
    problem of all the methods getting called?

  • Update DSO with planning function independently from saving data in realtim

    Dear all,
    I have an realtime cube which will be loaded via planning function and/or data entry queries.
    In order to track the entries, I store all companies with status in a DSO objects, by using a planning fuction which calls a function module and inserts entries in the DSO table. The planning function will be start by clicking a button in a web application.
    For example: A company enters data. The value will be stored in the realtime cube and the DSO entry will be created with company xyz and status 1.
    Sometime it is necessary to create a status entry in the DSO without entering data in the realtime cube. (  In order to provide an other department to enter data in during status 1).
    In this case the planning function which calls the function module in order to insert entries in DSO is not working because there is no data exchange with the realtime cube.
    How can I change DSO entries independently from writing data in a realtime cube or not.
    Any help would be great.
    Best regards,
    Stefan from Munich/Germany

    Hello Marcel,
    i have one planning function which copies data from one version to another within the cube and another planning function (type fox) which calls up an ABAP function module in order to update my status DSO. see below:
    DATA FISCYEAR TYPE 0FISCYEAR.
    DATA COMPANY TYPE ZMCOMPANY.
    FISCYEAR = OBJV( ).
    COMPANY = OBJV( ).
    CALL FUNCTION Z_FM_SEND_FOR_APP_PLAN_C01
    EXPORTING
    I_COMPANY = COMPANY
    I_FISCYEAR = FISCYEAR.
    normal way:
    User enters data via query and sends data to headquarters (1. planning functions copy from version 1 to 2 and second planning functions changes status in DSO from 1 to 2.) This works.
    not normal way, but somethis necessary:
    User does not malke any entries, and headquarters wants to change the status via an own web application. In this case the first planning function runs, but no data were copied because there are no entries. So far thats ok, but at least the second pölanning function should run and change the status in the DSO from 1 to 2. And exacltly this is not working. I suppose that the reason is, that there are no data in the cube.
    Any ideas would be great.
    Best regards,
    Stefan from Munich/Germnay

  • Error in Debugging a Custom Planning Function

    Hi All,
    I have a custom Planning function which is an ABAP code. I wanted to test the planning function and hence i set a breakpoint at the first line of the code. But when i execute the program RSPLS_PLSEQ_EXECUTE to debug my planning function, once i give the planning sequence and press F8, it gives an error instead of pointing to the breakpoint i set. Please help me out. Any pointers over this are greatly appreciated.
    Thanks
    Swaroop

    Hi Swaroop,
    take a look at RSPLS_PLSEQ_EXECUTE in transaction SE38. You will see the following line of code
    PERFORM execute_plseq  TABLES g_t_return USING seqnm variant.
    . Set a break-point here and execute the report. The debugger will stop at the above mentioned line. Press F6 to execute the statement and than double click on g_t_return. This table contains the messages. Please take a look at them. You can see the technical name of the message. To see them in a more readable format you can use transaction SE91.
    Regards Matthias Nutt
    SAP Consulting Switzerland

  • Execute process chain in BI out of an planning function

    Hello all,
    is there a way to execute a process chain in BI out of a planning function, e.g. FOX?
    We are using BI 7.0. Any help would be fantastic.
    Best regards,
    Stefan from Munich/Germany

    Hi Stefanos,
    you could use a planning function to call a function which starts the process chain. The planning function could be a customer planning function type. Make shure that you tick the without blocks tickbox. Otherwise it may be possible that the execution of the process chain is done several times.
    Regards Matthias Nutt
    SAP Consulting Switzerland

  • Execute BPS planning function on opening of web planning layout

    Hi all,
    Does anyone know how to execute a planning function automatically at the moment of opening a web planning layout in a BPS web planning folder(tx code BPS_WB/BPS_WIF0)?
    This was possible in the old BPS planning folder, but does not seem possible in the web planning folders?
    Thanks,
    Rael

    Hello Rael,
    Basically you have 2 options:
    - Use the same trick as in the how to paper "How to call a BPS Web Interface with predefined variable values" (see service market place, alias BW, then BI Planning). In the BSP page you do not set a variable value but use the BPS API to execute a planning function (just call the function module API_SEMBPS_FUNCTION_EXECUTE). When using the url parameters in a similar way as in the how to paper you can call different function modules for different web applications.
    - You can use the application class in the web interface builder and call the function in the "on load" method. There is a how to paper describing how such a application class can be used (Validate key figure values in manual planning - web). Note that there another event is used and thus a check AFTER input is done.
    Well - the second option might be a little more elegant but I think the first one is definitely less complicated and less work...
    Best regards,
    Gerd Schoeffl
    SAP NetWeaver RIG BI

  • IP - Is it possible to call exit planning function from ABAP Report..

    Hi All,
    Greetings.
    Is it possible to call exit planning function from ABAP Report (t-code SE38) ? Or I mean is not limited only to be called from ABAP Report, perhaps from BSP / Web-Dynpro / Function Module.
    If somebody here has been doing it before, I'm keen to ask to kindly share it. Particularly how to call and transfer data to that exit function.
    Or if somebody has done in BPS, appreciate if it can be shared too .
    Thanks a lot and have a good day,
    Best regards,
    Daniel N.

    Hi.
    You can achive this as suggested by Mattias in your previous post.
    Lets say you have next data structure:
    CostCenter | Amount | PercentForDistibution |
    Create input ready query in this format. Restrict cost center by variable type range.
    Create WAD with analysis item.
    When you run web page you enter range of cost centers (lets say you will enter 101004 to 101010).
    I assume you have data only for 101004 in your cube (lets say 1000).
    You will see only one record in your webpage.
    CostCenter | Amount | PercentForDistibution |
    101004       | 1000     | NOTHING
    When you create WAD in analysis item properties set "NUMBER_OF_NEW_LINES" to lets say 1 (so in WAD you will see always one blank line for entering new data).
    Just add 6 new records:
    CostCenter | Amount   | PercentForDistibution |
    101005       | NOTHING| 10
    101006       | NOTHING| 30
    101007       | NOTHING| 20
    101008       | NOTHING| 25
    101009       | NOTHING| 5
    101010       | NOTHING| 10
    Then run planning FOX function like this:
    FOREACH Z_COST_CENTER.
    IF {Amount, Z_COST_CENTER} <> 0
    Z_AMNT_TO_DISTRIBUTE = {Amount, Z_COST_CENTER}.
    ENDIF.
    ENDFOR.
    FOREACH Z_COST_CENTER.
    IF {PercentForDistibution Z_COST_CENTER} <> 0.
    {Amount, Z_COST_CENTER} = Z_AMNT_TO_DISTRIBUTE * {PercentForDistibution Z_COST_CENTER}.
    ENDIF.
    ENDFOR.
    It is not perfect FOX, but as an idead, it should work.
    Regards.

  • How can I get/set the vaule of a varibale in the planning function

    Hi All,
    in the fox I can get the value of a variable using VAR(), but How can I get/set it in a normal planning function?
    any proposal would be very appreciated.

    Hi,
    Call following functions 
    1. To get the current value of a planning variable call funtion
    API_SEMBPS_VARIABLE_GETDETAIL by passing Area and variable name
    2. To set the value of a variable call function
    API_SEMBPS_VARIABLE_SET  and pass planning area name and variable name.
    Award the points if thsi solves your purpose.
    Regards,
    Deepti

  • How can I get the query name/aggregationslevel in my planning function?

    Hi,
    is it possiable to get the query name/aggregationslevel in a planning fuction?
    thanks for your idea.
    hongwei

    Hi,
    The interface IF_RSPLFA_INFOPROV_DESC
    provides methods for retrieving the most important properties of an InfoProvider from the point of view of the implementation class of a planning function type.
    Methods GET_T_CHARNM and GET_T_KEYFNM return the names of the characteristics and key figures in the InfoProvider.
    You can get the properties of the InfoObjects and compound information by calling method GET_TAB_IOBJ_PRO and GET_TAB_IOBJ_CMP .
    Does this help?
    Best Regards
    Shyam

  • How to get planning function in customized data slice?

    Hi all,
    we are using a customized data slice which implements IF_RSPLS_DATASLICE. Now we have the requirement that the data slice only protects the data when it calls via query. The data slice will not protect data if a planning function is executed. How can we implement this requirement? Is it possible in the method IF_RSPLS_DS_METHODS ~ IS_PROTECTED to read this information from an instance of the planning function (CL_RSPLS_CR_CONTROLLER?) or the buffer or something else? Or can we find some information about the query?
    At the moment we only check if a planning sequence is called by a process chain. This works fine
    IF sy-batch IS NOT INITIAL.
        e_noinput = rs_c_false.
        EXIT.
      ENDIF.
    Thanks for your help!

    Hi,
    I think this topic was already discussed in this forum.
    By design, it should not matter whether a query or a planning function is not allowed to change records. This is what data slices were designed for.
    OK, you need a different behaviour.
    1. Maybe you can detect from the planning function filter or query filter whether you run function or a query. If this is the case use the method IS_OVERLAPPING of the data slice. There you get the filter as a I_TSX_SELDR or as a range table when you call SELDR_TO_RANGE. When you return r_is_overlapping = rs_c_false. the data slice will not be called.
    2. Another option is to call the factory of the data slice and to use a flag in the data slice that indicates that the data slice is used in the context of a planning function. The factory method is GET_INSTANCE. Set a break point there to find out how the system calls this method. But when to call the factory? Check note 1101726. This note provides infrastructure to change the filter of a planning function at run time. But you can use this exit to call the factory method mentioned above. The nice thing is that you can raise the excpetion EMPTY in the exit, thus the function will not be called. So use a planning sequence with dummy1, your function, dummy2. For dummy1 switch on flag on, raise EMPTY, dummy1 will not be executed (almost no run time is needed), then 'your function' will be called (do nothing in the exit', then function dummy2 will be called, here switch the flag off again.
    Check also the following link where the above technique is used to for the conditional execution of planning functions:
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/a0785271-1446-2d10-6987-d1e44f08e97c
    Regards,
    Gregor

  • Module Function not being called by the planning function

    Hi all,
    I am having a problem with the MF assigned to the planning function of my planning level. It's not being called when executing the layout using Planning Folder. This action is suppose to be taken when saving the entries of the layout (I have made the proper setting in planning folder)
    When I execute the planning folder and manually introduce data in the layout and save, the MF is not executed but data is loaded in the infocube anyway. I have put a breakpoint in the MF but never stops, as never has been called.
    Please, could anyway let me know his comments?
    Best Regards!
    José.-

    Hi Jose,
    There could be two reasons why the FM might not work.
    1. The level selections for which the FM runs and the Layout gets executed might different and the FM is not getting the Requisite Data set to read data from .
    The solution could be check the level selections and execute the FM .Also after you save the Data ,please do an F9 to check the display message.Chekc if oyu Function module is reading any data set at all(ifit says 0 read ,0 changed statement i mean).
    2. The second reason could be that the FM is not initialised at all.To initialise the FM you need to write an initialisation FM and place it in the INIT part of the Exit function.This creates dummy records if your data set is initially empty which is the case here.Here is a sample code you might get reference from .
    Create one dummy combination
    If we don't do this, the upload won't work since the second function
    will not be executed at all in case no transaction data exists so far.
    The combination must be a subset of the planning level!
    " >>> BEGIN INSERT
      IF l_count = 1.
        EXIT.
      ELSE.
        CLEAR ls_chas.
        CLEAR: ls_chasel.
        LOOP AT ito_chasel INTO ls_chasel.
          CLEAR: ls_charng.
          READ TABLE ls_chasel-t_charng INTO ls_charng INDEX 1.
          IF sy-subrc = 0.
            ASSIGN COMPONENT ls_chasel-chanm OF STRUCTURE ls_chas TO <f>.
            IF sy-subrc = 0.
              <f> = ls_charng-low.
            ENDIF.
          ENDIF.
          CLEAR: ls_chasel.
        ENDLOOP.
      ENDIF.
      " <<< END INSERT
      COLLECT ls_chas INTO lto_chas.
      eto_chas = lto_chas.
    ENDFUNCTION.
    Hope this helps.
    regards
    Sai Vishnubhatla

  • Server side function not get called after dispatching cairngorm event second time on same page

    Hi All,
    I am facing a urgent issue regarding cairngorm event. Actually my page contain 3 button add,delete,save
    and  clicking of any button I do the respected functionality. For ex:
    I click the add button & on clicking of add button I fire a cairngorm evnt & after getting response from server side that the record is added
    I displayed a message that the record is added & update the data source.
    After addition of the record , with out going to other page if I perform the same functionaly(Like adding another record) on same page the cairngorm
    event not call the server side function  -  after debugging I find out that cairngorm event  reach to the corresponding excutecommand function & called that function  but it is not calling my server side function & I also din't get any error message .
    I dont know why  the server side function not get called?. similarly if I try for delete or update case the same things happend. Only for the first time it works properly but not for the second  time.
    Could any of  you please tell me why the cairngorm event not calling the server side function.
    Thank you for your kind assistance.
    Regards,
    Ujjwal

    Okay, well I think I've worked out the problem.
    In ASP.NET we would typically bind repeating controls such as DataLists and Repeaters manually using <i>Control</i>.DataBind(), because we're usually using a separate class library containing collections for our objects. Seems the SAP Table control doesn't like this approach.
    I changed the code so that the databinding is specified on the control, and call the Page's DataBind() method and it all worked fine.
    One tip: because the collection I used to bind to is in a separate class library, I receieved a <i>BC306523: Reference required to assembly MyAssemblyName...</i> message, even though I had a reference to the assembly in my project and the DLL is being properly deployed. To fix this, you must include the following directive at the top of the component's ASCX file:
    <%@ Assembly Name="AssemblyName" %>

  • Call planning function in BSP application in IP

    Hello,
    In BPS we used function module API_SEMBPS_FUNCTION_EXECUTE to call a BPS planning function in a BSP application.
    Now, we want to call an IP planning function in the same BSP application. Is there a similar function module or any other method we can use??
    Thank you very much

    Try function module - RSPLSSE_SERVICE_EXECUTE to directly execute the function(planning service) or RSPLSSE_PLSEQ_EXECUTE to execute the planning function via planning sequence.

Maybe you are looking for

  • Verizon Wireless iPhone 4 FAQ

    Frequently Asked Questions: Two models available: Apple® - iPhone® 4 16GB Mobile Phone (Verizon Wireless) - Black Apple® - iPhone® 4 32GB Mobile Phone (Verizon Wireless) - Black When was the Verizon Wireless iPhone 4 made available at Best Buy®? Thur

  • Error message when trying to finalize project in iMovie

    I get the following message when I attempt to finalize my project in iMovie: "The project could not be prepared for publishing because an error occurred. (OpWrErr: file already open with with write permission)" This message appears well into the 6 or

  • Subscription to India double payment

    Hi  I paid for unlimited subscription to India on 24/08/2012 around 32 AUD$ were deducted from my account. Saying India Unlimited min subscription. I am not sure what it is?? And showing that subscription expires in 12 days. Can anyone explain why. I

  • How do I make Aperture NOT launch when I insert my photo microdrive?

    Aperture automatically launches when there is a camera disk mounted, which is annoying. How do I turn this off?

  • Retreiving actionlistner for jcombobox

    I am wanting to remove the actionlistener that is set to a jcombobox and i tried this line cboPatients.removeActionListener(cboPatients.getActionListeners());but gives me the error removeActionListener(java.awt.event.ActionListener) in javax.swing.JC