Getting the main program or tcode from child tcode

Hi
I execute a tcode1 . And while in that tcode1, I select the sub menu in the help menu. This sub menu is a custom one with a tcode2. Tcode2 calls a program. I would like to get tcode1 when I am in this progam. Somehow i get only Tcode2. Is there a way to get tcode1 which is the main tcode ?  
Thanks
Bindu

SY-CPROG
The name of the calling program in an external routine, otherwise the name of the current program.
based on that you can hit TSTC table and get the transaction code for that program... "some includes does not have T codes!"

Similar Messages

  • How to get variant of SUBMIT program to the main program.

    Hi!
    In my ZFRFI00R_PRINT_DOCUMENTS program i am using
    SUBMIT zfrfi01r_alv_fi_document
    using SELECTION-SET sp_vari
    with p_comp  = gw_bkpf_key-bukrs
    with p_year    = gw_bkpf_key-gjahr
    with p_doc    =  gw_bkpf_key-belnr
    and return.
    So in the main program i created one layout field to get the what are all the layouts in the SUBMIT program.
    I am using FMs 'REUSE_ALV_VARIANT_DEFAULT_GET' , 'REUSE_ALV_VARIANT_F4'  to get default layout from the SUBMIT program.
    It is not showing the layouts which are in the SUBMIT program when i press F4 in the layouy input field in the selection screen of the main program.
    Can anyone help in this regard?
    Thank you in advance for ur help.
    Regards,
    Raj

    Hi,
    IN the disvariant parameter are you populating the correct program name..meaning the submitted program name..
    Thanks,
    Naren

  • TS3212 When I try to start Itunes, I get the message" program can't start because MSVCR80.dll is missing from your computer - try reinstalling the program".  When I try to reinstall I get the message Error 7 (Windows Error 126) - can you help me?

    When I try to start iTunes, I get the message "program can't start because MSVCR80.dll is missing from your computper.  Try reinstalling the program."  When I try reinstalling, I get the message Error 7 (Windows Error 126)
    Can you help me?????

    Hello Charleen,
    It sounds like you are unable to reinstall iTunes because of this error message 7. I recommend the troublehsooting found in the following article that mentions that error named:
    iTunes 11.1.4 for Windows: Unable to install or open
    http://support.apple.com/kb/TS5376
    "iTunes was not installed correctly. Please reinstall iTunes. Error 7 (Windows Error 126)”
    Follow these steps to resolve the issue:
    Check for .dll files
    Go to C:\Program Files (x86)\iTunes and C:\Program Files\iTunes and look for .dll files.
    If you find QTMovie.DLL, or any other .dll files, move them to the desktop.
    Reboot your computer.
    Note: Depending on your operating system, you may only have one of the listed paths.
    Uninstall and reinstall iTunes
    Uninstall iTunes and all of its related components.
    Reboot your computer. If you can't uninstall a piece of Apple software, try using the Microsoft Program Install and Uninstall Utility.
    Re-download and reinstall iTunes 11.1.4.
    Thank you for using Apple Support Communities.
    Take care,
    Sterling

  • How can I allow a sub-vi to run independent of the main program once it has been called while still sending data to the sub-vi

    I have a main program where I call a sub-vi. In this sub-vi, there is a while loop that is used to wait for commands in the sub-vi. While the while loop is running, I cannot continue with normal operation of the main program. I would like get the sub-vi to run independently once it has been called, but not hold up the main program. As well, I need to still be able to send data to the sub-vi

    One way is to use VI Server, which has been mentioned by others. This will allow you to start another VI (by name) and run it entirely independently of the calling VI. This is a good way to start various independent VIs from a main menu, for example. None of the VIs thus called need have any connection to the others.
    Another way it to have the SubVI in a separate while loop on the calling VI's BD. Then, use a local var to start this sub VI from the main loop. The calling VI sets a local START bit and continues running. The sub VI's while loop watches for this START bit to go true, and then runs the Sub VI. The advantage here is that one can more easily pass arguments to the SubVI when it is started, using local vars, which are preferable to globals. Once the Su
    bVI is running, however, you must use a global Stop Bit, set in the calling VI, to stop it when the calling VI exits, or the calling VI will hang up, waiting for the Sub VI to close and exit its while loop.
    If you need an example of this, email me. ([email protected]). I can also recommend Gary W. Johnson's excellent book which discusses this. ("LabVIEW Graphical Programming", 2nd Ed).
    Note: Where possible, I try to call a subvi from within the main VI, wait till it is done, then continue. It avoids the use of locals & globals, and results in cleaner code, with fewer "race" conditions. However, the main VI stops until the subVI is done, hence one should make the subVI modal.

  • How to pass the caught exception in Thread.run back to the main program?

    I have following three Java files (simplified from a real world application I am developing, see files at the end of this posting):
    1. ThreadTest.java: The main program that invokes the Manager.run()
    2. Manager.java: The manager that creates a thread to execute the Agent.run() for each agent
    3. Agnet.java: The run() method can throw Exception
    My goal is twofold:
    1. To execute the run() method of an Agent in a thread (the reason for this is there are many Agents all managed by a Manager)
    2. To catch the exception thrown by Agent.run() in the main program, ThreadTest.main() -- so the main program can alert the exceptions
    My problem:
    Bottomline: I cannot pass the exception thrown by Agent.run() in the Thread.run() back to the main program.
    Explanation:
    The signature of Thread.run() (or Runnable.run()) is
    public void run();
    Since it does not have a throws clause, so I have to try/catch the Agent.run(), and rethrow a RuntimeException or Error. However, this RuntimeException or Error will not be caught by the main program.
    One work-around:
    Subclass the ThreadGroup, override the ThreaGroup.uncaughtException() methods, and spawn the threads of this group. However, I have to duplicate the logging and exception alerts in the uncaughtException() in addition to those already in the main program. This makes the design a bit ugly.
    Any suggestions? Am I doing this right?
    Thanks,
    Xiao-Li "Lee" Yang
    Three Java Files:
    // Agent.java
    public class Agent {
    public void run() throws Exception {
    throw new Exception("Test Exception"); // Agent can throw execptions
    // Manager.java
    public class Manager {
    public void run() throws Exception {
    try {         // <===  This try/catch is virtually useless: it does not catch the RuntimeException
    int numberOfAgents = 1;
    for (int i = 0; i < numberOfAgents; i++) {
    Thread t = new
    Thread("" + i) {
    public void run() {
    try {
    new Agent().run();
    } catch (Exception e) {
    throw new RuntimeException(e); // <=== has to be RuntimeException or Error
    t.start();
    } catch (Exception e) {
    throw new Exception(e); // <== never got here
    // ThreadTest.java
    public class ThreadTest {
    public static void main(String[] args) {   
    try {
    Manager manager = new Manager();
    manager.run();
    } catch (Throwable t) {
    System.out.println("Caught!"); // <== never got here
    t.printStackTrace();

    The problem is, where could you catch it anyway?
    try {
    thread.start();
    catch(SomeException e) {
    A thread runs in a separate, er, thread, that the catch(SomeException) isn't running within. Get it?
    Actually the Thread class (or maybe ThreadGroup or whatever) is the one responsible for invoking the thread's run() method, within a new thread. It is the one that would have to catch and deal with the exception - but how would it? You can't tell it what to do with it, it (Thread/ThreadGroup) is not your code.

  • PeopleCode - commit/rollback subprogram without committing or rolling back the data in the main program

    Hi,
    Is there a way in PeopleSoft/PeopleCode to do some database transactions in a subprogram (peoplecode function or method in Application Package) and commit that transaction without committing the things that are happening in the main program?
    you can compare it with a "autonomous_transaction" ( http://docs.oracle.com/cd/B19306_01/appdev.102/b14261/autonotransaction_pragma.htm ) / ( http://oracle-base.com/articles/misc/autonomous-transactions.php )
    or with what is happening in the database when using "GetNextNumberWithGapsCommit"
    or what happens when you turn on the logging in PeopleTools > Integration Broker > Integration Setup > Routingyou put a button on a page and write some PeopleCode on the FieldChange
    you first do a update statement with sqlexec
    you call the webservice (data is inserted in the PSIBLOGDATA and PSIBLOGINFO and committed)
    you generate a "Error" in PeopleCode
    => result: the update from the sqlexec is not committed, but the logging data (PSIBLOGDATA and PSIBLOGINFO) IS committed
    Kind regards, Bart

    Hi,
    Please take a look at the javadoc for the following BC4J API:
    ApplicationModule.passivateStateForUndo(String, byte[], int)
    ApplicationModule.activateStateForUndo(String, int)
    These APIs may not however be used to manage a DB savepoint -- they assume that all state is managed by the BC4J transaction.
    Hope this helps,
    JR

  • 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.

  • 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

  • On shut down I always get the message Program Not Responding. This happened before I installed Firefox. It does not pose a problem, that I know of but it does concern me.

    On shut down I always get the message Program Not Responding. This happened before I installed Firefox. It does not pose a problem, that I know of, but it does concern me because I always have to End Program manually when I get this message.
    == Over a year ago.

    Can you attach a screenshot?
    *http://en.wikipedia.org/wiki/Screenshot
    *https://support.mozilla.org/kb/how-do-i-create-screenshot-my-problem
    Use a compressed image type like PNG or JPG to save the screenshot.
    Reload web page(s) and bypass the cache to refresh possibly outdated or corrupted files.
    *Press and hold Shift and left-click the Reload button.
    *Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
    *Press "Command + Shift + R" (MAC)
    Clear the cache and the cookies from sites that cause problems.
    "Clear the Cache":
    *Firefox/Tools > Options > Advanced > Network > Cached Web Content: "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Firefox/Tools > Options > Privacy > Cookies: "Show Cookies"
    SeaMonkey

  • How do I get the calling program?

    Hi,
    I have been using a function module for a long time which is called by quite a number of programs. Now I want it to react differently dependent on the calling program.
    I could use a new optional parameter of course transferring the program id. In that case I have to change quite a number of programs.
    I was just wondering if there is a possibility to get the information of the calling program on the fly. (In the debugger you can find your calling program easily in the 'call stacks'). Does anyone know how to retrieve this information?
    Thanks in advance.
    Regards Johannes

    Hi,
    I am quite overwhelmed by the amount of answers.
    Actually ufortunately neither of the solutions offered solve my problem.
    1.) sy-cprog gives the name of the main program and not the name of the module/include/method that has called my function.
    2.) The function 'RS_EU_CROSSREF' was unknown to me. It is very interesting but it is a cross reference und shows all calling programs and not the one that was actually calling the function.
    Does anyone has got any other ideas?
    Regard Johannes

  • How to get the values of Select-options from the screen.

    The value of parameter can be obtained by function module 'DYNP_VALUES_READ' but How to get the values of Select-options from the screen? I want the F4 help values of select-options B depending on the values in Select-option A.So I want to read the Select-option A's value.

    Hi,
    Refer this following code..this will solve your problem...
    "Following code reads value entered in s_po select options and willprovide search
    "help for s_item depending upon s_po value.
    REPORT TEST.
    TABLES : ekpo.
    DATA: BEGIN OF itab OCCURS 0,
    ebelp LIKE ekpo-ebelp,
    END OF itab.
    SELECT-OPTIONS   s_po FOR ekpo-ebeln.
    SELECT-OPTIONS s_item FOR ekpo-ebelp.
    INITIALIZATION.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_item-low.
      DATA:
      dyn_field TYPE dynpread,
      temp_fields TYPE TABLE OF dynpread,
      zlv_dynpro TYPE syst-repid.
      zlv_dynpro = syst-repid.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname     = zlv_dynpro
          dynumb     = syst-dynnr
          request    = 'A'
        TABLES
          dynpfields = temp_fields
        EXCEPTIONS
          OTHERS     = 0.
      LOOP AT temp_fields INTO dyn_field.
        IF dyn_field-fieldname EQ 'S_PO-LOW'.
            SELECT * INTO CORRESPONDING fields OF TABLE itab FROM ekpo
            WHERE ebeln EQ dyn_field-fieldvalue.
            EXIT.
        ENDIF.
      ENDLOOP.

  • Issue in connecting sub VI programs through the main program

    Sir/Madam,
                       I have made a few sub VI  programs of 'Keithley 2400', but I am having problem in connecting them together through the main program. Actually the created sub VI programs are not showing  any activation button when I connect 'action.vi' file in 'read.vi' file (attachted). 
    Please give suggestions.
    Regards
    Yachika Manglik
    Solved!
    Go to Solution.
    Attachments:
    action.vi ‏24 KB
    read.vi ‏14 KB
    write.vi ‏24 KB

    Hello
    Thanks for your suggestion.
    I have successfully implemented connections in my code according to your given suggestion .
    Now I am facing problem to link a file named 'control1.ctl'(attached) that I have made for selecting option 'select type of action' and need to add' control1.ctl' in  'read.vi' file. It is showing  following error( below).
    Error: " required input ' GPIB action' is not wired.
                     OR
               "Enumeric conflict"
    So can you please suggest how this error can be removed?
    Attachments:
    Control 1.ctl ‏5 KB
    read.vi ‏13 KB

  • If I have 2 tv's and each their own apple tv can I display the same program to them from my macbook at the same time?

    If I have 2 tv's and each their own apple tv can I display the same program to them from my macbook at the same time?
    for instance Keynote?

    Welcome to the Apple community.
    The Apple TV cannot display keynote presentations or websites from the computer. It can display them via mirroring from the iPad 2 or better or the iPhone 4S.
    You cannot AirPlay to 2 Apple TV 2's at the same time from an iOS device. You can watch the same video, TV show or listen to the same music from your iTunes library on multiple Apple TV's at the same time.

  • How to get the number of community members from outside the community

    Hi everyone.
    I need to know if there is any way to get the number of community members from outside the community, I mean, not using the "What's happening" webpart. I want to build up a page with a Webpart that summarize my three most visited communities indicating
    number of members, three last messages in the newsfeed, and number of posts in blog, wikis, document libraries, etc.
    Do I need statistics to get this kind of information? Should I use Sharepoint Object model instead?
    Here is an example of what I need:
    - Community name
    - Number of members
    - Community activity (messages, docs uploaded to library, etc)
    - Number of posts in calendar, blog, wiki that belongs to community
    Thank you all!

    Hi Thuan.
    Thanks for your answer but it does not help me because these communities are Sharepoint Communities not external sites so I need to get that information using SP object model and BCS in this case is useless.
    EDIT
    I found the solution using the search objects but I was only able to get members, discussions and replies
    using (ClientContext clientContext = new ClientContext("URL_OF_ENTERPRISE_SEARCH_CENTER"))
    KeywordQuery keywordQuery = new KeywordQuery(clientContext);
    keywordQuery.QueryText = "The_Name_of_the_Community WebTemplate:COMMUNITY";
    SearchExecutor searchExecutor = new SearchExecutor(clientContext);
    ClientResult<ResultTableCollection> results = searchExecutor.ExecuteQuery(keywordQuery);
    clientContext.ExecuteQuery();
    System.Collections.Generic.IDictionary<string, object> ret = null;
    foreach (System.Collections.Generic.Dictionary<string, object> resultRow in results.Value[0].ResultRows)
    Console.WriteLine("{0}: {1} ({2})", resultRow["CommunityMembersCount"], resultRow["CommunityTopicsCount"], resultRow["CommunitiyRepliesCount"]);
    This is a Console Application.
    I hope someone helps

  • Is it possible to get the position of a charcter from a string ?

    Hi !
    Is it possible to get the position of a charcter from a string ?
    Example:
    @VAR contains the following text "ABCDEFGHIJKLM"
    I'am seaching for FGH, it start on pos. 6 en ends on pos 8.
    How can I get these numbers 6 and 8 ?
    So, I can use them in the MID(text,start,len) function.
    Thanks!

    Hi Sooraj,
    I'll explain more in detail:
    From a web-service I get a variable called @Spec.
    This variable contains the following:
    "MOTORTYPE[CR]D-QW1234[LF]PART[CR]1234-FRD-X[LF]"
    or
    "MOTORTYPE[CR]ABC[LF]PART[CR]E-435[LF]"
    I need the values behind MOTORTYPE[CR] and behind PART[CR]
    But you’ll see that the positions of these values are different each time.
    If there is a way to get the (start) position of "MOTORTYPE[CR]" or "PART[CR]" and the (end) position of the first "[LF]" behind that,
    then I could use the MID() function to get the correct values.
    The values will be displayed in a table view (between other fields).
    An ABAP-call/function won’t work . . . how should I invoke this within a table column/field object ? (system action ?)

Maybe you are looking for

  • Ipod touch 5th gen steering wheel controls

    Hi, I have an Ipod touch 5th gen running ios 7.1.1 and a Pioneer x3600dab car stereo. I cannot change track using my steering wheel.  Volume works. This is the same with Bluetooth connection and direct via USB. Has anyone found a work around for this

  • Problem with date format convertion

    Dear All, i want to convert the current system date to particular format that i have specified below in SimpleDateFormat but when ever i exceute my program it comes in different format could you help me to solve the problem DateFormat sdf = new Simpl

  • Rating tracks locks up

    If I double click select on my iPod and rate a track it seems to lock up in ratings mode. I can rate one track but then any other track I visit, I'm locked into ratings mode and using the wheel does nothing. I just see blank stars. Do I need to press

  • Importing requisitions using XML...

    We have an external system from which we need to import requisitions into Oracle. We would like to use XML. Is there a document describing the correct XML document format for Oracle?

  • Query language

    Hi, Does Oracle Corp. has plans to implement a language that allows to query XML data? Something like XQL proposal. That would be a great addition to XML utilities. While XSLT provides static XML transformation feature, a query languge is going to ad