Calling a Transaction from a Program

Hi all.
I need to call transaction VT70 and VL71 from a Program and print the Output ZBOL and ZPCK resp.(ZBOL and ZPCK are ouput types)
So how to call TCODEs from Program and print them
Thanks in Advance,
Balaji

Hi,
Use call transaction statement to call the required transaction and pass the data to the transaction using SPA/GPA parameters.
parameter id can be taken from the dataelement from the dictionary.
Reward.

Similar Messages

  • Call SXPG _ CALL _ SYSTEM from ABAP program

    Hi,
    Someone may help me?  I need to call the function module SXPG _ CALL _ SYSTEM from ABAP program for to encrypt a file.
    I created the command by SM49 , but I don't know how I can call it from ABAP program.
    Thanks
    Maria C

    Hi Maria.
    This is a possible code you can use:
    DATA: log LIKE TABLE OF btcxpm WITH HEADER LINE.
    Can contain STDOUT, STDERR
    commandname =
    CALL FUNCTION ‘SXPG_CALL_SYSTEM’
    IMPORTING
      COMMANDNAME = commandname
      PARAMETERS = parameters
    EXPORTING
    STATUS = status
      TABLES
      EXEC_PROTOCOL = log
    EXCEPTIONS
      NO_PERMISSION = 1
      COMMAND_NOT_FOUND = 2
      PARAMETERS_TOO_LONG = 3
      SECURITY_RISK = 4
      WRONG_CHECK_CALL_INTERFACE = 5
      PROGRAM_START_ERROR = 6
      PROGRAM_TERMINATION_ERROR = 7
      X_ERROR = 8
      PARAMETER_EXPECTED = 9
      TOO_MANY_PARAMETERS = 10
      ILLEGAL_COMMAND = 11
      OTHERS = 12.
    The following are the comments of the parameters taken from:
    http://help.sap.com/saphelp_40b/helpdata/en/fa/0971ee543b11d1898e0000e8322d00/content.htm
    Parameters
    IMPORTING Parameters
    Parameter name
    Use
    COMMANDNAME
    The name of the definition of the external command, as specified in the maintenance function (transaction SM69).
    PARAMETERS
    Arguments for the external command as specified by the definition in the R/3 System and by the calling program or user.
    These arguments are checked for impermissible characters, such as the ; under UNIX. Problems are registered with the SECURITY_RISK exception.
    EXPORTING Parameters
    Parameter name
    Use
    STATUS
    Returns the final status of the execution of the external command:
    · Value ‘O’: The external command was started and ran to end successfully.
    · Value ‘E’: An error occurred; the external command was not run successfully.
    Tables Parameters
    Parameter name
    Use
    EXEC_PROTOCOL
    Contains the STDOUT and STDERR output of the external command and any output from the target host system.
    Exceptions
    Exception name
    Meaning
    X_ERROR
    Reserved for future use.
    NO_PERMISSION
    The AUTHORITY-CHECK of the user’s authorization for the authorization object S_LOG_COM failed. The user is not authorized to carry out the command named with the specified arguments on the target system.
    COMMAND_NOT_FOUND
    Command name, as identified by COMMANDNAME and OPERATINGSYSTEM, has not been defined in the maintenance function (transaction SM69).
    PARAMETERS_TOO_LONG
    The combined argument string (ADDITIONAL_PARAMETERS and the DEFINED_PARAMETERS, as returned in ALL_PARAMETERS) exceeds the limit of 128 characters in length.
    SECURITY_RISK
    Either:
    · The command contains impermissible characters. These are characters with potentially dangerous properties, such as ; under UNIX.
    · The command definition specifies that an extra-check function module be run. This function module has rejected execution of the command.
    WRONG_CHECK_CALL_
    INTERFACE
    The command definition specifies that an extra-check function module is to be run. Either this function module is missing, or the interface defined for this function module does not match that of the standard R/3 function module SXPG_DUMMY_COMMAND_CHECK. For more information, please see SXPG_DUMMY_COMMAND_CHECK: Interface for Extra-Check Function Modules.
    TOO_MANY_PARAMETERS
    The command definition specifies that user-specified arguments for the external command are not allowed. However, an additional string of command arguments was specified.
    PARAMETER_EXPECTED
    The command definition includes the placeholder character ?, which signifies that additional user-defined arguments are required. However, no additional arguments string was supplied.
    PROGRAM_START_ERROR
    An error occurred while starting the external command. The R/3 system field SY-MSGV1 contains additional information on the problem.
    PROGRAM_TERMINATION_
    ERROR
    An error occurred while trying to obtain the return code of the external program. The R/3 system field SY-MSGV1 contains additional information on the problem.
    ILLEGAL_COMMAND
    The external command definition was modified "illegally". That is, the command was not modified by means of the maintenance function (transaction SM69).
    The modified command is registered in the system log in its substituted form. The message is registered under the system log ID "LC".
    OTHERS
    Catch any new exceptions added to this function module.
    Hope this will be useful.
    Sandro Lombardo

  • Can we call a BDC from REPORT program.

    hi
    can anybody tell me that
    can we call a BDC from REPORT program.
    thanks&regards

    Yes, It can be called.
    Infact you can generate a program from SHDB recording and in the program generated you can put necessary report logic and call the BDC/CALL TRANSACTION as required.
    <b>Please check here for a sample program,</b>
    http://www.sapdevelopment.co.uk/bdc/bdc_ctcode.htm
    Regards
    Kathirvel

  • Possible to call a transaction from a planning book using a macro button?

    Hi All,
    Is it somehow possible to call a transaction using a macro button in the planning book? Also, the current selection should be passed as input parameters to the transaction.
    In my example, I am trying to run the transaction /SAPAPO/MC90 - Release to Supply Network Planning from the Demand Planning  Planning Book/Data View. This way if planners need to change forecasts mid month for specific selections, they can easily transfer to SNP without having to go out of interactive planning.
    Thank you,
    Maria

    Hello Maria,
              It's possible to call a transaction from a planning book using a macro button.
    What you can do is ..... Create a function module and inside it use the command "Call Transaction Tcode"  (ABAPer can do this) to call ur specific transaction. And this module can in turn be called from your macro. Please find the below link which explanis how to call a function module from a macro. Do let me know if you need more information on this.
    Calling a function module from APO Macro
    Regards,
    Siva.

  • Can we call a transaction from a report

    hi
    can we call a transaction from a report

    hi,
    we can call
    check it
    *& Report  ZSALESORDERDETAILS_ASHOK
    REPORT         ZSALESORDERDETAILS_ASHOK
                   NO STANDARD PAGE HEADING
                   LINE-SIZE 50
                   LINE-COUNT 35(5).
    *data declaration.
    tables :vbak.
    tables: VBAP.
    DATA : TVBAK LIKE VBAK  OCCURS 0 WITH HEADER LINE,
           TVBAP LIKE VBAP  OCCURS 0 WITH HEADER LINE,
           TEMP TYPE p decimals 5 VALUE '0.0' ,
           A type i,
           FIELDNAME TYPE STRING,
           FIELDVALUE TYPE VBAP-VBELN.
    DATA G_CB.
    selection-screen  begin of block screen1  with frame title TEXT-001.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN COMMENT /32(35) COMM1.
    SELECTION-SCREEN ULINE /27(35).
    SELECTION-SCREEN SKIP.
    SELECT-OPTIONS TVBELN FOR VBAK-VBELN.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN ULINE.
    SELECTION-SCREEN COMMENT /30(50) COMM2.
    SELECTION-SCREEN ULINE /27(40).
    SELECTION-SCREEN SKIP.
    SELECT-OPTIONS TERDAT FOR VBAK-ERDAT.
    SELECTION-SCREEN SKIP.
    selection-screen  end of block screen1.
    *Initialization
    Initialization .
    TVBELN-low = 4000.
    TVBELN-high = 5000.
    TVBELN-option = 'BT'.
    TVBELN-sign = 'I'.
    APPEND TVBELN.
    TERDAT-low = '19960202'.
    TERDAT-high = '20020302' .
    APPEND TERDAT.
    AT SELECTION-SCREEN .
    SELECT *
           FROM VBAK
           INTO TABLE TVBAK
           WHERE  VBELN IN TVBELN AND erdat IN Terdat .
           IF sy-subrc ne 0.
           MESSAGE 'ENTERED ORDER NOT FOUND' type 'E'.
           ENDIF.
           START-OF-SELECTION.
           REFRESH TVBAK.
           SELECT *
                  FROM VBAK
                  INTO TABLE TVBAK
                  WHERE  VBELN IN TVBELN AND ERDAT IN TERDAT.
            END-OF-SELECTION.
            LOOP AT TVBAK.
                    WRITE: /2 SY-VLINE,
                    TVBAK-VBELN INPUT ON ,
                    15 SY-VLINE,TVBAK-ERDAT hotspot on,
                    30  SY-VLINE, 35 TVBAK-ERNAM,
                    46 SY-VLINE,
                    g_cb AS CHECKBOX.
           ENDLOOP.
           A = SY-LINCT - SY-LINNO - 1.
         SKIP A .
      RESERVE A LINES.
              AT SELECTION-SCREEN OUTPUT.
              comm1 ='SELECT SALES ORDER RANGE'.
              comm2 ='SELECT SALES ORDER CREATION DATE'.
           TOP-OF-PAGE.
           ULINE.
           WRITE /15    '     SALES ORDER REPORT    ' COLOR = 1 .
           ULINE.
           WRITE : /7 '  VBELN  ' COLOR = 5 ,
                   19 '  ERDAT  ' COLOR = 5,
                   34 ' ERNAM  ' COLOR = 5.
            ULINE.
            END-OF-PAGE.
            IF SY-LSIND = 0.
            ULINE.
            WRITE : /2 'NUMBER OF LINE IN THIS PAGE = ', SY-LINNO.
                    SKIP.
            WRITE: /30 'PAGE NUMBER = ', SY-PAGNO.
            ULINE.
            ELSEIF SY-LSIND = 1.
            ULINE.
            WRITE : /12 'TOTAL PRICE = ' ,TEMP.
            CLEAR TEMP.
            SKIP.
            WRITE : /30 'PAGE NUMBER = ', SY-PAGNO.
            ULINE.
            ENDIF.
            at line-selection.
            GET CURSOR FIELD FIELDNAME VALUE FIELDVALUE.
            IF FIELDNAME = 'TVBAK-VBELN'.
            CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
              EXPORTING
                INPUT         = FIELDVALUE
             IMPORTING
                OUTPUT        = FIELDVALUE.
            WINDOW STARTING AT 60 2 ENDING AT 120 25.
            IF SY-LSIND = 1.
            SELECT
                   FROM VBAP
                   INTO TABLE TVBAP
                   WHERE VBELN EQ FIELDVALUE.
            LOOP AT TVBAP.
            TEMP = TEMP + TVBAP-NETPR.
            WRITE :  /2 SY-VLINE, TVBAP-matnr,
                      17 SY-VLINE,TVBAP-VBELN,
                      30 SY-VLINE,TVBAP-NETPR currency 'IN',
                      49 SY-VLINE.
            ENDLOOP.
            ULINE.
            A = SY-LINCT - SY-LINNO - 1.
           SKIP A .
           RESERVE A LINES.
         ENDIF.
            <b>ELSEIF SY-LSIND = 2.
           call transaction 'MM01' .
           ENDIF.</b>
             TOP-OF-PAGE DURING LINE-SELECTION.
              WRITE : /  SY-ULINE,
                      /7 '    DETAIL OF GIVEN SALES ORDER    ' COLOR = 5,
                      /  SY-ULINE,
                      /4 'MATNR',
                      22 'VBELN',
                      35 'NETPR',
                      /  SY-ULINE.
      Regards
    ASHOK
    Message was edited by:
            ASHOK KUMAR

  • Calling SAP Transaction from BSP

    I wonder whether it is possible to call SAP transaction from BSP application and pass to it some data; e.g., PO# when calling VA02?
    The called transaction could appear in a separate MS IE Window (like in some Portal applications) or in SAP GUI.
    Any help will be appreciated.
    Thank you in advance

    I have launched the Java SAPGui from BSP pages before.  I used SNC so that the users were logged on via Single Sign On.  I store the Java Gui in the Mime directory.  You can force the startup transaction.  Theorectically you could also Gui Scripting to try and control the Gui and force in the default value for your PO field.  I have not tried that however.  You will probably want to check the Service Marketplace for documents on the Gui Scripting.  The following is the code from my BSP page to launch the Java Gui in the Browser as an applet:
    <%@page language="abap"%>
    <%@extension name="htmlb" prefix="htmlb"%>
    <HTML>
    <HEAD>
      <TITLE>SAPGUI for the Java Environment</TITLE>
      <STYLE type="text/css">
          body { margin-left:0px; margin-right:0px; margin-top:0px; margin-bottom:0px; }
      </STYLE>
    </HEAD>
    <BODY scroll="no">
    <SCRIPT language="JavaScript">
    // user configurable part starts here
    var pluginurl         = '';
    var scriptable     = 'true';
    var codebase         = '.';
    var jnlp           = 'platin.jnlp';
    var keepalive      = 'true';
    var frog           = 'true';
    var trace          = '';
    var tracefile      = '';
    var connectionData = 'conn=/M/nts163/S/3620/G/SPACE/&tran=SE80&clnt=088&fast=true&sncon=true&sncname=p:[email protected]&sncqop=9';
    // user configurable part ends here
    // verify if Java Plugin as control in Internet Explorer or Java Plugin for Netscape or native JRE of browser must be used
    var jre = 'control';
    if(navigator.platform.indexOf("Mac") > -1)
       jre = 'native';
    else if (navigator.appName.indexOf("Netscape") != -1)
       jre = 'plugin';
    document.open();
    switch (jre)
    case 'control':
        document.writeln('<OBJECT CLASSID  = "clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"                               ');
        document.writeln('    ID       = "PlatinGUI"                                                                    ');
        document.writeln('    CODEBASE = "j2re-1_3_1_02-win-i.exe#Version=1,3,1,0"                             ');
        document.writeln('    WIDTH    = "100%"                                                 ');
        document.writeln('    HEIGHT   = "100%"                                                 ');
        document.writeln('    BORDER   = 0>                                                      ');
        document.writeln('<PARAM NAME = "TYPE"           VALUE = "application/x-java-applet;jpi-version=1.3.1">         ');
        document.writeln('<PARAM NAME = "SCRIPTABLE"     VALUE = "', scriptable,'">                                ');
        document.writeln('<PARAM NAME = "code"           VALUE = "com.sap.platin.GuiApplet2">                   ');
        document.writeln('<PARAM NAME = "codebase"       VALUE = "', codebase,'">                             ');
        document.writeln('<PARAM NAME = "jnlp"           VALUE = "', jnlp,'">                             ');
        document.writeln('<PARAM NAME = "archive"        VALUE = "GuiStartS.jar">                             ');
        document.writeln('<PARAM NAME = "keepalive"      VALUE = "', keepalive,'">                             ');
        document.writeln('<PARAM NAME = "frog"           VALUE = "', frog,'">                             ');
        document.writeln('<PARAM NAME = "trace"          VALUE = "', trace,'">                             ');
        document.writeln('<PARAM NAME = "tracefile"      VALUE = "', tracefile,'">        ');
        document.writeln('<PARAM NAME = "connectionData" VALUE = "', connectionData,'">                               ');
        document.writeln('                                                                ');
        document.writeln('This page requires a Sun Java Plugin 1.3 and a SAPGUI for Java to view.                      ');
        document.writeln('                                                                ');
        document.writeln('</OBJECT>                                                           ');
        break;
    case 'plugin':
        document.writeln('<EMBED TYPE        = "application/x-java-applet;version=1.3"                         ');
        document.writeln('    PLUGINURL      = "', pluginurl,'"                                          ');     
        document.writeln('    WIDTH          = "100%"                                            ');                                        
        document.writeln('    HEIGHT         = "100%"                                             ');
        document.writeln('    ALIGN          = "BASELINE"                                                ');
        document.writeln('    code           = "com.sap.platin.GuiApplet2"                                      ');
        document.writeln('    codebase       = "', codebase,'"                                        ');
        document.writeln('    jnlp           = "', jnlp,'"                                                ');
        document.writeln('    archive        = "GuiStartS.jar"                                       ');
        document.writeln('    keepalive      = "', keepalive,'"                                       ');
        document.writeln('    frog           = "', frog,'"                                            ');
        document.writeln('    trace          = "', trace,'"                                            ');
        document.writeln('    tracefile      = "', tracefile,'"                                       ');
        document.writeln('    connectionData = "', connectionData,'"                                        ');
        document.writeln(' <NOEMBED>                                                      ');
        document.writeln(' </NOEMBED>                                                      ');
        document.writeln(' </EMBED>                                                              ');
        break;
    case 'native':
        document.writeln('<APPLET CODEBASE  = "', codebase,'"                                                           ');
        document.writeln('        ARCHIVE   = "GuiStartS.jar"                                                           ');
        document.writeln('        CODE      = "com.sap.platin.GuiApplet2"                                               ');
        document.writeln('        WIDTH     = "100%"                                                                    ');
        document.writeln('        HEIGHT    = "100%">                                                                   ');
        document.writeln('<PARAM NAME = "SCRIPTABLE"     VALUE = "', scriptable, '">                                    ');
        document.writeln('<PARAM NAME = "jnlp"           VALUE = "', jnlp, '">                                          ');
        document.writeln('<PARAM NAME = "keepalive"      VALUE = "', keepalive, '">                                     ');
        document.writeln('<PARAM NAME = "frog"           VALUE = "', frog, '">                                          ');
        document.writeln('<PARAM NAME = "trace"          VALUE = "', trace, '">                                         ');
        document.writeln('<PARAM NAME = "tracefile"      VALUE = "', tracefile, '">                                     ');
        document.writeln('<PARAM NAME = "connectionData" VALUE = "', connectionData, '">                                ');
        document.writeln('</APPLET>                                                                                ');
        break;
    document.close();
    </SCRIPT>
    </BODY>
    </HTML>

  • Can we call another transaction from the Userexit

    Hi all,
            Can we call another transaction from the Userexit?
    Thanks,
    Balaji

    Hi
    Because the statament CALL TRANSACTION triggers the end of the LUW so COMMIT WORK, so you should be sure not to insert that statament while some updating actions are been doing.
    So that exit shouldn't be triggered while updating
    Max

  • Call sap transaction from java

    can anyone tell me how to call SAP transaction from JCO,
    cheers
    Ajay

    Hi Ajay,
    You should find or create functional module which covers your requrements.
    Best regards, Maksim Rashchynski.

  • Call the BAPI from the program..

    Hey guys,
    can we  call the BAPI from the program..
    if yes how can  we  can show sales orders being loaded..
    thanks its urgent

    Nishant,
    yes easily you can call bapi from program.
    for getting all sales order use:
    BAPI_SALESORDER_GETLIST
    also am providing a program so that you can see how bapi has to call in program.
    CALL FUNCTION 'BAPI_SALESORDER_GETLIST'
                 EXPORTING
                      customer_number    = lf_customernumber
                      sales_organization = if_sales_organization
                      document_date      = lf_document_date_from
                      document_date_to   = lf_document_date_to
    *              PURCHASE_ORDER     = IF_PURCH_ORDER
                      material           = lf_matno
                 IMPORTING
                      return             = ls_return
                 TABLES
                      sales_orders       = sales_orders.
    Am afraid to say you that above solution you get about bapi it is not for showing the list of SO these are for creating SO.
    Edited by: Amit Gujargoud on Jul 3, 2008 3:12 PM

  • How to Call .XDO file From Java Program

    Hi,
    I have developed a report in using BI Publisher version 10.1.3.
    I created the report and it only created XDO files. If I want to call XDO file from Java program how I can do that.
    What are the APIs available to do that.
    Thanks
    -Ashutosh

    Hi,
    the JavaAPI didn't work with the xdo-Files. But you can create a proxy stub for the Web Service API of BI Publisher which uses the xdo's in the repository.
    regards
    Rainer

  • Calling a Transaction from Selection screen of Z Program...

    Hi,
    I am trying to call a Standard transaction from a report when they clicked one push button on selection screen.
    when i used CALL TRANSACTION 'MM01'. When i press save after entering the values in MM01, it is saving and coming out to selection screen of my Z program.
    But my question is when they press in BACK button in MM01 then only it should come out from MM01 and it should display the my Z Program selection screen. suppose if they press SAVE button on MM01 it should save and screen should be MM01 only.
    when i used LEAVE TO TRANSACTION 'MM01'. it is working fine but when i press BACK button from MM01 it is coming out and showing SAP EASY ACCESS screen. My requirement is when i press back button in MM01 then it must come to my Z program selection screen only.
    I hope it is clear.
    Regards,
    Sunny

    >
    sunny_143 wrote:
    > Hi,
    >
    > I am trying to call a Standard transaction from a report when they clicked one push button on selection screen.
    >
    > when i used CALL TRANSACTION 'MM01'. When i press save after entering the values in MM01, it is saving and coming out to selection screen of my Z program.
    >
    > But my question is when they press in BACK button in MM01 then only it should come out from MM01 and it should display the my Z Program selection screen. suppose if they press SAVE button on MM01 it should save and screen should be MM01 only.
    >
    >
    > when i used LEAVE TO TRANSACTION 'MM01'. it is working fine but when i press BACK button from MM01 it is coming out and showing SAP EASY ACCESS screen. My requirement is when i press back button in MM01 then it must come to my Z program selection screen only.
    >
    > I hope it is clear.
    >
    > Regards,
    > Sunny
    I'm not clear about what happens when you press the BACK button.
    First, LEAVE TO TRANSACTION is no help.  That ends your Z program.  CALL TRANSACTION is your only option.  If it doesn't work as you'd like, you're a bit stuck, as MMnn are standard SAP transactions, and you can't modify that. (well, you can, but that's a whole other tin of worms). 
    Perhaps if you told us what you're trying to achieve with the Z program, there might be another approach that will do that.
    matt

  • Calling another transaction in Dialog Programming

    Hello ppl,
    How can I call another transaction(ZPROGRAM2) from my transaction(ZPROGRAM1) using the delivery and the check box options selected in Screen Programming. Should I use BDC.? Also in case of any errors in ZPROGRAM2, the control should return to ZPROGRAM1 with all the previous setting retained.
    Thanks a lot.
    Karthikeyan

    Hi ,
    You can try with BDC as you need to get the control back to the program1.
    If not you can try with the SUBMIT statement.
    ex:-
    SUBMIT zrslg0000  EXPORTING LIST TO MEMORY
                  AND RETURN.
    Regards,
    Satish

  • How to call a transaction from ABAP code

    Hi everybody,
    How do I run a transaction from my ABAP code?
    For example, through my ABAP code, I want to call the ME24 transaction (Maintain Purchase Order).
    Thanks for the help,
    Roy

    CALL TRANSACTION
    Syntax
    CALL TRANSACTION ta { [AND SKIP FIRST SCREEN]
                        | [USING bdc_tab [bdc_options]] }.
    Extras:
    1. ... AND SKIP FIRST SCREEN
    2. ... USING bdc_tab [bdc_options]
    Effect
    The statement CALL TRANSACTION calls the transaction whose transaction code is contained in data object ta. The data object ta must be of character type and must contain the transaction code in uppercase letters. If the transaction specified in ta cannot be found, an untreatable exception is triggered. The additions suppress the display of the initial screen and allow you to execute the transaction using a batch input session.
    At CALL TRANSACTION the calling program and its data is kept, and after exiting the called transaction, processing is resumed in the calling program after the call.
    When the transaction is called, the ABAP program linked with the transaction code is loaded in a new internal session. The session of the calling program is kept. The called program runs in an SAP LUW of its own.
    If the called transaction is a dialog transaction, after loading the ABAP program the event LOAD-OF-PROGRAM is triggered and the dynpro defined as initial dynpro of the transaction is called. The initial dynpro is the first dynpro of a dynpro sequence. The transaction is finished when the dynpro sequence is ended by encountering the next dynpro with dynpro number 0 or when the program is exited with the LEAVE PROGRAM statement.
    If the called transaction is an OO transaction (as of release 6.10), when loading all programs except class pools the event LOAD-OF-PROGRAM is triggered and then the method linked with the transaction code is called. If the method is an instance method, implicitly an object of the corresponding class is generated and referenced by the runtime environment. The transaction is finished when the method is finished or when the program is exited using the LEAVE PROGRAM statement.
    After the end of the transaction call, program execution of the calling program resumes after the CALL TRANSACTION statement.
    Note
    At the statement CALL TRANSACTION, the authorization of the current user to execute the called transaction is not checked automatically. If the calling program does not execute a check, the called program must check the authorization. To do this, the called program must call function module AUTHORITY_CHECK_TCODE.
    Addition 1
    ... AND SKIP FIRST SCREEN
    Effect
    This addition suppresses the display of a screen of the initial dynpro of a called dialog transaction. The addition AND SKIP FIRST SCREEN suppresses the first screen under these prerequisites:
    For the initial dynpro, in the Screen Painter the own dynpro number must not be specified as the next screen number.
    All mandatory input fields of the initial dynpro must be filled completely and with the correct values by the SPA/GPA parameters
    If these prerequisites are met, that screen of the dynpro is displayed that is specified in the Screen Painter as the next dynpro of the initial dynpro.
    Example
    If the static next dynpro of the initial dynpro of the called dialog transaction FLIGHT_TA is not the initial dynpro itself, its screen is suppressed, because its input fields are filled using the SPA/GPA parameters CAR and CON.
    DATA: carrid TYPE spfli-carrid,
          connid TYPE spfli-connid.
    SET PARAMETER ID: 'CAR' FIELD carrid,
                      'CON' FIELD connid.
    CALL TRANSACTION 'FLIGHT_TA' AND SKIP FIRST SCREEN.
    Addition 2
    ... USING bdc_tab [bdc_options]
    Effect
    Use this addition to pass an internal table bdc_tab of row type BDCDATA from the ABAP Dictionary to a dialog transaction. The additions bdc_options control the batch input processing. When a transaction with addition USING is called, the system field sy-binpt is set to value "X" in the called program - while this transaction is running, no other transaction can be called with this addition.
    The internal table bdc_tab is the program-internal representation of a batch input session and must be filled accordingly. The structure BDCDATA has the components shown in the table below.
    Component Description
    PROGRAM Name of the program of the called transaction
    DYNPRO Number of the dynpro to be processed
    DYNBEGIN Flag for the beginning of a new dynpro (possible values are "X" and " ")
    FNAM Name of a dynpro field to be filled or batch input control statement, for example, to position the cursor
    FVAL Value to be passed to the dynpro field or to the control statement
    Using the internal table bdc_tab, you can provide any number of screens of the called transaction with input and user actions.
    System Fields
    sy-subrc Description
    0 The batch input processing of the called transaction was successful.
    < 1000 Error in the called transaction. If within the transaction a message was sent, you can receive it using the addition MESSAGES.
    1001 Error in batch input processing.
    Note
    Outside of ABAP Objects you can specify the additions AND SKIP FIRST SCREEN and USING together. However, this does not make sense, because the addition AND SKIP FIRST SCREEN is desigend only to fill the mandatory input fields using SPA/GPA parameters, while the batch input table specified with USING controls the entire transaction flow including the display of the screens.
    Example
    Call of the Class Builder (transaction SE24) and display of class CL_SPFLI_PERSISTENT. The internal table bdcdata_tab contains the input for the batch input processing of the first dynpro (1000) of the transaction. Using structure opt, the batch input processing is set to suppress the first screen and to display the next screen in the standard size.
    DATA class_name(30) TYPE c VALUE 'CL_SPFLI_PERSISTENT'.
    DATA: bdcdata_wa  TYPE bdcdata,
          bdcdata_tab TYPE TABLE OF bdcdata.
    DATA opt TYPE ctu_params.
    CLEAR bdcdata_wa.
    bdcdata_wa-program  = 'SAPLSEOD'.
    bdcdata_wa-dynpro   = '1000'.
    bdcdata_wa-dynbegin = 'X'.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'BDC_CURSOR'.
    bdcdata_wa-fval = 'SEOCLASS-CLSNAME'.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'SEOCLASS-CLSNAME'.
    bdcdata_wa-fval = class_name.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'BDC_OKCODE'.
    bdcdata_wa-fval = '=CIDI'.
    APPEND bdcdata_wa TO bdcdata_tab.
    opt-dismode = 'E'.
    opt-defsize = 'X'.
    CALL TRANSACTION 'SE24' USING bdcdata_tab OPTIONS FROM opt.

  • Call a Tcode from different program

    Hi frieds,
    How to call a Tcode using a push button in another report.
    Eg:   Tcode =  Ztest.  (for invoice list report, using 
                            the program zinvlist).
          This Ztest should be called in another report
          Zrep1 (program name Zsale) using the push button.
    Regards,
    A S VINCENT

    Hai Vincent
    *&      Form  DISPLAY_SEC1
         TO CALL TRANSACTION ME23
    form DISPLAY_SEC1.
    <b> SET PARAMETER ID 'BES' FIELD IT_EKKO-EBELN.
    CALL TRANSACTION 'ME23' AND SKIP FIRST SCREEN.</b>endform.                    " DISPLAY_SEC1
    also I will send you Some Sample Code
    *& Report  ZSSSS1                                                      *
    REPORT  ZSSSS1  LINE-SIZE 120
                    LINE-COUNT 25(3)
                    MESSAGE-ID ZSAN.
    *Program Desc: INTERACTIVE REPORT FOR PURCHASE ORDER DETAILS
                   BASIC LIST CONTAINS HEADER DETAILS
                   SECONDARY LIST CONTAINS ITEM DETAILS
                      AND CONDETION RECORD DETAILS
       T A B L E S         U S E D                                   *
    TABLES: EKKO,EKPO,KONV,LFA1,T001.
       S E L E C T I O N     S C R E E N                             *
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-000.
    SELECT-OPTIONS:
          S_LIFNR FOR EKKO-LIFNR,
          S_BUKRS FOR EKKO-BUKRS.
    SELECTION-SCREEN END OF BLOCK B1.
       D A T A   D E C L A R A T I O N S                             *
    DATA: BEGIN OF IT_EKKO OCCURS 0,
              BUKRS LIKE EKKO-BUKRS,
              LIFNR LIKE EKKO-LIFNR,
              EBELN LIKE EKKO-EBELN,
              KNUMV LIKE EKKO-KNUMV,
          END OF IT_EKKO.
    DATA: BEGIN OF IT_EKPO OCCURS 0,
              EBELN LIKE EKPO-EBELN,
              EBELP LIKE EKPO-EBELP,
              MATNR LIKE EKPO-MATNR,
              INFNR LIKE EKPO-INFNR,
              MENGE LIKE EKPO-MENGE,
              MEINS LIKE EKPO-MEINS,
              NETPR LIKE EKPO-NETPR,
          END OF IT_EKPO.
    DATA: BEGIN OF IT_KONV OCCURS 0,
              KNUMV LIKE KONV-KNUMV,
              KSCHL LIKE KONV-KSCHL,
              KAWRT LIKE KONV-KAWRT,
              KBETR LIKE KONV-KBETR,
              KPOSN LIKE KONV-KPOSN,
          END OF IT_KONV.
    DATA: BEGIN OF IT_LFA1 OCCURS 0,
              LIFNR LIKE LFA1-LIFNR,
              NAME1 LIKE LFA1-NAME1,
              STRAS LIKE LFA1-STRAS,
              ORT01 LIKE LFA1-ORT01,
              PSTLZ LIKE LFA1-PSTLZ,
              LAND1 LIKE LFA1-LAND1,
          END OF IT_LFA1.
    DATA: V_BUTXT LIKE T001-BUTXT,
          FNAM(20) TYPE C,
          FVAL(20) TYPE C.
      A T    S E L E C T I O N - S C R E E N    O N    <FIELD>       *
    AT SELECTION-SCREEN ON S_BUKRS.
      PERFORM VALIDATE.
      S T A R T - O F - S E L E C T I O N                            *
    START-OF-SELECTION.
      PERFORM SELECT_DATA.   " SELECTION OF ALL DATA
      PERFORM DISPLAY_DATA.  " DISPLAY OF BASIC LIST
      A T   L I N E   S E L E C T I O N                              *
    AT LINE-SELECTION.
      GET CURSOR FIELD FNAM VALUE FVAL.
      CASE FNAM.
      WHEN 'IT_EKKO-EBELN'.
            PERFORM DISPLAY_SEC1.
      WHEN 'IT_EKKO-LIFNR'.
            PERFORM DISPLAY_SEC2.
      WHEN OTHERS.
            PERFORM DISPLAY_SEC3.
      ENDCASE.
      T O P - O F - P A G E                                          *
    TOP-OF-PAGE.
      PERFORM WRITE_HEADER.
      T O P - O F - P A G E   D U R I N G   L I N E  S E L           *
    TOP-OF-PAGE DURING LINE-SELECTION.
      PERFORM WRITE_HEADER2.
      E N D - O F - P A G E                                          *
    END-OF-PAGE.
      PERFORM WRITE_FOOTER.
    *&      Form  SELECT_DATA
          THIS FORM CONTAINS ALL SELECTION OF DATA STATEMENTS
    form SELECT_DATA.
    SELECT  BUKRS LIFNR EBELN KNUMV
            FROM EKKO
            INTO TABLE IT_EKKO
            WHERE LIFNR IN S_LIFNR
            AND BUKRS IN S_BUKRS.
    IF NOT IT_EKKO[] IS INITIAL.
    SELECT   EBELN EBELP MATNR INFNR MENGE MEINS NETPR
          FROM EKPO
          INTO TABLE IT_EKPO
          FOR ALL ENTRIES IN IT_EKKO
          WHERE EBELN = IT_EKKO-EBELN.
    IF SY-SUBRC = 0.
      LOOP AT IT_EKKO.
       LOOP AT IT_EKPO.
        SELECT  KNUMV KSCHL KAWRT KBETR KPOSN
                FROM KONV
                INTO IT_KONV
                WHERE KNUMV = IT_EKKO-KNUMV
                AND KPOSN = IT_EKPO-EBELP.
          APPEND IT_KONV.
        ENDSELECT.
      ENDLOOP.
    ENDLOOP.
    ENDIF." END OF IF FOR CHECK OF SY-SUBRC
       SELECT  LIFNR NAME1 STRAS ORT01 PSTLZ LAND1
               INTO TABLE IT_LFA1
               FROM LFA1
               FOR ALL ENTRIES IN IT_EKKO
               WHERE LIFNR = IT_EKKO-LIFNR.
    ENDIF." END OF IF FOR IT_EKKO IS NOT INITIAL
    endform.                    " SELECT_DATA
    *&      Form  DISPLAY_DATA
          DISPLAY THE BASIC DATA
    form DISPLAY_DATA.
      DATA: LINNO TYPE I.
      SORT IT_EKKO BY BUKRS LIFNR EBELN.
      LOOP AT IT_EKKO.
        READ TABLE IT_LFA1 WITH KEY LIFNR = IT_EKKO-LIFNR.
        SELECT SINGLE BUTXT
                      FROM T001
                      INTO (V_BUTXT)
                      WHERE BUKRS = IT_EKKO-BUKRS.
        WRITE:/1 SY-VLINE,
                (10) IT_EKKO-EBELN HOTSPOT ON,
                  SY-VLINE,
                (10) IT_EKKO-LIFNR HOTSPOT ON,
                  SY-VLINE,
                (15) IT_LFA1-NAME1 HOTSPOT ON,
                   SY-VLINE,
                (10) IT_EKKO-BUKRS HOTSPOT ON,
                  SY-VLINE,
                (15) V_BUTXT,
                 75 SY-VLINE.
                 HIDE: IT_EKKO-EBELN,
                       IT_EKKO-LIFNR.
         WRITE:/1(75) SY-ULINE.
        AT END OF LIFNR.
          LINNO = SY-LINCT - SY-LINNO - 1.
          SKIP LINNO.
        ENDAT.
      ENDLOOP.
    endform.                    " DISPLAY_DATA
    *&      Form  DISPLAY_SEC3
    form DISPLAY_SEC3.
      LOOP AT IT_EKPO.
         CLEAR: IT_EKPO, IT_KONV.
       READ TABLE IT_EKPO WITH KEY EBELN = IT_EKKO-EBELN.
        IF SY-SUBRC = 0.
              FORMAT COLOR 3.
              WRITE:/1 SY-VLINE,
                    (10) IT_EKPO-EBELN,
                    SY-VLINE,
                    (10) IT_EKPO-EBELP,
                    SY-VLINE,
                    (18) IT_EKPO-MATNR,
                    SY-VLINE,
                    (10) IT_EKPO-INFNR,
                    SY-VLINE,
                    (15) IT_EKPO-MENGE,
                    SY-VLINE,
                    (10) IT_EKPO-MEINS,
                     SY-VLINE,
                    (12) IT_EKPO-NETPR,
                      105  SY-VLINE.
               FORMAT COLOR OFF.
              WRITE:/1(105) SY-ULINE.
              FORMAT COLOR 4.
        READ TABLE IT_KONV WITH KEY KPOSN = IT_EKPO-EBELP.
         IF SY-SUBRC = 0.
          WRITE:/1 SY-VLINE,
               (10) IT_KONV-KNUMV,
               SY-VLINE,
               (10) IT_KONV-KSCHL,
               SY-VLINE,
               (15) IT_KONV-KAWRT,
               SY-VLINE,
               (12) IT_KONV-KBETR,
               SY-VLINE.
          WRITE:/1(95) SY-ULINE.
         FORMAT COLOR OFF.
       ENDIF.
    ENDIF.
    ENDLOOP.
    endform.                    " DISPLAY_SEC3
    *&      Form  DISPLAY_SEC1
         TO CALL TRANSACTION ME23
    form DISPLAY_SEC1.
    SET PARAMETER ID 'BES' FIELD IT_EKKO-EBELN.
    CALL TRANSACTION 'ME23' AND SKIP FIRST SCREEN.
    endform.                    " DISPLAY_SEC1
    *&      Form  WRITE_HEADER
            HEADER DISPLAY
    form WRITE_HEADER.
    FORMAT COLOR 3.
    WRITE:/1 SY-VLINE,
                (10) 'PUR.ORDER',
                  SY-VLINE,
                (10) 'VENDOR',
                  SY-VLINE,
                (15) 'NAME',
                   SY-VLINE,
                (10) 'COMP.CODE',
                  SY-VLINE,
                (15) 'COMP.DESC',
                 75 SY-VLINE.
    WRITE:/1(75) SY-ULINE.
    FORMAT COLOR OFF.
    endform.                    " WRITE_HEADER
    *&      Form  WRITE_FOOTER
    FOOTER OF LIST
    form WRITE_FOOTER.
    FORMAT COLOR 4.
    WRITE: /1 'USER:',SY-UNAME,
            45 'DATE:', SY-DATUM.
    FORMAT COLOR OFF.
    endform.                    " WRITE_FOOTER
    *&      Form  WRITE_HEADER2
             HEADER FOR SECONDARY LIST
    form WRITE_HEADER2.
          FORMAT COLOR 4.
          WRITE: /30 'INTELLIGROUP ASIA PVT LTD' CENTERED.
          WRITE:/50  'HYDERABAD' CENTERED.
              FORMAT COLOR 5.
               WRITE:/1 SY-VLINE,
                    (10) 'PUR.ORDR',
                    SY-VLINE,
                    (10) 'ITEM',
                    SY-VLINE,
                    (18) 'MATERIAL NUMBER',
                    SY-VLINE,
                    (10) 'INFO.RECD',
                    SY-VLINE,
                    (15) 'QUANTITY',
                    SY-VLINE,
                    (10) 'UNITS',
                     SY-VLINE,
                    (12) 'NETPRICE',
                      105  SY-VLINE.
               FORMAT COLOR OFF.
              WRITE:/1(105) SY-ULINE.
               FORMAT COLOR 6.
               WRITE:/1 SY-VLINE,
               (10) 'COND.RECD',
               SY-VLINE,
               (10) 'TYPE',
               SY-VLINE,
               (15) 'BASE VALUE',
               SY-VLINE,
               (12) 'AMOUNT',
               SY-VLINE.
               FORMAT COLOR OFF.
          WRITE:/1(95) SY-ULINE.
    endform.                    " WRITE_HEADER2
    *&      Form  DISPLAY_SEC2
       TO DISPLAY VENDOR DETAILS IN POP UP WINDOW
    form DISPLAY_SEC2.
    READ TABLE IT_LFA1 WITH KEY LIFNR = IT_EKKO-LIFNR.
    IF SY-SUBRC = 0.
      WRITE:/   'NAME IS:' ,   IT_LFA1-NAME1,
            /   'STREET IS:',  IT_LFA1-STRAS,
            /   'CITY  IS:',   IT_LFA1-ORT01,
            /   'POSTEL CODE IS:',IT_LFA1-PSTLZ,
            /   'COUNTRY IS: ', IT_LFA1-LAND1.
      WINDOW STARTING AT 1  15
             ENDING   AT 50 20.
    ENDIF.
    endform.                    " DISPLAY_SEC2
    *&      Form  VALIDATE
      VALIDATE BUKRS
    form VALIDATE.
    SELECT SINGLE *
                FROM T001
                WHERE BUKRS IN S_BUKRS.
    IF SY-SUBRC <> 0.
      MESSAGE E001.
    ENDIF.
    endform.                    " VALIDATE
    Thanks & regards
    Sreenivasulu P

  • Calling SAP transaction from WebDynpro

    HI,
    Could someone post a link as to how I may call a SAP transaction from a webdynpro.
    Will this be an external call to R/3 or can i get it embedded in my dynpro.......
    Tnks..

    Hi,
    You can call by creating external window method.
    create LINK to URL or LINK TO ACTION according to requirement, for this. write code in onaction of that.
    data: iv_url type string value 'http://<server>:<port>/sap/bc/gui/sap/its/webgui?~transaction=*se38 RS38M-PROGRAMM=rsparam;DYNP_OKCODE=SHOP'.
      data: api_component  type ref to if_wd_component,
              window_manager type ref to if_wd_window_manager,
              window type ref to if_wd_window.
      api_component = wd_comp_controller->wd_get_api( ).
      window_manager = api_component->get_window_manager( ).
      window = window_manager->create_external_window(
                     url = iv_url
                     modal = abap_false ).
      window->open( ).
    Cheers,
    Kris.

Maybe you are looking for

  • Do I need to replace my Macbook Pro?

    I have a Mid 2009 Macbook Pro that has started to give me lots of issues. My question is should I try to find a way to fix these problems, or do I simply need a new laptop? I am a college student and really use my laptop for just basic things--assign

  • Sync new laptop with existing Apple TV and iPhone.

    I have an Apple TV and a MacBook Pro (as well as an iPhone) that were all synced and dandy, until my laptop died and had to be rebuilt. Now, with a new system, I proceeded to sync with my Apple TV and iPhone and of course nothing wants to know my lap

  • Ipad gets hot and then touch don't work..

    ipad gets hot and then touch don't work..

  • Can't find Add a Device option Photosmart C4700

    I have a Photosmart C4700 that I am trying to set up wirelessly. I had it working once before, and for some reason it no longer works. After MUCH trial and error, I have been able to set it up again to work while connected to my MacBook Pro (running

  • HT201210 why can't i get my phone out of recovery mode

    hello im having trouble getting my phone out of recovery mode. i tried to restore it but it keeps telling me thier's an unknown error???