Get Table Meta Data with RFC

Hi,
I wonder if there is a way to get the meta data from a table or structure using RFCs.
More detailed:
I am using RFCs to read data from tables and structures. It would be nice to have a way to also get the table definitions, like column headers, column types and contraints, etc. using RFC.
Does somebody know how to do that? (My test system is an IDES)
Thanks in advance
Stefan

It's me again,
Today, I had a closer look on what you gave me yesterday. I think the problem is that I asked for the wrong information.
What I am actually looking for isn't meta information for tables, but information about the "Associated Type" that is associated with every import, export, or table parameter of a function module.
If I double-click on one of those types in transaction se37 after choosing a function module, I get a wonderful overview about the structure including 'component', 'component type', 'data type', 'length', etc.
Is there an RFC I can call that gives me exactly this information?
Best,
Stefan

Similar Messages

  • How can i get the meta data from database?

    Hi, all java and db experts,
    I need to write a tool to generate java file which will be used to hold the resultset of a stored procedure of Oracle. Is there any API call or tools to connect to db and then get the meta data of the return cursor instead of reading stored procedure definition on my own?
    Please help, thanks a lot.
    Hanna

    if i execute a Oracle stored procedure, the resultset of a cursor is returned. It's easy to know the meta data at the runtime.
    However, could i get the meta data about the resultset of a cursor before runtime? Such as by connecting to the database and ask it about meta data of a specified stored procedure?
    Is it feasible?
    DatabaseMetaData dbmd = conn.getMetaData();
    ResultSet rs = dbmd.getProcedureColumns("", "%", "SP_NAME", "%");
    while (rs.next()) {
    String colName = rs.getString(4);
    int colType = rs.getInt(5);
    int colDataType = rs.getInt(6);
    int colPrecision = rs.getInt(8);
    int colLen = rs.getInt(9);
    int colScale = rs.getInt(10);
    long defaultValue = rs.getLong(11);
    But what i get is a list of stored procedure parameters. In oracle, cursor is IN OUT parameter . How can i get the meta data about the resultset of cursor?

  • Read Dictionary Meta Data with a Single Server Connection

    Hello,
    I've Enterprise Portal 6.0 SP4 NetWeaver Stack 2 Developer Workplace Sneak Preview from https://www.sdn.sap.com/sdn/downloads.sdn running on my computer and implemented the Tutorial: "Creating A Web Dynpro Application Accessing ABAP Functions" from https://www.sdn.sap.com/sdn/developerareas/webdynpro.sdn?page=TutWD4_AccessingABAP.htm.
    During the setup of the JCo Conneciton for the WD_FLIGHTLIST_RFC_METADATA_DEST in the Web Dynpro Content Administrator in Step 3 I came across the problem that I can not use a Single Server Connection to read Dictionary Meta data.
    So my Question: Why is it not possible to read Dictionary Meta Data with a Single Server Connection?
    Regards
    Gregor

    Hi Ruth,
    Thanks for the guideline.
    I entered an entry in the etc/service file on the m/c which is having SAP WAS 6.40 J2ee installed.(let say ip address 172.16.1.38)
    for e.g.
    sapmsSA1 3600/tcp
    I restated the webAS server.
    Then from SAP GUI when i am connecting to SAP R/3 backend system and checking the 'smlg' transaction.....i can see 3 Logon groups with the same name 'PUBLIC'.
    Now i have created the BC Message server connection in SLD with this information.
    caption - SA1 01
    Message server IP = 172.16.1.242
    port 3600
    After that i specified this message server information to WD_MetaData connection in JCO content administrator.
    When i tetsed this connection it gives me error as follow.
    com.sap.mw.jco.JCO$Exception:(102) RFC_ERROR_COMMUNICATION: Connect to SAP gateway failed
    connect_PM TYPE=B MSHOST=172.16.1.242 GROUP=PUBLIC R3NAME = SA1 MSSERV=sapmsSA1 PCS=1 LOCATION CPIC(TCP/IP)on localhost with Unicode ERROR partner not reached(host 172.16.1.38,service sapgwoo)
    connection refused
    can u guide me what i am missing?
    Thanks,
    Mital.

  • Get data with rfc-sdk language c

    Good morning all,
    Me was given a task to develop a simple data read between C and SAP.  To foreshadow my prerequisites: I did not work with SAP and only have the possibilities of the NW7.01 Trial with a MaxDB database.
    I will use the RFC_READ_TABLE and the RfcCallReceive function. The error handling and opening the rfchandle runs.
    Using the RFC_READ_TABLE requires to fill the export parameters and handle the 3 tables, FIELDS, OPTIONS and DATA.
    Handling the tables throws the error:
    RFC Call/Exception: SYSTEM_FAILURE
    Group       Error group 104
    Key         RFC_ERROR_SYSTEM_FAILURE
    Message     Incorrect field length for 'Remote Function Call'.
    After searching here this problem I place 3 structs  to define the maximum length, which is returnd by the rfc:
    typedef struct tDATA
    {     SAP_CHAR     WA[512];
    }tDATA;
    typedef struct tFIELDS
    {     SAP_CHAR     Fieldname[30];
         SAP_CHAR     Offset[6];
         SAP_CHAR     Length[6];
         SAP_CHAR     Type;
         SAP_CHAR     Fiedltext[60];
    }tFIELDS;
    typedef struct tOPTIONS
    {     SAP_CHAR     WA[72];
    }tOPTIONS;
    Now using the size of these structs the error still stays the same.
    So how do I initialise the tables and export parameters, to receive a useable data returned in the DATA table?
    The declaration of the export and table structs is left out for now, I will post them immediatly if necessary.
    Thanks & Regards
    H.Fischer
    Edited by: HFischer on Aug 12, 2009 4:09 PM

    Hi all,
    I returned to my mind that there was a function embedded in the SDK which generates a  headerfile which could be implemented easily. Now I have the structs necessary for the tables but the problem is still the same. I tried some configurations on the termination of the parameter list and I observe that the rfc does not handle with 5 export parameter tables. Here is the parameter declaration I try to use.
    At last the tables are terminated with NULL, here I placed it at index 5 but with this the RFC throws an error about the RFC length mentioned in the first post. If I terminate at index 3 the "rfccallreceive" runs without error but returns two empty tables.
    Or is it a problem in the declaration of ROWSKIPS and ROWCOUNT?
    exporting[0].name = cU("QUERY_TABLE");
    exporting[0].nlen = strlen(cU("QUERY_TABLE"));
    exporting[0].addr = cU("SPFLI");
    exporting[0].leng = strlen(cU("SPFLI"));
    exporting[0].type = RFCTYPE_CHAR;
    exporting[1].name = cU("DELIMITER");
    exporting[1].nlen = strlen(cU("DELIMITER"));
    exporting[1].addr = cU(" ");
    exporting[1].leng = strlen(cU(" "));
    exporting[1].type = RFCTYPE_CHAR;
    exporting[2].name = cU("NO_DATA");
    exporting[2].nlen = strlen(cU("NO_DATA"));
    exporting[2].addr = cU(" ");
    exporting[2].leng = strlen(cU(" "));
    exporting[2].type = RFCTYPE_CHAR;
    exporting[3].name = cU("ROWSKIPS");
    exporting[3].nlen = strlen(cU("ROWSKIPS"));
    exporting[3].addr = cU("0");
    exporting[3].leng = strlen(cU("0"));
    exporting[3].type = RFCTYPE_CHAR;
    exporting[4].name = cU("ROWCOUNT");
    exporting[4].nlen = strlen(cU("ROWCOUNT"));
    exporting[4].addr = cU("0");
    exporting[4].leng = strlen(cU("0"));
    exporting[4].type = RFCTYPE_CHAR;
    exporting[5].name = NULL; /*position I mean*/
    importing[0].name = NULL;
    tables[3].name = NULL;

  • How can we get current time date with resultset?

    Dear All,
    I have to insert current time date in the table.So,i need to get the current time and date with result set.So,I will first get the time date and then insert it into the table.
    I know how can we get current time and date without resultset.i have created this function its working.But now i want to use this.mean using resultset i want to put in the table.
    How can i do this?
    public static String DATE_FORMAT_NOW = "yyyy-MM-dd HH:mm:ss";
    public static String now() {
    Calendar cal = Calendar.getInstance();
    SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT_NOW);
    return sdf.format(cal.getTime());
    }

    yuck. Why not simply set a "new java.sql.Date()" to the SQL parameter in question?

  • Can a Photo Gallery be created using the Meta Data with a Widget or Lightroom ?

    I want to create a website with a bunch of photo galleries, but I have to have the Titles and Descriptioins from the Meta data used. 
    Can Muse import Lightroom Photo Gallery's web pages?
    Or, Is there a widget to do this?

    So your saying import a Gallery from Lightroom using Muse's slideshow widget, which ignores titles/descriptions? 
    I'm finding it very difficult to understand why Muse would not use this information as it clearly shows the File Names in Asssets.
    The workflow seems simple: Take A picture, Bring it into Lightroom, Adjust and enter WHAT it is with Titles and Descriptions, use it ALL in a website.
    I've got some 500 photos.
    Re-entering Titles/Description information everytime it's used in a website is not something anybody should have to do.
    Please help, there has to be a better way to do this.
    I'm eager to buy Adobe's product to do this if it can be done.
    Adobe is too smart to leave out something so simple with MUSE.

  • Dynamically how to get the meta data of an ui element which is custom one

    Hi All ,
    In SRM , I want to know the meta data declarations of an UI element in my webdynpro component  ..How to know this ..Can anyone help me in this ..I want to know the meta data of an ui element .
    Sandeep

    You really aren't supposed to read the properties of active UI elements directly.  Instead they should be bound to context attributes and then you read these attributes via normal context APIs.  If you absolutely needed such access because this is a standard SAP WD, then consider that the WDDOMODIFYVIEW is the only part of th event loop where you are allowed access to the View and its UI elements.

  • How to get sales order data with GL tables

    I want to get sales order details from my GL query. I need to get item number, quantity and customer PO from there. Here is my query from GL.
    SELECT PH.po_header_id,
      I.GL_DATE,
      R.je_header_id JE_HEADER_ID,
      R.je_line_num JE_LINE_NUM,
      aeh.org_id ORG_ID ,
      I.invoice_num TRX_NUMBER_C ,
      ael.description COMMENTS ,
      ael.ACCOUNTED_CR ACCOUNTED_CR,
      ael.ACCOUNTED_DR ACCOUNTED_DR,
      ael.code_combination_id CODE_COMBINATION_ID,
      ael.currency_code CURRENCY_CODE,
      ael.entered_cr ENTERED_CR,
      ael.entered_dr ENTERED_DR,
      PH.segment1 PO_ORDER_NUMBER,
      GL.segment1 company,
      GL.segment2,
      GL.segment3,
      GL.segment4,
      GL.segment5 account
      ,ael.description
      ,PD.quantity_ordered, PD.amount_billed, D.quantity_invoiced,  D.unit_price
    FROM gl_import_references R, --ok
      gl_je_categories jc,
      ap_ae_lines_all AEL, --ok
      ap_ae_headers_all AEH, --ok
      ap_invoice_distributions_all D,
      ap_invoices_all I,
      ap_accounting_events_all AE,
      po_releases_all PR,
      po_headers_all PH,
      po_distributions_all PD,
      po_vendor_sites_all VS,
      gl_code_combinations GL
    WHERE 1=1
    AND jc.je_category_name       = aeh.ae_category
    AND PR.po_release_id(+)       = PD.po_release_id
    AND PH.po_header_id(+)        = PD.po_header_id
    AND PD.po_distribution_id(+)  = D.po_distribution_id
    AND ael.third_party_sub_id    = VS.vendor_site_id
    AND AE.accounting_event_id    = AEH.accounting_event_id
    AND I.invoice_id              = AE.source_id
    AND AE.source_table           = 'AP_INVOICES'
    AND AEH.ae_header_id          = AEL.ae_header_id
    AND DECODE(ael.source_table,'AP_INVOICE_DISTRIBUTIONS', AEL.source_id,NULL) = D.invoice_distribution_id(+)
    AND AEL.gl_sl_link_id         = R.gl_sl_link_id
    and ael.code_combination_id = GL.code_combination_id

    Then your query is completely wrong.
    Your query is looking at Purchase Order tables.
    If you want sales order data, you should be looking at OE tables (such as OE_ORDER_HEADERS_ALL, OE_ORDER_LINES_ALL etc.)
    Sandeep Gandhi

  • How to get nested table meta data

    how to get nested table column name, column type and column size
    by using java. i need code for this.
    please help me.

    The Follopwing program does display the the details of table. Hope you get the solution
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.ResultSetMetaData;
    import java.sql.Statement;
    public class Main {
      public static void main(String[] args) throws Exception {
        Connection conn = getOracleConnection();
        System.out.println("Got Connection.");
        Statement st = conn.createStatement();
        st = conn.createStatement();
        ResultSet rs = st.executeQuery("SELECT * FROM SCHEDULE_SET");
        ResultSetMetaData rsMetaData = rs.getMetaData();
        int numberOfColumns = rsMetaData.getColumnCount();
        System.out.println("resultSet MetaData column Count=" + numberOfColumns);
        for (int i = 1; i <= numberOfColumns; i++) {
          System.out.println("column MetaData ");
          System.out.println("column number " + i);
          // indicates the designated column's normal maximum width in
          // characters
          System.out.println(rsMetaData.getColumnDisplaySize(i));
          // gets the designated column's suggested title
          // for use in printouts and displays.
          System.out.println(rsMetaData.getColumnLabel(i));
          // get the designated column's name.
          System.out.println(rsMetaData.getColumnName(i));
          // get the designated column's SQL type.
          System.out.println(rsMetaData.getColumnType(i));
          // get the designated column's SQL type name.
          System.out.println(rsMetaData.getColumnTypeName(i));
          // get the designated column's class name.
          System.out.println(rsMetaData.getColumnClassName(i));
          // get the designated column's table name.
          System.out.println(rsMetaData.getTableName(i));
          // get the designated column's number of decimal digits.
          System.out.println(rsMetaData.getPrecision(i));
          // gets the designated column's number of
          // digits to right of the decimal point.
          System.out.println(rsMetaData.getScale(i));
          // indicates whether the designated column is
          // automatically numbered, thus read-only.
          System.out.println(rsMetaData.isAutoIncrement(i));
          // indicates whether the designated column is a cash value.
          System.out.println(rsMetaData.isCurrency(i));
          // indicates whether a write on the designated
          // column will succeed.
          System.out.println(rsMetaData.isWritable(i));
          // indicates whether a write on the designated
          // column will definitely succeed.
          System.out.println(rsMetaData.isDefinitelyWritable(i));
          // indicates the nullability of values
          // in the designated column.
          System.out.println(rsMetaData.isNullable(i));
          // Indicates whether the designated column
          // is definitely not writable.
          System.out.println(rsMetaData.isReadOnly(i));
          // Indicates whether a column's case matters
          // in the designated column.
          System.out.println(rsMetaData.isCaseSensitive(i));
          // Indicates whether a column's case matters
          // in the designated column.
          System.out.println(rsMetaData.isSearchable(i));
          // indicates whether values in the designated
          // column are signed numbers.
          System.out.println(rsMetaData.isSigned(i));
          // Gets the designated column's table's catalog name.
          System.out.println(rsMetaData.getCatalogName(i));
          // Gets the designated column's table's schema name.
          System.out.println(rsMetaData.getSchemaName(i));
        st.close();
        conn.close();
      public static Connection getOracleConnection() throws Exception {
        String driver = "oracle.jdbc.driver.OracleDriver";
        String url = "jdbc:oracle:thin:@son15644:1521:CXPqa1";
        String username = "ess4qa2";
        String password = "ess4qa2pw";
        Class.forName(driver); // load Oracle driver
        Connection conn = DriverManager.getConnection(url, username, password);
        return conn;
    }

  • SPROXY unable to get Interface meta-data from XI Server

    Hi,
    In our SAP R/3 Enterprise system, the transaction SPROXY complains that "No connection to Integration Builder (only local data visible)".  It is unable to get the message interfaces defined in the SAP XI Server.
    Connection to SLD is configured correctly, and transaction SLDCHECK works correctly.
    Where can I configure the SAP R/3 system so that it can retrieve the message interfaces from SAP XI system ?
    thanks,
    Manish

    Hi Manish -
    Did you maintain the RFC destinations LCRSAPRFC and SAPSLDAPI?  And the corresponding J2EE connections?  These must be completed in addition to other possible configurations.
    Please check XI 3.0 Configuration Guide, section 8 (Connecting Business Systems with an Integration Engine to the Central Integration Server).  These have all the necessary steps.
    Regards,
    Jin

  • How to get & use xml data with jstl libraries? (URGENT PLZ)

    I am using jstl to get and use xml data
    I needs to perform operations on the parsed xml document with other libraries of jstl. How can i do that.
    I used Dom variable to parse my document as:
    <x:parse varDom="test"> <c:import url="project.xml"/> </x:parse>
    where my project.xml is:
    <?xml version="1.0" encoding="iso-8859-1"?>
    <project>      <projectName>myProject</projectName> </project>
    I can dislay this value in html by
    <x:out select="$test/project/projectName"/>
    But I need a string value sotred in variable such as <c:set var="pname" value="???">
    HOW CAN I SET THIS VALUE IN CORE VARIABLE THAT IS, USING <c:set...> SO THAT IT CAN BE USED ANYWHERE IN JSP PAGE TO CONCATE RETURNED STRING IN OTHER STRING VARIABLES DEFINED BY CORE LIB?
    Jessy
    Message was edited by:
    jessy
    Message was edited by:
    jessy

    I believe that <c:set> should do that but i am facing problem in it. Look into this jsp scriptlet:
    1-<x:parse varDom="test"> <c:import url="project.xml"/> </x:parse>
    2-<x:set var="ds" select="$test/project/projectName"/>
    3-<x:out select="$ds"/> <br>
    4-<c:set var="tt" value="${ds}" />
    5-<c:out value="${tt}" />
    In line 3 variable ds returns: myProject
    In line 5 variable tt returns: [[projectName: null]]
    perhaps on line 4 ds is storing some array to tt and i am not calling correct array element. I tried many options but still could not find solution. Plz Plz do something urgent for me. Thanks
    Jessy
    Message was edited by:
    jessy

  • How can an external table handle data with line feed between delimiters?

    I have defined an external table as below. My data is pipe delimited and comes from a DOS system.
    I already remove any carriage returns before putting the file into the DATA_DIR for reading. But
    I have found that some of my VARCHAR fields have embeded line feeds.
    Is it possible to have a definition that would remove any line feed characters between the delimiters?
    Below I also threw together a sample data set there ID #2 has that extra character. Yes, I could
    write an awk script to pre-process all my data files. But I am hoping there is a way for Oracle
    to also do this.
    I understand the LDTRIM to remove any leading and trailing spaces in the delimited field. Is there a
    REPLACE or TRANSLATE option. I did a bit of searching but I must be asking the wrong things.
    Thanks for any help
    Eric
    CREATE TABLE table_ext
      id        NUMBER,
      desc1     VARCHAR2(64 CHAR),
      desc2     VARCHAR2(255 CHAR),
      add_date  DATE
    ORGANIZATION EXTERNAL
      TYPE ORACLE_LOADER
      DEFAULT DIRECTORY data_dir
      ACCESS PARAMETERS
        RECORDS DELIMITED BY NEWLINE
        CHARACTERSET WE8ISO8859P1
        BADFILE     log_dir:'table_ext.bad'
        DISCARDFILE log_dir:'table_ext.dis'
        LOGFILE     log_dir:'table_ext.log'
        FIELDS TERMINATED BY '|' LDRTRIM
        MISSING FIELD VALUES ARE NULL
        id        INTEGER EXTERNAL(38),
        desc1     CHAR(64),
        desc2     CHAR(255),
        add_date  CHAR DATE_FORMAT DATE MASK "yyyy-mm-dd hh24:mi",
      LOCATION( 'data.txt' )
    PARALLEL
    REJECT LIMIT UNLIMITED;
    1|short desc|long desc|2001-01-01 00:00
    2|short desc| long
    desc |1999-03-03 23:23
    3|short desc|  long  desc  | 2011-02-02 02:02

    Thanks for looking. But that relates to the record delimiter which in my case is the pipe character '|'. In my various data sets this is consistent. I expect each record to be one per line. But between two delimiters some data has a line feed. So I'm looking for a method that will "cleanup" the field data as it gets imported.
    I was hoping there was an option that would ignore any embedded line feeds (\n) characters. I.e., those not at the end of the line.
    Eric

  • How to merge source data with RFC response and post back again as Idoc

    Hi All,
    This is the requirement we have for an interface
    The legacy application is sending Vendor master to PI 7.0
    If it is new vendor then it is send as an Cremas Idoc into SAP. Legacy (New Vendor) -
    > PI 7.0  -
    >Cremas Idoc SAP
    If it is changed Vendor legacy will only send changed fields for that Vendor.In PI we would like to call an RFC which will return all the data for that changed Vendor Number and then merge the RFC response with changed data from legacy and then send it to SAP as Cremas Idoc again with all values.
    I know these can be achieved using Proxy by custom Abap Code in SAP.But we would like to avoid it.
    How can we achieve it?
    1.RFC lookup - Shall we use these , when PI receives changed Vendor from legacy ,it will call RFC using RFC lookup and the response message from RFC lookup should be merged with source data .Is this possible?
    2.Shall we achieve this using BPM ?Is it feasible and How?
    Any Help greatly appreciated
    Thanks,
    V

    If it is changed Vendor legacy will only send changed fields for that Vendor.In PI we would like to call an RFC which will return all the data for that changed Vendor Number and then merge the RFC response with changed data from legacy and then send it to SAP as Cremas Idoc again with all values.
    I am not sure why you want to pull whole data from R3 and send back to R3.
    you can follow any of these approach..
    if you have any indicator for new/ changed cusotmer in the legacy data then trigger CREMAS IDoc accordingly.
    mapping rules will be diffrent for New and changed CREMAS idoc.
    otherwise just do RFC look up for each record then based on the output(new/changed) create or update cusotmer data through CREMAS IDoc.
    when changing the customer through CREMAS no need to pass whole data again. it is enough if pass the changed fields. offcourse qualifier values  for segments will differ.

  • Af:tree table populate data with viewobject

    Hi all,
    I am trying to populate data into af:tree which binds with viewobject.
    so i create recursive view object using view link.
    then i populate data into view object programmatically.
    but i found that those data show as normal table rather than tree structure.
    is there any way to achieve this?
    With Regard,s
    Wai Phyo

    Hi,
    this doesn't work without partially refreshing the table I guess. You would need to set the link to disabled for the non-current row followed by a table refresh
    Frank

  • Getting Started Sharing Data with SAP?

    Hi Folks, as will be apparent, I'm a complete newbie with SAP.
    Long and short of it is this: I have an App that generates project plans for maintenance systems, costs and budgets them, and reports 'currently' as a stand alone package.
    A number of Clients who use the package already have SAP handling some of these aspect, and therefore would like some degree of integration. Primarily for our package to pass maintenance dates, costs and other performance data to SAP, and update work-scope progress etc. It would be useful if we could have two way linkage though to.
    My view is that we should be able simply to access the relevant columns in a SAP managed table(s), but I may be being very simplistic and naive?
    We use Java - developed with Servoy RAD, and access JDBC Dbs only.
    Q: Is there a Java Bean available that opens some degree of data sharing to SAP?
    Q: Where should I begin looking for info on how to do this?
    Q: Is it likely that we need a SAP Pro to develop this integration.
    Appreciate any feedback or guidance on where to look next!

    Note, that this forum is dedicated to all other development-related questions which are not directly addressed by other forums. This includes Business Objects SDKs, products, or technologies which do not fall under BusinessObjects Enterprise, BusinessObjects Edge, Crystal Reports Server, or Crystal Reports (for example Desktop Intelligence SDK, Universe Designer SDK, Portal Integration Kits, Java User Function Libraries, and other third party technologies or development languages).
    I don't believe your query addresses any of the above products thus you may want to pose your query to one of the SAP product forums.
    Ludek

Maybe you are looking for