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

Similar Messages

  • Dynamic Internal Table for reading data from external file

    Hello All,
    The task was to create a internal table with dynamic columns,
    Actually this is my first task in the WebAS 6.20, my program is based on input file provided by user with certain effort. this file can have different effort for a one yr to five year frame..
    I needed to read the raw data from file, based on months create a internal table to hold the data, after this i need to validate the data...
    I have browsed thru dynamic internal table topic, but couldn't find any dynamic appending structure, the dynamic structure would contains 12 month fileds.
    can any one help me in getting my task completed..
    Thanks
    Kumar

    Hi,
    I see that you posted the same question a couple of days ago at Dynamic Internal Table for reading data from external file Didn't Charles's response address your problem?
    Regards

  • Is there a user exit for Excel download from Web Template?

    Hi,
    Is there a user exit for Excel download from Web Template?
    Thanks,
    Frank

    Hi,
    I need to do some data manipulation before export to Excel.  I could use Table Interface to manipulate the data before rendering to the Web.
    Regards,
    Frank

  • Urgent help with simple BPEL process for reading data from database

    Hello there,
    I need help with BPEL project.
    i have created a table Employee in Database.
    I did create application, BPEL project and connection to the database properly using Database Adapter.
    I need to read the records from the database and convert into xml fomat and it should to go approval for BPM worklist.
    Can someone please describe me step by step what i need to do.
    Thx,
    Dps

    I have created a table in Database with data like Empno,name,salary,comments.
    I created Database Connection in jsp page and connecting to BPEL process.
    It initiates the process and it goes automatically for approval.
    Please refer the code once which i created.
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@page import="java.util.Map" %>
    <%@page import="com.oracle.bpel.client.Locator" %>
    <%@page import="com.oracle.bpel.client.NormalizedMessage" %>
    <%@page import="com.oracle.bpel.client.delivery.IDeliveryService" %>
    <%@page import="javax.naming.Context" %>
    <%@page import="java.util.Hashtable" %>
    <%@page import="java.util.HashMap" %>
    <%@ page import="java.sql.*"%>
    <%@ page import= "jspprj.DBCon"%>
    <html>
    <head>
    <title>Invoke CreditRatingService</title>
    </head>
    <body>
    <%
    DBCon dbcon=new DBCon();
    Connection conn=dbcon.createConnection();
    Statement st=null;
    PreparedStatement pstmt=null;
    Hashtable env= new Hashtable();
    ResultSet rs = null;
    Map payload =null;
    try
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
    env.put(Context.PROVIDER_URL, "opmn:ormi://localhost:port:home/orabpel");//bpel server
    env.put("java.naming.security.principal", "username");
    env.put("java.naming.security.credentials", "password");//bpel console
    Locator locator = new Locator("default","password",env);
    IDeliveryService deliveryService =
    (IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME );
    // construct the normalized message and send to Oracle BPEL Process Manager
    NormalizedMessage nm = new NormalizedMessage();
    java.util.HashMap map = new HashMap();
    st=conn.createStatement();
    out.println("connected");
    String query1="Select * from EMPLOYEE";
    rs=st.executeQuery(query1);
    /*reading Data From Database and converting into XML format
    so that no need of going to BPEL console and entering the details.
    while (rs.next()){
    String xml1 = "<AsynchBPELProcess1ProcessRequest xmlns='http://xmlns.oracle.com/AsynchBPELProcess1'>"+
    "<Empno>"+rs.getString(1)+"</Empno>"+
    "<EmpName>"+rs.getString(2)+"</EmpName>"+
    "<Salary>"+rs.getString(3)+"</Salary>"+
    "<Comments>"+rs.getString(4)+"</Comments>"+
    "</AsynchBPELProcess1ProcessRequest>";
    out.println(xml1);
    nm.addPart("payload", xml1 );
    // EmployeeApprovalProcess is the BPEL process in which human task is implemented
    deliveryService.post("EmployeeApprovalProcess", "initiate", nm);
    // payload = res.getPayload();
    out.println( "BPELProcess CreditRatingService executed!<br>" );
    // out.println( "Credit Rating is " + payload.get("payload") );
    //Incase there is an exception while invoking the first server invoke the second server i.e lsgpas13.
    catch(Exception ee) {
    //("BPEL Server lsgpas14 invoking error.\n"+ee.toString());
    %>
    </body>
    </html>
    Its working fine.And i want it for Bulk approvals.please help me step by step procedure if any other way to implement this.

  • How to relate data of tables returned by FM for reading data from ST03N

    Hello,
    I am using the FM SWNC_COLLECTOR_GET_AGGREGATES to retrieve data displayed in T-Code ST03N into my report.
    I am able to get the required data in different tables like Times, Memory, Usertcode, Userworkload, Hitlist_database.
    However I am unable to undertand how to relate the data of these different tables, prepare another internal table with only the fields that are required for my report and then display those details.
    Like, I want to loop through one of these internal tables, read data from other internal tables and consolidate my required data. But I am unable to understand based on what criteria I can read other internal tables inside a loop of any one of the above said internal tables.
    I searched a lot and found many threads and blogs related to ST03N and learnt a lot about this T-code. But I could not find how to relate the data of all these tables.
    Request you to please help.
    Thanks and Best Regards,
    Eswar

    Hi,
    I see the common fields like TaskType, EntryId. But, I want to make sure that these are the fields that are enough to read the records or is there any other way that I can be sure that I am getting the correct record in my read statement. So my question is specific to the tables returned from the FM SWNC_COLLECTOR_GET_AGGREGATES and not a generic one.
    Thank you for your help.
    Best Regards,
    Eswar.
    Edited by: eswar praveen on Aug 20, 2010 12:19 PM

  • User exit for component data in ME21n/ME22n

    Hello,
    I have a requirement to issue an error message if a component quantity is not evenly divisible by the end item quantity.  The component data (BOM) is entered after clicking the components button on ME21n/ME22n at the item level detail.  I need to evaluate the data after a user clicks save, but I cannot find a user exit where the data is passed into, or where it is defined as global data where I can reference it in a user exit.  The data is stored on the screen in structure MDPM and stored in the database in table RESB.
    I appreciate any help,
    David

    Thanks for pointing me in the right direction.
    I was able to put my code in EXIT_SAPMM06E_012 and retrieve the component data through (SAPLEINK)XMDPM[]
    Below is the code I used to assign the data to be able to evaluate it.
    FIELD-SYMBOLS: <z_mdpm_x> TYPE ANY.
    DATA: i_mdpm_x TYPE STANDARD TABLE OF MDPM_X.
    Fetching Component data
      ASSIGN ('(SAPLEINK)XMDPM[]') to <z_mdpm_x>.
      CHECK sy-subrc = 0.
    Assigning data into an internal table
      i_mdpm_x[] = <z_mdpm_x>.
      CHECK i_mdpm_x[] IS NOT INITIAL.
    David
    Edited by: David Herrema on Oct 20, 2010 3:03 PM

  • User exit for save data in T.code PA40 ABAP-HR

    Hi Expart,
    what is the user exit which is trigger when we save the data through pa40 transaction which check the latest update in the database.
    Kindly give me exit name .

    Hi Vikash ,
    Please refer to below Exits :
    HRPBAS01            User Exit for HR Master Data
    HRPC0001            HR: PC download authorization
    HRRPAI01            User exit for FB HR_ENTRY_DATE and HR_LEAVING_DATE
    PARA0001            Enhancement for Determining the Number of Periods
    PARA0002            Enhancement for Calculating Annual Salary; IT0008,14,15
    PBAS0001            PA: Pers.Admin./Recruitment: Default values and checks
    PBAS0002            PA: Enhancements for Personnel Administration - Menu
    PBASRP01            PA: User exit distributed reporting
    Hope this will help you.
    Regards,
    Nikhil

  • User Exit for Validity Date for VA41 Tcode

    Hi,
    I am giving order type in VA41 Tcode and then Clicking on 'Create with Reference' .Then  a Pop Up is getting generated. In this i am giving Contract created with validity date lessthan today's date(in Contract Tab).For Example i created a Contract xxxxxx with 'valid to'  9.12.2008. When I am giving this contract and clicking on 'Copy' button a Warning message is getting generated 'The sales document is only valid until 09.12.2008'. Now i have to change this into Error message instead of Warning Message.
    i used User Exits  mv45afzz,MV45AFZA,MV45AFZB. But the debugger is getting started only after Warning message got generated.Is there any User Exit for which debugger gets started  when i give the Contract and then Click on 'Copy' button. Please Suggest.
    Thanks and Regards
    K Srinivas

    Hi,
    One idea. Go to VTAA (copy between sales docs) and create a new VOFM where you manage the copy control. Set a warning/error message in the new VOFM (in your range number), and try it.
    Regards,
    Eduardo
    Edited by: Eduardo Hinojosa on Dec 10, 2008 3:58 PM

  • User exit for additional data B for sale order item .

    Hi., all
    my client requirement is
    (  This business requirement will make the Last Price for a given item be visible during order entry.  )
    u2022Retrieve & display during order entry, the most recent unit price given to a customer for a specific item, from the Billing data.
    . Display the Last Price under Additional Data B Screen
    add new field (last extended price) in additional data b screen.
    after that 1.     Using the Sales Order Material Number (VBAP-MATNR), Sales Order Sales Organization (VBAK-VKORG), Sales Order Distribution Channel (VBAK-VTWEG), Sales Order Division (VBAK-SPART), Sales Order Sold-to Number (VBPA-KUNNR for VBPA-PARVW=u2019AGu2019) to access the Billing Items By Material Index Table (VRPMA) and specify a billing date (VRPMA-FKDAT) of less than 60 days from current Sales Order requested delivery date (if specified at header VBAK-VDATU or at the schedule line level (VBEP-EDATU).  This will result in all the billing documents where the Sold-to bought the item but isnu2019t completely refined as of yet.  Retain the billing document (VRPMA-VBELN), item (VBPMA-POSNR), and billing date (VRPMA-FKDAT) in a temporary table to pass to number 2 as the input.
    2.     Use the billing document (VRPMA-VBELN) and item (VRPMA-POSNR) to read the Sales Document Partners Table (VBPA) where the partner function (VBPA-PARVW = u201CSHu201D) and the Sales Order Ship-To (VBPA-KUNNR for VBPA-PARVW=u2019WEu2019) to select ONLY billing documents that are for that given ship-to location.  This filters out only billing documents relevant for that ship-to location. 
    3.     From the resulting list of billing documents, select the most recent date (VRPMA-FKDAT) which will refine the search for the last Billing Document (VRPMA-VBELN) and item (VRPMA-POSNR).
    4.     Using the most recent Billing Document (VBPA-VBELN), access the Billing Document Item Table (VBRP). To result in the Last Extended Price as VBRP-KZWI1.
    5.     This price will be an extended price which needs to be calculated as a u2018unit priceu2019.  For this billing item, select the sales unit (VBRP-VRKME) to determine if the sales unit is in cases or eaches. 
    a.     If the unit of measure is in cases, then simple math is required to divide the Last Extended Price (VBRP-KZWI1) by the billing quantity (VBRP-FKIMG).  Standard rounding should apply when .005 results in a .01.
    how to achive this ?

    Hi Chakravarthy,
    use the Exits provided in SAPMV45A -includes MV45*ZZ and screen exits as well 8309 8310 8459, 8460. Just be sure to
    use zznnnnnn include in the SAP provided forms instead of coding directly in the forms.
    You can check below user exits:
    MV45ATZZ :For entering metadata for sales document processing. User-specific metadata must start with "ZZ".
    MV45AOZZ:
    For entering additional installation-specific modules for sales document processing which are called up by the screen and run under PBO (Process Before Output) prior to output of the screen. The modules must start with "ZZ".
    MV45AIZZ:
    For entering additional installation-specific modules for sales document processing. These are called up by the screen and run under PAI (Process After Input) after data input (for example, data validation). The modules must start with "ZZ".
    MV45AFZZ and MV45EFZ1:
    For entering installation-specific FORM routines and for using user exits, which may be required and can be used if necessary. These program components are called up by the modules in MV45AOZZ or MV45AIZZ.
    Reddy

  • User Exit for transferring text from delivery -Item note to Accounting doc.

    Hi Experts ,
    I need an user exit where I can transfer the delivery item text (item note )  from outbound deliver to accounting document when the post goods issue (PGI ) is done .
    Please suggest.
    Thanks in advance
    Tanveer Khan

    I have got the function Exit EXIT_SAPMM07M_001. Which resolves the purpose...Thanks for your time..

  • User exit for actual dates in CJ20N

    I have a req,  When i start any activity i enter date in user field in actual dates as displayed in below pic
    Now when i enter date in user field it should be copied to actual  start date field in dates tab as shown in below pic
    Kindly suggest the user exit needed for it
    Best Regards,
    Nitesh H Panchal

    Hi Nilesh,
    Try this with Substitution & Validation rule.
    You want AFVGD-ISDD should have same detail as of AFVGD-USR08.
    However with the help ABAPer you can achieve this easily.
    Regards,
    Pranav

  • BPEL or OSB for reading data from db and then writing to another db

    Hi All,
    I have a requirement of reading the data from a table in one database and then writing into the table in another databas.I dont need any transformation on the data.
    I understand that i can do this by creating a BPEL process with DB adapters.
    Is there any better way of implementing this.I am new to OSB and If need to use OSB, then how can we do this in OSB and what are the advantages of using OSB over BPEL in implementing this.
    Thanks,
    ashok

    probably it would be much easier to develop everything in JDeveloper using DBAdapter.
    You can run it inside SOA Suite, but you don't even need BPEL, just use Mediator.
    Otherwise you can export all the JCA and WSDL and XSD paraphernalia from JDeveloper and import into OSB, it should run smoothly.
    How do you trigger the transfer? Polling the DB to look for new rows?

  • User Exit for delivery Date Update in ME41

    Hi,
    I want to Create one User Exit which will Update the Delivery Date of All Line Items ,same as of Item one.
    Detail : When creating RFQ using tcode ME41, create with Reference to PR, add your collective Number and copy few line items from your PR, say 5 items selected, now  when come to RFQ it asks to change item details if require,
    now here i want to change Delivery date of item one and when putting new delivery date, and press enter then it should update all (remaining 4 ) items delivery date same as of item one. so that user do not need to update all items delivery date one by one.
    is there any user exit/Enhancement Spot available which get triggered after pressing enter when changing the items?
    Thanks in advance.
    Regards,
    Sujeet

    Hi,
    Check these enhancements:
    ME590001           
    MEETA001           
    MEFLD004           
    MELAB001
    Jitendra

  • User exit for updating date field in msc2n while doing a goods rcpt in cor6

    is ther anyexit to update the Date1 field(MCHA-FVDT1) in MSC2n( Batch) while doing a Good receipt for an order
    Thanks in advance

    Hi,
    to find the user exits & Badi's for the T-code..
    go to table TSTC>enter T-code and execute> get the Program for the t-code..
    and go to-se38-->get the package attached to the t-code..
    next go to t-code Se15>expand the enhacement tab>enter package under userexit and
                                                         execute you will get the list of exits
                                                         available...
                                                      -->enter package under Badi's tab and
                                                         execute you will get the list of Badi's
                                                         available... 
    All the User exits are stored in Table MODSAP..
    Prabhudas

  • User exit for pricing date determination

    Hi Friends
    I want to have a custom validation at pricing date determination at billing document creation. Please anybody can help me which exit available at VF01 for this purpose.
    Regards,
    Ramindu

    Hello,
    Check for the below link:
    http://help.sap.com/saphelp_46c/helpdata/en/18/f62c7dd435d1118b3f0060b03ca329/content.htm
    Prase

Maybe you are looking for

  • Toshiba Satellite L650-07U, Hard disk failure and replacement

    Hi all, I have Toshiba Satellite L650-07U Laptop, Model: PSK1EC-0700Q with 4GB RAM, 650GB HD, Windows 7 Home Premium installed. At the time of first use, i made Recovery DVDs which took 4 blank DVDs using Recovery media creator. From 2 weeks it is gi

  • Business object and BW

    Hi gurus can any one tell the difference between  difference between a Business Object and Business Warehouse. Regards Arunkumar

  • Can't Connect to Server after Upgrading to Lion

    I upgraded to 10.7 from 10.6.8. I've ran all the updates etc, but now I cannot connect to my OS X Server (10.6.8) or any other machine for that matter. The server appears in my finder window and will allow me to connect as a guest but if I try to log

  • Mobile number is not uploading for BP master data creation using BAPI ?

    Hi, I am creating Business Partner Master data in ISU/CCS using the BAPI "BAPI_ISUPARTNER_CREATEFROMDATA". Uploading data from Excel. Successfully uploading and creating new Business Partners apart from Mobile number, nick name,middle name, and name

  • Appending a strucutre to a Structure

    Hello everyone,   Actually i am adding a field from a transparent table to an existing structure,while appending the zzfield i am saving that 'APPEND STRUCTURE' in a different package to that of an existing structure.Now it is not showing that field