External sub routines

what is the syntax for external sub routines

Hi,
You can specify the name of a subroutine and, in the case of external calls, the name of the program in which it occurs, dynamically as follows:
PERFORM (fsubr)[IN PROGRAM (fprog)][USING    p1 p2... ]
                                   [CHANGING p1 p2... ]
                                   [IF FOUND].
The names of the subroutine and the external program are the contents of the fields fsubr und fprogrespectively. By using the option IF FOUND, you can prevent a runtime error from being triggered if no subroutine with the name fsubr is found. If you omit the parentheses, this variant of the PERFORMstatement behaves like the static variant.
Assume a program contains the following subroutines:
PROGRAM formpool.
FORM sub1.
  WRITE: / 'Subroutine 1'.
ENDFORM.
FORM sub2.
  WRITE: / 'Subroutine 2'.
ENDFORM.
Dynamic Subroutine Specification:
PROGRAM form_test.
DATA: progname(8) TYPE c VALUE 'FORMPOOL',
      subrname(8) TYPE c.
subrname = 'SUB1'.
PERFORM (subrname) IN PROGRAM (progname) IF FOUND.
SUBRNAME = 'SUB2'.
PERFORM (subrname) IN PROGRAM (progname) IF FOUND.
This produces the following output:
Subroutine 1
Subroutine 2
The character field progname contains the name of the program, in which the subroutines are contained. The names of the subroutines are assigned to the character field subrname.
Calling Subroutines from a List
You can call a subroutine from a list as follows:
PERFORM idx OF subr1 subr2 ... subrn.
The system calls the subroutine specified in the subroutine list in position idx. You can only use this variant of the PERFORMstatement for internal subroutine calls, and only for subroutines without a parameter interface. The field idx can be a variable or a literal.
REPORT demo_mod_tech_perform_list.
DO 2 TIMES.
  PERFORM sy-index OF sub1 sub2.
ENDDO.
FORM sub1.
  WRITE / 'Subroutine 1'.
ENDFORM.
FORM sub2.
  WRITE / 'Subroutine 2'.
ENDFORM.
This produces the following output:
Subroutine 1
Subroutine 2
In this example, the two internal subroutines, sub1 and sub2, are called consecutively from a list.
Regards
Sudheer

