Function to extract descr from given code

Kindlhy help some one to get the following function. The prototype of the function is
FUNCTION extract_descr(given_val VARCHAR2 , table_name VARCHAR2, field_name varchar2) RETURN BOOLEAN. This function
get the above parameters and returning the description of from the table (table,field,value of the code is parameters). Thanks.

Hello,
Simply create a cursor on the USER_TAB_COLUMNS view.
e.g.:
Cursor c_cols is
select column_name, data_type, data_length,data_precision, data_scale from user_tab_columns
where table_name = 'EMP';Francois

Similar Messages

  • CALL function to extract data from a structure table

    Hi Gurus,
    Anyone knows how to write a call function to extract data from a structure table?
    Your help is very much appreciated.
    Thanks alot.

    Hi,
    structure doesnot hold any data. instead of it you can check the stucture in which table it is used, find the table name,use select query to extract the data u needed.
    you can use where used list option to find the structure in which table it is used.
    regards
    siva

  • To extract data from t.code mm02

    Hi,
       I want to write the program to extract the data from t.code mm02 for clsiification and unit of measure .
         In classification there are charactersitcs and values which i want to extract. And in unit of measure i want to extract the data .
    please if somebudy knows plz let me know.

    Hi Rahul,
    You can use following tables to extact default material characteristics.
    CABN,CABNT,CAWN & CAWNT
    And you can also refer following code where I have used FM's -
    *&--- Select class type available for material table (MARA)
        SELECT klart
                FROM tcla
                INTO TABLE t_klart
                WHERE obtab = c_mara AND
                      klart = '300'.    " GIves Material class type
    REFRESH t_objkeys.
        LOOP AT t_klart INTO w_klart.
          CLEAR : w_objkeys.
          w_objkeys-class_type     =  w_klart.
          w_objkeys-objectkey      =  w_matnr2.      "material number
          w_objkeys-objecttable    =  c_mara.          " MARA
          APPEND w_objkeys TO t_objkeys.
          CLEAR : w_klart,
                  w_objkeys.
        ENDLOOP.
    REFRESH : t_allocations, t_class_char1, t_class_char.
    *&---FM to get the Class Name for the material
        CALL FUNCTION 'CLBPAX_READ_CLASSIFICATIONS'
          EXPORTING
            t_object_keys = t_objkeys
            keydate       = sy-datum
          IMPORTING
            t_allocations     = t_allocations
            t_valuations_char = t_value_char
            t_valuations_num  = t_value_num.
      IF t_allocations[] IS NOT INITIAL.
        LOOP AT t_allocations INTO w_allocations WHERE class_type = '300'.
            CALL FUNCTION 'BAPI_CLASS_GETDETAIL'
              EXPORTING
                classtype            = w_allocations-class_type
                classnum             = w_allocations-classnum
              TABLES
                classcharacteristics = t_class_char1
                classcharvalues      = t_class_char.
          ENDLOOP.
        ENDIF.

  • Extract article from HTML code

    Hi,
    I'm trying to build a search engine for an RSS feed. Thing is i'm trying to store every article as a BLOB field in the database. To optimize my search i'll need to extract the article only and nothing else (no unrelated hyperlinks or html code)
    I'm using the HTMLEditoKit of swing to get the html content without the code, but that's not enough. I need to clean the page of things like headers and footers (they affect the search results)

    i already parsed the XML in the RSS...i've got informa ; the problem is the article itself
    Take this article for example: [http://news.bbc.co.uk/2/hi/europe/7572635.stm] , you've got the article, but you've things all around it from link to different articles to headers, footers menus.
    All of this affects the search results dramatically so i just want the article itself.
    that's the greatest challenge.

  • Tools for extracting strings from java code for internationalization

    For legacy code with lots and lots of strings what method is typically used to extract strings for internationalization?
    Am I right in thinking you couldnt simply grep for strings, it could get pretty complitcated, especially with escape characters, escaped quotes etc.,
    -SK

    When dealing with legacy code, it is nice to have an application that queries you as it extracts the strings. You have a choice whether to accept the string as a localizable entity or not.
    There are several tools that do this...including some IDEs like JBuilder. Although it isn't a fully supported or robust tool, Sun has a utility for extracting strings in Java source files:
    http://java.sun.com/products/jilkit/.
    Regards,
    John O'Conner

  • How to extract month from given date in bpel??

    Hi friends hi need some information  regarding dates in BPEL.. Here in these I taking date as input which type is also date type.Then required output is month in number format.. Here I  used Assign activity and in assign activity,I took month-from-date and passed argument to this function.But it raised an error "internal Xpath error" Any one can you give me ideas please....

    First convert you date into datetime and then use the month-from-datetime function.
    Regards,
    Anshul

  • Function to extract data from a ledger to a detail account

    I have created a ledger sheet to collect income and expense chronologically.  I have created running totals by account in another sheet using the SUMIFS function, which works well.
    I would also like to collect the ledger data in seperate detail accounts so the function would look for an account number field and when it finds a match move the related data to the detail account sheet.
    I would like to end up with a Ledger (which I have working) with all entries by date order and a Totals sheet with a running total (which I have working) and a number of separate account sheets with the detail by account.  What function do I need to accomplish the detail by account issue?

    Attached is a screenshot of what I already have.  I would like all the Account 402 entries to appear in order in the Account 402 Escrow sheet.

  • How to extract data from info cube into an internal table using ABAP code

    HI
    Can Anyone plz suggest me
    How to extract data from info cube into an internal table using ABAP code like BAPI's or function modules.
    Thankx in advance
    regds
    AJAY

    HI Dinesh,
    Thankq for ur reply
    but i ahve already tried to use the function module.
    When I try to Use the function module RSDRI_INFOPOV_READ
    I get an information message "ERROR GENERATION TEST FRAME".
    can U plz tell me what could be the problem
    Bye
    AJAY

  • Calling a javascript function from java code and getting tha value in Java

    Hi,
    I would like to call a Java script function confirmRemove() from Java code upon meeting a condition..
    for example the code snippet is:
    if(true){
    // I want to call js confirmRemove() over here. And get the value of variable "answer" in this if block.
    <html>
    <head>
    <script type="text/javascript">
    function confirmRemove() {
         var answer = confirm("Are you sure you want to Delete?")
    </script>
    </head>
    <body>
    <form>...

    Hi,
    Back in 2003 I have used an Applet which contain java code and this java code was calling the java scripts ( different methods, DHTML etc..)
    There was a component developed by NetScape called JSObject I am not sure it there is other third party component other then the JSObject
    look at this article which shows how (based on JSObject)
    [http://java.sun.com/products/plugin/1.3/docs/jsobject.html|http://java.sun.com/products/plugin/1.3/docs/jsobject.html]
    Regards,
    Alan Meio
    London,UK

  • Functions for mapping Latin-1 character codes to and from WinLatin-1  character codes

    HI ALL
    I will like to know how could i write own functions for mapping Latin-1 character codes to and from WinLatin-1
    character codes.
    Can show me some source code or how to mapping it. Because i just begineer.
    Hope you able to help me..

    I see your issue. I tried to reproduce this issue using sqlplus.
    Setup NLS_LANG as you mentioned using WE8ISO8859P1 and connect to a UTF8 db.
    [oracle@server ~]$ locale -a | grep en_US
    en_US
    en_US.iso88591
    en_US.iso885915
    en_US.utf8
    [oracle@server ~]$ export LC_ALL=en_US.iso88591
    [oracle@server ~]$ locale
    LANG=en_US.UTF-8
    LC_CTYPE="en_US.iso88591"
    LC_NUMERIC="en_US.iso88591"
    LC_TIME="en_US.iso88591"
    LC_MEASUREMENT="en_US.iso88591"
    LC_IDENTIFICATION="en_US.iso88591"
    LC_ALL=en_US.iso88591
    [oracle@server ~]$ echo $NLS_LANG
    AMERICAN_AMERICA.WE8ISO8859P1
    SQL> select value from nls_database_parameters where parameter='NLS_CHARACTERSET';
    AL32UTF8
    SQL> select nchr(223) from dual;
    NCHR
    ß
    SQL> select chr(223) from dual;
    ERROR:
    ORA-29275: partial multibyte character
    SQL> SELECT CHR (223 USING NCHAR_CS) from dual;
    C
    ß
    SQL>  select  CONVERT('ß', 'WE8ISO8859P1','UTF8') FROM DUAL;
    CO
    SQL> select  CONVERT(CHR(223 USING NCHAR_CS), 'WE8ISO8859P1','UTF8') FROM DUAL;
    select  CONVERT(CHR (223 USING NCHAR_CS), 'WE8ISO8859P1','UTF8') FROM DUAL
    ERROR at line 1:
    ORA-12703: this character set conversion is not supportedI found that beta is in WE8ISO8859P1 character set
    here[url http://docs.oracle.com/cd/E11882_01/server.112/e10729/ch2charset.htm#NLSPG164]What Characters Does a Character Set Support?
    But I don't really understand whats the problem in the conversion.

  • Code Challange - Code for extracting content from a file in KM

    Hi,
      I want to extract content from a file which is in KM Repository using the Webdynpro View.  I wrote the following code for the extraction. But it is throwing some exception.
    Code Written:
    <b>  
      URLConnection conn = null;
          DataInputStream data = null;
          String line;
          StringBuffer buf = new StringBuffer();
         wdContext.currentContextElement().setTextdisp("Hello");
         try {
          URL theURL = new URL("http://ctssap1:50000/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/News/New%20text.txt");     
            conn = theURL.openConnection();
           // conn.connect();
            wdContext.currentContextElement().setTextdisp("Inside Try");      
            data = new DataInputStream(new BufferedInputStream(
                               conn.getInputStream()));
            while ((line = data.readLine()) != null) {
               buf.append(line + "\n");
            data.close();
            String buffer = new String(buf);
            wdContext.currentContextElement().setTextdisp(buffer);
          catch (IOException e) {
              wdContext.currentContextElement().setTextdisp("IO Error:" + e.getMessage());
          }</b>
    Exception Got:
    <b>IO Error:Server returned HTTP response code: 401 for URL: http://ctssap1:50000/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/News/New%20text.txt</b>
    Can anyone help me out in this process... or please suggest some other way to extract the content.
    Thanks in Advance.
    Regards,
    Srinivas.

    Hi Srinivas,
    VaPath will have the path of ur document.
    Check this modified code snippet which will answer ur  questions and solve ur problem.
    IWDClientUser wdClientUser = WDClientUser.getCurrentUser();
    IUser sapUser = wdClientUser. getSAPUser();
    com.sapportals.portal.security.usermanagement.IUser ep5User = WPUMFactory.getUserFactory().getEP5User(sapUser);
    IResourceContext context = new ResourceContext(ep5User);
    /Specify the path of ur document here./
    RID pathRID = RID.getRID("/documents/file2");
    IResource resource = ResourceFactory.getInstance()
    .getResource(context);
    InputStream in = resource.getContent().getInputStream();
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    byte[] buffer = new byte[4096];
    int bytesread = 0;
    while ((bytesread = in.read(buffer)) != -1) {
    out.write(buffer, 0, bytesread);
    String myData = out.toString();
    /*myFile will containS the content of the document./
    wdComponentAPI.getMessageManager().reportSuccess(myData);
    Hope this solves ur problem.
    Regards,
    Sowjanya.

  • How to extract data from generic view and function module

    hi experts,
    can anybody give me the steps to extract data from generic view and  functon modules.
    thanks and regards
    venkat

    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a0f46157-e1c4-2910-27aa-e3f4a9c8df33
    https://websmp103.sap-ag.de/~sapidb/011000358700007535452002
    Hope it Helps
    Chetan
    @CP..

  • Air Native Extension for OS X. Cant call functions from native code.

    Hi, I am trying to build native extension for OS X.
    After creating context, I try to call native function with "call" method, but always I have an error "The extension context does not have a method with the name ..."
    In as3 code my ExtensionContext is not null, so it's okay. And in native objective-c code I have a function, which I call in as3 code.
    What should I do?
    Here my code.
    Objective-c:
    FREContext AirContext = nil;
        FREObject init(FREContext ctx, void* funcData, uint32_t argc, FREObject argv[])
            return nil;
        FREObject someFunction(FREContext ctx, void* funcData, uint32_t argc, FREObject argv[])
            FREDispatchStatusEventAsync(AirContext ,(uint8_t*) "SOME_EVENT", (uint8_t*) "some information" );
            return nil;
        void ANEContextInitializer(void* extData, const uint8_t* ctxType, FREContext ctx, uint32_t* numFunctionsToTest, const FRENamedFunction** functionsToSet)
            NSLog(@"Entering ContextInitinalizer()");
            *numFunctionsToTest = 5;
            FRENamedFunction* func = (FRENamedFunction*) malloc(sizeof(FRENamedFunction) * *numFunctionsToTest);
            func[0].name = (const uint8_t*) "init";
            func[0].functionData = NULL;
            func[0].function = &init;
            func[1].name = (const uint8_t*) "someFunction";
            func[1].functionData = NULL;
            func[1].function = &someFunction
            // other blank functions
            *functionsToSet = func;
            AirContext = ctx;
            FREDispatchStatusEventAsync(AirContext ,(uint8_t*) "SOME_EVENT", (uint8_t*) "some information" );
        void ContextFinalizer(FREContext ctx) {
            NSLog(@"Entering ContextFinalizer()");
            NSLog(@"Exiting ContextFinalizer()");
        void ANEInitializer(void** extDataToSet, FREContextInitializer* ctxInitializerToSet, FREContextFinalizer* ctxFinalizerToSet )
            NSLog(@"Entering ExtInitializer()");
            *extDataToSet = NULL;
            *ctxInitializerToSet = &ContextInitializer;
            *ctxFinalizerToSet = &ContextFinalizer;
            NSLog(@"Exiting ExtInitializer()");
        void ANEFinalizer(void* extData)
            return;
    ActionScript3:
    public class MyANE extends EventDispatcher{
            private static var _instance:MyANE;
            private var extCtx:ExtensionContext;
            public function MyANE()
                if (!_instance)
                    if (this.isSupported)
                        extCtx = ExtensionContext.createExtensionContext("my.awesome.ane", null);
                        if (extCtx != null)
                            trace('context is okay'); //this trace works
                            extCtx.addEventListener(StatusEvent.STATUS, onStatus);
                        } else
                            trace('context is null.');
                _instance = this;
                else
                    throw Error('singleton');
        public static function getInstance():MyANE
                return _instance != null ? _instance : new MyANE();
        public function get isSupported():Boolean
                var value:Boolean = Capabilities.manufacturer.indexOf('Macintosh') > -1;
                trace(value ? 'supported' : 'not supported ');
                return value;
        private function onStatus(event:StatusEvent):void
                trace('Event', event, 'code', event.code, 'level', event.level); //this traсе does not works
         private function test(): void
              extCtx.call("someFunction"); //this throws error
    XML:
        <extension xmlns="http://ns.adobe.com/air/extension/3.9">
            <id>my.awesome.ane</id>
            <versionNumber>1.0.0</versionNumber>
            <platforms>
                <platform name="MacOS-x86">
                    <applicationDeployment>
                        <nativeLibrary>MyANE.framework</nativeLibrary>
                        <initializer>ANEInitializer</initializer>
                        <finalizer>ANEFinalizer</finalizer>
                    </applicationDeployment>
                </platform>
            </platforms>
        </extension>
    And this script Im using for build ANE:
        mv ../as3/bin/MyANE.swc .
        unzip MyANE.swc
        mv library.swf mac/
        rm catalog.xml
        rsync -a ../Obective-C/ANE/Build/Products/Debug/ANE.framework/ mac/ANE.framework/
        adt -package -target ane MyANE.ane extension.xml -swc MyANE.swc -platform MacOS-x86 -C mac .
        mv MyANE.ane ~/Work/_Projects/test/libs-ane/

    I haven't done Objective C in a long time, but if I'm not mistaken, it requires the semicolon to terminate a line of code. The line containing "func[1].function = &someFunction" does not have that termination and since that is the function you are trying to execute, maybe that is the source of the error.

  • Extracting and updating files inside a JAR file... from my code

    Hi.
    I need some help in the following:
    from my code, I need to search a JAR file, open it, unzipped it, then I need to search a xml and property files inside the JAR, after that I need to modify the files and finally, my code has to save the changes and update the JAR file. All that must be from my java code.
    How can I do that? I am trying to use Runtime.getRunTime().exec().... but I am not sure that it works. Besides, I don�t know what command to include in the exec() method. Is there any way to do that?
    Thanks

    The normal reason I see for this requirement is that people want to update a properties or data file. The approach I use it that I first look for the data file in a well defined location and if I find it I use it and update it as required. If I don't fine it I create it base on a template file read from the jar file using getResourceAsSrream().
    In this way I never have to update the jar file.

  • FM to extract data from Datasource

    Hi,
    Can any one of you suggest me an idea or let me know where to start and how to start ?
    I want to write a ABAP code/ create a Function Modules which extracts data from a DATASOURCE be it any on condition(say date) and the output given should be filtered on some fields
    Does a standard datasource be extracted using a custom FM?
    Are there any standard FM to do this?

    Hi,
    go to the TX- SE80 and create the function group.
    after take the FM - RSAX_BIW_GET_DATA_SIMPLE
    please look at the below doc it will help.
    Generic Extraction based on Function Module
    Thanks,
    Phani.

Maybe you are looking for