Macros Vs Subroutine pool

Hi All,
I need to chage the code as per my company coding standards.
As per the  requiremnt i am using the PERFORM statment  more time to dispaly Field Catalog based on some coditions.
Statments:
PERFORM F_FIRST_FIELD_CATALOG USING C_HKONT
                                      C_BSIS
                                      W_COL_POS
                                      TEXT-010
                                      SPACE.

hi
hope it will help you.
<REMOVED BY MODERATOR>
Refer this link,it will provide u sample code for all.
http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db979035c111d1829f0000e829fbfe/content.htm
PERFORM - parameter_list
Syntax
... [TABLES   itab1 itab2 ...]
    [USING    a1 a2 ...]
    [CHANGING a1 a2 ...].
Extras:
1. ... TABLES itab1 itab2 ...
2. ... USING a1 a2 ...
3. ... CHANGING a1 a2 ...
Effect
These additions assign actual parameters to the formal parameters from the parameter interface for the subroutine subr. You can specify all data objects whose data type matches the typing of the corresponding formal parameter (see Check Typing) as actual parameters. Each formal parameter assumes all the properties of the actual parameter assigned to it when it is called.
Addition 1
... TABLES itab1 itab2 ...
Effect
If you specify the addition TABLES, each table parameter t1 t2 ... for the subroutine called that is defined with the addition TABLES to the FORM statement must be assigned an internal table itab as the actual parameter. The assignment of the actual parameters to the formal parameters takes place using their positions in the lists t1 t2 ... and itab1 itab2 ... .
You can only specify standard tables for itab. Transfer takes place by means of a reference. If a specified table itab has a header line, this is also transferred; otherwise, the header line in the corresponding table parameter t is blank when it is called.
Note
Use of table parameters in the interface for subroutines is obsolete but a large number of subroutines have not yet been converted to appropriately typed USING or CHANGING parameters, so that they must still be supplied with data by the TABLES addition to the PERFORM statement.
Example
Static call of the internal subroutine select_sflight transferring a table parameter.
PARAMETERS: p_carr TYPE sflight-carrid,
            p_conn TYPE sflight-connid.
DATA sflight_tab TYPE STANDARD TABLE OF sflight.
PERFORM select_sflight TABLES sflight_tab
                       USING  p_carr p_conn.
FORM select_sflight TABLES flight_tab LIKE sflight_tab
                    USING  f_carr TYPE sflight-carrid
                           f_conn TYPE sflight-connid.
  SELECT *
         FROM sflight
         INTO TABLE flight_tab
         WHERE carrid = f_carr AND
               connid = f_conn.
ENDFORM.
Addition 2
... USING a1 a2 ...
Addition 3
... CHANGING a1 a2 ...
Effect
If you specify the additions USING and CHANGING, an actual parameter a1 a2 ... of the appropriate type must be assigned to each of the formal parameters u1 u2 ... and c1 c2 ... defined with the same additions to the FORM statement. The actual parameters specified after USING and CHANGING form one shared list. They are assigned to the formal parameters after the position in the shared list. The type of parameter transfer is defined with the additions USING and CHANGING to the FORM statement. The addition USING must be before CHANGING. Otherwise, the assignment of the actual parameters to the additions USING and CHANGING is irrelevant to the PERFORM statement. It is also irrelevant whether only one or both of the additions is specified.
Notes
For the sake of program documentation, we advise that you specify the additions USING and CHANGING in the FORM statement according to the definition of the parameter interface.
In non-Unicode programs, you can address memory area outside an actual parameter if an actual parameter a1 a2 ... is assigned offset or length specifications. In non-Unicode programs, the length is set to the length of the current parameter if an offset is specified without a length. Both of these lead to warnings in the syntax check and to syntax errors in Unicode programs. The rules for the ASSIGN statement apply to the addressable memory area in non-Unicode programs as well.
Example
The following five PERFORM statements mean the same but only the fourth is recommended, since it is the only one that documents the interface of the subroutine called.
DATA: a1 TYPE string,
      a2 TYPE string,
      a3 TYPE string,
      a4 TYPE string.
