How to get the main funciton name when calling another function inside?

for eg, one RFC named A,inside A,a funtion B is called.when the processing is at B now,how can i get the main RFC name(A)?
any help will be much appricated.

> just see SM50,there is a column called 'Report',it shows the program id the proess is now processing.but i don't know its main program or say it 'the process's first excuting program',how can i get it programmatically?
I'm still not sure to understand. The program in SM50 is the current main program (not the first). It is stored in SY-REPID system variable. Or use this code:
DATA lt_callstack_long TYPE abap_callstack.
DATA ls_callstack_long TYPE LINE OF abap_callstack.
CALL FUNCTION 'SYSTEM_CALLSTACK'
      IMPORTING
        callstack    = lt_callstack_long.
READ TABLE lt_callstack_long INDEX 1 INTO ls_callstack_long.
WRITE : / 'current main program is:', ls_callstack_long-mainprogram.
If you want to know the frame program (the first called), use SY-CPROG, or use this code:
DATA lt_callstack_long TYPE abap_callstack.
DATA ls_callstack_long TYPE LINE OF abap_callstack.
CALL FUNCTION 'SYSTEM_CALLSTACK'
      IMPORTING
        callstack    = lt_callstack_long.
" read last line = first called program
DESCRIBE TABLE lt_callstack_long. "to make sy-tfill = number of lines
READ TABLE lt_callstack_long INDEX sy-tfill INTO ls_callstack_long.
WRITE : / 'First main program is:', ls_callstack_long-mainprogram.