Similar Messages

  • Calling external sub-routine from script

    asap.

    this simple example can help you out i hope.
    in the script,
    /: PERFORM WAREHOUSE IN PROGRAM ZWAREHOUSE
    /: USING &WERKS&
    /: USING &LGORT&
    /: CHANGING &FLAG&
    /: ENDPERFORM
    /: IF &FLAG& NE 'X'
    <print the data>
    /: ENDIF
    in the program zwarehouse,
    FORM warehouse TABLES fp_in STRUCTURE itcsy
    fp_out STRUCTURE itcsy.
    TABLES t320.
    DATA : l_werks LIKE resbd-werks,
    l_lgort LIKE resbd-lgort,
    l_flag(1) type c.
    clear : l_werks, l_lgort, l_FLAG.
    READ TABLE fp_in INDEX 1.
    l_werks = fp_in-value.
    READ TABLE fp_in INDEX 2.
    l_lgort = fp_in-value.
    SELECT SINGLE *
    FROM t320
    WHERE werks EQ l_werks AND
    lgort EQ l_lgort.
    IF SY-SUBRC EQ 0.
    l_flag = 'X'.
    ENDIF.
    READ TABLE fp_out INDEX 1.
    fp_out-value = l_flag.
    MODIFY fp_out INDEX sy-tabix.
    ENDFORM. "WAREHOUSE

  • Reg, sub routine

    how can u call a sub-routine from other programmes?

    Hi,
    Start of Content Area
    Naming Subroutines Locate the document in its SAP Library structure
    With the PERFORM statement, you can call subroutines which are coded in the same ABAP program (internal calls), or subroutines which are coded in other ABAP programs (external calls).
    You can also specify the name of the subroutine dynamically at runtime, and call subroutines from a list.
    Internal Subroutine Calls
    To call a subroutine defined in the same program, you need only specify its name in the PERFORM statement:
    PERFORM subr [USING    p1 p2... ]
                 [CHANGING p1 p2... ].
    The internal subroutine can access all of the global data of the calling program.
    Example
    REPORT demo_mod_tech_perform_int.
    DATA: num1 TYPE i,
          num2 TYPE i,
          sum  TYPE i.
    num1 = 2. num2 = 4.
    PERFORM addit.
    num1 = 7. num2 = 11.
    PERFORM addit.
    FORM addit.
      sum = num1 + num2.
      PERFORM out.
    ENDFORM.
    FORM out.
      WRITE: / 'Sum of', num1, 'and', num2, 'is', sum.
    ENDFORM.
    This produces the following output:
    Sum of          2 and          4 is          6
    Sum of          7 and         11 is         18
    In this example the subroutines addit and out are defined at the end of the program. addit is called by the program and out is called by addit. The subroutines have access to the global fields num1, num2 und sum.
    External Subroutine Calls
    The principal function of subroutines is for modularizing and structuring local programs. However, subroutines can also be called externally from other ABAP programs. In an extreme case, you might have an ABAP program that contained nothing but subroutines. These programs cannot run on their own, but are used by other ABAP programs as pools of external subroutines.
    However, if you want to make a function available throughout the system, you should use function modules instead of external subroutines. You create function modules in the ABAP Workbench using the Function Builder. They are stored in a central library, and have a defined release procedure.
    You can encapsulate functions and data in the attributes and methods of classes in ABAP Objects. For any requirements that exceed pure functions, you can use global classes instead of external subroutines.
    When you call a subroutine externally, you must know the name of the program in which it is defined:
    PERFORM subr(prog) [USING    p1 p2... ]
                       [CHANGING p1 p2... ] [IF FOUND].
    You specify the program name prog statically. You can use the IF FOUND option to prevent a runtime error from occurring if the program progdoes not contain a subroutine subr. In this case, the system simply ignores the PERFORM statement.
    When you call an external subroutine, the system loads the whole of the program containing the subroutine into the internal session of the calling program (if it has not already been loaded). In order to save memory space, you should keep the number of subroutines called in different programs to a minimum.
    Example
    Suppose a program contains the following subroutine:
    REPORT formpool.
    FORM header.
      WRITE: / 'Program started by', sy-uname,
             / 'on host', sy-host,
               'date:', sy-datum, 'time:', sy-uzeit.
      ULINE.
    ENDFORM.
    The subroutine can then be called from another program as follows:
    REPORT demo_mod_tech_perform_ext.
    PERFORM header(demo_mod_tech_formpool_1) IF FOUND.
    In this example, no data is passed between the calling program and the subroutine.
    Specifying Subroutines Dynamically
    You can specify the name of a subroutine and, in the case of external calls, the name of the program in which it occurs, dynamically as follows:
    PERFORM (fsubr)[IN PROGRAM (fprog)][USING    p1 p2... ]
                                       [CHANGING p1 p2... ]
                                       [IF FOUND].
    The names of the subroutine and the external program are the contents of the fields fsubr und fprogrespectively. By using the option IF FOUND, you can prevent a runtime error from being triggered if no subroutine with the name fsubr is found. If you omit the parentheses, this variant of the PERFORMstatement behaves like the static variant.
    Example
    Assume a program contains the following subroutines:
    PROGRAM formpool.
    FORM sub1.
      WRITE: / 'Subroutine 1'.
    ENDFORM.
    FORM sub2.
      WRITE: / 'Subroutine 2'.
    ENDFORM.
    Dynamic Subroutine Specification:
    PROGRAM form_test.
    DATA: progname(8) TYPE c VALUE 'FORMPOOL',
          subrname(8) TYPE c.
    subrname = 'SUB1'.
    PERFORM (subrname) IN PROGRAM (progname) IF FOUND.
    SUBRNAME = 'SUB2'.
    PERFORM (subrname) IN PROGRAM (progname) IF FOUND.
    This produces the following output:
    Subroutine 1
    Subroutine 2
    The character field progname contains the name of the program, in which the subroutines are contained. The names of the subroutines are assigned to the character field subrname.
    Calling Subroutines from a List
    You can call a subroutine from a list as follows:
    PERFORM idx OF subr1 subr2 ... subrn.
    The system calls the subroutine specified in the subroutine list in position idx. You can only use this variant of the PERFORMstatement for internal subroutine calls, and only for subroutines without a parameter interface. The field idx can be a variable or a literal.
    Example
    REPORT demo_mod_tech_perform_list.
    DO 2 TIMES.
      PERFORM sy-index OF sub1 sub2.
    ENDDO.
    FORM sub1.
      WRITE / 'Subroutine 1'.
    ENDFORM.
    FORM sub2.
      WRITE / 'Subroutine 2'.
    ENDFORM.
    This produces the following output:
    Subroutine 1
    Subroutine 2
    Regards,
    Chandru

  • Select statement in a sub routine(For Sapscript)

    Hi,
    M unable to write select statement for my reqirement in Sap-script in Sub routine.
    My requirement is 1)"Your correspondent for quality" in main window of my form.
    For dis rule is as below
    "Get the 'changed by' value resord in table QCPR field AENDERER.For the same value found in tabe USR21 fiels BNAME,pick up the PERSUNUM value.For dis PERSUNUM value, found in ADRP feild NAME_TEXT the value for "Your Correspondent for Quality".
    2) For this PERSUNUM value found in ADCP-TEL_NUMBER the vakue for "Ph".
    3)For this PERSUNUM value found in ADCP-FAX_NUMBER the vakue for "FAX".
    4For this PERSUNUM value found in ADR6-SMTP_ADDR the vakue for "EMAIL".
    Please help me out it's urgent for me.I wil b waiting 4 ur reply.

    READ TABLE in_par WITH KEY 'QCPR-AENDERER'.
      CHECK sy-subrc = 0.
      MOVE in_par-value TO V_aenderer
    .  READ TABLE in_par WITH KEY 'USR21-BNAME.
      CHECK sy-subrc = 0.
      MOVE in_par-value TO V_bname
      SELECT SINGLE persnumber addrnumber
        INTO wa_usr21-persnumber wa_usr21-addrnumber
        FROM usr21
        WHERE bname = V_bname
    and <b>check field for this</b> = V_aenderer.
      CHECK sy-subrc = 0.
      SELECT SINGLE tel_number fax_number
        INTO adcp-tel_number adcp-fax_number
        FROM adcp
        WHERE addrnumber = usr21-addrnumber
          AND persnumber = usr21-persnumber.
      CHECK sy-subrc = 0.
      READ TABLE out_par WITH KEY 'ADCP-TEL_NUMBER'.
      CHECK sy-subrc = 0.
      out_par-value = adcp-tel_number.
      MODIFY out_par INDEX sy-tabix.
      READ TABLE out_par WITH KEY 'ADCP-FAX_NUMBER'.
      CHECK sy-subrc = 0.
      out_par-value = adcp-fax_number.
      MODIFY out_par INDEX sy-tabix.
      SELECT SINGLE smtp_addr
        INTO adr6-smtp_addr
        FROM adr6
        WHERE addrnumber = usr21-addrnumber
          AND persnumber = usr21-persnumber.
      READ TABLE out_par WITH KEY 'ADR6-SMTP_ADDR'.
      CHECK sy-subrc = 0.
      out_par-value = adr6-smtp_addr.
      MODIFY out_par INDEX sy-tabix.
    Regards

  • How to on Debugging Mode for T-Code F110 from Script in Sub routine Pool Pr

    Hi Every one....
    I have done SAP-Script for Payment Vocher for T-code F110 ..I have a Sub Routine Program where I have few Form statements which is called by SAP - Script using Perform Statements, But my problem is when I set a break point in Sub Routine pool program, the out put is issuing with out Debugger ...
    Could any one plz suggest me wht to do???
    Help ful answers will be rewarded....
    Regards,
    sg

    Hi,
    First see if the 'Perform' statement is getting triggered in Script. To put a breakpoint in any script ( even if you do not know the form name, that is the best part ) is se38---->RSTXDBUG --->F8 & execute your pgm/Transaction. The control will wait in the form-debugger.
    I hope this helps,
    Regards
    Raju Chitale

  • How do we write the sub routines in smart forms?

    1) How do we write the sub routines in smart forms?
    2) What is the’ form interface’ in smart forms?
    3) Write down the path for writing for select queries in smart forms?
    4) How do we put dynamic page break in smart forms?
    5) in which system field contain the total page number of all forms in the currently processed print request in smart forms?
    6) What is the name of function module used to calling smart forms?
    1)     What is the functionality of function module ‘controal_form’?
    2)     How do we print the system date in this format ’15th Jan 2008’ on scripts?
    3)     What r the various print modes available in scripts?
    4)     What is the tcode for text element?
    5)     How do we draw horizontal line in scripts?
    6)     How can we suppress the leading zeros for a field in scripts?
    7)     In which system field is used to print current no page in scripts?
    Which f.m is used to reads text in sap scripts

    1) How do we write the sub routines in smart forms?
    after opening form see global definitions
    click on that there one tab called form routines inthat you can write subroutines logic.
    You can call in program lines .
    2) What is the’ form interface’ in smart forms?
    It is an interface between program and form .
    like function module we provide import,export,tables,exceptions
    Based on import and export parameters form will display for us.
    3) Write down the path for writing for select queries in smart forms?
    On window give right click in that command->programlines
    you can write all select  statements.
    4) How do we put dynamic page break in smart forms?
    you can define break point using break-point<>. syntax.
    5) in which system field contain the total page number of all forms in the currently processed print request in smart forms?
    SFSY-PAGE
    SFSY-JOBPAGES
    6) What is the name of function module used to calling smart forms?
    SSF_FUNCTION_MODULE_NAME
    =================
    1) What is the functionality of function module ‘control_form’?
    This function module is used to insert SAPScript control commands like NEW-PAGE etc from whithin the ABAP program.
    CALL FUNCTION 'CONTROL_FORM'
    EXPORTING
      COMMAND    =
    EXCEPTIONS
      UNOPENED   = 1
      OTHERS        = 3
    IF SY-SUBRC NE 0.
    MESSAGE ...
    ENDIF.
    2) How do we print the system date in this format ’15th Jan 2008’ on scripts?
    Use SET DATE MASK to change format of date display.
    3) What r the various print modes available in scripts?
    4) What is the tcode for text element?
    se91
    5) How do we draw horizontal line in scripts?
    &ULINE&
    6) How can we suppress the leading zeros for a field in scripts?
    &it_vbak-vbeln(Z)&
    7) In which system field is used to print current no page in scripts?
    &SYST-PAGE& of &SYST-FORMPAGES&
    Which f.m is used to reads text in sap scripts
    READ_TEXT functiomodule.
    Reward points

  • Dynamic TABLE parameter in Sub routine call

    Hi,
    Is it possible to have a dynamic TABLE parameter in a sub-routine call? The structure of the internal table will be different during different calls to the sub-routine.
    I have a subroutine which has the FM "HR_INFOTYPE_OPERATION" to update the infotype data for an Applicant. Now i want to call this subroutine for every Infotype update. So every time the structure of the internal table to be passed will vary depending on Infotype ( eg P0002 for Infotype 0002, p0006 for infotype 0006).
    Any pointers will be appreciated.
    Thanks in advance.

    Hi Navin,
    yes, why not.
    just use a generic type parameter, i.e.
    FORM process USING IT_00x type table IV_type typc.
    It depend what yout FORM shall do. If you pass the types name, you can dynamically assign to a field-symbol of the respective type.
    Regards,
    Clemens

  • How do i make this a sub routine

    I have a little script to drill down folders and add comments to every folder and ever file inside the parent folder. It works perfectly well when run but itself. This was based heavily on the script found by NovaScotian here http://discussions.apple.com/thread.jspa?messageID=2182916&#2182916
    I basically want to make this script into a sub routine, and i have tried various methods and havent been able to make it work.
    global the_comments
    global each_item
    global pete
    global ddp
    global ddp2
    set ddp to {}
    set ddp2 to {}
    set theLetter to "s"
    set newDroppedFiles to choose folder with multiple selections allowed
    to drilldown(afolder)
    tell application "Finder"
    set file_list to files of a_folder
    set folder_list to folders of a_folder
    end tell
    repeat with i in file_list
    processDrilledDownFile(i)
    tell application "Finder"
    set comment of pete to text of the_comments
    end tell
    end repeat
    repeat with i in folder_list
    copy i to end of ddp2
    drill_down(i)
    end repeat
    end drill_down
    on processDrilledDownFile(a_file)
    copy a_file to end of ddp
    end processDrilledDownFile
    set the_comments to (do shell script "/usr/bin/defaults read com.Rich.move " & theLetter & "Text")
    repeat with each_item in newDroppedFiles
    set pete to each_item
    tell application "Finder"
    set comment of each_item to text of the_comments
    end tell
    drill_down(pete)
    end repeat
    repeat with each_item in ddp
    tell application "Finder"
    set comment of each_item to text of the_comments
    end tell
    end repeat
    repeat with each_item in ddp2
    tell application "Finder"
    set comment of each_item to text of the_comments
    end tell
    end repeat
    regards
    Rich

    Your script already includes several subroutines, so the trick is separating those out first.
    Essentially your script consists of three elements - global declarations, your own subroutines and a run handler. Since there's no explicit 'on run', everything that's not inside a subroutine becomes the run handler.
    Therefore what you should do is strip out all the code that's not a global declaration or an existing handler and just wrap that in a new 'on subroutinename()... end subroutinename' block.
    For sanity's sake I'd also add a specific run handler to bind it all together.
    This means you'll end up with something like:
    <pre class=command>global the_comments
    global each_item
    global pete
    global ddp
    global ddp2
    on run
    my myNiftySubroutine()
    end run
    to drilldown(afolder)
    tell application "Finder"
    set file_list to files of a_folder
    set folder_list to folders of a_folder
    end tell
    repeat with i in file_list
    processDrilledDownFile(i)
    tell application "Finder"
    set comment of pete to text of the_comments
    end tell
    end repeat
    repeat with i in folder_list
    copy i to end of ddp2
    drill_down(i)
    end repeat
    end drill_down
    on processDrilledDownFile(a_file)
    copy a_file to end of ddp
    end processDrilledDownFile
    on myNiftySubroutine()
    set ddp to {}
    set ddp2 to {}
    set theLetter to "s"
    set newDroppedFiles to choose folder with multiple selections allowed
    set the_comments to (do shell script "/usr/bin/defaults read com.Rich.move " & theLetter & "Text")
    repeat with each_item in newDroppedFiles
    set pete to each_item
    tell application "Finder"
    set comment of each_item to text of the_comments
    end tell
    drill_down(pete)
    end repeat
    repeat with each_item in ddp
    tell application "Finder"
    set comment of each_item to text of the_comments
    end tell
    end repeat
    repeat with each_item in ddp2
    tell application "Finder"
    set comment of each_item to text of the_comments
    end tell
    end repeat
    end myNiftySubroutine</pre>
    There's just one other observation - most of the globals are not actually needed since you can just pass them as parameters to the subroutines.
    I'm also not sure what the purpose of the script is - the upshot seems to be that you're setting the comment of items in the Finder, however, since you:
    <pre class=command> set comment of pete to text of the_comments</pre>
    and pete is a global pointing to the folder you're processing, surely this sets the comment of the folder x times, where x is the number of files in the folder - in other words if there are 100 files in the folder, you set the comment of the folder 100 times and don't touch the files themselves. Is that what you intend?

  • Passing parametrs to Sub routines

    Hi all,
    Please tell me how to pass the Parameters  as message number and message id for an SUB ROUTINE.If possible please give me the sample code.
    Regards
    Ajay

    declare
    data : message_nm type  sy-msgno,
            sys_id type sy-repid.
    simply write rthe oerform AS
    perform sample_form using message_nm
                                            sys_id
    then in the form.
    form sample_form using message_nm type sy-msgno
                                            sys_id type sy-repid .
    endform.
    reward points if useful...
    Edited by: Rudra Prasanna Mohapatra on Jun 25, 2008 1:41 PM

  • Include or sub-routine in user-exit

    Hi all,
    i want to put  a sub-routine in my customer user-exit (CMOD).but i can not put the subroutine.
    can i put a subroutine or include statement in a user exit?
    correct answers will be rewarded.
    Thanks
    pabi

    You can make subroutine calls inside a User exit, only if the exit is part of a function pool. All the subroutines can be placed in an include in the function pool & can be called with a Perform Statement from the User Exit.
    ~Suresh

  • 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

  • Urgent!!!!Related To SUB-ROUTINES

    Hi All,
    I have 2 subroutines.My problem is that if a particular sub-routine is terminated in middle for any reason my second sub-routine should not get called.How can i know that?Please answer my question as soon as possible.
    Useful answers will be rewarded with points.
    Regards,
    Chaitanya.
    Message was edited by:
            LEELA KRISHNA SAI CHAITANYA

    Hi leela,
    you can use one global variable for this as flag.
    ex:
    data flag type c.
    perform sub1.
    if flag = 'X'.
    perform sub2.
    endif.
    form sub1.
    if (condition yes).
       flag = 'X'.
    endif.
    endform.
    form sub2.
    endform.
    this will work well

  • Smart forms not displaying result from sub routine

    I am working on a smart form and need to display the description of the fabric code. Under Form Routines, I create a sub routine
    FORM fcc_values USING gv_fabrictext.
    which is supposed to store the description in gv_fabrictext. GV_FABRICTEXT has been declared in global data as char64. Then I call prior to displaying my table as
    perform fcc_values using gv_fabrictext.
    And then insert the field &gv_fabrictext& in cell but this does not display any result
    I know for sure that this sub routine works as I have tested it separately as a test program. Any ideas?

    1. put break point at ssf_function madulename and check field value.
    or
    2 fm_name export parameter ur not mentioned
    or
    3 global variable not defined properly
    go through above. still if u didnt get
    need program where the problem to find.
    Message was edited by:
            Deepa KN

  • Inability to integrate an external C routine

    Hello, I am K Vishwanathan.
    I need some help:
    I am unable to integrate an external C routine with my forte application I
    followed all the steps given in the "Integrating with External Systems"
    manual Page # 4-6.
    I am working on Windows'95 Platform , used Borland C++ ver 3.1 Compiler
    Compilation Result is :
    D:\BORLANDC\BIN>bcc @cp.rsp
    Borland C++ Version 3.1 Copyright (c) 1992 Borland International
    c:\forte\distrib\libs\cproj\cl1\cproj.cc:
    Available memory 3641820
    This is cp.rsp file --
    -2 -ml -c -v -j10 -W3 -Wx -DSTRICT -WD -P -Ic:\forte\distrib\libs\CProj\cl1
    -Ic:\forte\install\inc\cmn -Ic:\forte\install\inc\os
    c:\forte\distrib\libs\CProj\cl1\CProj.cc
    Linking Result is :
    D:\BORLANDC\BIN>tlink /v /c /C /m /s /n /Vt /Twd @cproj.rsp
    Turbo Link Version 5.1 Copyright (c) 1992 Borland International
    Warning: No module definition file specified: using defaults
    Fatal: Bad object file record in library file c:\forte\install\lib\qqsh.lib
    in module @qqsh_CompiledLOM@0CreatePartition$qn9qqsh_Task near module file
    offset 0x00000000
    This is CProj.rsp file --
    C0dl c:\forte\install\lib\dll.obj CProj.obj CProgram
    CProj.dll
    CProj.map
    IMPORT c:\forte\install\lib\qqsh.lib c:\forte\install\lib\qqkn.lib MATHWL
    CRTLDLL c:\forte\distrib\libs\CProj\cl1\CProj.def
    Any help in this matter would be highly appreciated.
    Thanks in advance
    K. Vishwanathan
    SSI- Software Services International
    419 Park Avenue South
    New York, NY 10016
    Tel: (212) 725-7646 x 33
    Fax: (212) 725-7647
    E-Mail: [email protected]

    Although your error message looks a little different, a bad object file
    usually has indicated to me that the object that you are attempting to
    wrapper is not a true obj or lib file. If you are attempting to wrapper a
    dll (or exe like user.exe in Win 3.1) then you need to create a lib from
    it and wrapper the lib. The Borland 4.5 syntax to do this is 'implib
    destfile.lib source.dll'
    I hope this is of some value to you.
    Tony Elmore <[email protected]>
    From: K. Vishwanathan <[email protected]>
    To: [email protected]
    Subject: Inability to integrate an external C routine
    Date: Tuesday, July 09, 1996 9:53 AM
    Hello, I am K Vishwanathan.
    I need some help:
    I am unable to integrate an external C routine with my forteapplication I
    followed all the steps given in the "Integrating with External Systems"
    manual Page # 4-6.
    I am working on Windows'95 Platform , used Borland C++ ver 3.1 Compiler
    Compilation Result is :
    D:\BORLANDC\BIN>bcc @cp.rsp
    Borland C++ Version 3.1 Copyright (c) 1992 Borland International
    c:\forte\distrib\libs\cproj\cl1\cproj.cc:
    Available memory 3641820
    This is cp.rsp file --
    -2 -ml -c -v -j10 -W3 -Wx -DSTRICT -WD -P-Ic:\forte\distrib\libs\CProj\cl1
    -Ic:\forte\install\inc\cmn -Ic:\forte\install\inc\os
    c:\forte\distrib\libs\CProj\cl1\CProj.cc
    Linking Result is :
    D:\BORLANDC\BIN>tlink /v /c /C /m /s /n /Vt /Twd @cproj.rsp
    Turbo Link Version 5.1 Copyright (c) 1992 Borland International
    Warning: No module definition file specified: using defaults
    Fatal: Bad object file record in library filec:\forte\install\lib\qqsh.lib
    in module @qqsh_CompiledLOM@0CreatePartition$qn9qqsh_Task near modulefile
    offset 0x00000000
    This is CProj.rsp file --
    C0dl c:\forte\install\lib\dll.obj CProj.obj CProgram
    CProj.dll
    CProj.map
    IMPORT c:\forte\install\lib\qqsh.lib c:\forte\install\lib\qqkn.libMATHWL
    CRTLDLL c:\forte\distrib\libs\CProj\cl1\CProj.def
    Any help in this matter would be highly appreciated.
    Thanks in advance
    K. Vishwanathan
    SSI- Software Services International
    419 Park Avenue South
    New York, NY 10016
    Tel: (212) 725-7646 x 33
    Fax: (212) 725-7647
    E-Mail: [email protected]

  • How to call external Perl routines from Pl/SQL - Urgent

    Available software in the Test Environment:
    1. Sun Unix 2.8
    2. Oracle 8.1.7 ( 8i)
    3. Perl 5
    Iam trying to call/execute perl scripts from PL/SQL using the DEMO_RDBMS.mk. I am able to call C scripts from PL/SQL, but actually want to call Perl scripts.
    The steps followed for for C are -
    1. Create and compile a simple C program to execute a unix command (eg., touch a file).
    2. Make a shared library of the above compiled program (object), i.e., load the compiled object module into a dynamic load library.
    3. Declare the above library in Oracle using SQL*Plus.
    4. Define a PL/SQL function or procedure to call the external routine.
    5. Test the external routine.
    The above steps run good for a C program, but step 2 fails when run for a Perl script.
    When I tried to use the following command for step 2 -
    make -f $ORACLE_HOME/rdbms/demo/demo_rdbms.mk extproc_callback \
    SHARED_LIBNAME=cmd_lib.so \
    OBJS=tst_cmd.pl
    got the following error -
    ld: fatal: file tst_cmd.pl: unknown file type.
    ld: fatal: File processing errors. No output written t cmd_lib.so
    *** Error code 1
    This gives me an indication that demo_rdbms.mk does not understand/interpret Perl scripts. Going through the demo_rdbms.mk suggests the same.
    My questions is - How do we call external Perl scripts/routines from PL/SQL ??
    Do I have to get a different version of "demo_rdbms.mk" ?
    PS: The perl scripts used above (tst_cmd.pl) is error free and works as intended in the unix environment.

    Iam trying to call/execute perl scripts from PL/SQL using the DEMO_RDBMS.mk. I am able to call C scripts from PL/SQL, but actually want to call Perl scripts. Well, C is a "compiler" language and Perl is interpreted. In a sense, C is not "scripts".
    When I tried to use the following command for step 2 -
    make -f $ORACLE_HOME/rdbms/demo/demo_rdbms.mk extproc_callback \
    SHARED_LIBNAME=cmd_lib.so \
    OBJS=tst_cmd.pl
    got the following error -
    ld: fatal: file tst_cmd.pl: unknown file type.
    ld: fatal: File processing errors. No output written t cmd_lib.soI guess this compiles an extproc "stub" with your object file, generating an external procedure. So the object file really needs to be an object file :-)
    My questions is - How do we call external Perl scripts/routines from PL/SQL ??I'd guess you need an embedded Perl interpreter in the external procedure.
    Not much help though I'm afraid :-/
    Cheers
    Fredrik