PERFORM test USING a1 a2 a3 a4.
PERFORM test CHANGING a1 a2 a3 a4.
PERFORM test USING a1 CHANGING a2 a3 a4.
PERFORM test USING a1 a2 CHANGING a3 a4.
PERFORM test USING a1 a2 a3 CHANGING a4.
FORM test USING p1 TYPE string
                p2 TYPE string
          CHANGING value(p3) TYPE string
                   value(p4) TYPE string.
ENDFORM.
Edited by: Alvaro Tejada Galindo on Jan 29, 2008 10:07 AM

Similar Messages

  • Macros Vs Subroutine pool code change

    Hi All,
    I need to chage the code as per my company coding standards.
    As per the requiremnt i am using the PERFORM statment more time to dispaly Field Catalog based on some coditions.
    PERFORM Statments:
    PERFORM F_FIRST_FIELD_CATALOG USING C_HKONT
                                                                          C_BSIS
                                                                  W_COL_POS
                                                                        TEXT-010
                                                                           SPACE.
    FORM Statments:
    FORM F_FIRST_FIELD_CATALOG USING  US_FIELDNAME TYPE ANY
                                         US_REF_TAB   TYPE ANY
                                         US_COL_POS   TYPE ANY
                                         US_COLTEXT   TYPE ANY
                                         US_DO_SUM    TYPE ANY.
      CLEAR E_CATLOG.
      MOVE : US_FIELDNAME TO E_CATLOG-FIELDNAME,
             US_REF_TAB   TO E_CATLOG-TABNAME,
             US_COL_POS   TO E_CATLOG-COL_POS,
             US_COLTEXT   TO E_CATLOG-SELTEXT_L,
             US_DO_SUM    TO E_CATLOG-DO_SUM.
      APPEND E_CATLOG TO I_CATLOG1.
      CLEAR E_CATLOG.
    ENDFORM.                    " f_first_field_catalog
    I need to change this code using MACROS.
    Can any one help how to to this code using MACROS..
    and also send me documnt for Macros.
    Best Regards,
    Sridhar Amruth

    As per my opinion macro are outdated. and also debugging not possible in macros
    Still you want to use
    then
    define F_FIRST_FIELD_CATALOG.
    CLEAR E_CATLOG.
    MOVE : &1 TO E_CATLOG-FIELDNAME,
           &2 TO E_CATLOG-TABNAME,
           &3 TO E_CATLOG-COL_POS,
           &4 TO E_CATLOG-SELTEXT_L,
           &5 TO E_CATLOG-DO_SUM.
    APPEND E_CATLOG TO I_CATLOG1.
    ENDFORM.
    F_FIRST_FIELD_CATALOG: C_HKONT C_BSIS W_COL_POS TEXT-010 SPACE.

  • SY-SUBRC = 4 after GENERATE SUBROUTINE POOL

    Hi,
    I am trying to create a dynamic subroutine using the statement:
    GENERATE SUBROUTINE POOL t_codeline NAME v_program
                                     MESSAGE v_message
                                        LINE v_line.
    IF SY-SUBRC = 0.
      PERFORM (v_routine) IN PROGRAM (v_program)
                              TABLES IM_VKORG
                                     IM_VTWEG
                                     IM_SPART
                                     IM_KUNNR.
    Here
      v_program     TYPE  DB2BPNAME,
      v_message     TYPE  BALTMSG,
      v_line        TYPE  SYINDEX,
      v_routine(32).
    After executing the statement
    GENERATE SUBROUTINE POOL t_codeline NAME v_program
                                     MESSAGE v_message
                                        LINE v_line.
    I am getting SY-SUBRC = 4 which means Syntax error.
    Could you please tell me why the statement GENERATE SUBROUTINE POOL is giving me SY-SUBRC = 4.
    Thanking You,
    Surya

    hi,
    A few lines to give you an idea
    itab11 = 'begin of it_ord_sto_data occurs 0'.
    append itab1.
    clear itab1.
    concatenate 'import it_ord_sto_data from memory id' gc_ord '.' into itab1 separated by space.                  
      append itab1.                                               
      clear itab1.                                      
    Regards,
    Sailaja.

  • Debugging of a subroutine pool.

    Hi there,
    Does anyone knows if is posible to debug a subroutine pool?
    I'm trying to print a smartform of a RFQ using the function ME_READ_PO_FOR_PRINTING, but the program prints a different requisition a not the one selected.
    I want to capture the RFQ number and pass it as a parameter to the smartform but for any reason I can't get the correct number.
    I put a break-point on the program but it doesn't work and I am unable to track and find the problem.
    Any help will be appreciated.
    Thanks,
    Orlando

    Hi Orlando,
    Are you printing the RFQ from ME52N by assigning an O/P ?
    If so then assign O/P to your RFQ and then set further data dispatch time as send as Period job.
    Then use program RSNAST00 and you can debug .
    If you are doing as a back ground job then :
                     type JDBG in the OK-code and press enter
    Hope this may help you.
    Lanka
    Message was edited by: Lanka Murthy

  • How to delete Subroutine Pool and delete the custom report in mass

    Hello,
    How to delete the subroutine pool
    Is there any transaction to delete report mass.
    Thanks in advance,
    Best Regards,
    Suresh kumar K

    You can use FM RS_DELETE_PROGRAM in your program and pass all the programs
    that are to be deleted into that FM using TADIR table..
    Alternatively you can create a bdc for the same.

  • Hi. how to create Subroutine Pool and call it from sapscript

    HI,
    Can anyone tell is there any standard subroutine pool available which could fetch the customer number. 
    how to create an subroutine pool and call it from the sapscript..
    please help me
    Advance Thanks..
    Guhapriyan.

    Hi Guhapriyan,
    1. Create a FORM in your program.
    2. call it from sapscript using
    /:   PERFORM GET_COMPANY_INFO IN PROGRAM YHRR_OFFER_CONTRACT_FORM      
    /:   USING &P0001-BUKRS&                                               
    /:   CHANGING &COMP_NAME&                                              
    /:   ENDPERFORM                                                        
    3. The form in your program should be of the following  parameters only.
    form GET_COMPANY_INFO tables IN_PAR  structure ITCSY
                            OUT_PAR structure ITCSY.
    (important is IN_PAR, OUT_PAR -
    where in your read the values passed,
    and pass back the values
    thru internal table using varname, varvalue)
    regards,
    amit m.

  • Difference between Macros and subroutine

    Hi all,
    What is the difference between the macros subroutine and function module functinalitywise.;

    Hi,
    Macros can only be used in the program the are defined in and only after the definition.
    Macros can take max 9 parameters.
    Macros are expanded at compilation / generation.
    Subroutines (FORM) can be called from both the program the are defined in and other programs ('perform
    ' of 'perform in program ').
    Subroutines can take any amount of parameters.
    Subroutines are 'expanded' at runtime.
    Functions are just like FORMs, but are intended to be called external.
    Some differences between FUNCTIONs and FORMs:
    The name of a FORM must be unique within the program (two programs can have different FORMs with the same name). A FORM is intended to be called internal (from within the program, however by a 'trick' you can call them external).
    The name of a FUNCTION has to be unique throughout the system. A FUNCTION is intended to be called external (and is thus shared by 'many' programs).
    The latter is more important for programmers and maintenance. Since a FUNCTION is called external, it is important to keep the interface (parameters) the same. The interface of a FORM (which is intended to be called internal) is check when debugging a program (but it is only checked within the program that is debugged). So if the interface of a FORM is changed, but the call to the FORM (perform ) is not, the debugger will notice this and issue an error message.
    In general:
    A MACRO is more or less an abbreviation for some lines of code that are used more than once or twice.
    A FORM is a local subroutine (which can be called external).
    A FUNCTION is (more or less) a subroutine that is called external.
    Since debugging a MACRO is not really possible, prevent the use of them (I've never used them, but seen them in action). If the subroutine is used only local (called internal) use a FORM. If the subroutine is called external (used by more than one program) use a FUNCTION.
    --Excerpt from http://sap.ittoolbox.com/documents/popular-q-and-a/macro-vs-subroutine-1594#
    DATA p_c(10).
    FIELD-SYMBOLS: <fs> TYPE ANY.
    DATA p_old1 TYPE i VALUE 10.
    DATA p_old2 TYPE i VALUE 11.
    DATA p_old3 TYPE i VALUE 12.
    DATA p_old4 TYPE i VALUE 13.
    DATA p_old5 TYPE i VALUE 14.
    DATA p_old6 TYPE i VALUE 15.
    DATA p_old7 TYPE i VALUE 16.
    DATA p_old8 TYPE i VALUE 17.
    DATA p_old9 TYPE i VALUE 18.
    DATA p_old10 TYPE i VALUE 19.
    DATA p_old11 TYPE i VALUE 21.
    DATA p_old12 TYPE i VALUE 22.
    DATA p_old13 TYPE i VALUE 23.
    DATA p_old14 TYPE i VALUE 24.
    DEFINE ADD_MAPPING.
    p_c = &1.
    CONDENSE p_c.
    CONCATENATE 'p_old' p_c INTO p_c.
    ASSIGN (p_c) TO <fs>.
    WRITE <fs>.
    END-OF-DEFINITION.
    DO 14 TIMES.
    ADD_MAPPING sy-index.
    ENDDO.
    http://sap.ittoolbox.com/documents/popular-q-and-a/macro-vs-subroutine-1594
    http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db972835c111d1829f0000e829fbfe/frameset.htm
    Regards,
    Priyanka.

  • Need to create subroutine pool for info structure

    Hi gurus,
    I need to create a subroutine pool for the info strucuture S891for one of the key figures.(in the extended update rules). and in that i need to write 3 routines for the 3 key figures.
    plz help me how to create the subroutine pool for this.
    I just went to se38 and choose type subroutine pool and created a prg. But do not know how to proceed further.
    Any idea on this?
    Regards,
    Sakthi.
    Edited by: sakthi sri on Sep 6, 2010 9:47 AM

    Hi,
    Please Check this link,
    http://help.sap.com/saphelp_nw70/helpdata/en/c0/980389e58611d194cc00a0c94260a5/content.htm
    How to create variant for csutom screen
    New transaction - require variant selection to be disabled
    This may help you.
    Regards,
    Renuka.

  • How do we define a sub-routine in a subroutine pool

    How do we define a sub-routine in a subroutine pool and how do we call the same in an executable program

    Hi
    Go to SE38.Create a program and in the program type select Subroutine pool.Inside this u can code for teh various subroutines or forms.
    For calling these forms these forms in ur main program refer below link:
    <u>http://help.sap.com/saphelp_nw04/helpdata/en/9f/db999535c111d1829f0000e829fbfe/content.htm</u>
    Sample code:
    Below is the subroutine pool used in the creation of the SAP Script:
    Program Name : Z689_SUBROUTINE
    Date          : 03/28/2007
    Author        : Sayee Manojnah Kasala
    Description  : This is the subroutine used for SAP Script,
                   Z689_SAPSCRIPT.It fetches customer details like
                    customer name & place
    PROGRAM  Z689_SUBROUTINE.
    Form GET_LAND1
    Fetches the country key
    *&      Form  get_land1
          text
         -->INTABLE    text
         -->OUTTABLE   text
    FORM get_land1 TABLES intable STRUCTURE itcsy
                          outtable STRUCTURE itcsy.
      DATA: v_kunnr LIKE kna1-kunnr,
            v_land1 LIKE kna1-land1,
            v_name1 LIKE kna1-name1.
      READ TABLE intable INDEX 1.
      v_kunnr = intable-value.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          input  = v_kunnr
        IMPORTING
          output = v_kunnr.
      IF sy-subrc = 0.
        SELECT SINGLE land1
          FROM kna1
          INTO v_land1
          WHERE kunnr = v_kunnr.
        IF sy-subrc = 0.
          READ TABLE outtable INDEX 1.
          outtable-value = v_land1.
          MODIFY outtable INDEX 1.
        ENDIF.
        SELECT SINGLE name1
          FROM kna1
          INTO v_name1
          WHERE kunnr = v_kunnr.
        IF sy-subrc = 0.
          READ TABLE outtable INDEX 2.
          outtable-value = v_name1.
          MODIFY outtable INDEX 2.
        ENDIF.
      ENDIF.
      CLEAR: intable,outtable.
    ENDFORM.                                                    "get_land1
    Form GET_LANDX
    Fetches the Country Name
    *&      Form  get_landx
          text
         -->INTABLE    text
         -->OUTTABLE   text
    FORM get_landx TABLES intable STRUCTURE itcsy
                          outtable STRUCTURE itcsy.
      DATA: v_land1 LIKE kna1-land1,
            v_landx LIKE t005t-landx.
      READ TABLE intable INDEX 1.
      v_land1 = intable-value.
      IF sy-subrc = 0.
        SELECT SINGLE landx
          FROM t005t
          INTO v_landx
          WHERE land1 = v_land1 AND spras = 'E'.
        IF sy-subrc = 0.
          READ TABLE outtable INDEX 1.
          outtable-value = v_landx.
          MODIFY outtable INDEX 1.
        ENDIF.
      ENDIF.
      CLEAR: intable,outtable.
    ENDFORM.                    "get_landx
    It can be called as follows:
    PERFORM GET_LANDX IN PROGRAM Z689_SUBROUTINE
    USING &V_LAND1&
    CHANGING&V_LANDX&
    ENDPERFORM.
    Reward points if found useful.
    Thanks
    Vasudha
    Message was edited by:
            Vasudha L

  • Subroutine pool

    how execute the subroutine pool program (progrm name: SAPFM06P).

    Hi,
    Subroutines are not stored as seperate objects. You cannot execute them.
    What you can do is create a report and INCLUDE this subroutine pool and then you can execute this report.
    But for that also you need to have PERFORM statements.
    Regards,
    Sesh

  • Difference between Macros and subroutines

    Hi experts can any one tell difference between macros and subroutines.

    1) Macros can only be used in the program the are defined in and only after the definition are expanded at compilation / generation. Subroutines (FORM) can be called from both the program the are defined in and other programs . A MACRO is more or less an abbreviation for some lines of code that are used more than once or twice. A FORM is a local subroutine (which can be called external). A FUNCTION is (more or less) a subroutine that is called external. Since debugging a MACRO is not really possible, prevent the use of them (I’ve never used them, but seen them in action). If the subroutine is used only local (called internal) use a FORM. If the subroutine is called external (used by more than one program) use a FUNCTION
    2)  The macros, which we may use,
    (stored in table TRMAC)
    , we cannot debug that code.
    3) where as in subroutine,
    its a abap code, directly visile in
    the editor,
    and we can debug this code.
    4) MACROS =>
    Getting a feel of macros
    The basic syntax of macros is as follows:
    DEFINE macro_name. "Macro Definition
    ……………. Statements
    ……………. Statements
    END-OF-DEFINITION. "Macro Definition
    macro_name par1 par2 …par9. "Macro call -parameters separated by spaces
    Within the DEFINE... and END-OF-DEFINITION lies the body of the macro—the statements that you wish to be executed each time the macro is called. These statements may be any valid ABAP statements, such as WRITE, CLEAR, FORM calls, or database statements such as SELECT or UPDATE.
    To familiarize yourself with the working of macros, it's necessary to take a close look at exactly what happens when an ABAP program containing a macro call is generated. Consider Listing A.
    All ABAP programs must be generated before they can be executed. At the time of program generation, the system supplants each macro call, as shown in Listing A, with the statement(s) placed between the macro definition. Furthermore, the parameters passed at the time of macro calling are copied in place of the any placeholders (numbered &1, &2 …&9) found in the body of the macro definition. The system simply ignores the presence of the macros during the execution of the program—that is, all statements are executed as a single block of code:
    write : int1.
    write : int2.
    write : int3.
    Other than readability and meaningfulness, macros also offer performance advantages. For testing purposes, I wrote a macro that incremented the value of a variable by 1 and called the macro N times via a DO loop, as shown here:
    DEFINE INCREMENT.
    ADD 1 TO &1.
    END-OF-DEFINITION.
    DO N TIMES.
    INCREMENT VAR1.
    ENDDO.
    SUBROUTINES=>
    Subroutines
    You call subroutines from ABAP programs using the PERFORM statement.
    Subroutines are introduced with the FORM statement and concluded with the ENDFORM statement.
    You can define subroutines in any ABAP program. You can either call a subroutine that is part of the same program or an external subroutine, that is, one that belongs to a different program. If you call an internal subroutine, you can use global data to pass values between the main program and the subroutine. When you call an external subroutine, you must pass actual parameters from the main program to formal parameters in the subroutine.
    *U Shud start rewarding helpfull answers*
    amit

  • Difference between macro and subroutine

    what is the difference between macro and subroutine? i
    need some example on macro

    Hi,
    <b>
    Subroutines</b>
    Subroutines are procedures that you can define in any ABAP program and also
    call from any program. Subroutines are normally called internally, that is, they
    contain sections of code or algorithms that are used frequently locally. If you want
    a function to be reusable throughout the system, use a function module.
    <b>Defining Subroutines</b>
    A subroutine is a block of code introduced by FORM and concluded by ENDFORM.
    FORM <subr> [USING ... [VALUE(]<pi>[)] [TYPE <t>|LIKE <f>]... ]
    [CHANGING... [VALUE(]<pi>[)] [TYPE <t>|LIKE <f>]... ].
    ENDFORM.
    <subr> is the name of the subroutine. The optional additions USING and
    CHANGING define the parameter interface. Like any other processing block,
    subroutines cannot be nested. You should therefore place your subroutine
    definitions at the end of the program, especially for executable programs (type 1).
    In this way, you eliminate the risk of accidentally ending an event block in the
    wrong place by inserting a FORM...ENDFORM block.
    <b>Macros</b>
    If you want to reuse the same set of statements more than once in a program, you can include
    them in a macro. For example, this can be useful for long calculations or complex WRITE
    statements. You can only use a macro within the program in which it is defined, and it can only
    be called in lines of the program following its definition.
    The following statement block defines a macro <macro>:
    DEFINE <macro>.
    <statements>
    END-OF-DEFINITION.
    You must specify complete statements between DEFINE and END-OF-DEFINITION. These
    statements can contain up to nine placeholders (&1, &2, ..., &9). You must define the macro
    before the point in the program at which you want to use it.
    Macros do not belong to the definition part of the program. This means that the DEFINE...ENDOF-
    DEFINITION block is not interpreted before the processing blocks in the program. At the
    same time, however, macros are not operational statements that are executed within a
    processing block at runtime. When the program is generated, macro definitions are not taken
    into account at the point at which they are defined. For this reason, they do not appear in the
    overview of the structure of ABAP programs [Page 44].
    A macro definition inserts a form of shortcut at any point in a program and can be used at any
    subsequent point in the program. As the programmer, you must ensure that the macro
    definition occurs in the program before the macro itself is used. Particular care is required if you
    use both macros and include programs, since not all include programs are included in the syntax
    check (exception: TOP include).
    To use a macro, use the following form:
    <macro> [<p1> <p2> ... <p9>].
    When the program is generated, the system replaces <macro> by the defined statements and
    each placeholder &i by the parameter <pi>. You can use macros within macros. However, a
    macro cannot call itself.
    DATA: RESULT TYPE I,
    N1 TYPE I VALUE 5,
    N2 TYPE I VALUE 6.
    DEFINE OPERATION.
    RESULT = &1 &2 &3.
    OUTPUT &1 &2 &3 RESULT.
    END-OF-DEFINITION.
    DEFINE OUTPUT.
    WRITE: / 'The result of &1 &2 &3 is', &4.
    END-OF-DEFINITION.
    OPERATION 4 + 3.
    OPERATION 2 ** 7.
    OPERATION N2 - N1.
    The produces the following output:
    The result of 4 + 3 is 7
    The result of 2 ** 7 is 128
    The result of N2 - N1 is 1
    Here, two macros, OPERATION and OUTPUT, are defined. OUTPUT is nested in
    OPERATION. OPERATION is called three times with different parameters. Note
    how the placeholders &1, &2, ... are replaced in the macros.
    Rgds,
    Prakash

  • Subroutine pool of sapscript

    Hi All
    can anybody plz tell me waht is subroutine pool of sapscript??
    waiting for replies
    THanks

    Hi,
       If you want to do calculations on some of the fields in a script one way is to change the print program. And other way is to call a routine in the windw which is in another program.
    For eg: if you have a subroutine named ADD_INCOME in a program ZSHAIL_BASIC, you can call the subroutine in SAPScript as follows:
    /: PERFORM ADD_INCOME IN PROGRAM ZSHAIL_BASIC
    /: USING &var1&
    /: CHANGING &var2&
    /: ENDPERFORM.
    Here the input parameter to the subroutine is var1 and the value returned by the subroutine is var2.
    In the program ZSHAIL_BASIC, you have to call the subroutine as
    FORM ADD_INCOME TABLES IN_TAB STRUCTURE ITCSY OUT_TAB STRUCTURE ITCSY.
    ENDFORM.
    IN_TAB is a structure of type ITCSY,which has 2 components, NAME and value.
    So in the program, var1(which is sent from SAPScript) , will be stored as IN_TAB-NAME and its value will be in IN_TAB-VALUE. You can utilise the IN_TAB-VALUE and after performing the required operations, the return value should be assigned to table OUT_TAB.
    This value can thus be obtained in var2 specified in SAPScript.
    Thanks and Regards,
    Bharat Kumar Reddy.V

  • Subroutine pools

    Hello,
    I am using statement GENERATE SUBROUTINE POOL to create a subroutine pool to dynamically filla table.  I get a dump if more than 36 are created...
    Dump text: "No more than 36 temporary subroutine pools can be generated.
    This maximum value has been exceeded. "    
    SAP documentation states .....
    "a maximum of 36 temporary subroutine pools may be created. 
    A temporary subroutine pool generated for an internal mode cannot be explicitly deleted. It remains available from its generation up to the point where the internal mode is cancelled. "
    Does anyone have an idea how I can delete the subroutine pool in internal mode?
    Thanks for your help,
    Ruairi

    You might want to have a look at this thread.
    Re: GENERATE SUBROUTINE POOL - Need to create More than 36 times
    Regards,
    Rich Heilman

  • Transporting subroutine pool

    hi
    can anyone tell me how should i transport subroutine pool please

    Hi,
    Subroutines are not stored as seperate objects. You cannot execute them.
    What you can do is create a report and INCLUDE this subroutine pool and then you can execute this report.
    But for that also you need to have PERFORM statements.
    Regards,
    Sesh

Maybe you are looking for