Trouble calling functions in PHP

I am trying to get around this problem that I have been stuck
on so as to call a function in the $videoSQL list that uses an
array list from a database. Any help would be appreciated.

you can use AMFPHP. here is an artile which leads to a pdf explanation:
http://blogs.adobe.com/mikepotter/2006/02/flex_and_php_us.html
or you can google.

Similar Messages

  • Trouble calling function

    I am having trouble calling simple functions and/or procedures for my database. First of all, here is the DDL to create a single table with a single entry:
    CREATE TABLE Security (SSN char(9) NOT NULL, PASSWORD char(10) NOT NULL);
    INSERT INTO Security ('123456789', 'mypass');
    Now, I want to create a function that takes an SSN and password and returns true if they are associated, and false otherwise. I was able to successfully create the function with no errors using the following:
    CREATE OR REPLACE FUNCTION CheckPassword(inSSN VARCHAR2, inPASS VARCHAR2)
    RETURN BOOLEAN
    IS
    valid_pass BOOLEAN;
    selected_pass char(10);
    BEGIN
    SELECT password INTO selected_pass FROM security WHERE ssn=inSSN;
    RETURN selected_pass = inPASS;
    END CheckPassword;
    show errors
    However, now I cannot call the function. I have been looking online and the references say to use "call" or "execute", and I have tried both with no luck.
    When I try to use "call CheckPassword ('123456789', 'mypass');"
    call CheckPassword ('123456789', 'mypass')
    ERROR at line 1:
    ORA-06576: not a valid function or procedure name
    When I try to use "execute CheckPassword ('123456789', 'mypass');"
    BEGIN CheckPassword ('123456789', 'mypass'); END;
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00221: 'CHECKPASSWORD' is not a procedure or is undefined
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    It keeps saying undefined or not a valid function or procedure, but it is. I've created it and can see that it is exists and is valid by using "select * from user_objects". I have also tried "call function CheckPassword..." and "execute function CheckPassword..." but neither work. What am I doing wrong?
    Thanks
    Blake

    You've created a function which returns a boolean type. You can't just ignore the return value of a function.
    Oh, and another thing...the table you created uses CHAR types, but your function uses VARCHAR2. This can lead to some bugs.
    Are you sure you need CHAR types in your table?

  • Calling function from PHP

    How do you call a function plsql from PHP 5.0 and Oracle 10g XE?
    Thank you

    Two tips
    1 Otn.oracle.com has a tutorial section. Tutorials on PHP exist.
    2 This is the SQL forum, the PHP forum is PHP.
    I suggest you either read the tutorial or repost your question in this more appropiate forum.
    Sybrand Bakker
    Senior Oracle DBA

  • Calling function from PHP fails..!

    Hi everybody.
    I'm developing a web application using oracle Portal and have made a 'dynamic' page from the Portal. In this page I have a form which execute a php script.
    In the php script I want to get the logged in userid.
    So I try to execute the following code in my php script:
    $plsql = "begin :userid := portal.wwsto_api_session.load_session('MY_DOMAIIN','SUBDOMAIN').get_attribute_as_varchar2('USERNAME'); end;";
    $stmt = OCIParse($conn,$plsql);
    OCIBindByName($stmt, ":userid", $user);
    OCIExecute($stmt);
    I have already set the session data in the dynamic page and have also tested that the session data is working.
    But, in the php script I get the following error messages:
    Warning: ociexecute(): OCIStmtExecute: ORA-06510.....
    ORA-06512: ved "PORTAL.WWCTX_SSO", line 1744 ORA-06510: PL/SQL: ....
    The error message refer to the OCIExecute(..) statement.
    I'm running PHP version 4.3.9 and Oracle 10g on windows 2003 server.
    Hope you can give me some hints!
    sh75.

    Well, the user is already logged in, and I assume that the session should still be valid even though the user goes to a new URL (within the same domain). Dont you agree?
    Steps in my application is as follows:
    1. Set session data in dynamic page
    2. User press submit bottom which call php-script
    3. php script tries to fetch session data set in (1) and does insert in a table
    4. php script redirect back to dynamic page (same as (1) )
    I thought this was trivial.....
    sh75

  • Problem calling function

    Hi,
    i have creted a function module which read stock quantity using BAPI_MATERIAL_AVAILABILITY.
    Import - MFRPN
    Export - QNTY
    If i execute function module from SAP the result it's OK but when i call function from PHP it does not output nothing.
    $sap = new saprfc(array(
                                       "logindata"=>array(
                                            "ASHOST"=>"192.168.3.1"          // application server
                                            ,"SYSNR"=>"00"                    // system number
                                            ,"CLIENT"=>"200"               // client
                                            ,"USER"=>"rfc"               // user
                                            ,"PASSWD"=>"123456789"          // password
                                       ,"show_errors"=>true               // let class printout errors
                                       ,"debug"=>false)) ;                     // detailed debugging information
              // Call-Function
              // Call-Function
              $result=$sap->callFunction("Z_READ_QNTY",
                                                             array(
                                                                     array("IMPORT","MFRPN",$_POST['cod']),
                                                                     array("EXPORT","QNTY",$quantity),
              // Call successfull?
              if ($sap->getStatus() == SAPRFC_OK)
                   echo $quantity;
              else
                   // No, print long Version of last Error
                   $sap->printStatus();
                   // or print your own error-message with the strings received from
                   //           $sap->getStatusText() or $sap->getStatusTextLong()
    Please someone help me.
    Thank you.

    hi Dan,
    i will send you an working code sample. The  Fuba ZGET_MAKTX is easy  MATNR as import parameter and MAKTX as export parameter.
    you will receive the material short description.
    hope this will help you a little bit.
    in your code i thing you forgot to fill the $quantity    like this    $quantity = saprfc_export($fce,"QNTY");   before         echo $quantity;
    regards
    Tony
    <?php
         //Login to SAP R/3
         $login = array ("ASHOST"=>"vsap3", "SYSNR"=>"2", "CLIENT"=>"200","USER"=>"vsrfc", "PASSWD"=>"********", "CODEPAGE"=>"1100");
         $rfc = saprfc_open($login);
         if (!$rfc) {
              echo "RFC connection failed";
              exit;
         $fce = saprfc_function_discover($rfc,"ZGET_MAKTX");
         if (!$fce) {
              echo "Discovering interface of function module failed";
              exit;
         saprfc_import($fce,"MATNR","200200");
         $rc = saprfc_call_and_receive ($fce);
             if ($rfc_rc != SAPRFC_OK) { if ($rfc == SAPRFC_EXCEPTION ) echo ("Exception raised: ".saprfc_exception($fce)); else echo (saprfc_error($fce)); exit; }
             $maktx = saprfc_export($fce,"MAKTX");
             echo $maktx;
             saprfc_function_free($fce);
             saprfc_close($rfc);
    ?>
    Edited by: Tony Wienhold on Oct 7, 2008 11:19 AM
    Edited by: Tony Wienhold on Oct 7, 2008 11:22 AM

  • How to call PL/SQL function from php

    I have one function define in package,like below
    >>
    create or replace package body Intg$Label_DB as
    Future constant date := to_date ('21990101', 'YYYYMMDD');
    Max_Annotation_Len integer := 3995;
    function Get_Tagged_Label (Product_Name varchar2,Branch_Name varchar2, Platform_Name varchar2, Schema_Name varchar2) return varchar2 is
    Series_Id integer := Get_Series (Product_Name,Branch_Name,Platform_Name);
    Schema_Id integer := Get_Schema (Schema_Name);
    Dep_Label_Id integer;
    Next_Dep_Label_Id integer;
    Result_Id integer;
    Result Intg$Labels.Name%type;
    begin
    select SLT.Dep_Label_Id, SLT.Next_Dep_Label_Id into Dep_Label_Id, Next_Dep_Label_Id
    from Intg$Series_Label_Tags SLT
    where SLT.Series_Id = Get_Tagged_Label.Series_Id and SLT.Schema_Id = Get_Tagged_Label.Schema_Id;
    Result_Id := Next_Dep_Label_Id;
    if Result_Id = -1 then
    Result_Id := Dep_Label_Id;
    end if;
    select L.Name into Result from Intg$Labels L where L.Id = Result_Id;
    return Result;
    exception
    when NO_DATA_FOUND then
    return '';
    end Get_Tagged_Label;
    >>
    i want to call Get_Tagged_Label() from php and print the output,I tried below code but seems i am missing lots of things here.Any help will be appreciate.
    $sql = 'BEGIN INTG$Label_DB.Get_Tagged_Labell(:Product_Name,:Branch_name,:Platform_Name,:message,:message_1,:message_2); END;';
    $stmt = oci_parse($conn,$sql) or die ('Can not parse query') ;
    // Bind the input parameter
    oci_bind_by_name($stmt,':Product_Name',$name,32);
    oci_bind_by_name($stmt,':Branch_name',$branch,32);
    oci_bind_by_name($stmt,':Platform_Name',$pt,32);
    // Bind the output parameter
    oci_bind_by_name($stmt,':message',$message,32);
    oci_bind_by_name($stmt,':message_1',$message_1,32);
    oci_bind_by_name($stmt,':message_2',$message_2,32);
    // Assign a value to the input
    $name = 'PCBPEL';
    $branch ='MAIN';
    $pt ='GENERIC';
    oci_execute($stmt);
    Thanks
    Hridyesh

    What errors are you getting?
    It's always helpful to know the version of PHP and the database.
    When calling a function, you'll need a bind variable to hold the return value, and make sure the number of parameters match:
    $sql = 'BEGIN :rv := INTG$Label_DB.Get_Tagged_Labell(:Product_Name,:Branch_name,:Platform_Name,:message); END;';
    This new variable will need to bound with oci_bind_by_name()
    Have you looked at my free Underground PHP and Oracle Manual at http://www.oracle.com/technology/tech/php/pdf/underground-php-oracle-manual.pdf ? Or any one of the other fine PHP-Oracle books available?

  • Calling Oracle Function in PHP

    Hi,
    I'm calling a oracle function in php, the function has 1 IN parameter and 1 OUT parameter. The OUT parameter is BOOLEAN type.How to bind php variable for BOOLEAN type?
    Thanks.
    srinath.

    I think you're going to have to use it as a string and use string comparison.
    ~Jer

  • CALL FUNCTION 'RFC_REMOTE_PIPE' throwing exception as 1

    Hi Sapients,
    I am using CALL FUNCTION 'RFC_REMOTE_PIPE' to rename a file at the UNIX level..Though this runs well... sometimes this is giving an exception as ''1'' (System Failure).. if we execute the same after 3  or 4 hours this RFC is again successfully executed...Can anyone throw some light on why this is happening and how we can avoid the same.
        CALL FUNCTION 'RFC_REMOTE_PIPE'
        DESTINATION 'SERVER_EXEC'
        EXPORTING
          COMMAND = l_command
          READ    = c_yes
        EXCEPTIONS
          system_failure        = 1
          communication_failure = 2
          OTHERS                = 3.
    where the l_command is mv old_file_name New_file_name
    and C_yes is X

    Hi,
    Maybe my answer comes too late.
    Could be helpful for others anyway.
    We got the same trouble and it was due to the RFCEXEC.SEC file.
    Installing the SDK7.20 the RFCEXEC files were missing and old RFCEXEC.SEC was not in the same format...
    Please look also to OSS notes #1592501 and #1581595
    Thanks
    //Philippe.

  • CALL FUNCTION 'RFC_REMOTE_PIPE' throwin exception ''1''

    Hi Sapients,
    I am using CALL FUNCTION 'RFC_REMOTE_PIPE' to rename a file at the UNIX level..Though this runs well... sometimes this is giving an exception as ''1'' (System Failure).. if we execute the same after 3  or 4 hours this RFC is again successfully executed...Can anyone throw some light on why this is happening and how we can avoid the same.
        CALL FUNCTION 'RFC_REMOTE_PIPE'
        DESTINATION 'SERVER_EXEC'
        EXPORTING
          COMMAND = l_command
          READ    = c_yes
        EXCEPTIONS
          system_failure        = 1
          communication_failure = 2
          OTHERS                = 3.
    where the l_command is mv old_file_name New_file_name
    and C_yes is X
    <promise removed by moderator>
    Edited by: Thomas Zloch on Mar 16, 2011 1:00 PM

    Hi,
    Maybe my answer comes too late.
    Could be helpful for others anyway.
    We got the same trouble and it was due to the RFCEXEC.SEC file.
    Installing the SDK7.20 the RFCEXEC files were missing and old RFCEXEC.SEC was not in the same format...
    Please look also to OSS notes #1592501 and #1581595
    Thanks
    //Philippe.

  • Problem mimicking ASP's GetRow function in PHP

    I am new to PHP but not to scripting. I am developing a web app using PHP/MySql that will let a particular client's employees set up and order their business cards. I have a Mac running InDesign CS4 and a set of scripts that will take a text file and make the business card out of it automatically. I also have a MySQL database and a PHP-based Dreamweaver site that does everything other than make the text file I need.
    For clarity, let me give you the rundown on what happens with this app. What I want to do is have the client login with generic credentials, go through an initial setup where they develop new credentials, as well as all the data to be used later in their business cards and possibly other printed materials. After they submit that info they are taken to another login page where they use their new credentials to go to the main page for them, with links for ordering business cards, updating their personal information, and looking at all their previous orders. When they choose to order more cards, they go to a page that lets them see how the data will look on their card. If they don't like the way it looks, there is a link that lets them update their info and leads them back to the order page. If they like it and want to see a PDF preview of their card, they can click a button that will drop out a text file, which should have a name with a reference in it as being temporary plus a counter that make it unique, into a hot folder on the server that the mac with InDesign picks up, formats, and outputs a PDF that is then mailed to the client. If they like the preview, they choose choose a quantity for their order and submit a form with hidden fields that not only posts an entry to the database but also generates another text file that makes the final PDF for the business card. This final PDF gets mailed back to the client as well as the CSR handling the account so they can enter a job ticket to get it printed. This final text file contains references to the order number
    Of all the stuff I just mentioned, the two things I am having problems with is making the text files for the preview and the final PDFs. I have already written code that will save a file using fopen(). The problem I am having is passing user data from the database into an array so I can use it to fill the file with relevant information for the InDesign scripts. The other is passing the new order number to the final text files name, and getting a number for the temporary text file's counter. I assume that I can merely ask the database for the greatest order number and temporary number. But I have to get those things into variables that I can use to concatenate a string for the file names.
    In my research I found that ASP has a great command called GetRow that will make pass a row of data into a 2d array. I also found a nice piece of code where you can get PHP to mimc the same trick. Here it is (written by a user named bastion at http://www.codewalkers.com/c/a/Database-Code/Mimic-ASPs-GetRows-functionality-in-PHP/).
    <?
    function GetRows($handle)
    This function emulates the ASP GetRows function. It creates a 2 dimensional
    array of the data set where the :
    1st dimension is the row number of the data
    2nd dimension are the data fields
    Returns a two dimensional array if there are record or false if no records
    come out of the query
    if (mysql_num_rows($handle)>0){
    //initialize the array
    $RsArray1 = array();
    //loop thru the recordset
    while ($rows = mysql_fetch_array($handle))
    $RsArray1[] = $rows;
    } //wend
    return $RsArray1;
    }else{
    //no records in recordset so return false
    return false;
    } //end if
    //close the connection
    mysql_close($handle);
    } //end function
    ?>
    My problem now is figuring out what he means by the variable $handle. What is this a reference to? Is it the name of the database connection? The recordset? One of the other many variables Adobe's code for a recordset has in it? If my database connection is called dbconnection, and the recordset for the user data from that connection is called rsUsers, what do I literally put into this function's parameters when I call it in my code for the page? When I call this function and return its value into a new array called $user_data_arr, how do I reference its values so I can create a string to save into the text file? Can I use this same function to call rsOrders, get the latest order number and put it into an array, and add 1 to it so I can generate the file name? Or is there a better way to do this that I don't know about?

    This might help. I wrote it a couple of years ago and it workds fine for blobs you will more then likely be able to adapt it.
    <?php
    $db = "[your SID]" ;
    $dbuser = "[user name]" ;
    $dbpword = "password]" ;
    $OraDB = oci_connect($dbuser,$dbpword,$db);
    $ImageFileName = "/srv/www/htdocs/moon_landing_map.jpg" ;
    $ImageFile = fopen($ImageFileName,"rb");
    $Image = fread($ImageFile,filesize($ImageFileName));
    $ImageID = 2 ;
    $query = "insert into blob_test (id,description,image_data) values (:ImageID,'Test Image',EMPTY_BLOB()) returning image_data into :image_data" ;
    $Stmt = oci_parse($OraDB,$query);
    $Blob = oci_new_descriptor($OraDB,OCI_D_LOB);
    oci_bind_by_name($Stmt, ':ImageID',$ImageID);
    oci_bind_by_name($Stmt, ':image_data', $Blob, -1, OCI_B_BLOB);
    oci_execute($Stmt,OCI_DEFAULT);
    $Blob->save($Image);
    oci_commit($OraDB);
    $Blob->close() ;
    oci_close($OraDB);
    fclose($ImageFile);
    ?>and here is the code to get a blob out!
    <?php
    $db = "[your SID]" ;
    $dbuser = "[user name]" ;
    $dbpword = "[password]" ;
    $OraDB = oci_connect($dbuser,$dbpword,$db);
    $Image = "";
    $ImageID = $_GET['id'] ;
    $query = "select image_data from blob_test where id = :ImageID" ;
    $Stmt = oci_parse($OraDB,$query);
    oci_bind_by_name($Stmt, ':ImageID', $ImageID);
    oci_execute($Stmt);
    $arr = oci_fetch_array($Stmt,OCI_ASSOC);
    $Image = $arr['IMAGE_DATA']->load();
    $arr['IMAGE_DATA']->free() ;
    oci_close($OraDB);
    echo $Image ;
    ?>Edited by: FlyingGuy on Feb 25, 2011 11:16 AM

  • Cannot call functions with this[]

    Hello,
    I'm in trouble because I need to call functions from MCs with
    a variable
    name.
    I tried to use this[] that should do the trick, but it
    doesn't.
    Here's what I did in code to try to debug :
    - trace what's inside the this[]
    - the actual this[]
    - a cut and paste of the above trace() with the function call
    Of course, both "hardcoded" calls work..; what am I doing
    wrong ?
    Here's the code :
    trace(_parent + "." + buttonName);
    trace("_parent." + buttonName);
    this[_parent + "." + buttonName].setBtnState("test1");
    this["_parent." + buttonName].setBtnState("test2");
    _parent.mcBtn1.setBtnState("test3");
    _level0.mcInt.mcBtn1.setBtnState("test4");
    What am I supposed to feed this[] with ? Path as a string ?
    Thanks in advance.
    PJ

    What you need to feed the array operator is a string or a
    variable that can be resolved to a string. And that string needs to
    be the sole name of an instance or property of something that can
    be found in that object.
    So the reason the ones with the "_parent.mcMe" didn't work is
    because there is no object with the name "_parent.mcMe" inside of
    this. There is a _parent object and inside the parent object there
    is an mcMe, but that isn't the same thing.So you need to pick out
    the path one item at a time.
    this["_parent"]["mcMe"]["testMe"]();
    Should also work. And any of those string litterals could be
    replaced by a variable which held a string as well. Also notice
    that the function at the end can also be referenced since you are
    looking inside the mcMe object for some object with a name of
    testMe. But the parens which call the function need to be outside
    the array access because they aren't part of the name of the
    object.

  • Calling function within function as parameter

    We're planning to switch from MS-OLEDB to Oracle OLEDB and are expecting several troubles.
    One of these is that MS supports calling functions with another function within whilst Oralce does not?
    Example (works fine with MS):
    {? = call *<FUNCTION_1>* ( ?, ?, *<FUNCTION_2>* ( ?, ?, ? ) + 1, ?, 1 )}
    This raises ORA-01036: Variablenname/-nummer ungültig with Oracle's OLEDB.
    Any ideas?
    Thanks in advance!
    Edited by: user617919 on 04.11.2011 01:28

    Hi,
    Whenever you have a problem, please post a complete test script that people can run to re-create the problem and test their ideas. In this case, include complete CREATE PACKAGE and CREATE PAGKAGE BODY statements, CREATE TABLE and INSERT statements for any tables needed, some test calls to the the package, and the results you want from those test calls gibven that data.
    Always say which versin of Oracle you're using (e.g. 11.2.0.2.0).
    See the forum FAQ {message:id=9360002}
    LostNoob wrote:
    --Calculate salary minus before tax deductions
    FUNCTION sal_mns_btd (emp_no IN NUMBER)
    RETURN NUMBER
    IS
    tot_mns_btd Number;
    BEGIN
    SELECT e.sal - bef_tax_ded(bef_ded_tot)
    INTO  tot_mns_btd
    FROM  emp
    WHERE empno = emp_no;
    RETURN tot_mns_btd;
    END sal_mns_btd;
    If bef_tax_ded is a function in the same package, then what you posted is a correct way to call it.
    What is bef_ded_tot? If it's a NUMBER column in emp, then what you posted makes sense. If bef_ded_tot is a local variable inside some other function, then it doesn't make sense.. How to do what you want depends on what you want, and I can't tell you how to do it unless I understand what you want.
    Also, the table alias e isn't defined. It doesn't look like you need a table alias.

  • Call function POPUP_TO_CONFIRM after Excel close

    Good morning
    I have written code like this
    DATA: EXCEL TYPE OLE2_OBJECT.
      DATA: BOOKS TYPE OLE2_OBJECT.
      DATA: BOOK  TYPE OLE2_OBJECT.
      DATA: CELL  TYPE OLE2_OBJECT.
      DATA: FONT  TYPE OLE2_OBJECT.
      DATA: FILE  TYPE OLE2_OBJECT.
      CREATE OBJECT EXCEL 'EXCEL.APPLICATION'.
      CALL METHOD OF EXCEL 'WORKBOOKS' = FILE.
      CALL METHOD OF FILE 'OPEN'
        EXPORTING
          #1 = 'C:temp8D.xls'
          #2 = 1.
    CALL METHOD OF EXCEL 'CELLS' = CELL
        EXPORTING
          #1 = 6
          #2 = 'C'.
      SET PROPERTY OF CELL 'VALUE' = zak_pomoc.
    CALL METHOD OF EXCEL 'QUIT'.
      FREE OBJECT EXCEL.
    If user has modified the 8D file I want display this file on the screen, but first function POPUP_TO_CONFIRM  should ask him if he really wants to show file.
    I make it like this.
      call function 'POPUP_TO_CONFIRM'
        EXPORTING
          TITLEBAR              = 'Display report'
          TEXT_QUESTION         = 'Display report 8D?'
          DEFAULT_BUTTON        = '1'
          DISPLAY_CANCEL_BUTTON = 'X'
          START_COLUMN          = 25
          START_ROW             = 6
        IMPORTING
          answer                = ans.
             if ans eq '1'.
    DATA gs_excel TYPE ole2_object .
      DATA gs_wbooks TYPE ole2_object .
      DATA gs_wbook TYPE ole2_object .
      DATA gs_application TYPE ole2_object .
      CREATE OBJECT gs_excel 'EXCEL.APPLICATION' .
      SET PROPERTY OF gs_excel 'Visible' = 1 .
      GET PROPERTY OF gs_excel 'Workbooks' = gs_wbooks .
      GET PROPERTY OF gs_wbooks 'Application' = gs_application .
    *--Opening the existing document
      CALL METHOD OF gs_wbooks 'Open' = gs_wbook
        EXPORTING
          #1 = 'c:temp8D.xls'.
    endif.
    But there is my problem because two windows: first- asking about saving the file and the second- asking about showing the file, pop up in this same time.
    What condition should I write to call second window after this first one?
    Please, any suggestions?
    Thank you.

    Hello
    I'm just beginner and there is one thing I don't understand. Between lines
    CALL METHOD OF EXCEL 'QUIT'
    and
    FREE OBJECT EXCEL
    the window 'Do you want save changes' appears. And in that moment what is the value that says if the user chooses OK or QUIT?
    If I would know that value, I could call function POPUP_TO_CONFIRM in the right moment.

  • Call Function Destination in a background job

    I am having a problem using:
      CALL FUNCTION 'TABLE_ENTRIES_GET_VIA_RFC'
             DESTINATION p_dest
    in a background job.
    I am working on a program that would compare the same table in 2 different systems and write the differences.  It works when I run it in the foreground.  However, I want to run this in a nightly background job.  However, it is failing and I beleive that it is the result of the program needing a user to interactively logon to the remote system.
    How can I bypass the logon screen or enter information into the logon screen using a background job?
    Thanks.
    Jon

    Hi Jonathan,
    Would you like to reward some points to the poster to thank them as a part of SDN Contributor Recognition Program?
    You can click on the yellow star on the right of each post header to reward points.
    For more information:
    https://www.sdn.sap.com/sdn/index.sdn?page=crp_help.htm
    John.

  • Uncatchable exception: BSP calling Function Module

    Hi all,
    currently i'm facing a very weird problem. My application class calls function module
    HR_INFOTYPE_OPERATION. Normally, in case of an error, the function module gives you back a return parameter. But if i call it from my BSP, the processing doesn't leave the function module. It directly throws an exception ERROR_MESSAGE_STATE instead of writing the message into parameter return.
    If i call the function module with the same parameters from a report, it works fine and the error message is written to return parameter without throwing an exception.
    What am i doing wrong? I don't want that exception and need to go on with filled parameter result.
    Regards
    Mark-André

    Hi MA,
    try using ERROR_MESSAGE in the exceptions list, like this.
    CALL FUNCTION 'func_name'
         EXPORTING
              string            = text
              pos               = position
         IMPORTING
              string1           = text1
              string2           = text2
         EXCEPTIONS
              string1_too_small = 1
              string2_too_small = 2
              ERROR_MESSAGE     = 3
              OTHERS            = 4.
    Cheers
    Graham Robbo

Maybe you are looking for