Similar Messages

  • How to get the array of Complex when call a webserivce method it's return an array of user define data struct?

    When call a webservice opreation, it returns an array of complex type, sure, the calling is successed,  but i don't know how to get the return values,
    I have tried use Pendingcall.response & Pendingcall.getOutPutValues() in Pendingcall.onResult event function...
    Waiting....

    Flash Lite doesn't fully support webservices, so you will find it difficult to use the full api set.
    I suggest that you use SWX (swxformat.org) or simply HTTP requests for transactions.
    We have a tutorial on use with ColdFusion here:
    http://vimeo.com/6829083
    Mark

  • How to get the complete path name when uploading a file from servlet

    Hi,
    I write a servlet to upload a file from html page
    <intput type=file name=fileupload>I am using
    import org.apache.commons.fileupload.to upload file. i want to get the all fields in the form and file name and content of the file also.
    It give the file name only
    String filename= fileItem.getName();
    o/p krish.jpgBut i want complete path naem like
    d:/krishna/images/funny/krish.jpgI serach the API org.apache.commons.fileupload.*
    But i did nt find the method to get it.
    plz help me , which api or method to use here..

    Krishna_Rao_chintu wrote:
    But i need path and have to do some calculations on it.No, you don't. If you have requirements which say you do then the requirements are wrong. You couldn't do anything useful with the path on the client system even if you could get it.
    is there any alternatives in java
    I need path and have to calculate MD5, Presumably you need to calculate MD5 on the contents of the file and not on the name of the file.
    and convert the file to binary format.... etc oprations on itSorry, "convert a file to binary format" is basically meaningless.
    but we can get the content of the file using
    byte [] get()/ getString() methods
    If i get content is there any performance degrades?
    ie if the content is lengthy is it take more time?Take more time than what? Degrading performance from what? It's certainly true that it would be quicker to not upload the file, but that's a pointless comparison. If you have some other process to compare with, let us know what it would be.

  • How to get the current schema name

    Hi,
    Can anybody please tell me how to get the current schema name, there is some inbuilt function for this,but i am not getting that. Please help me.
    Thanks
    Jogesh

    ok folks, I found the answer at Tom's as usual.
    http://asktom.oracle.com/tkyte/who_called_me/index.html
    I rewrote it into a function for kicks. just pass the results of DBMS_UTILITY.FORMAT_CALL_STACK to this function and you will get back the owner of the code making the call as well some extra goodies like the name of the code and the type of code depending on the parameter. This ignores the AUTHID CURRENT_USER issues which muddles the schemaid. Quick question, does the average user always have access to DBMS_UTILITY.FORMAT_CALL_STACK or does this get locked down on some systems?
    cheers,
    paul
    create or replace
    FUNCTION SELF_EXAM (
       p_call_stack VARCHAR2,
       p_type VARCHAR2 DEFAULT 'SCHEMA'
    ) RETURN VARCHAR2
    AS
       str_stack   VARCHAR2(4000);
       int_n       PLS_INTEGER;
       str_line    VARCHAR2(255);
       found_stack BOOLEAN DEFAULT FALSE;
       int_cnt     PLS_INTEGER := 0;
       str_caller  VARCHAR2(30);
       str_name    VARCHAR2(30);
       str_owner   VARCHAR2(30);
       str_type    VARCHAR2(30);
    BEGIN
       str_stack := p_call_stack;
       -- Loop through each line of the call stack
       LOOP
         int_n := INSTR( str_stack, chr(10) );
         EXIT WHEN int_cnt = 3 OR int_n IS NULL OR int_n = 0;
         -- get the line
         str_line := SUBSTR( str_stack, 1, int_n - 1 );
         -- remove the line from the stack str
         str_stack := substr( str_stack, int_n + 1 );
         IF NOT found_stack
         THEN
            IF str_line like '%handle%number%name%'
            THEN
               found_stack := TRUE;
            END IF;
         ELSE
            int_cnt := int_cnt + 1;
             -- cnt = 1 is ME
             -- cnt = 2 is MY Caller
             -- cnt = 3 is Their Caller
             IF int_cnt = 1
             THEN
                str_line := SUBSTR( str_line, 22 );
                dbms_output.put_line('->' || str_line);
                IF str_line LIKE 'pr%'
                THEN
                   int_n := LENGTH('procedure ');
                ELSIF str_line LIKE 'fun%'
                THEN
                   int_n := LENGTH('function ');
                ELSIF str_line LIKE 'package body%'
                THEN
                   int_n := LENGTH('package body ');
                ELSIF str_line LIKE 'pack%'
                THEN
                   int_n := LENGTH('package ');
                ELSIF str_line LIKE 'anonymous%'
                THEN
                   int_n := LENGTH('anonymous block ');
                ELSE
                   int_n := null;
                END IF;
                IF int_n IS NOT NULL
                THEN
                   str_type := LTRIM(RTRIM(UPPER(SUBSTR( str_line, 1, int_n - 1 ))));
                 ELSE
                   str_type := 'TRIGGER';
                 END IF;
                 str_line  := SUBSTR( str_line, NVL(int_n,1) );
                 int_n     := INSTR( str_line, '.' );
                 str_owner := LTRIM(RTRIM(SUBSTR( str_line, 1, int_n - 1 )));
                 str_name  := LTRIM(RTRIM(SUBSTR( str_line, int_n + 1 )));
              END IF;
           END IF;
       END LOOP;
       IF UPPER(p_type) = 'NAME'
       THEN
          RETURN str_name;
       ELSIF UPPER(p_type) = 'SCHEMA.NAME'
       OR    UPPER(p_type) = 'OWNER.NAME'
       THEN
          RETURN str_owner || '.' || str_name;
       ELSIF UPPER(p_type) = 'TYPE'
       THEN
          RETURN str_type;
       ELSE
          RETURN str_owner;
       END IF;
    END SELF_EXAM;

  • How to get the full image directory when i upload the image to web page???

    hai, how to get the full image directory when i upload the image to web page???
    here is the example:
    <form action="uploadfile.jsp" method="post">
    image<input type="file" name="image" />
    <input type="submit" value="submit"/>
    <%
    String s=request.getParameter("image");
    %>
    <%=s%>
    </form>
    i upload the image from C:\image\center.gif. i use request.getParameter just can get the image name like "center.gif". Can anybody help me how to get the full path name. Thanks a lot..

    There is no need to get the path. It is also fairly pointless as the server cannot access the client's local file system.
    Carefully read this article how you can upload files the right way: http://balusc.blogspot.com/2007/11/multipartfilter.html

  • How to get the actual font name from a font file?

    Hi
    I have only the font Path I have to get the font name from that path. Any idea how to get the actual font name?
    Thanks,

    I would ask you these questions:
    Why do you need to do this?  What are you ultimately trying to accomplish?
    Are you really asking about the InDesign SDK?
    Do you really need to get the "name" of a font from an arbitrary file?  Or do you want information about a font installed on the system?  If so, what OS?
    Do you need to be able to handle any font format?
    Which font "name" do you mean?
    What language do you want the name in?
    (1) It's not clear what you're trying to accomplish.  A bit more information about your ultimate goal would be helpful.
    (2) This question is not at all specific to the InDesign SDK.  Are you really trying to do something in the context of an InDesign plug-in?  If so, you probably want to look at IID_IFONTFAMILY and the IFontFamily::GetFamilyName function.
    (3) If you are asking more generally, Windows and Mac both have system API calls to get this information, although those tend to deal with installed system fonts, not with arbitrary font files per se.
    Also, you can parse the name table from a True Type or Open Type font without using any system APIs; as True Type and Open Type are well-documented standards.  I would start by reading these:
    The Naming Table
    Font Names Table
    (4) Although there are other standards, such as Type 1 (PostScript) fonts, and True Type Collection files and other formats, especially on Mac.
    (5) Also, when you start down this road, you will quickly realize that your seemingly simple question is actually ambiguous, and that the answer is kind of complicated, because a font can have many names (a family name, a full font name, a style name, a PostScript name, etc.).
    (6) And not only does a font have multiple names, it can have each of those names in multiple languages and encodings.
    Any clarification would make this a better question.

  • How to get the jsp page name in jsp?

    how to get the jsp page name in jsp? how the jsp get the jsp page name dynamic.
    thanks in advance.

    Try request.getServletPath()

  • How can get the console window name of the current form?

    How can get the console window name of the current form?

    Try the various get methods of the viewObject such as getQuery:
    http://www.oracle.com/webapps/online-help/jdeveloper/10.1.2/state/content/navId.4/navSetId._/vtAnchor.getQuery%28%29/vtTopicFile.bc4jjavadoc%7Crt%7Coracle%7Cjbo%7CViewObject%7Ehtml/

  • Is it possible to get the main class name in a Thread context ?

    for example, i want to get the main class name (the first entry of the program).
    public class Test implements Runnable {
         public Test() {}
         public static void main(String[] args) {
              new Thread(new Test()).start();
         public void run() {
              try {
                   //Want to get the main class name (not the current class name)
                   throw new Throwable();
              } catch (Throwable e) {
                   e.printStackTrace();
    }

    Acutally, i wanna make clear about the concept of a "Thread"
    Is it true that ..
    the main() method is a thread , once I create another thread in the program , both of (or all of them) will contains it owns stack exception information ?
    My english is poor, please try to understand it. Thx

  • How to get the report server name in Forms 10g.

    How to get the report server name in Forms 10g.
    I'm using the Application Server 10g 10.1.2.

    Hello,
    I do not think that you can get this value from anywhere. A solution is to put the Reports server name in an environment variable stored in the /forms/server/default.env file, then to query it at Forms runtime with the TOOL_ENV.Getvar() built-in.
    Francois

  • How to get the Application perform actions when exits?

    How to get the Application perform actions when user clicks on the "X" icon in the top right hand corner?
    OR
    If i placed an Exit Button.... when actions that i need to use to allow my application to perform a certain action when it exits?
    Thanks

    frame.addWindowListener(new WindowAdapter() {
      public void windowClosing(WindowEvent e) {
        // do your stuff here
    });The WindowListener and WindowEvent can be found in java.awt.event package
    //David

  • How to get the Portal Page name from PLSQL?

    Can anyone tell me how to get the portal page name from my dynamic page using plsql?
    Apparently you can get the page id and work it out from there, but my calls to get the page id are not returning any values anyway.
    My code for attempting to get the page id is below.
    <oracle>
    declare
    v_pageid varchar2(30);
    begin
    v_pageid := wwpro_api_parameters.get_value('_pageid', '/pls/portal30');
    htp.print('Page is '|| v_pageid);
    end;
    </oracle>
    Ideally I'd actually just like to get the page name. Is there a straightforward way to do this?
    Thanks in advance!
    Sarah

    Few clarifications -
    1. wwpro_api_parameters cannot be used to get default portal
    page parameters such as '_pageid', '_dad', '_schema' etc.,
    2. Page information can be obtained through any components which
    are available in that particular page. For example, in case of
    dynamic page, we need to publish it as a portlet and add it to the
    page. This process creates necessary packages in the DB, but we
    will not have access to the portlet methods.
    So, I would prefer creating a simple DB provider & portlet and access
    page title from its show method as follows -
    //Declare local variable l_page_id, l_page_title as varchar2
    select page_id into l_page_id from wwpob_portlet_instance$ where
    portlet_id = p_portlet_record.portlet_id and
    provider_id = p_portlet_record.provider_id;
    select name into l_page_title from wwpob_page$ where id=l_page_id;
    More information on DB provider can be found at
    http://portalstudio.oracle.com/pls/ops/docs/FOLDER/COMMUNITY/PDK/articles/understanding.database.providers.html
    Secondly, usage of wwpro_api_parameters.get_value method is
    incorrect. This method expects two arguments -
    <ul>
    <li><b>p_name : </b> The name of the parameter to be returned.</li>
    <li><b>p_reference_path : </b> An unique identifier for a portlet instance on the current page.</li>
    </ul>
    p_reference_path would be something like 99_SNOOP_PORTLET_76535103 and not some type of path as its name suggests.
    The following code fragment fetches all parameters available
    for a portlet.
    Note : Copy this code into 'show' method of your portlet.
    //Declare l_names, l_values as owa.vc_arr
    * Retreive all of the names of parameters for this portlet
    l_names := wwpro_api_parameters.get_names(
    p_reference_path=>p_portlet_record.reference_path);
    * Retreive all of the values of parameters for this portlet
    l_values := wwpro_api_parameters.get_values(p_names=>l_names,
    p_reference_path=>p_portlet_record.reference_path);
    //Loop through these arrays to get parameter information
    htp.p('<center><table BORDER COLS=2 WIDTH="90%" >');
    htp.p('<tr ALIGN=LEFT VALIGN=TOP>');
    htp.tableData(wwui_api_portlet.portlet_heading('Name',1));
    htp.tableData(wwui_api_portlet.portlet_heading('Value',1));
    htp.tableRowClose;
    if l_names.count = 0 then
    htp.p('<tr ALIGN=LEFT VALIGN=TOP>');
    htp.p('<td COLSPAN="2">'
    ||wwui_api_portlet.portlet_text(
    'No portlet parameters were passed on the URL.',1)
    ||'</td>');
    htp.tableRowClose;
    else
    for i in 1..l_names.count loop
    htp.p('<tr ALIGN=LEFT VALIGN=TOP>');
    htp.tableData(l_names(i));
    htp.tableData(l_values(i));
    htp.tableRowClose;
    end loop;
    end if;
    htp.p('</table></center>');
    Hope it helps...
    -aMJAD.

  • How to get the store procedure name inside this store procedure?

    how to get the store procedure name inside this store procedure?

    Why cant you get the procedure name as hard code as the proc name is going to change.
    Are you looking for getting the parent proc name from child proc name which is getting executed within parent proc?
    Try the below:
    --Parent Proc
    Alter Proc sp_test
    as
    Begin
    Declare @s varbinary(MAX) = Cast('sp_test' as Varbinary(MAX));
    SET CONTEXT_INFO @s;
    exec sp_test2
    End
    --Child proc
    Alter proc sp_test2
    as
    SELECT Cast(CONTEXT_INFO() as varchar(100));
    --Test execution
    Exec sp_test
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped.
     [Blog]

  • How to get the field row name of database from a form?

    Hello experts,
    I am newer in OIM and developments with the API's.
    I have this environment,
    one resource that have the attribute department
    relationship with the database row
    UD_RESOURCE1_DEPARTMENT and other resource with the same attribute in, UD_RESOURCE2_DEPARTMENT
    I am programing one java class that put values in the
    form field through the table name, sample,
    UD_RESOURCE_DEPARTMENT.
    I let some code:
    # Hash table with the value of Department
    myMap.put("UD_RESOURCE_DEPARTMENT", value);
    # and save in the resource form
    tcFormInstanceOperationsIntf tcform = (tcFormInstanceOperationsIntf)tcUtilityFactory.getUtility(dataProvider,"Thor.API.Operations.tcFormInstanceOperationsIntf");
    tcform.setProcessFormData(Long.parseLong(formKey), myMap);
    But this solution implies know the name of the field in the database and not is a global solution.
    I am interesting in know how I can obtain the name of the
    row field of the database for the atribute. Does anybody know how to obtain the row field name of database from an IT Resource or through the field name of the form?
    Is this the correct way to store data in a form?
    Thanks in advanced.

    Hi,
    Thank you.
    I have seen this function in the OTN help, but how can i get the index number. My requirment is when saving the data, I need to save both the value and the element name into the database,
    Also it is tabular block, more than one rows
    Thanks again

  • How to get the current user name in Provider hosted app using appOnlyAccessToken

    Hi, 
    Please help me, how to get the HostWeb UserName in Provider Hosted App
    i have Provider hosted App, and Anonymous Authentication is enabled on AppWeb, using appOnlyAccessToken
    Below code does not return current user who Log in in hostweb, it is returning
    SharePoint App (app@sharepoint)
    Web web = clientContext.Web;
    clientContext.Load(web);
    clientContext.ExecuteQuery();
    clientContext.Load(web.CurrentUser);
    clientContext.ExecuteQuery();
    clientContext.Web.CurrentUser.LoginName;
    Below code gives a blank name when Anonymous Authentication is enabled, if Anonymous Authentication is disabled
    app prompts for credentials 
    HttpContext.Current.User.Identity.Name
    Thanks
    Ram

    Hi,
    Since you are using a provider Hosted app if you want to get the current logged in name than do not use AppOnlyAccessToken else use AccessToken which is App + user Context AccessToken.
    then 
    Web web = clientContext.Web;
    clientContext.Load(web);
    clientContext.ExecuteQuery();
    clientContext.Load(web.CurrentUser);
    clientContext.ExecuteQuery();
    clientContext.Web.CurrentUser.LoginName;will return proper user Name.
    HttpContext.Current.User.Identity.Name will never return the user as this object is related to IIS server of your App Server not sharepoint.you should set this as Anonymous in case of provider hosted app.you can download the below sample which uses the AccessToken which has user name in it.https://code.msdn.microsoft.com/Working-provider-hosted-8fdf2d95
    Whenever you see a reply and if you think is helpful,Vote As Helpful! And whenever you see a reply being an answer to the question of the thread, click Mark As Answer

Maybe you are looking for

  • Bridge CS4 always opens in the same folder

    Since I upgraded to Photoshop CS4, Bridge always opens in the same folder. It used to open up whatever folder I was working on last. There must be a setting somewhere to tell Bridge to open the last visited folder but I can't seem to find it. Any ide

  • Most suitable external drive format for pc/mac

    hope i've posted this in the correct forum. i've formated an external OWC mercury 500GB drive to use with my desktop asus P4 and my macbook pro 17" i formated in fat 32 in order to be able to read/write data files from both systems... so far things w

  • Crystal Reports 2008 Missing Page Headers and Footers when Exporting Excel

    After upgrading from Crystal Reports 9 to Crystal Reports 2008 we have noticed that when we export to Excel the document no longer retains the page headers and footers.  After doing some reading I see that there is a property called ExportPageHeaders

  • Convert from LV8.6 to LV8.5

    Hi, Would someone please convert this project from LV8.6 to LV8.5 as I only have version 8.5? Thanks Tom Attachments: Project.zip ‏758 KB

  • What is password for time machine backup

    I have bought a mountain lion compatible wd ny book live 1 tb external hard disk. While connecting through wifi, it is asking for password of system administrator. It is not taking either apple I'd or other download, application install passwords. Wh