Error Passing subrc to Fuinction

Hi All ,
I Am getting this error in an upgrade environment testing
Passing the formal parameter "SUBRC" to the field SY-SUBRC is not appropriate .
since SY-SUBRC is set by the statement,
This is  while calling FM 'HR_READ_INFOTYPE'.
Thanks in advance for any input on the reason for error .
Vinay

Hello Vinay
You try to fetch the value of EXPORTING parameter SUBRC into sy-subrc  which is not correct because the sy-subrc will be set by the fm (either = 0 or in case of an exception = 1).
Not correct:
  data: gt_pa0001     type STANDARD TABLE OF pa0001.
  CALL FUNCTION 'HR_READ_INFOTYPE'
    EXPORTING
*     TCLAS                 = 'A'
      pernr                 = '12345678'
      infty                 = '0001'
*     BEGDA                 = '18000101'
*     ENDDA                 = '99991231'
*     BYPASS_BUFFER         = ' '
*     LEGACY_MODE           = ' '
    IMPORTING
      SUBRC                 = sy-subrc
    tables
      infty_tab             = gt_pa0001
    EXCEPTIONS
      INFTY_NOT_FOUND       = 1
      OTHERS                = 2.
  IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
Correct:
  data: gt_pa0001     type STANDARD TABLE OF pa0001,
        gd_rc         type syst-subrc.
  CALL FUNCTION 'HR_READ_INFOTYPE'
    EXPORTING
*     TCLAS                 = 'A'
      pernr                 = '12345678'
      infty                 = '0001'
*     BEGDA                 = '18000101'
*     ENDDA                 = '99991231'
*     BYPASS_BUFFER         = ' '
*     LEGACY_MODE           = ' '
    IMPORTING
      SUBRC                 = gd_rc
    tables
      infty_tab             = gt_pa0001
    EXCEPTIONS
      INFTY_NOT_FOUND       = 1
      OTHERS                = 2.
  IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
Regards
  Uwe

