How to get multipe data set values from Decision Table.

Hi All,
I need to use SAP BRM for one of the scenario where based one some Code Group I need to get a set of questions and for each question a set of possible answers.
The structure of Decision Table will be like below :
Table 1 : To get set of questions based on Project Code
Input                   Output           Output
Project Code
Question Id
Question Description
Table 2 : To get set of answers based on question
Input                   Output            Output
Question ID
Answer Id
Answer Description
I already searched in forum to get the multiple values based on some input and that works fine for a single field with multiple outcome.
Handling Selective Multiple Actions in  SAP Business Rules Management System
In my scenario I need to get a set of Id and description as multiple outcome.
Can anyone please let me know how this can be achieved in BRM.
Thanks in advance
Ravindra

Create an XSD in the BRM project with the desired data structure and import the XSD alias in the 'Project Resources'. Add this XSD alias as input/output of the decision table.
Refer this:
Creating a Simple BRM Ruleset in 30 Easy Steps using NWDS 7.3 (Flow Ruleset with a Decision Table)

Similar Messages

  • How to get all the column values from a table source

    Hi,
    I have created one table source on a employee table and some customized attributes using global settings>search attributes.
    Now these customized attributes mapped with the table columns through attribute mapping from the sorce tab.
    Using doOracleSearch method i passed last parameter i.e. Integer array of customized attributes.
    After execution of doOracleSearch method i am getting the results but customized attributes are not coming.
    getCustomAttributes method returns null instead of some values.
    Please refer following code for more info:
    Integer[] fetchAttr=new Integer[2];
    fetchAttr[0]=new Integer(137);
    fetchAttr[1]=new Integer(138);
    result =
    stub.doOracleSearch("BTM",
    new Integer(1),
    new Integer(10),
    Boolean.TRUE,
    Boolean.TRUE,
    group,
    "en",
    "en",
    Boolean.TRUE,
    null,
    null,
    fetchAttr);
    ResultElement[] resElements = result.getResultElements();
    for(int i = 0; i < resElements.length; i++)
    System.out.println("Title : " + resElements[0].getTitle());
    System.out.println("Snippet : " + resElements[0].getSnippet());
    System.out.println("URL : " + resElements[0].getUrl());
    System.out.println("non default : " + resElements[0].getCustomAttributes()); // it returns null here
    }

    Confirm the attributes you are asking SES for match those on the data source being searched. One thing to try is to simply tell SES to return all custom attributes for your search. Here is a snippet to build a list of all attribute IDs and pass them to your search...
    // Create and set SOAP URL
    OracleSearchService searchService = new OracleSearchService();
    searchService.setSoapURL("http://myserver:7777/search/query/OracleSearch");
    // Set attributes to fetch (all)
    Attribute[] attributesAll = searchService.getAllAttributes("en");
    ArrayList<Integer> attributeIds = new ArrayList<Integer>();
    for(Attribute a: attributesAll)
    attributeIds.add(a.getId());
    Integer attributeIdArrayAll[] = new Integer[attributeIds.size()];
    attributeIdArrayAll = attributeIds.toArray(attributeIdArrayAll);      
    // Query
    OracleSearchResult result = searchService.doOracleSearch("some text", ..........[other params], attributeIdArrayAll);
    // Print out results
    ResultElement[] resElements = result.getResultElements();
    for(int i = 0; i < resElements.length; i++)
    // Get document
    ResultElement doc = resElements;
    // Print Title
    System.out.println("Title: " + doc.getTitle());
    // Print custom attributes
    CustomAttribute[] attributes = doc.getCustomAttributes();
    for(int j = 0; j < attributes.length; j++)
    CustomAttribute attr = attributes[j];
         System.out.println("[Custom Attribute] " + attr.getName() + ": " + attr.getValue());
    Hope this helps.

  • How to delete master data of materials from sap tables

    how to delete master data of materials from sap tables...its needed now.
    i know its not recommended but still we need to do this. give me the best possible approach.
    regards,
    suneetha

    Hi,
    I would suggest you not to write your own code to delete the entries.
    BAPI_MATERIAL_DELETE, this would mark all materials selected for deletion. But still the material would exist in SAP.
    Another solution: Delete a material manually and in another session execute the transaction SM04. This would display the tables which get locked when you do the operation, Then you can write your own code to delete the material numbers from all the related tables.
    Regards
    Subramanian

  • Trigger how to get new and old value for nested table column?

    Hi,
    I have created a nested table based on the following details:
    CREATE TYPE typ_item AS OBJECT --create object
    (prodid NUMBER(5),
    price NUMBER(7,2) )
    CREATE TYPE typ_item_nst -- define nested table type
    AS TABLE OF typ_item
    CREATE TABLE pOrder ( -- create database table
    ordid NUMBER(5),
    supplier NUMBER(5),
    requester NUMBER(4),
    ordered DATE,
    items typ_item_nst)
    NESTED TABLE items STORE AS item_stor_tab
    INSERT INTO pOrder
    VALUES (800, 80, 8000, sysdate,
    typ_item_nst (typ_item (88, 888)));
    Now I would like to create a trigger on table pOrder for after insert or update or delete
    and I would like to track the new and old value for the columns inside nested table.
    Can anybody direct me how to do it?
    I would like to know the sytax for it like:
    declare
    x number;
    begin
    x := :new.nestedtablecolumn;--how to get the new and old value from nested table columns
    end;
    Hope my question is clear.
    Thanks,
    Lavan

    Hi,
    Try like this:
    CREATE OR REPLACE TRIGGER PORDER_I
    BEFORE INSERT
    ON PORDER
    REFERENCING OLD AS old NEW AS new
    FOR EACH ROW
    DECLARE
      items_new typ_item_nst;
      ordid_NEW NUMBER;
    BEGIN
    FOR i IN :new.items.FIRST .. :new.items.LAST LOOP -- For first to last element
      DBMS_OUTPUT.PUT_LINE(':new.items(' || I || ').prodid: ' || :new.items(I).prodid );
      DBMS_OUTPUT.PUT_LINE(':new.items(' || I || ').price:  ' || :new.items(I).price );
    END LOOP;
    END;Regards,
    Peter

  • How to get large no of records from adf table

    Hi All,
    I'm working on adf.I'm using jdeveloper 11.1.1.5 version.In my adf application i have 1000 records in my adf table.I want to get the 500 selected records from that table at a time.But im not able to get huge number of records.How can i get the records from adf table.Please give me ur valuable suggestions.
    Thanks!

    Hi.
    for large record check the oficial doc.
    http://docs.oracle.com/cd/E24382_01/web.1112/e16182/bcadvvo.htm#CEGDBJEJ
    PAGE_RANGING is the best option for large tables.
    and these maybe will help you
    Re: Performance scrolling large ADF tables
    Re: Expert opinion needed: Best practices to handle huge rowsets on UI

  • How to get the date-time value?

    Hi All
    I have a a field "START_TIME of type DATE". The value stored for that particular field is of the form "10/17/2006 2:23:40 PM" i.e. a date-time value.
    Now when i try to get the values stored in the table in which the START_TIME field is defined i get the value in the form of "10/17/2006" .... I missed out the time information. Why is this so? How do i get the complete value as a string?
    Thanks in advance. Vijay

    Hi All
    I have a a field "START_TIME of type DATE". The value stored for that particular
    field is of the form "10/17/2006 2:23:40 PM" i.e. a date-time value.Actually it is stored as an internal date format (see my example SQL below, taking note of the dump'ed data).
    Now when i try to get the values stored in the table in which the START_TIME field is defined i get the
    value in the form of "10/17/2006" ....
    I missed out the time information. Why is this so?
    How do i get the complete value as a string?The value you see on the screen is the display format and this is determined by the client application that is displaying the date and what settings it is using. If a date column is retrieved from the database then all the data (date and time) is given back, but it's up to the application how that is displayed. e.g. you may see it differently if you view it is SQL*Plus against some other tool such as TOAD.
    To change the display settings you can change your NLS_DATE_FORMAT setting or whatever setting is suitable for your client application, or you can use TO_CHAR with a format string to specify the components you want to see. The different with TO_CHAR is that you are converting it to a character string so don't attempt to do any date type comparisons on it after that conversion, e.g. don't try and compare if one date is greater than another, without converting it back to DATE datatype first.
    SQL> create table t (x date);
    Table created.
    SQL> insert into t (x) values (sysdate);
    1 row created.
    SQL> select x from t;
    X
    02-JUN-08
    SQL> select x, dump(x) from t;
    X
    DUMP(X)
    02-JUN-08
    Typ=12 Len=7: 120,108,6,2,13,32,51
    SQL> alter session set nls_date_format = 'DD/MM/YYYY HH24:MI:SS';
    Session altered.
    SQL> select x, dump(x) from t;
    X
    DUMP(X)
    02/06/2008 12:31:50
    Typ=12 Len=7: 120,108,6,2,13,32,51
    SQL>

  • How to get a specific tag value from SAX parser

    I am using the SAX method to parse my xml file.
    My Question is how to get the returning characters parsed after calling?
    esp the value of <body> tag?
    Here is my xml file, and i want to get the parsed <body> value after call sax parser.
    <?xml version="1.0" encoding="UTF-8"?>
    <article>
    <content>
    <title>floraaaaa</title>
    <date>2004-03-19</date>
    <body>
    Details of an article, and i want to get the article details
    </body>
    </content>
    </article>

    here is the parser code I am using:
    import java.io.*;
    import org.apache.xerces.parsers.SAXParser;
    import org.xml.sax.Attributes;
    import org.xml.sax.ContentHandler;
    import org.xml.sax.ErrorHandler;
    import org.xml.sax.Locator;
    import org.xml.sax.SAXException;
    import org.xml.sax.SAXParseException;
    import org.xml.sax.XMLReader;
    import org.xml.sax.helpers.XMLReaderFactory;
    public class test2 {
         public String m_xmlDetail;
         public void readDetail(String url) {
              System.out.println("Parsing XML File: " + url + "\n\n");
              try {
                   XMLReader parser = new SAXParser();
                   ContentHandler contentHandler = new MyContentHandler();
                   parser.setContentHandler(contentHandler);
                   parser.parse(url);
              } //try ends here
              catch (IOException e) {
                   System.out.println("Error reading URI: " + e.getMessage());
              } //catch ends here
              catch (SAXException e) {
                   System.out.println("Error in parsing: " + e.getMessage());
              } //catch ends here
         } //function
    }//close class
    public class MyContentHandler implements ContentHandler {
         private Locator locator;
         //public String m_bodyDetail=new String();
         public void setDocumentLocator(Locator locator) {
              System.out.println(" * setDocumentLocator() called");
              this.locator = locator;
         public void startDocument() throws SAXException {
              System.out.println("Parsing begins...");
         public void endDocument() throws SAXException {
              System.out.println("...Parsing ends.");
         public void processingInstruction(String target, String data)throws SAXException {
              System.out.println("PI: Target:" + target + " and Data:" + data);
         public void startPrefixMapping(String prefix, String uri) {
              System.out.println("Mapping starts for prefix " + prefix + " mapped to URI " + uri);
         public void endPrefixMapping(String prefix) {
              System.out.println("Mapping ends for prefix " + prefix);
         public void startElement(String namespaceURI, String localName,String rawName, Attributes atts)throws SAXException {
              System.out.print("startElement: " + localName);
              if (!namespaceURI.equals("")) {
                   System.out.println(" in namespace " + namespaceURI + " (" + rawName + ")");
              else {
                   System.out.println(" has no associated namespace");
              for (int i=0; i<atts.getLength(); i++)
                   System.out.println(" Attribute: " + atts.getLocalName(i) +"=" + atts.getValue(i));
         public void endElement(String namespaceURI, String localName, String rawName) throws SAXException {
              System.out.println("endElement: " + localName + "\n");
         public void characters(char[] ch, int start, int end) throws SAXException {
              String s = new String(ch, start, end);
              System.out.println("characters: " + s);
         public void ignorableWhitespace(char[] ch, int start, int end)throws SAXException {
              String s = new String(ch, start, end);
              System.out.println("ignorableWhitespace: [" + s + "]");
         public void skippedEntity(String name) throws SAXException {
              System.out.println("Skipping entity " + name);
    } //close class

  • How to retrieve the data/property value from portalapp.xml

    Hi I would like to retrive the some common data from the portalapp.xml file
    <application>
      <application-config>
        <property name="PrivateSharingReference" value="com.sap.portal.htmlb"/>
          </application-config>
      <components>
        <component name="DynZMMGR">
          <component-config>
            <property name="ClassName" value="DynZMMGR"/>
            <property name="SecurityZone" value="DynZMMGR/high_safety"/>
            <property name="ComponentType" value="jspnative"/>
            <property name="JSP" value="pagelet/DynJspZMMGR.jsp"/>
          </component-config>
          <component-profile/>
        </component>
        <component name="dynpagedel">
          <component-config>
            <property name="ClassName" value="dynpagedel"/>
          </component-config>
          <component-profile/>
        </component>
        <component name="VARIANTLIST">
          <component-config>
            <property name="ClassName" value="com.sap.ep.r3rpts.VARIANTLIST"/>
            <property name="SecurityZone" value="com.sap.ep.r3rpts.VARIANTLIST/high_safety"/>
          </component-config>
          <component-profile/>
        </component>
        <component name="DynZMM33">
          <component-config>
            <property name="ClassName" value="DynZMM33"/>
            <property name="SecurityZone" value="DynZMM33/high_safety"/>
            <property name="ComponentType" value="jspnative"/>
            <property name="JSP" value="pagelet/DynJspZMM33.jsp"/>
          </component-config>
          <component-profile/>
        </component>
      </components>
      <services/>
    </application>
    The above is my portalapp.xml file .
    I want to retrieve the common data across the component.
    These  datas are common across the components .
    I kmow by putting the data inside the
    component name="DynZMM33">
          <component-config>
            <property name="ClassName" value="DynZMM33"/>
            <property name="SecurityZone" value="DynZMM33/high_safety"/>
            <property name="ComponentType" value="jspnative"/>
            <property name="JSP" value="pagelet/DynJspZMM33.jsp"/>
          </component-config>
    <component-profile>
       <property name="UserID" value="userid"/>
       <property name="password" value="password"/>
    </component-profile>
    </component>
    this becoms component specific ... which I can retriev the by using
    String ClientVal = request.getComponentContext().getProfile().getProperty("Client");
    in doContent()  method ..
    But this way i have to specify these properties in all the component.. which is repetetive in nature.
    I would rather put it in common location and want to retrieve the info from the portalapp.xml...
    How to achieve this
    I am using "AbstractPortalComponent"  .
    thanks
    pkiran

    Hi Prashanth,
    see Reading another iView's profile personalized values and Validate PCD URI
    Anyhow, maybe you should implement a service which returns the values (from the service profile). This would be more clean for accessing global values.
    Hope it helps
    Detlev

  • How to get xkomv-kwert (condition value) from a pricing condition ZZP1

    Hi experts,
       I have a pricing condition zcust that I need to modify in the sales order.   The calculation of ZCUST is dependent on the condition value in another price condition ZZP1.   The price for ZZP1 is a fixed amount of $6 which is split among line items in the order.    In sapmv45A, when the code hits userexit_save_document_prepare, the value of xkomv-kwert (condition value) exist.   In other user-exits in sapm45A, I was unable to find xkomv-kwert.  My question is:  How can I find the value of xkomv-kwert  as i don't  know how ZZP1 is calculated ??  There is no routine attached to ZZP1.
        THE ZCUST has a routine 993 which is similar to 3.   Here in program saplv61A, i was trying to get xkomv-kwert for ZZP1 but unable to get any data.   Can anyone suggest where i can get the data (xkomv-kwert) for ZZP1 in saplv61a ?
    I looked at userexit_xkomv_bewerten_end in saplv61a but it does not help.
    XKomv-kbetr  always has data.    If i have ZZP1 data, then i can modify ZCUST.
    Many thanks.
    Joyce

    Hi Jelena,
      In VOFM, it is Formula/Condition Base Value for routine 993.   In Pricing Procedure, it falls in column "Base Type" for 993.
    Let's see if i can simplify this: In a sales order with 2 line items:
                   prices                    Amt                      Condition Value (USD)
    Line 10     ZS1   sell price     2.30                                 1150
                     ZPP1 charge        6.36                                 3.40  (note the distribution **)
                     ZL1                      3                                      3
                    ZR1 %                  1.000%                            11.50
                    ZR2                      0.01                                   5
                    Suggested price =  2.35                             1172.90
                      ZCUST               2.34                                1170
                      total price            2.34                               1170  
    Note:  The ZCUST price is wrong.  It is missing the ZPP1 charge which is 3.40.  Zcust should be 1170 + 3.40 = 1173.40
    Line 20     ZS1   sell price     25                                 1000
                     ZPP1 charge        6.36                                 2.96  (note the distribution **)
                     ZL1                      3                                      3
                    ZR1 %                  1.000%                            10
                    ZR2                      0.01                                   0.6
                    Suggested price =  25.41                              1016.56
                      ZCUST                   25.34                           1013.60 (should be 1013.60 + 2.96)
                   Total price                25.34                            1013.60
    You can see the ZCUST is calculated incorrectly.  The routine calculate zcust as $1170 and $1013.60 for each item which did not include the distribution amount of  ZPP1 ($3.40 and $2.96).  
    When i debug the routine, the xkomv-kwert is zero.   I  am trying to get $3.40 and $2.96 so i can add to to zcust in the routine.
    Am trying to determine in saplv61A at which include that i can see #3.40 and $2.96 for both line items in xkomv-kwert.
    Then maybe i can modify the routine or saplv61A so it shows the correct zcust price  after entering the 2 line items in the sales order  create (VA01) ?     Can you pls suggest  ?
    If i make the changes in USEREXIT_SAVE_DOCUMENT_PREPARE, then user cannot see the correct zcust until the order is saved.  This would be too late to know the zcust price ahead of time.
    Pls view in the Edit mode... i see my texts have been compressed.
    Many thanks
    Joyce
    Edited by: Joyce Chan on Jul 9, 2009 10:24 PM
    Edited by: Joyce Chan on Jul 9, 2009 10:25 PM

  • Get old and new values from DBTABLOG table

    Hi,
    I am developing a report to display all changes to some fields of PKHD table over a date range. CDHDR & CDPOS do not capture the changes while DBTABLOG does. But the variable key field (LOGDATA) in DBTABLOG does hold encrypted values which need to be decrypted. Is there any FM or a way out to get them ?
    Please let me know. Thanks a lot.
    Regards
    Neeraj

    Use DBLOG_READ and then work with the data like in the following sample
    * Constants (cf. SAP RSVTPTOP)
      CONSTANTS: type_i4 LIKE x031l-fieldtype VALUE 'AC',       "UF160698B
                 type_i2 LIKE x031l-fieldtype VALUE 'A8',
                 type_f  LIKE x031l-fieldtype VALUE '88'.       "UF160698E
    * First - informations from directory
            REFRESH fld_list.
            CALL FUNCTION 'GET_FIELDTAB'
              EXPORTING
                langu                     = sy-langu
                only                      = ' '
                tabname                   = 'TEVEN'
                withtext                  = 'X'
    *       IMPORTING
    *         HEADER                      =
    *         RC                        =
              TABLES
                fieldtab                  = fld_list
              EXCEPTIONS
                internal_error            = 1
                no_texts_found            = 2
                table_has_no_fields       = 3
                table_not_activ           = 4
                OTHERS                    = 5.
            LOOP AT fld_list INTO fld WHERE keyflag = 'X'.
              ADD fld-intlen TO keylen.
            ENDLOOP.
    * Then extract data log
            REFRESH obj_list.
            obj-tab = 'TEVEN'.
            INSERT obj INTO  TABLE obj_list.
            CALL FUNCTION 'DBLOG_READ'
              EXPORTING
                from_day                   = s-aedtm-low
    *           FROM_TIME                  = '000000'
                to_day                     = s-aedtm-high
    *           TO_TIME                    = '235959'
                obj_list                   = obj_list
    *         ACCESS_DATABASE            = 'X'
    *         ACCESS_ARCHIVES            = ' '
    *         AUTO_ARCH_SEL              = ' '
    *         USER_LIST                  =
              CHANGING
                log_list                   = log_list
              EXCEPTIONS
                archive_access_error       = 1
                no_archives_found          = 2
                OTHERS                     = 3.
    *   Extract data from returned tables
            LOOP AT log_list INTO log.
              LOOP AT fld_list INTO fld.
                IF fld-keyflag = 'X'.
                  ASSIGN log-logkey+fld-offset(fld-intlen)
                    TO <hexa> TYPE 'X'.
                ELSE.
                  fld-offset = fld-offset - keylen.
                  ASSIGN log-logdata+fld-offset(fld-intlen)
                    TO <hexa> TYPE 'X'.
                  fld-offset = fld-offset + keylen.
                ENDIF.
                CASE fld-inttype.
                  WHEN 's'.
                    f_type = type_i2.
                  WHEN 'I'.
                    f_type = type_i4.
                  WHEN 'F'.
                    f_type = type_f.
                ENDCASE.
                IF 'sIF' CS fld-inttype.
                  feld = <hexa>.
                  CALL FUNCTION 'DB_CONVERT_FIELD_TO_HOST'
                       EXPORTING
                            type        = f_type
                       CHANGING
                            field       = feld
                       EXCEPTIONS
                            wrong_param = 1
                            OTHERS      = 2.
                  ASSIGN feld TO <hexa> TYPE 'X'.
                ENDIF.
                ASSIGN <hexa> TO <char> TYPE 'C'.
                teven+fld-offset(fld-intlen) = <char>.
              ENDLOOP.
    *     Here structure teven is filled
            ENDLOOP.
    Regards

  • How to get Essential and additional qualifications ,From which table

    Hi all,
    In one of my requirement, the report should show the Qualifications and Essential qualifications columns in the output.
    Requirement is :
    1. I have brought qualifications of Applicant from PB0024 table.
    2. I need to compare these with the Qualifications maintained in Job for the pernr.
    3. There are two types of Qualifications namely essential Qualifications and additional Qualifications.
    4.
    How do we get the Qualifications maintained for a job/Position?
    How can we distinguish between Qualifications and essential Qualifications maintained for a job at the database table level ?
    Please reply ASAP.
    Regards,
    Rama.P

    Hi Dilek Ersoz Adak,
    How can we get the jobs assigned to a position ,from which table ?
    Actually i am doing a custom recruitment report which displayes several fields along with the qualificaions and additional qualifications.
    For the two fileds: in the spec it is given as:
    14.     Qualification (This is maintained in HRPE_PROFQ_TBJID-infotype 0024 of the employee. Thus, check Position maintained for the employee in P4002_OBJID, against this position check for Essential Qualification, related object type u2018Qu2019 HRPE_PROFQ_ESSENTIAL, compare this with the qualifications maintained for the employee in Infotype 0024, and display wherever these maintained.)
    15.     Additional Qualification (This is maintained in HRPE_PROFQ_TBJID-infotype 0024 of the employee. Thus, check Position maintained for the employee in P4002_OBJID, against this position check for Essential Qualification, related object type u2018Qu2019, compare this with the qualifications maintained for the employee in Infotype 0024, and display all qualifications for which HRPE_PROFQ_ESSENTIAL is not maintained.)
    16.     Proficiency (HRPE_PROFQ_PROFC_TEXT)
    in clear :
    1.       Positions (Object Type S) are linked to Job through relationship A 007
    2.       In APDISCOM scenario, Qualifications (Object Type Q) are attached to Object u2018Jobu2019 (Object Type C) through Transaction Code PPPM
    3.       Now, for a Job there can two types of qualifications maintained Essential Qualifications (ii) Additional Qualifications
    4.       For essential qualifications: Against a Qualification we can maintain u201Cessential check boxu201D HRPE_PROFQ
    5.       For additional qualifications: Those qualifications for which HRPE_PROFQ is not maintained
    6.       Now, for an applicant, Qualifications are maintained in Infotype 0024, wherein the necessary qualifications would be selected.
    7.       In the report for field of u201Cessential qualificationu201D, check for qualifications maintained in Infotype 0024 and compare it with qualifications maintained in Job (through Position assigned to the applicant in P4002_OBJID)
    8.       Check for essential qualification HRPE_PROFQ maintained in Job and check whether the same Q is maintained in Infotype 0024 for the applicant, if yes, then generated Text of the Q
    9.       If there are any additional qualifications which are maintained in the job and not maintained in Infotype 0024, DONu2019T GENERATE ANYTHING IN FIELD
    10.   If there are any additional qualifications which are maintained in the job and if same are maintained in Infotype 0024, generate Q text under field of u201CAdditional Qualificationsu201D in the report
    11.   If there are any extra qualifications in infotype 0024, which are not maintained in Job, then generate Q text under field of u201CAdditional Qualificationsu201D in the report
    Please provide the procedure.(For clarity copy and paste the text in a MS-word)
    Please reply ASAP.
    Regards,
    Rama.P
    Edited by: Rama Chary on Dec 9, 2009 1:28 AM

  • How to get the last inserted record from a table ?

    :-) Hiee E'body
    I work on Oracle 8i and need to get the last
    record inserted in a table.
    I have tried using rownum and rowid pseudo-columns
    but that doesn't work.
    Can you please help me out ?
    :-) Have a nice time
    Vivek Kapoor.
    IT, Atul Ltd.,
    India.

    I'm not sure about 8i features.
    I assume here that you don't have 'Date-Time' stamp columns on the table which is the easiest way to determine the last inserted row in the table.
    If not try the following :-
    select address, piece, SQL_TEXT
    from V$SQLTEXT
    where upper(sql_text) like '%INSERT INTO TABLE_NAME%'
    Substiute the TABLE_NAME with the name of the actual table.
    Have fun.
    Regards,
    Shailender
    :-) Hiee E'body
    I work on Oracle 8i and need to get the last
    record inserted in a table.
    I have tried using rownum and rowid pseudo-columns
    but that doesn't work.
    Can you please help me out ?
    :-) Have a nice time
    Vivek Kapoor.
    IT, Atul Ltd.,
    India.

  • How to get the Data type of the Internal Table.

    How can i get the data types used to create an internal table
    TYPES : BEGIN OF t_makt,
              matnr    TYPE    matnr,
              maktx    TYPE    maktx,
            END OF t_makt.
    Like this some function will give me which data types i have used for the internal table at run time.

    Use the FM ..
    data : int_fcat type SLIS_T_FIELDCAT_ALV.
    REUSE_ALV_FIELDCATALOG_MERGE ..
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
           EXPORTING
                I_PROGRAM_NAME         = sy-repid
                I_INTERNAL_TABNAME     = 'IMAT'   <-- this is your internal table
                 I_INCLNAME             = sy-repid
           CHANGING
                CT_FIELDCAT            = int_fcat <--- this contains all the fields along with their characteristics ...
           EXCEPTIONS
                INCONSISTENT_INTERFACE = 1
                PROGRAM_ERROR          = 2
                OTHERS                 = 3.

  • How to return the same SUM value from two tables

    Hello,
    I have the following data:
    SQL> SELECT * FROM t1;
         T1_ID   T1_VALUE
             1        500
             1        500
    SQL> SELECT * FROM t2;
         T2_ID   T2_VALUE
             1       1000
    SQL> SELECT t1_id, SUM(t1_value), SUM(t2_value)
      2    FROM t1, t2
      3   WHERE t1_id = t2_id
      4   GROUP BY t1_id;
         T1_ID SUM(T1_VALUE) SUM(T2_VALUE)
             1          1000          2000How is it possible that SUM(T2_VALUE) returns also 1000.
    Thank you

    Here's one way:
    with t1 as (select 1 t1_id, 500 t1_value from dual union all
                select 1 t1_id, 500 t1_value from dual),
         t2 as (select 1 t2_id, 1000 t2_value from dual)
    select t3.t3_id, t3.t3_sum, t4.t4_sum
    from   (select t1_id t3_id, sum(t1_value) t3_sum from t1
            group by t1_id) t3,
           (select t2_id t4_id, sum(t2_value) t4_sum from t2
            group by t2_id) t4
    where  t3.t3_id = t4.t4_id

  • How to get Meta Data Extension value?

    Hello,
    I created a new property in KM and set "Meta Data Extension" field that points to some bundle class file for Labels for this property.
    How can I get the value of this "Meta Data Extension" field or, to be more exactly, this bundle class in my property renderer code?
    I'll be very much appreciated for your help.

    Hello Sergei,
    IMetaName getLabel will give you the label out your bundle file if you've set the metadata extension and the bundle key in the metadata property configuration. There is no API that exposes the metadata extension information. It's only used inside the property configuration service.
    For more information about how tho customize labels of KM attributes see the documentation:
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/65/6fc63ed4027f6be10000000a114084/frameset.htm">Changing Labels for Properties</a>
    Regards
    Lars

Maybe you are looking for

  • What are the main tables to refer in ASAP(asap 7.2)?

    what are the main tables to refer in ASAP(asap 7.2)?

  • Irritating "Open with" issue in the context menu

    Hi all, When I click on a file and then choose "Open with" in the context menu, I get multiple instances of the same program instead of just one instance. For example, if I click on a document, the context menu may have 4 instances of Preview and 3 i

  • New DMS features available in EHP5

    Hi, Could anyone apprise of the new features offered for SAP DMS in Ehp5 incase you have upgraded? Found a couple of references in forums,BPX community, but none of them go into specifics. Inputs from the PLM Solution management team will be apprecia

  • SEM documentation for BPS

    Hello Everyone, I am starting a newbie in SEM and my client wants me to learn and get a feel of it before he can start me off on that. I do not have access to service market place and also the documentation on help.sap.com is not very clear. If someo

  • Modify the preference value of the default route

    Hi How to achieve the Below ? any configuration example? 1)How to modify the preference value of the default route to be less prefered than OSPF External route 2)how to redistribute the default route as type 2 external route 3)how to redistribute the