Callling an standard program and return back

Hi all,
I am coding an  Zprogram in that i have to call an Standard Program ( ex:- SAPMF02K) and after executing that standard program again i have to come back and execute my remaining Zprogram .
How can i do this.
Regards
Ajay

Hi,
Use SUBMIT AND RETURN
That is , u can do...
SUBMIT SAPMF02K AND RETURN.
Chk the following link.....
http://www.sapdevelopment.co.uk/reporting/rep_submit.htm
Regards.
Edited by: Iyswarya  Godi on Jul 9, 2008 7:16 AM
Edited by: Iyswarya  Godi on Jul 9, 2008 7:16 AM

Similar Messages

  • How To call a Tcode From a Program and returning back ?

    Dear All,
    I have a requirement, i have to show all the open orders as in the the tcode va05  and return back to the my program. so how to display the tcode and getting back to my program. please help?

    Hi,
    Basic syntax to call the transaction is:
    SET PARAMETER ID <id name> FIELD <filedname>.
    CALL TRANSACTION <TCOde> AND SKIP FIRST SCREEN.
    If your are using ALV then snippet is :
    FORM user_command  USING okcode    LIKE sy-ucomm
                           lselfield TYPE slis_selfield.
      CASE okcode.
        WHEN '&IC1'. " SAP standard code for double-clicking
          CASE lselfield-sel_tab_field."check if double click is only on
            WHEN 'ITAB-AUFNR'."aufnr not on any other field
              SET PARAMETER ID 'ANR' FIELD lselfield-value.
              CALL TRANSACTION 'IW32' AND SKIP FIRST SCREEN.
          ENDCASE.
      ENDCASE.
    Endform.
    Pooja

  • How to call an alv report from another program and return back

         Hello ,
    I am calling one abap program (Prgm B) from another program (Prgrm A).
    Here, Prgm B is an ALV report. I have fetch some data from Prgem B that gets stored in an internal table.
    Now, I am using below code in Prgrm A,
      SUBMIT Prgrm B VIA SELECTION-SCREEN
                          WITH SELECTION-TABLE rspar
                          EXPORTING LIST TO MEMORY
                          AND RETURN.
    When Prgrm A executed, it lead me to selection screen of Prgrm B and when I click F8, it shows me the report output, In short, it doesnt return back to Prgrm A. It ends up showing me the alv report if Prgrm B even afetr using RETURN statement.
    I want to get back to Prgrm A by fetching some data from Prgrm B.
    Please let me know, if i am missing something.
    Regards,
    Seema

    Hi Seema,
    Refer below code.
    DATA: v_matnr LIKE mara-matnr.
    DATA: t_listobject TYPE abaplist OCCURS 0 WITH HEADER LINE.
    DATA: t_mara TYPE mara OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF t_ascilist OCCURS 0,
             line(200).
    DATA: END OF t_ascilist.
    data var(3) type c.
    SELECT-OPTIONS: s_matnr FOR v_matnr.
    var = '  3'.
    START-OF-SELECTION.
       SUBMIT ztestaks1 WITH s_matnr IN s_matnr EXPORTING LIST TO MEMORY
       AND RETURN.
       CALL FUNCTION 'LIST_FROM_MEMORY'
            TABLES
                 listobject = t_listobject
            EXCEPTIONS
                 not_found  = 1
                 OTHERS     = 2.
       IF sy-subrc <> 0.
         MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                 WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
       ELSE.
         CALL FUNCTION 'LIST_TO_ASCI'
    *     EXPORTING
    *       LIST_INDEX               = -1
    *       WITH_LINE_BREAK          = ' '
           TABLES
             listasci                 = t_ascilist
             listobject               = t_listobject
           EXCEPTIONS
             empty_list               = 1
             list_index_invalid       = 2
             OTHERS                   = 3.
         IF sy-subrc <> 0.
           MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                   WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
         ELSE.
           WRITE:/ 'Below are the lines from the submitted program.'.
           LOOP AT t_ascilist.
             WRITE:/ t_ascilist-line.
           ENDLOOP.
           SKIP 2.
         ENDIF.
       ENDIF.
       IMPORT t_mara FROM MEMORY ID 'T_MARA'.
       WRITE:/
    'Here is the output from the table exported from the submitted program.'
       LOOP AT t_mara.
         WRITE:/ t_mara-matnr.
       ENDLOOP.
    Submitted program
    REPORT  ZTESTAKS1.
    DATA: v_matnr LIKE mara-matnr,
           v_maktx LIKE makt-maktx.
    DATA: t_mara TYPE mara OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF t_makt OCCURS 0,
             matnr LIKE makt-matnr.
    DATA: END OF t_makt.
    SELECT-OPTIONS: s_matnr FOR v_matnr,
                     s_maktx FOR v_maktx.
    START-OF-SELECTION.
       SELECT matnr INTO TABLE t_makt
                    FROM makt
                   WHERE matnr IN s_matnr
                     AND maktx IN s_maktx.
    if not t_makt[] is initial.
       SELECT * FROM mara
                INTO TABLE t_mara FOR ALL ENTRIES IN t_makt
               WHERE matnr = t_makt-matnr.
    endif.
       EXPORT t_mara TO MEMORY ID 'T_MARA'.
       WRITE:/ 'This list is from the submitted program'.
       SKIP 1.
       LOOP AT t_mara.
         WRITE:/ t_mara-mtart.
       ENDLOOP.
    Hopes this helps you.
    Thanks,
    Ashok.

  • My Ipad turns off programs and goes back to startpage.

    I have an iPad ( 1 ) the oldest type. It has always got the last upgrade of iOS but more and more often my iPad turns off programs and goes back to startpage of iPad.
    What can I do ?

    1. Double-click the Home button to close all Inactive Apps in Task Bar
    2. Hold the Apps in Task Bar down for a second or two until you see the minus sign
    3. Tap the minus sign to close App
    4. Tap center of screen to return to Home Screen
    5. Reset iPad. Hold the Sleep and Home button down for about 10 second until you see the Apple logo. Ignore the red slider

  • Remove latest macbook update "yosemite" and return back to "maverick"

    Hi,
    I have just updated my macbook pro to the new software "Yosemite", now my drawing program, AutoCAD does not open...
    I really need this program for work... Is there anyway i can remove this update and return back to my original system, (maverick) i think it was...
    Thankyou in advance
    Greg

    If you have a complete backup or clone of your Mac before you installed Yosemite, you can erase the Mac and restore the backup.

  • Customer Statement (Standard Program and Scripts)

    Hi All ABAPers,
    Can anyone tell me the standard programs and their tcodes used for Customer statement with the smartform and sap script names?

    Custom statement Prog Name: RFKORD11
    Script name: F140_CUS_STAT_01 & F140_CUS_STAT_02
    Statements would be printed via FBL5N.
    Edited by: Alexander on Jul 1, 2009 12:00 PM

  • If I buy an unlocked iphone 6 in the uk and have a uk sim card in it initially, will i be able to use my german sim card in it when i'm in germany and return back to my UK sim card on my return?

    If I buy an unlocked iphone 6 in the uk and have a uk sim card in it initially, will i be able to use my german sim card in it when i'm in germany and return back to my UK sim card on my return?

    Yes. But make sure you buy it at an Apple Store. Other stores selling SIM free iPhones will sell those that will usually lock to the carrier whose SIM is used to first activate the phone. Then you will be stuck.

  • TS1702 Why My iPhone 4s close most of my apps when i opened them immediately and return back to home screen

    Why My iPhone 4s close most of my apps when i opened them immediately and return back to home screen ?
    What is the problem and how can i fix it ?

    Download a free app and see if that helps, you can delete the app later if you do not want it.

  • Call transaction MMBE from another program and press Back button

    Hello,
    I have program that is used as a 'launch pad' for some of our heavily used transactions. When I call the main 'launch pad' program, the user will select a button and a Call Transaction MMBE is initiated (USING the first screen). The user selects a material for display and presses the execute button (F8). The material overview is displayed correctly.  When the user presses the Back button (F12), transaction returns all the way back to the first called program and not to the first screen for transaction MMBE as expected.
    Does anyone know how I can change the screen flow and go back to the fist screen of MMBE and not the screen of the first called program?
    Regards,
    RC

    Rod,
    In your case i think it is not possible as it is standard functionality by SAP.
    Try work around, may be modification to the program will work.
    Regards,
    Amey

  • Call program and return with data

    Hi, Experts,
    I have called a program from my main program using SUBMIT
    and return.
    I need to get data back from called program in table format.
    Is there any way to fullfill such requirement.
    Regards
    Rajiv singh.

    if the program is custom , then you can use import and export  option. you can export the data to memory in the submit program, and import from memory after submit call.
    if it Standard program , in some standard programs also will export data to memory , so check in inside the program.

  • CALL A TRANSACTION  IN SIMPLE REPORT AND RETURN BACK TO REPORT

    I 'VE A REQUIREMENT IN WHICH I HAVE TO MAKE A REPORT PROGRAM. IN THIS REPORT PROGRAM I HAVE TO CALL A TRANSACTION cs11 IN BACKGROUND AND THEN PICK ITS OUTPUT VALUE (DISPLAYED IN alv GRID OF cs11) AND THEN RETURN BACK TO MAIN PROGRAM. DO SOME CALCULATION WITH THE BROUGHT DATA AND THEN DISPLAY THEM ON THE REPORT alv OUTPUT.
    iS THIS POSSIBLe? IF YES? HOW.
    PLEASE HELP.

    try creating two reports.....ztest_a and ztest_b
    do your call transaction in ztest_b
    in ztest_a you can write submit ztest_a and return....
    see if this works...
    Message was edited by:
            Priyank Jain

  • Executing Java CGI Program and Returning Result to Browser

    Hi all, I'm an experienced ASP/PHP/JS programmer but completely new to Java. I'm building a site where I need to execute the same piece of code in every language I can manage, and I'm onto Java. For the purpose of illustration, my goal is to replicate the following PHP code as Java code:
    <?php echo($_GET['message']); ?>I've written and compiled a "Hello World!" application and uploaded it to my server (Dreamhost shared hosting, Linux platform with JDK installed). Using this line form telnet, the application prints "Hello World!" to the screen:
    java -classpath . helloworld.classSo, following a very old tutorial I found online, I created a CGI script and CHMOD'd it to 755 containing the following:
    #!/usr/sh /usr/bin/java -classpath . regex.classBut this returns a 500 "Internal server error". After a few unsuccessful alterations I tried to emulate the CGI script in PHP like so:
    <?php exec('java -classpath . regex', $output); echo(join($output, '<br />')); ?>But all I get back from that is "Error occurred during initialization of VM. Could not reserve enough space for code cache".
    Any advice would be very much appreciated. I can learn the Java language - there's plenty of resources available for that, but I'm struggling to get started because I can't get the application to run as CGI.
    Many Thanks,
    -William

    wwarby wrote:
    Hi, and thanks for the responses.
    paulcw, my ultimate goal is obviously a little more ambitious than printing "Hello World!" to the browser but for simplicity's sake I thought I'd start there. I tried this in a .cgi file:
    #!/bin/sh
    /usr/local/dh/java -version...and I still get a 500 internal server error. I have uploaded the script in ASCII mode and CHMOD'd it to 755, and checked with my host that I have the Java path correct (I've also tried just "java" and "/usr/bin/java" which do the same thing).Well that's because you're confusing running Java generally vs running it as a CGI vs running ANYTHING as a CGI. The web server expects CGI scripts to send certain content to standard output, and in a certain format. Generally speaking it's headers, then a blank line, then other content.
    Furthermore, I think you might be confusing executing arbitrary code from PHP vs executing a CGI script. I'm not familiar with PHP but the way you called exec suggests to me that it can run arbitrary code and doesn't expect the output to necessarily be in CGI format.
    You've got to do things one step at a time here.
    spoon_, the #!/usr/sh" thing was a mistake on the forum post - in the script it is "#!/bin/sh" and it is on a line of it's own. The full .cgi file is now:
    {code}#!/bin/sh
    /usr/local/dh/java -classpath . hello{code}
    And the .java file is now:
    {code}class hello {
         public static void main(String args[]) {
              System.out.println("Content-type: text/html");
              System.out.println();
              System.out.println("Hello World!");
    }{code}
    as per your instructions. I compliled it on the server using javac, and when I run:
    {code}java -classpath . hello{code}
    in telnet, it returns:
    {code}Content-type: text/html
    Hello World!{code}
    to the telnet window. Unfortunately when run from the CGI script I still get the 500 Internal server error.Have you checked your web server logs?
    I'm going to guess here that your web server doesn't have permission to run the JVM executable.
    That's an interesting path: "/usr/local/dh". What does "dh" stand for?
    My server definitely supports Java (version 1.5.0_02) and CGI - it says so on their Wiki and specifically mentions Java as one of the languages that CGI scripts can use. What am I doing wrong?
    Edited by: wwarby on Dec 25, 2007 1:30 AMCheck your web server logs. There should be both an access log and an errors log. The errors log will probably contain more information.

  • How to submit a page and return back to originating page?

    I have two form pages. The first page gives a error message and also gives second page url to go to fix the error. The url also sets the return page on page 2, so that after submit the changes, the user can come back to first page automatically. I have created branch on second page and gave return page item and flow works fine, but does not save changes on second page. How can I save the changes and go back to first page automatically. any ideas are appreciated.
    Thanks,
    Surya

    I have two form pages. The first page gives a error message and also gives second page url to go to fix the error. The url also sets the return page on page 2, so that after submit the changes, the user can come back to first page automatically. I have created branch on second page and gave return page item and flow works fine, but does not save changes on second page. How can I save the changes and go back to first page automatically. any ideas are appreciated.
    Thanks,
    Surya

  • I would like to delete this program and go back to yahoo home page.

    I just want to delete firefox and go back to my yahoo home page. I cannot understand this program and I cannot get my bookmarks back that have all my bill information.

    In order to set up your Yahoo page as your Home Page, refer to this help article on "[https://support.mozilla.com/en-US/kb/How%20to%20set%20the%20home%20page?s=home+page&r=0&as=s How to Set Up a Home Page]".
    Not sure how you lost your Bookmarks, but this help article on "[https://support.mozilla.com/en-US/kb/Lost%20Bookmarks?s=recovering+bookmarks&r=0&as=s Lost Bookmarks]" may help.

  • How to get Spool Number after submtting the program and return

    Hi All,
    Could you please assist me on this issue. I have ABAP program which will create a spool number and this spool number is generated by submitting the same report. Now when try to retrive the spool number from sy-spono it is displaying as 000000 but it suppose to be the spool which is created during submit program. COuld you please assist me on this issue. I have added the part of code for your reference,
    DATA: l_params TYPE pri_params,
    l_valid TYPE string,
    w_spool_nr like sy-spono,
    p_m_werks like marc-werks.
    export p_werks to memory id 'P_WERKS'.
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
    IMPORTING
    out_parameters = l_params
    valid = l_valid
    IF sy-subrc <> 0.
    ENDIF.
    import p_werks from memory id 'P_WERKS'.
    p_m_werks = p_werks.
    SUBMIT zmmlist01 with p_werks eq p_m_werks
    to SAP-SPOOL
    spool parameters l_params
    without spool dynpro and return.
    write: sy-SPOno.
    Thanks & Regards,
    Nagaraj Kalbavi

    Hi,
    You can use the code snippet as below :
    SELECT MAX( RQIDENT ) INTO G_SPOOL_NUM
    FROM TSP01
    WHERE RQCLIENT = SY-MANDT AND
    RQOWNER = SY-UNAME.
    Also you can use the FM RSPO_FIND_SPOOL_REQUESTS' and pass the relevant parameters to this FM. This should get you the desired results.
    Hope this would be of some help!!
    Regards,
    Lalit Kabra

Maybe you are looking for

  • Installing the Business Content Objects from R/3 in to BW

    From R/3 system with RSA5 (Installation DataSource from Business Content), I have selected 0PF_FUND_ATTR (Pension Fund in Personnel Management) and clicked the 'Transfer DataSource' and it was successful. Then I have logged on to BW and 'Replicated t

  • Good old IE 6!!!

    Good old IE 6, still a solid 25% of people using it and still doing my head in! Could you take a look here in IE6: Website Here Problem is #sidebar1 is not floating correctly and pushing my #mainContent down the page. Can you help. Thanks, Richard

  • Big Problem- can anyone help me?

    Today, my iBook started to act goofy. It would work about 5-10 minutes, then it would freeze up. I would restart it by using ctrlcmdpower. I would log in, and about 10 minutes later, the computer would freeze up again. I regularly ran disk utility. I

  • InDesign is missing in the Creative Cloud desktop application

    no se aparece la descarga de InDesing en mi panel

  • Second monitor only shows when I  open PPRO a second time.

    CS5 WIN7 - 64 Pro Looking for a suggestion /solution  to an issue I have had for some while. I have the latest Nvidia Drivers for QuadroFX3800 but the issue began at least two previous versions ago. I open PPRO and it does not see the second monitor.