How to call transaction in an abap program

how do we open a transaction thru an abap program and pass a parameter to it

Use call transaction. You can fill up the parameters in the BDC internal table
DATA:   bdc_tab LIKE bdcdata    OCCURS 0 WITH HEADER LINE.
DATA:   messtab LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.
CONSTANTS: c_tcode LIKE t130m-tcode VALUE 'FB01'. "Tcode you want to call
        CALL TRANSACTION c_tcode
             USING  bdc_tab
             MODE   'N'
             UPDATE 'S'
             MESSAGES INTO messtab.
Error message will be captured in the messtab.
You can goto the SAP help on Call transaction to see all the details and options.
<b><REMOVED BY MODERATOR></b>
Thanks.
Message was edited by:
        Alvaro Tejada Galindo

Similar Messages

  • How to call subroutines defined in ABAP program with type S

    how to call subroutines defined in ABAP program with type S? can you give an example?

    Normal executable program,
    REPORT  ZTEST_MAIN.
    perform sub1 in program ztest_sub.
    "you can call using in program addition
    Subroutine pool program
    PROGRAM  ZTEST_SUB.
    form sub1.
    endform.

  • How to call a idoc in abap program and updates catsdb table

    how to call a idoc in abap program and updates catsdb table
    thank you,
    Jagrut BharatKumar Shukla

    Hi Kishan,
    You can refer to following help document,
    http://help.sap.com/saphelp_nw04/helpdata/en/bf/d005244e9d1d4d92b2fe7935556b4c/content.htm
    Regards,
    Meera

  • How to call the webservice in abap program

    Hi All,
    I have created a web service for my RFC .  The RFC has Import and export paramaters.
    I want call the same web service into my  ABAP REPORT and at the same time i want pass the values to webservice  and get the result from webservice in my abap report,
    Please help me  how to call the web service and pass the values and get the values?
    Highly appreciate your assitance.
    Thanks,
    Kishan

    Hi Kishan,
    You can refer to following help document,
    http://help.sap.com/saphelp_nw04/helpdata/en/bf/d005244e9d1d4d92b2fe7935556b4c/content.htm
    Regards,
    Meera

  • How to call BAPI_XBP_JOB_START_IMMEDIATELY in the ABAP program

    Dear all,
    I call the function 'BAPI_XBP_JOB_START_IMMEDIATELY' to release the backgroud jobs. It does not work. it's remote enable function. Should I use call function 'XXX' destination 'XXX' to call it? How can I check the destination? Thanks for your answer.

    Hi,
    if the Function module is remotely enabled also, we can call that from same system.If u want to use destination give destination 'NONE',otherwise no need to give destination.
    Regards,
    Jyothi.

  • Urgent!!  How to call a custom transaction or an ABAP program in BSP?

    Urgent!!  How to call a custom transaction or an ABAP program in BSP?
    We are pretty new on BSP.  Would be very appreciated if any expert here give us the detailed steps on how to build up the application to just call a custom transaction (e.g., t-code: ztest) or an ABAP program.  Would we have to create a button or event handler to do that?  And the detailed steps?
    Thanks in advance and we will definately give you reward points!

    hi Durairaj,
    During the time to wait for your answer, we copied Bernd's code from your last link, but when activating it, get the 1st error msg:
    Field "CLIENT" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement. "DATA" statement."DATA" statement. The error shows up here:
    <td>
    <htmlb:inputField id = "client"
    value = "<%= client %>" />
    </td>
    Then we added Client to the page attribute and define it as type String, then get another error:
    The field "EVENT" is unknown, but there is a field with the similar name "EVENT_ID"."EVENT_ID". This error shows up at the beginning in the Event Handler:
    OnInputProcessing:
    code
    • event handler for checking and processing user input and
    • for defining navigation
    • event handler for data retrieval
    event = cl_htmlb_manager=>get_event( runtime->server->request ).
    IF event->name = 'button' AND event->event_type = 'click'.
    button_event ?= event.
    How to resolve this unknown Event error, need to define in Page Attribute tab? but with what type?
    Actually we only want to run an ABAP4 program in BSP, the code is complicated, could you show us an easy way of doing this in BSP?

  • 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

  • How to call a Method in a Program?

    Hello,
    I am very new to the ABAP world.  I have been given a task to call a method if_hrbas_plain_infotype_access~read_single from the class CL_HRBAS_PLAIN_INFOTYPE_ACCESS in a program to see if we can use it to display some employee information.  I don't know how to call a method in a program.  Can somebody please provide me some pseudo code or instructions?
    Thanks.

    Hi Shan,
    here is the code to call a method. while calling the method Instance as 'r_info' which is the type reference to class as specified.
    pass the values to exporting parameters plvar,otype,objid...etc  according  to the requirement
    infotypes: 0002.   " creates an internal table p0002.
    data:
    r_info type ref to CL_HRBAS_PLAIN_INFOTYPE_ACCESS.
    TRY.
    CALL METHOD r_info->if_hrbas_plain_infotype_access~read
       EXPORTING
         plvar           = 
         otype           =
         objid           =
         istat           =
         infty           =
    *     SUBTY           =
         begda           =
         endda           =
         no_auth_check   =  'X'
         message_handler =
       IMPORTING
         PNNNN_TAB       = P0002
    *     HRTNNNN_TAB     =
    *     IS_OK           =
      CATCH CX_HRBAS_VIOLATED_ASSERTION .
    ENDTRY.
    LOOP AT P0002.
          WRITE:/
            P0002-VORNA,
            P0002-NCHMC,
            P0002-NACHN.
        ENDLOOP.
    Regards

  • How to make a transport of ABAP Program to a QA environment

    Hi forum and sorry for my easy question, but i am a newby in ABAP
    How can i a transport an ABAP program to QA environment?... is the same machine only changes the mandant.
    Thnks
    Josue Cruz

    You need have transport request for ABAP program.
    Transport Request are two types :
    1.customizing
    2 work bench
    customizing - it is related to SPRO Transaction and Functional people will create Customizing request
    Work Bench Request - normally irt realeted to ABAP Develper. and all about SE38 Programs ,Data dictinary and so on..
    If you want to to release transport request ,then you need to use SE10 or SE09 Transaction.
    Goto SE10 and see ur transport request -.it will have sub request #
    Select Sub request #->overall check -Syntax check
    then Activate check
    then click on release dirctly button(Looks like Bus)
    activate
    now select main request and click on release directly button.
    check the status - by using transport logs at SE10 transaction,you need to have sy-subrc eq 0
    when you get sy-subrc eq 4 then you deleted something in ur program ,sy-subrc eq 8,sy-subrc eq 12 these all status of ur transport request.
    once you done then you need import to Tst Box,use STMS Transaction.
    Reward Points if it is useful
    Thanks
    Seshu

  • How to debug the method in abap program

    How to debug the method in abap program ?
    Could you please give the solution.
    Thanks
    sai

    Hi ,
    Place break point at call method .
    It takes u in to the method implementation .
    Here u can analyse the method implementation ...
    Reward if useful
    Thanks
    Jagadeesh.G

  • HOW TO creat  BAR CHART using ABAP Programming

    DEAR ALL,
    I want some help as to how to creat GRAPHICAL display using ABAP programing (BAR CHART) any sample codes Example will be very helpful.
    Regards,
    VJ

    On earlier versions, you can do something like this.
    [code]
    REPORT ZRICH_0005 .
    DATA: BEGIN OF ITAB_DATA OCCURS 0,
               DATANAME(15),
               QUANTITY1 TYPE I,
               QUANTITY2 TYPE I,
               QUANTITY3 TYPE I,
          END OF ITAB_DATA.
    Data: BEGIN OF ITAB_OPTIONS OCCURS 0,
               OPTION(20),
          END OF ITAB_OPTIONS.
    ITAB_DATA-DATANAME = 'Maple'.
    ITAB_DATA-QUANTITY1 = 5500.
    ITAB_DATA-QUANTITY2 = 6200.
    ITAB_DATA-QUANTITY3 = 5900.
    APPEND ITAB_DATA.
    ITAB_DATA-DATANAME = 'Oak'.
    ITAB_DATA-QUANTITY1 = 3500.
    ITAB_DATA-QUANTITY2 = 5200.
    ITAB_DATA-QUANTITY3 = 4400.
    APPEND ITAB_DATA.
    ITAB_DATA-DATANAME = 'Cherry'.
    ITAB_DATA-QUANTITY1 = 1800.
    ITAB_DATA-QUANTITY2 = 2200.
    ITAB_DATA-QUANTITY3 = 1900.
    APPEND ITAB_DATA.
    CALL FUNCTION 'GRAPH_MATRIX_3D'
         EXPORTING
              COL1        = 'Jan'
              COL2        = 'Feb'
              COL3        = 'Mar'
              TITL        = 'Lumber Usage in $'
         TABLES
              DATA        = ITAB_DATA
              OPTS        = ITAB_OPTIONS
         EXCEPTIONS
              OTHERS      = 1.
    [/code]
    Regards,
    Rich Heilman

  • Timeout Error in Call Transaction on Asynchronous Abap Proxy

    Hi Gurus!!
    We have a problem with a Call Transaction on Asynchronous Abap Proxy. When the process of Call Transaction (transaction CO02) takes more than 10 minutes, the process is cancelled with sy-subrc 1001 and the Abap Proxy continues with the execution. Strangely, there is a short dump in ST22 on transaction CO02, although on the ABAP Proxy we don't get any dump.
    When this process is called from a Background Job no dumps are get.
    Somebody knows if there is a problem with the Asynchronous ABAP Proxy executing CALL TRANSACTION statementent?
    Thanks and regards,
    Manuel.

    and the message after recording is
    Number               1
    Transaction          F-22
    SY-SUBRC             0
    Messages
    FB01                SAPMF05A                                0301WEZ001                066
    FB01                SAPMF05A                                0300WEZ001                066
    FB01                SAPMF05A                                0300EEZ001                073
    I F5 573                   Correct the error reported before on the next screen
    FB01                SAPMF05A                                0300WEZ001                066
    FB01                SAPMF05A                                0300EEZ001                073
    I F5 573                   Correct the error reported before on the next screen
    FB01                SAPMF05A                                0330WEZ001                066
    FB01                SAPMF05A                                0301WEZ001                066
    FB01                SAPMF05A                                0301WEZ001                066
    FB01                SAPMF05A                                0301WEZ001                066
    S F5 312                   Document 100001677 was posted in company code 3100

  • How to call Operating System commands / external programs from within APEX

    Hi,
    Can someone please suggest how to call Operating Systems commands / external programs from within APEX?
    E.g. say I need to run a SQL script on a particular database. SQL script, database name, userid & password everything is available in a table in Oracle. I want to build a utility in APEX where by when I click a button APEX should run the following
    c:\oracle\bin\sqlplusw.exe userud/password@database @script_name.sql
    Any pointers will be greatly appreciated.
    Thanks & Regards,

    Hi Guys,
    I have reviewed the option of using scheduler and javascript and they do satisfy my requirements PARTIALLY. Any calls to operating system commands through these features will be made on the server where APEX is installed.
    However, here what I am looking at is to call operating systems programs on client machine. For example in my APEX application I have constructed the following strings of commands that needs to be run to execute a change request.
    sqlplusw.exe user/password@database @script1.sql
    sqlplusw.exe user/password@database @script2.sql
    sqlplusw.exe user/password@database @script3.sql
    sqlplusw.exe user/password@database @script4.sql
    What I want is to have a button/link on the APEX screen along with these lines so that when I click that link/button this entire line of command gets executed in the same way it would get executed if I copy and paste this command in the command window of windows.
    Believe me, if I am able to achieve what I intend to do, it is going to save a lot of our DBAs time and effort.
    Any help will be greatly appreciated.
    Thanks & Regards,

  • CALL TRANSACTION 'ME33K  from another program

    Hi,
    I ma trying to CALL TRANSACTION 'ME33K  from another program, but it is not working.  The transactions is opening, but it is not opening with the contract number (ls_ekpo-ebeln) i am passing.
    ls_ekpo-ebeln does have a valued when CALL TRANSACTION 'ME33K  is called.
    In debug, I noticed the "value" is blank when step into CALL TRANSACTION 'ME33K .
       WHEN 'EBELN'.  "Contract
          l_field = 'EVRTN'.
         IF ls_ekpo-ebeln <> ''.
            GET PARAMETER ID 'VRT' FIELD l_field.  "EVRTN.
           SET PARAMETER ID 'VRT' FIELD ls_ekpo-ebeln.
           CALL TRANSACTION 'ME33K AND SKIP FIRST SCREEN.
            SET PARAMETER ID 'VRT' FIELD ls_ekpo-ebeln.
          ENDIF.
    Any help or suggestions would be great.
    Thanks,
    Naing

    Dear Naing,
    I execute the same code
    IF ls_ekpo IS INITIAL.
    GET PARAMETER ID 'VRT' FIELD LS_EKPO.
    SET PARAMETER ID 'VRT' FIELD ls_ekpo.
    CALL TRANSACTION 'ME33K' AND SKIP FIRST SCREEN.
    SET PARAMETER ID 'VRT' FIELD ls_ekpo.
    ENDIF.
    And it is working.
    Try to do de simple sintax.
    A program with one pararmeter to introduce the contract number.
    The set parameter for this parameter and the call transaction.
    I´m waiting your comments.
    Regards.
    Antonio.

  • How to create a job thru ABAP program for calling a program with variant???

    Hello experts,
    can u give me step wise procedure to create jobs for  a program with a variant name thru ABAP???
    Also, can a transaction can be scheduled as a job to run in background with a variant name???
    Edited by: SAP USER on Jul 22, 2008 6:08 AM

    Hi,
    To create a job through ABAP program you can do the following.
    Go to Menu bar.
    In there, go to   SYTSTEM> SERVICES> JOBS--> DEFINE JOB.
    Then give the JOB NAME and CLASS in the screen that comes up.
    This is how we schedule a program.
    Now, to create a variant for a program -
    First activate your program in SE38. Then execute it .
    Now, click on SAVE button. It will open up  the variant creation screen. Give the details there like variant name and value for the fields. Save and come back.
    Hope this helps.
    Regards,
    Hari Kiran