Similar Messages

  • Outbound IDOC( Error passing data to port)

    Hi,
    We have an interface running daily configured such that the idocs are converted to files and placed on a directory path.
    All the idocs are processed successfully but for one hour the idocs failed and the error message says:
    Status: Error passing data to port
    Error at OPEN (Directory path) with operating system error msg.:No such file or directory.
    The missed data from the error idocs have been sent via PFAL.
    But again after this one hour the idocs were successfully posted for the same directory path.
    Please let me know what the issue can be here or how can we avoid this.
    Thanks.

    Hi
    *Some times it may happen that IDOC doesnt reach to the port , in case if you are using Transactional RFC port so*
    *you can use the report RSEOUT00  for sending the IDOC to port .*
    *Hope it may help you .*

  • Error in Production Load: Error passing data to port

    Hello All,
    I got this unexpected error in production. The Jobs are still processing for a long time(in Yellow status) with the error message :
    Extraction (messages): Missing messages       (Status:Yellow)
         Missing message: Request received      (Status:Yellow)
         Missing message: Number of records sent     (Status:Yellow)
         Missing message: Selection Completed     (Status:Yellow)
    Transfer (IDocs and TRFC): Missing messages or warnings           (Status:Yellow)
         Request IDoc : Application document posted                (Status:Green)
         Info IDoc 2 : sent, not arrived ; Error passing data to port      (Status:Yellow)
         Info IDoc 3 : sent, not arrived ; Error passing data to port      (Status:Yellow)
         Info IDoc 1 : sent, not arrived ; Error passing data to port      (Status:Yellow)
    I went through the below forumn, and asked the basis to look in to it. In the meantime can any one please suggest me any solutions.
    Some problem with IDoc's Settings while loading data

    Hi Ram,
    The problem may be with the connection to the source system you are loading the data from. You can check the connection using the note 140276.
    Best Regards,
    Des.

  • IDOC Error - Error Passing the IDOC

    Dear Experts,
                 I had a <removed by moderator> problem while saving the invoice.
                In my case, IDOC is created and Status is shown as 03 (Data Passed to port OK), But the file is not written in Application server. In the status record of the IDOC its showing as 02 (Error at OPEN '/usr/sap/invoice/20110616_125040 with operating system error msg.: ' (check path name) Message no. E0099) .
                  I search some of the Answers in SDN but unable to find the Exact Solution. Some members get the same problem, But the status shown to them is 02(Error passing the data to Port) - for me its shown as 03.
                  But Some of the IDOC are generating without any error, I can the view the file in Application Server. But some idoc are getting status as 03, but unable to view the file in Application Server while viewing from AL11.
                Please help me to solve this problem. <removed by moderator>.
    Thanks & Regards,
    Srini
    Edited by: Thomas Zloch on Jun 16, 2011 11:50 AM - priority normalised

    Dear Ambujavalli,
                       In my case, IDOC gets generated, but file is not appeared in Application Server. When i view the IDOC in WE05, it showing the status as 03 - IDOC pass to port OK, but while checking the Status record, its Showing as 02, ,Error at OPEN '/usr/sap/invoice with operating system error msg.: ' (check path name) Message no. E0099     "
                    But his happen only for few IDOC,, For first time it is generating without any Error, 2nd time its generating IDOC, but file is not written.
    Regards,
    Srini

  • IDoc Status 02 Error passing data to port

    Hi Experts,
    I wrote a custome program to send customer via HTTP XML port. This program collects customer and send in single IDoc as per specified batch size.eg if batch size is 5 then 5 custome will be send in one IDoc. On devlopment environment it was working fine upto batch size 500. In quality single customer is transfering successfully but while selecting a batch size arround 100 it is displaying error 'Error passing data to port' with status 02.
    Please help me to be out of this.
    Regards,
    Ravinder

    status 02 is     Error passing data to port ...it simply means your port setting has some problem. do configure your port setting and also in partner profile
    Thanx and Regards
    Arpan Maheshwari

  • Error passing data to port

    Hello,
    I use extractor 1_CO_PA1100V04.
    I see that data are uploaded. Diagnosis - current process not finished :
    Number of records like that
    15.42:10 (68888 from 0 records)
    Errors in details :
    sent, not arrived; Error passing data to port
    Selected number dores not agree with transferred number
    What is the problem? What is solution for that problem?
    A

    Hi Aleksandrs,
    there must be an error logged somewhere. Please check out the weblog /people/siegfried.szameitat/blog/2005/07/28/data-load-errors--basic-checks for analyzing the issue.
    regards
    Siggi

  • Info IDoc  : sent, not arrived ; Error passing data to port

    Hi Folks,
      While I am loading the data from R/3 I am facing the following error in Production..
    Info IDoc 2 : sent, not arrived ; Error passing data to port
    when I checked in SM59 every thing seems fine like RFC test connection and authorization check
    In BW is check the Source system saying it is Ok.
    Only the thing I found here is in TRFC, it is error when opening RFC Connection.
    but it is different in SM59 saying every thing is ok, as said above..
    Please help me in this regard
    thanks masters
    DJ

    Srinivas,
      Thanks for your prompt reply..
    user : ALEREMOTE  and password are fine..
    As told I check st22 and sm21 in both sytems, no sort dumps I found..
    Please help me its an urgent..
    thanks
    DJ
    Message was edited by:
            Jangareddy dasari

  • Error pass limit

    Cisco phone shows " Error Pass Limit".
    Product Type:
    Cisco 7941
    Phone has 2 Lines.

    This can also be caused by excessive number of unused DN’s in CUCM. See more in this url, http://www.cisco.com/en/US/products/sw/voicesw/ps556/products_tech_note09186a0080875c69.shtml
    Roger

  • Error Pass Limit 7940 series phone

    Hi all,
    I have a 7940 that's displaying an "Error Pass Limit" error on the screen. It receives no dial tone but can browse the corporate directory and the switch works fine. Things like call fwd doesn't work and view missed calls do not display even though they did a few days ago.
    I'm using a CAT6 patch cable. It configures and gets its IP fine.
    If you like, I can post info about its Rx or Tx packets displayed on its Port Information page.Let me know which one to show and I can get the info for you.
    THANKS in advance! I really need to get it back in working condition.

    Hi Erik,
    This bug is rated as a severity level 4. Here is the description of a level 4 (not being worked on);
    4 - Minor - Things fail under very unusual circumstances, but operation essentially recovers without intervention. Users don't need to install any workarounds, and performance impact is tolerable.
    This bug is only found on CCM 4.0(1), is that what you are running? If so,you probably want to upgrade to at least 4.0(2)a (but more likely to 4.1(3)sr3b). Here is a link to the number of resolved caveats between 4.0(1) and 4.0(2) which is a massive list.
    http://www.cisco.com/univercd/cc/td/doc/product/voice/c_callmg/4_0/rel_note/402cmrn.htm#wp1723292
    Hope this helps!
    Rob
    Please remember to rate helpful posts....

  • ICM 'SSSLERR_SSL_READ' error, with subrc = 110

    Hi,
    After setting up my HTTP RFC connection, loading third party server certificate, and testing successfully mi connection, I´ve run my code.
    When I send my request, everything is fine.
    When I try to get the response (client->receive), I get no text error, with subrc code= 110.
    ICM trace file says:
    *** ERROR during SecudeSSL_Read() from SSL_read()==SSL_ERROR_SSL
        session uses PSE file "/usr/sap/GSD/DVEBMGS00/sec/SAPSSLC.pse"
    SecudeSSL_Read: SSL_read() failed
      secude_error 536872195 (0x20000503) = "handshake failure"
    >>            Begin of Secude-SSL Errorstack            >>
    ERROR in ssl3_read_bytes: (536872195/0x20000503) handshake failure
    WARNING in ssl3_read_bytes: (536875072/0x20001040) received a fatal SSLv3 handshake failure alert message from the peer
    <<            End of Secude-SSL Errorstack
       SSL NI-sock: local=192.168.79.17:60348  peer=201.175.40.6:443
    <<- ERROR: SapSSLRead(sssl_hdl=0x6000000005f35bc0)==SSSLERR_SSL_READ
    *** ERROR => IcmReadFromConn(id=5/222): SapSSLRead returned (-58): SSSLERR_SSL_READ
    *** ERROR => IcmReadFromConn(id=5/222): read failed (rc = -1)
    *** ERROR => IcmHandleNetRead(id=5/222): IcmReadFromConn failed (rc = -1)
    Any idea of what does it means?
    Thanks in advance.
    Federico

    Hi Olivier,
    I don´t see any further information related to the error in the trace.
    I´ll just show you some lines may be you see anything interesting:
    NiIBlockMode: set blockmode for hdl 9 TRUE                                                                            
    *** ERROR during SecudeSSL_Read() from SSL_read()==SSL_ERROR_SSL                                                      
        session uses PSE file "/usr/sap/GSD/DVEBMGS00/sec/SAPSSLC.pse"                                                     
    SecudeSSL_Read: SSL_read() failed --                                                                               
    secude_error 536872195 (0x20000503) = "handshake failure"                                                                    
    >> -
    Begin of Secude-SSL Errorstack -
    >>                                                            
    ERROR in ssl3_read_bytes: (536872195/0x20000503) handshake failure                                                    
    WARNING in ssl3_read_bytes: (536875072/0x20001040) received a fatal SSLv3 handshake failure alert message from the peer        
    << -
    End of Secude-SSL Errorstack -
    <<- ERROR: SapSSLRead(sssl_hdl=0x60000000009273e0)==SSSLERR_SSL_READ                                                  
    ->> SapSSLErrorName(rc=-58)                                                                               
    <<- SapSSLErrorName()==SSSLERR_SSL_READ                                                                               
    *** ERROR => IcmReadFromConn(id=3/1455): SapSSLRead returned (-58): SSSLERR_SSL_READ               
    *** ERROR => IcmReadFromConn(id=3/1455): read failed (rc = -1)                                     
    *** ERROR => IcmHandleNetRead(id=3/1455): IcmReadFromConn failed (rc = -1)                                                      
    Finally, there´s no doubt about that the destination server is the one who sends the alert, and finish communication, right? I mean, it´s not SAP who interrupts the session.
    Hope you could help me.
    Thanks a lot.
    Federico

  • Error Pass Limit on 7912

    Hi i have a problem with 7912s registered to a callmanager v 4.1(3)sr3a. I changed the maximum allowed calls in the directory number but nothing happened, do you think that Cisco release a service release to solve this problem? I don't know what else to do, any suggestion?
    Thanks in advanced,
    Pepe

    We receive 5 new phones (7912) when i registered them the error pass limit appeared on 4 of them. After that, i searched for the error on the web and tried put the maximum calls on 6 and the trigger on 4 on the DN of the phone, but nothing happened. I tried this with all the values allowed but nothing happened. After that i tried to register the phone with other number but the problem was still there.
    To discard a software problem on the phone i registered it on my callmanager and its function was normally.

  • CRM ACE gives authorization error(sy-subrc 4) when executing CRM_ORDER_READ

    Hi,
    In R pipe, ACE work package is created for ONEORDER service request objects. i have written code in the ACE Class based on the rules required by the business. in that code, i need to call the function module, CRM_ORDER_READ to get the related products and partners of the service request object guid that is being passed. this function module gives me no_change_authority error which is sy-subrc = 4, even though i have given my user id, FULL(read, write,delete) access in the ACE workpackage.
    Any suggestions?
    thanks,
    Anisha.

    Hi Benoit ,
    Thanks for your reply , can you please tell me how we can use CRM_ORDER_INITIALIZE FM , what exporting parameters should I pass :
    CALL FUNCTION 'CRM_ORDER_INITIALIZE'
         EXPORTING
           it_guids_to_init  = lt_guid
         EXCEPTIONS
           error_occurred    = 1
           OTHERS            = 2.
    Thanks & regards,
    Akhilesh Bhagat.

  • ALSM_EXCEL_TO_INTERNAL_TABLE , ERROR SY-SUBRC = 2 , UPLOAD_OLE

    Hi,
    I would like to know in what cases sy-subrc is '2' in function ALSM_EXCEL_TO_INTERNAL_TABLE
    the result of this function depends the version of excel, office ???
    Somebody can help me ?

    Hi Michael,
    It is a Upload error from Excel file.
    The return value of sy-subrc is as follows in Help.SAP.com
    Return Value
    SY-SUBRC
    Return value set by the following ABAP statements. In general, a content of 0 means that the statement was executed without problems.
    ·        ASSIGN sets SY-SUBRC to 0 if assignment to field symbol is possible, otherwise 4.
    ·        ASSIGN <dref>->* sets SY-SUBRC to 0 if dereferencing is possible, otherwise 4.
    ·        AUTHORITY-CHECK sets SY-SUBRC to 0 if the user has the necessary authorization, otherwise 4, 8, 12, 16, 24, 28, 32, or 36 depending on the cause.
    ·        CALL DIALOG with USING sets SY-SUBRC to 0, if processing was successful, otherwise <>0.
    ·        CALL FUNCTION sets SY-SUBRC according to the exception handling.
    ·        CALL METHOD sets SY-SUBRC according to the exception handling.
    ·        CALL SELECTION-SCREEN sets SY-SUBRC to 0 if the user chose Enter or Execute and 4 if the user chose Cancel.
    ·        CALL TRANSACTION with USING sets SY-SUBRC to 0 if processing was successful, otherwise <>0.
    ·        CATCH SYSTEM-EXCEPTIONS sets SY-SUBRC if there are runtime errors after the ENDCATCH statement. The value is specified in the program.
    ·        COMMIT WORK sets SY-SUBRC to 0.
    ·        COMMIT WORK AND WAIT sets SY-SUBRC to 0 if update was successful, otherwise <>0.
    ·        COMMUNICATION INIT DESTINATION u2026 RETURNCODE sets SY-SUBRC as specified.
    ·        CONCATENATE sets SY-SUBRC to 0 if the result fits into target variable, otherwise 4.
    ·        CREATE OBJECT sets SY-SUBRC if the exceptions of the instance constructor are handled.
    ·        CREATE OBJECT in OLE2 sets SY-SUBRC to 0 if an external object was created, otherwise 1,2, 3 with different causes.
    ·        DELETE sets SY-SUBRC to 0 if the operation was successful, otherwise 4 or <> 0 depending on cause.
    ·        DEMAND u2026 MESSAGES INTO sets SY-SUBRC to 0 if a message table is empty, otherwise <> 0.
    ·        DESCRIBE LIST sets SY-SUBRC to 0 if row or list exists, otherwise 4 or 8.
    ·        EXEC SQL - ENDEXEC sets SY-SUBRC to 0 in almost all cases. Only if no set was read with FETCH is SY-SUBRC 4.
    ·        FETCH sets SY-SUBRC to 0 if at least one row was read, otherwise 4.
    ·         GENERATE SUBROUTINE POOL sets SY-SUBRC to 0 if generation was successful, otherwise 8.
    ·        GET CURSOR sets SY-SUBRC to 0 if the cursor is correctly positioned, otherwise 4.
    ·        GET PARAMETER sets SY-SUBRC to 0 if value found in SAP Memory, otherwise 4.
    ·        IMPORT sets SY-SUBRC to 0 if import of data objects was successful, otherwise 4.
    ·        LOAD REPORT sets SY-SUBRC to 0 if the operation was successful, otherwise 4 or 8 depending on cause.
    ·        LOOP sets SY-SUBRC to 0 if loop over extract was passed at least once, otherwise 4.
    ·        LOOP AT sets SY-SUBRC to 0 if loop over internal table was passed at least once, otherwise 4.
    ·        MODIFY sets SY-SUBRC to 0 if operation was successful, otherwise 4.
    ·        MODIFY LINE sets SY-SUBRC to 0 if list row was changed, otherwise <> 0.
    ·        MODIFY sets SY-SUBRC to 0 if operation was successful, otherwise 4.
    ·        OLE2 automation, bundled commands set SY-SUBRC to 0 if all were successfully executed, otherwise 1, 2, 3, 4 depending on cause.
    ·        OPEN DATASET sets SY-SUBRC to 0 if the file was opened, otherwise 8.
    ·        Open SQL commands set SY-SUBRC to 0 if operation was successful, otherwise <>0.
    ·        OVERLAY sets SY-SUBRC to 0 if at least one character is overlayed, otherwise 4.
    ·        READ DATASET sets SY-SUBRC to 0 if the read operation was successful, otherwise 4 or 8 depending on cause.
    ·        READ LINE sets SY-SUBRC to 0 if list row exists, otherwise <> 0.
    ·        READ TABLE sets SY-SUBRC to 0 if the table row was found, otherwise 2, 4, 8 depending on cause.
    ·        REPLACE sets SY-SUBRC to 0 if search string could be replaced, otherwise <> 0.
    ·        ROLLBACK WORK always sets SY-SUBRC to 0.
    ·        SCROLL sets SY-SUBRC to 0 if scrolling in list successful, otherwise 4 or 8 depending on cause.
    ·        SEARCH sets SY-SUBRC to 0 if search string was found, otherwise 4.
    ·        SELECT sets SY-SUBRC to 0 if at least one row was read, otherwise 4 or even 8 with SELECT SINGLE FOR UPDATE.
    ·        SET COUNTRY sets SY-SUBRC to 0 if country ID was found in table T005X, otherwise 4.
    ·        SET BIT sets SY-SUBRC to 0 if bit was set, otherwise <> 0.
    ·        SET TITLEBAR sets SY-SUBRC to 0 if title exists, otherwise 4.
    ·        SHIFT u2026 UP TO sets SY-SUBRC to 0 if position was found in character string, otherwise 4.
    ·        SPLIT sets SY-SUBRC to 0 if size of target fields is sufficient, otherwise 4.
    ·        UPDATE sets SY-SUBRC to 0 if operation successful, otherwise 4.
    ·        WRITE u2026 TO sets SY-SUBRC to 0 if assignment successful, otherwise 4.
    Thanks & Regards,
    Dileep .C

  • Error Passing an internal table between BSP pages

    Any time there is data in the internal table and I try to pass it from one BSP page to the next I get an Web error.  I've heard that it is possible to pass an internal table from one page to the next.  can anyone point me in the right direction here?

    You can do this with the navigation object only if the table is very small. Overwise it overflows 2+KB limitation of URLs.
    Alternative ideas is to use server side cookies (search forum for many examples).
    If stateful, just hang stuff of your application class.

  • Error passing a remote object in a rmi function call

    Hi,
    I've a problem passing an UnicastRemoteObject extended object in a rmi function call. I get the following error
    java.lang.IllegalArgumentException: argument type mismatch
    I've 2 Remote Objects: GalaxyRegistration and Station. I want to pass a Station Object as argument in a function from GalaxyRegistration. Does anyone know what the problem is?
    Here is the code:
    public class GalaxyRegistration
    extends UnicastRemoteObject
    implements GalaxyRegistrationInterface, Galaxy {
         public GalaxyRegistration() throws RemoteException {
         public void add(Station station) throws RemoteException {
              stations.addElement(station);
              System.out.println("Add Station " + station.getName());
    public class Station
    extends UnicastRemoteObject
    implements StationInterface {
         SystemInfo system;
         public Station(String name, String description, Coordinate position, Profile profile)
    throws RemoteException {
              system = new SystemInfo(name, description, position, profile);
    public class StationServer {
         Station station;
         public void run() {
              // create new Station
              System.out.println("Create new Station:");
              // register and bind new station
              try     {
                   station = new Station(name, descr, location, profile);
                   System.out.println("Station created ...");
                   GalaxyRegistrationInterface registry =
                             (GalaxyRegistrationInterface)
                             Naming.lookup
    ("//localhost/GalaxyRegistration");
                   System.out.println("Registry looked up ...");               
                   // >>>>>>>> NEXT LINE IS THE ERROR LINE <<<<<<<<<<<<<<     
                   registry.add(station);
              } catch(Exception e) {
                   System.out.println(e);
    }

    regardless of any other problems in your code, neither of the objects which you are subclassing from UnicastRemoteObject call the superclass constructor, which is a pretty basic flaw - in this case, it will lead to neither of these objects being exported properly.

Maybe you are looking for

  • MAC powerpc MIME not working with latest update

    i have installed the latest flash player and upon doing that i go to youtube.com but i get a pop up saying content of MIME type "application/x-shockwave-flash". Because you don't have a plug-in installed for this MIME type, this content can't be disp

  • Problem extracting a large node with getClobval()

    Hi all, i got a problem with the extraction of data from an xml node. The problem only occurs in the second database with a sligtly higher version. first database version is 10.1.0.2.1, NLS_CHARACTERSET = AL32UTF8 second database version is 10.1.0.3.

  • Best Tool to use ! Mouse ? or Pad ?

    Hello!  What are the tools that you find it more effective in using the photoshop ? Is it just a normal mouse ? or do you use pad ( I do not even know if that is what's called..) ? Can you please recommend which brand works the best for photoshop ? i

  • Recently Upgraded to leopard on 1.5ghz powerbook 1.5gb ram

    hi i upgraded to leopard a couple of months ago which caused problems when i did archive and install. there were some bugs with Mail that would not quit. so them i did a clean install and now slowly adding the software needed. everything seems to run

  • Internet video trial team contact info./ help....PLEASE!!!

    I signed up way back in sept for the internet video trial.  I recieved an email on 10-27saying my test dvr was being shipped they also attached download and setup info which i followed but im still waiting for the dvr. I recently tried to change my c