ABAP program to load an infocube

Hello All,
I am new to BW and have learnt the basic concepts only. I now have to write an ABAP program to load one of the infocube after receiving the data in the form of a flat file from an external system. Any ideas on how I can go about this will be greatly appreciated and rewarded!  Thanks in advance.
Regards
Veena

Hi,
I guess you can try to raise an event to trigger the PC or IP to load the cube.
You should raise the event through your ABAP code and schedule the PC or IP to run once this event is raised.
Create event in tcode SM62
Use FM: BP_EVENT_RAISE to raise an event
Use after event in the start variant of the process chain.
You create user events in SM62. In SM62, next to "User even names", click on Maintain and press Enter. Click on the Create icon to create a new event (let's call it ZEVENT).
Next, in your process chain, change the Start variant to be scheduled "After event", and put in ZEVENT for the event name. Also, click on the "Periodic job" at the bottom. This will automatically reschedule the jobs for the process chain after it executes.
Next, create an ABAP program (let's call it Z_EVENT_RAISE) to call the function module BP_EVENT_RAISE. You're code can look like this:
codeREPORT Z_EVENT_RAISE.
PARAMETERS: P_EVENT LIKE TBTCO-EVENTID.
CALL FUNCTION 'BP_EVENT_RAISE'
EXPORTING
EVENTID = P_EVENT.
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.[/code]
This ABAP program will prompt for an event name, so you will need to create a variant (let's call it ZEVENT) which will save the value of the event name (also ZEVENT). You will need the variant name to be able to trigger the event in a batch job.
Now all you need is the batch job. Use tcode SM36 to create a batch job where you call the ABAP program (Z_EVENT_RAISE) using the variant (ZEVENT).
Raise an event to trigger process chain in BI
http://sapbwneelam.blogspot.com/2007/09/how-to-start-process-chain-through.html
how do we raise an event to trigger process chain in BI
Hope this helps.
Thanks,
JituK

Similar Messages

  • Is a save step neccessary in a Process Chain when loading hierarchies with an ABAP program?

    We are loading hierarchies using the ABAP routine found here in the SDN. 
    We have come accross the issue where the process chain loads successfully, but does not update the hierarchy (this problem is documented in the SDN).  It is not a consistent issue, but it causes problems when it does occur.
    OSS note 652856 points out that a SAVE HIERARCHY step is needed after the load and before the Change Attribute run.
    We have added the step to the process chain, which leads me to the question.
         In using the ABAP program to load hierarchies is the addition of the Save Hierarchy step necessary?
         Will that resolve the issue with hierarchies not updating?

    Hi Bill,
    Yes, SAVE HIERARCHY step is required when hierarchies are loaded as part of process chain. This step ensures that the hierarchy data loaded to BW has been saved. Then we have to run ACR so that these hierarchies will be activated and adjusted.
    This is the reason why even the hierarchy data loaded using infopackage needs this step. This step is not required if the Infopackage is triggered manually.
    This link will help you in better understanding
    http://help.sap.com/saphelp_nw04/helpdata/en/3d/320e3d89195c59e10000000a114084/content.htm
    Regards
    Chandu

  • Events in ABAP Programming

    Hi,
    Can anybody please list out the exact differences between the events 'LOAD-OF-PROGRAM', 'INITIALIZATION' and 'AT SELECTION-SCREEN OUTPUT'.
    Thanks in advance,
    Sujit.

    Hi,
    <u><b>LOAD-OF-PROGRAM:</b></u> When an ABAP program is loaded in an internal session, the runtime environment triggers the LOAD-OF-PROGRAM event, and the corresponding event block is executed.
    The processing block LOAD-OF-PROGRAM has approximately the same function in an ABAP program with type 1, M, F, or S as the constructor method of a class in ABAP Objects.
    Programs wiht type 1, M, F, or S can be loaded into an internal session in two ways:
    Program calls
    Whenever you call a program using SUBMIT or a transaction code, a new internal session is opened. The LOAD-OF-PROGRAM event is therefore called in each program call.
    External procedure calls
    The first time you call an external procedure (subroutine or function module), the main program of the procedure that you called is loaded into the internal session of the calling program. The eventLOAD-OF-PROGRAM is triggered and the corresponding processing block is executed before the procedure that you called. However, subsequent calls from the same calling program to a procedure in the same subroutine pool or function group do not trigger the LOAD-OF-PROGRAM event.
    so it's before the program is loaded in the memory for execution.
    <u><b>INITIALIZATION:</b></u>
    This event occurs before the standard selection screen is called. You can use it, for example, to initialize the input fields of the standard selection screen. This is the only possible way to change the default values of parameters or selection criteria defined in logical databases. To change a selection criterion, you must fill at least the components <seltab>-SIGN, <seltab>-OPTION, and <seltab>-LOW of the selection table <seltab>, otherwise it remains undefined.
    If you want to initialize input fields of the logical database, you need to find out the names of the fields. To do this for the logical database SAPDB<ldb>, use Transaction SLDB or choose Tools
    ABAP Workbench, followed by Development   Programming environ.   Logical databases. You
    can also display the technical information for the required field on the selection screen. To do
    this, call the F1 help for the required field and then choose Technical info. In the field Scrn Field
    of the following dialog box, you then see the name of the field used in the program.
    <u><b>AT SELECTION-SCREEN OUTPUT</b></u>
    event is triggered. This event block allows you to modify the selection screen directly before it is displayed.

  • Running a DOS program before an ABAP program

    Hello
    we have Z_Order  ABAP program which load order to SAP, we need to run a DOS program to get file to the correct folder.
    Is it possible to run this DOS program every time user run Z_Order program
    Thanks

    Hello Mohsen,
    welcome in the SAP community.
    If you don't have the possibility to change your ABAP report Z_Order you can do this:
    Download the COM Connector from here. Look at example 0108_ABAPReport.vbs. It is a VBScript to implement and execute and ABAP Report via VBScript. Change the report inside the VBScript like this:
    Dim ABAP(2)
    ABAP(0) = "Report z_myreport Line-Size 256."
    ABAP(1) = "Submit Z_Order."
    Now write a batch file like this:
    MyDOSProg.exe
    wscript.exe 0108_ABAPReport.vbs
    In the first step your DOS program is executed and in the second step the VBScript implements and executes the ABAP program to run your Z_Order report. You can start your batch file from your presentation server. But you need one the one hand rights for RFC connection and on the other hand a developer key.
    Another way is to go to your developer and talk to him about a RFC function module, which calls the report Z_Order via Submit. Now you can call this RFC function module as in the CCo example 0103_Ping.vbs as I described above. Here you need only the rights for RFC connection.
    If you have the possibility to change your ABAP report, you can do that:
    Call Method cl_gui_frontend_services=>execute
      Exporting
        DOCUMENT = 'cmd MyDOSProg.exe'
        SYNCHRONOUS = 'X'
      Exceptions
        Others = 1.
    Call the method execute in front of all other commands inside your Z_Order report.
    Cheers
    Stefan

  • How to extract data from BPC InfoCube via ABAP program?

    Hi experts!!
    I tried to extract data from a BPC InfoCube via ABAP program, but I did'n have succeed.
    I used the function 'RSDRI_INFOPROV_READ' to extract data from standard InfoCubes such as '0COPC_C07' and it run OK! However, when I change the InfoCube name to '/CPMB/WAIX8NE' (BPC InfoCube), everything goes wrong...
    Is there any difference between extracting data from BPC and standard InfoCubes?
    Thank you all!

    Moderator message - Welcome to SCN.
    But please do not cross and duplicate post.
    Thread locked.
    Rob

  • Tcode to find the load in server is 20 users run a particular ABAP program

    I want to find the load in the SAP Server (in terms of CPU Usage, memory usage) if a particular Query or ABAP program is executed by 20 users.
    Pls let me knwo the Tcode for the same
    As per my understanding ST03 can be used to view the report of previous information only.

    Balaji
    You have the analyze the load while 20 users executing the following transaction code.
    OS06 - operting system monitor and click on detailed analysis where you can monitor the various instances
    if do you find the other transaction which will show you load of current program being used by 20 users, please share with the expert communitiy to help to other users.
    REgards
    Anwer Waseem

  • Can we update BW infocube from SAP using Custom ABAP program ?

    Hi,
    My requiremnet is to update the infocube using data from R/3 .
    I have a custom report program and users want this data in BW.
    Let me if there are any FM? from which we can call via RFC or any other alternatives?
    Rgds
    Praveen

    report must be an ABAP program in ECC I guess...Why dont you look forward for generic extraction...
    Check this one:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a0f46157-e1c4-2910-27aa-e3f4a9c8df33

  • How to access Infocube content using an ABAP program

    Hi,
       I am trying to access infocube contents using a ABAP program in BW.
       It is easy to access ODS content as we have NEW DATA or ACTIVE DATA
       tables. Is there any way we can access Infocube content.
       I tried using the FACT table but it has only Keyfigure data.
    thanks
    arshad.

    Hi,
    I would suggest to use a transactionnal cube, even if you do not use BPS to feed it.
    Then, you create a layout in transaction BPS0 (~ similar to a query), and you can access the cube content by simply using the SAP function <b>API_SEMBPS_GETDATA</b>.
    This is easy and fast.
    Regards,

  • Full Load and delta loads of HR Data using ABAP Program

    Hi All,
    I need to write an ABAP program that will pull some HR data from some of the infotypes.When i run it for the first time it should pull all the data for all the employees but in the subsequent runs it should run only the delta changes
    for example
    inital run is on 04/30 it should pull all the data for all the employees
    next run 05/02 then it should pull onlly the infotypes for which there is a change between 04/30 and 05/02
    Please let me know the solution
    Thanks
    Bala Duvvuri

    Rob,
    I understand that I need to AEDTM field but the problem is
    during the initial load i will not have any control date stored in the z table so i will fetch all the records using the select queries on various infotypesin the if condition but the problem is i need to repeat the same queries by adding the AEDTM condition in the else condition where control date is not initial(not an initial load) so it will be a duplicacy of all the select queries.
    is it a good programming style?please let me know your thoughts on this
    if p_ctrl is initial " Initial load
    select queries
    else " subsequent runs
    same select queires with AEDTM condition
    endif.
    Thanks
    Bala Duvvuri

  • ABAP Program Name CHanging the PSA Load status

    Hi,
    Our Scenario is Non-SAP -> PI -> BI.
    Every Day PI reads the file from source and it will directly upload to PSA in BI.But in PSA the status will show as yellow only it is not turning to green.But I am able to see the data in PSA but status is yellow.
    When we activate the Data source manually the load status is turning to green.
    I heared there is an ABAP Program to change the status.If anybody knows pl provide me the details.
    Regards
    Ram.

    Hi Ramakanth,
    Yes, that right. I have mistaken here because our pos dispatcher pumps data source every 15 mins thats why its in yellow status. I am sorry about that.
    Usually there are some reasons why the PSA in yellow.
    1. If the data is being loaded from PSA to data target, it will be in yellow
    2. If the data is loaded into PSA then it will be in yellow
    3. If we make any changes in the PSA for example deleting few records in psa and then added and transferred records doenst match then it will be yellow. In this case we have to manually change the status.
    In your case I am not sure y its not getting into green once is done. We never had any issue. Pos dispatcher runs and uploads the data into PSA and then we upload into targets.
    Thanks
    Srikanth

  • Assign loading / handling resource to location through ABAP program

    Hello Experts,
    I have a requirement where by I have to assign loading / unloading resource to a location through ABAP program. Need to assign the resource in Resources Tab in TP/VS section. Is there any function module or any method available to this?
    Responses highly appreciated. Thanks in advance
    Regards
    Sandeep Patil

    Hi all
       I have the same requirement for the end user.
      Is it a good idea update active Table of ODS behind an ABAP Program Z?, I understood that you can't have log history... and you can't delete request.. because you will not generate this..
      We actually have one ODS that contain invoices... all the fields that contain the invoice..like material, vendor, etc.. was updated according to ABAp programa that we specify on start routine, each time that we need to update these fields we need to unload fros ODS to PSA and load again with dtp...
      Let me copy more details:
    Actually, we have an DSO that is updated each week, we load the information into different PSA, all of this PSA pass to ODS for one info source and transformation rule, in this transformation rule we have an ABAP rotine that have some validation and assign some values for different fields.
    In this procees everthing look fine, actually If we need to update this information from DSO (that was loaded and the user need to update some fields) we need to download information from DSO to PSA and load again with DTP process, this was fine.
    Actually the user want that this kind of changes will be apply on line, this mean that for example all the invoices that I have actually loaded into DSO need to be analyzed and update according new parameters that they specify in other tables.
    The DSO is standard, and contain three basis tables, active, delta, modified.
    My question is: Is it possible update directly table of active records of DSO with one Z program?? is it a good idea?, We want to discard the option of unload and load information each time that they need to update certain field that are calculated or updated whit the transformation rule or load.
    Than you for your help.

  • Can i load the cube through an customised abap program??

    Hi all,
    I have loaded the ODS using the customised abap pgrm. is it possible to load the CUBES through the abap program.
    If not what is the reasons for not loading it?
    Thanks
    Pooja

    Hi Pooja,
    For me ..
    I'm afraid to upload directly by program to info cube tables .. Because, i don't know what tables it will be taken into account for uploading ..
    But ..
    If the requirement is to upload it by ABAP Program ..
    I make like this ..
    1. I create the ABAP Program to create .csv files. So all uploaded data will be written into .csv files.
    2. I create info-package, that upload data from file. And i define the path to refer to that corresponding .csv files.
    3. Beside ABAP Program is used to write .csv files, i also use it to trigger the info-package.
    So by that techniques, i'm able to upload data by ABAP Program.
    Hopefully it can help you a lot.
    Regards,
    Niel.

  • Abap program to list the status of BW infocubes

    Hi experts,
    I am an SAP BW consultant. My BW environment has around 20 cubes and dataloads are carried out every 2 hours. I need to write an ABAP program which when run anytime returns the list of all BW cubes which are reportable at that point in time.Similarly it should also list which cubes are not reportable.
    Could you please tell me how I should approach the solution to this requirement.
    Thanks Ankit

    Hi ,
          Copy paste below mentioed Code and try  .
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e0b4bd31-7771-2910-41b4-ff762238a857
    Salil....

  • Deleting data from an Infocube in BW using ABAP program?

    Hi Everybody,
                       I have to create a ABAP program in SE38 which, on execution will delete selected data from a Cube in BW module. How to achieve it. Is there any function module that can do so? Eagerly waiting for your suggestions.
    Regards,
    Pulokesh

    Dear Ravi,
                  Other than two parameters I_INFOCUBE, I_SHOW_REPORT do i need to pass any value to the table I_T_SELTAB.
    Regards,
    Pulokesh

  • Deleting selected data from an Infocube in BW using ABAP program?

    Hi Everybody,
                       I have to create a ABAP program in SE38 which, on execution will delete selected data from a Cube in BW module. How to achieve it. Is there any function module that can do so? Eagerly waiting for your suggestions.
    Regards,
    Pulokesh

    select the records from the cube or  ods and put in to one internal table.
    and then u can delete the records

Maybe you are looking for

  • Have a message of an error while uploading photo on to a site

    Wondered if anyone else has had this problem.  Tried to upload photos on to a selling site and while uploading an error flashed up in red.  Error while uploading. This was while using my Pro Mac laptop. Can anyone advise please?  Thank you

  • AE Composistion Settings for DVCPRO HD footage?

    Slightly unrelated but giving it a shot anyways . I have some DVCPRO HD footage. Here's the clip settings for it (digitized using Final Cut Pro). Vid Rate: 23.98 fps, Frame Size 960 x 720, Compressor DVC PRO HD 720p60, Data Rate 5.5 MB/sec, Pixel Asp

  • Wireless connection problems (SOLVED)

    Seems to randomly work now, thanks Yesterday I was doing normal things on the web and suddenly the airport logo went blank, connection is gone.  Strange, so I try a few things: - messing with Network Preferences, which after manually trying to connec

  • Create Tabbed and Accordion Panels | Adobe Muse Feature Tour | Adobe TV

    Organize lengthy information in more visually appealing, "bite-sized" chunks by using fully customizable tabbed or accordion panels. http://adobe.ly/I5cQoV

  • Title vs Version Name

    Hi!! I have iPhoto and Aperture libraries combined. I use aperture library as a main one and aperture as a edit and work with photos and iPhoto to see it. In Aperture we have to fields to name a photo. Version Name and Title. I think that in aperture