Maybe you are looking for

  • Can some one tell me a better way...

    Hi All.. I work on a web application. I create user ids for people logging into my application. here I have a small problem.. This is what I am currently doing... When I create a new user, I assign a new user id to the user and store all hi info. All

  • Creative webcam dell studio 17 problems with creative zen

    hi there, ive got a dell studio 17 with a built in webcam. When i try to install the drivers for the creative zen, and put the disk in, a message comes up saying 'we could not find the driver software for your device' then windows trys to solve the p

  • ITunes has stopped working on windows 8

    I have been unable to connect to iTunes for two days.. I have followed the uninstall and reinstall process . Still no luck.. Clicking the iTunes icon in windows gives me one of two things... 1 nothing happens or 2 it comes up with a windows message t

  • OpenLDAP missing after EPM 11.1.1.4 fresh install on Oracle Linux 5.8 32bit

    Hello, I try install Oracle EPM Foundation 11.1.1.4 on Oracle Linux 5.8 32Bits. No error with installTool.sh but the openLDP directory missing in $HYPERION_HOME/product/Foundation I have found the openLDAP files after extrac from productCommonCompone

  • Premiere Pro cc crashing on file export with Windows 8.1

    Windows just crashed three consecutive times when trying to export. My files are all updated and current. I found this was mentioned in a thread as being a Mac only problem. It is not! It's very frustrating to be unable to produce video for export wh