Maybe you are looking for

  • Refreshing an UIX page

    Does anybody know how to explicitly for an refresh on a UIX page. The problem that I have now is that only after I some where did a rollback, the page is displayed correctly. Before the rollback, the page shows one table updated and one table still i

  • Varchar2 issue..

    Hi all... Database: oracle 11g please help me with this issue. we are calling a SQL server procedure which returs a string. The string can be very large The procedure is working fine on their side, but if i call that procedure i am not getting any ou

  • Dynamic Link Vs. File- Export- Media

    I'm probably about to open a can of worms, but could ya'll take a minute and debate the pros and cons of Dynamic Link vs Exporting?  As far as I can tell, exporting triples or quadruples the time involved and I need to produce quick results.  And as

  • IDOCS: How to Create Address Master to tranfer TPSLOC01 Idoc

    Hi Gurus, We are tranferring Location Masters like Customer, Vendor, Plant through TPSLOC01 IDOCs from SAP ECC 6.0 to Third party Trnasport Management System. How to create Address Master Data (TRMTYP-AD) separately like Customer Master (TRMTYP-CU, V

  • Eclipse SLI: Can't change Base Clock in Bios

    Not sure why, but in the Cell Menu in the Bios (v. 1.6) the Base Clock can't be changed - hitting Enter when it's highlighted does nothing.  It's not greyed out, just doesn't change. I looked in the manual and it shows a setting for D.O.T. Control ri