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.

Similar Messages

  • 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 an web dynpro abap application with an particular theme

    Dear friends,
    i have created one web dynpro abap application. i created one theme XYZ in portal with required font size. when i applied this theme on portal all web dynpro application use this theme.
    i want to use current theme for one application not for all.
    is it poosible to call an web dynpro abap appl with the particular theme where as others should not be temper with this theme.
    please guide me by some useful steps.
    regards
    sunil

    Sunil,
    Check if this helps.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/7015b1f9-535c-2910-c8b7-e681fe75aaf8?QuickLink=index&overridelayout=true
    Cheers!
    Sandeep Tudumu

  • 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

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

  • 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 Subroutines,Standard Text  & using Internal Table in SmartForm

    Hi all,
    need help in the following areas.Its very urgent!
    1.How to CAll Subroutines in Smart Forms
    2.How to CAll Standard Text in Smart Forms
    Situation:
    We have an Internal Table T_SALES with all the data which am going to display in the smartform,How to retrive data from an internal table in Smart forms
    Any Help in this direction would be highly appreciated.
    Regards
    Ramu

    Hi,
      When you are using quantity or currency fields, you have to mentiong the reference fileds in a tab called CURRENCY/QUANTITY FILEDS in the GLOBAL DATA node.
    Specifying a Currency or Quantity Reference
    Use
    In the ABAP Dictionary, you can assign a currency or quantity field to a table field. In the output of these fields, the system can then insert the relevant currency or unit:
    ·        If the value field is in the same table as the corresponding currency or quantity field, the system recognizes the reference automatically, and formats the value field according to the currency or unit in the assigned field.
    ·        If the value field is in a different table from the currency or quantity field, the system cannot recognize this reference automatically.
    In the second case, you must indicate this reference to the system in the form, to ensure that the value field is formatted correctly.
    Procedure
    You want to assign a currency or quantity field in one table (for example, CURTAB) to a value field in another table (for example, VALTAB).
           1.      Create the reference to the currency field by entering the following values:
    -         Field Name: VALTAB-VALUE, if this is the value field of VALTAB that you want to display.
    -         Reference Field: CURTAB-CURRENCY, which is the currency field of CURTAB.
           2.      Under Data Type, specify whether the data type is a currency or quantity.
    Result
    In the output of the PDF-based print form, the system formats the value field VALTAB-VALUE according to the assigned value in the currency or quantity field of the global variable CURTAB-CURRENCY.
    Thanks and Regards,
    Bharat Kumar Reddy.V
    Message was Added by: Bharat Reddy V
    Message was Added by: Bharat Reddy V

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

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

  • 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 does works default parameters in a program with logical database PNP?

    Hi Friends,
      I have a basic program, i need to filter info with period parameters in a program that uses logical database PNP, but it doesn't work.
      If i use "person selection period" that it's suposed to filter info according to infotype 0001 (as the sap help says), it doesn't work, i use: PNPBEGPS = today and PNPENDPS = today, and the result it's a lot of registers that doesn't meet that criteria.
      Also i tried with: data selection period, today, up to day, current month. And the result it's with the same problem.
      How does works period parameters in a program with logical database PNP?
    This it's the program example, i use the default category.
    REPORT  ZRPHRTEST.
    tables: pernr.
    infotypes: 0001.
    start-of-selection.
    get pernr.
      write: pernr-pernr, p0001-begda, p0001-endda.
    end-of-selection.
    write 'fin'.

    Hi,
    Define pernr table under tables statement then and use GET PERNR event.This get event is followed by End-Of-Selection.
    Syntax: Tables pernr.
                Get pernr.
    Try, activate and test. This should solve your problem.
    Regards,
    Abhijeet

  • Problem with the active version of the transfer rule ABAP program with sour

    Hi,
    I have a problem with the active version of the transfer rule ABAP program with source system EXCEL. 
    The system does not react to changes done in the transfer rule coding. For FISCPER I have hardcoded the result 'BABABA' and still the results delivered are those from the CSV.
    Resetting the system buffers does not help. The problem is systematic in combination with source system EXCEL (i.e. not only 1 InfoSource).  Checking the active program Extras->Display Program shows the coding (result='BABABA') being there, but
    as stated, the system does not produce the result BABABA, but instead the result of the CSV.
    It seems as if the original version from the very first activation of the transfer rule program remains somewhere and continues to be used.  Does anybody know how to flush it out and get the system to actually use the coding appearing as the active program.
    I have posted an OSS note, but SAP takes it time to answer and I am under time pressure so I figured that maybe one of you know who to solve it before SAP does.
    Greetings and thanks,
    Martin

    Hi martin,
    just try to go out the RSA1 and then return to your infopac. ...
    sometimes there some "cache" trouble

Maybe you are looking for