11 Replies Latest reply: Jun 22, 2012 3:41 AM by Daniel B RSS

subroutine "eban_update"   Function Group XM02

Holger Maisenbacher
Currently Being Moderated

I am trying to find out the point when the subroutine "eban_update" (Function Group XM02) is getting called since our custom field is being populated right there.

 

I have tried to go over where used list, but I am getting this message when double clicking on it.

 

Subroutine EBAN_UPDATE not found in Programs (possibly dynamic calls!)

 

Please advice.

 

Regards

Holger

  • Re: subroutine "eban_update"   Function Group XM02
    Glen Simpson
    Currently Being Moderated

    Hi Holger

     

    I can't find a subroutine called EBAN_UPDATE in my ECC 6.05 system. I assume this subroutine is a custom one in your system?

     

    There are 3 potential reasons (that I can think of) that you can't find where that subroutine is called.

    1. It is an orphaned routine and isn't called anywhere. To attempt to prove this you could run program RS_ABAP_SOURCE_SCAN on groups of likely program looking for the string EBAN_UPDATE. It might be difficult to definitively prove that it's orphaned as to scan the whole SAP sytem could take quite a long time.

    2. The subroutine is only called dynamically (via PERFORM (lv_subroutine_name) or similar code where the variable lv_subroutine_name is a string that contains the name of your subroutine... obviously! ). If the subroutine name is definedin a constannt somewhere then the RS_ABAP_SOURCE_SCAN program mentioned previous might help find it. However if the subroutine name is configured in a table then that won't work. The simplest way to find the subroutine caller in this case is to put a breakpoint in the subroutine and then run the program/transaction that you believe calls the subroutine. If/when the debugger is opened then you should be able to view the callstack of the program and see which program calls your subroutine.

    3. The subroutine is called via normal PERFORM EBAN_UPDATE code but the where-used index in your system is out of synch. In this case you can run program SAPRSEUB to regenerate the where-used index however there are a couple of things to note before you do. Firstly, this program does not have a selection screen so don't attempt to execute it from the first screen of SE38/SA38 or from SE80 just to see what the selection screen looks like. Secondly, this can be a long running program so I suggest talking to your basis team first and then setting it up as a background job.

     

    I hope that some of this helps....

     

    Regards

    Glen

    • Re: subroutine "eban_update"   Function Group XM02
      Holger Maisenbacher
      Currently Being Moderated

      Dear Glen,

       

      thanks for your response.

       

      I have checked, on SAP ECC 6.0 and SAP 4.6c is this subroutine "EBAN_UPDATE" existing.

       

      I have followed your instructions, unfortunately I could not find this place where the caller is.

       

      The mentioned code Fragment is as follows:

       

      FORM eban_update.

       

        SELECT * FROM eban

                 INTO  itab_eban

                 WHERE banfn = gd_banfn.

       

          CALL FUNCTION 'ENQUEUE_EMEBANE'

           EXPORTING

             mode_eban            = 'E'

             mandt                = sy-mandt

             banfn                = itab_eban-banfn

             bnfpo                = itab_eban-bnfpo

      *        X_BANFN              = ' '

      *        X_BNFPO              = ' '

             _scope               = '2'

      *        _WAIT                = ' '

      *        _COLLECT             = ' '

           EXCEPTIONS

             foreign_lock         = 1

             system_failure       = 2

             OTHERS               = 3

                    .

          IF sy-subrc <> 0.

           ENDIF.

       

      * within ZXM02TOP

      * DATA gd_drad TYPE drad.

       

          MOVE gd_drad-objky+10(5) TO gd_bnfpo.

       

          IF itab_eban-bnfpo = gd_bnfpo.

            itab_eban-zflag = 'X'.

          ELSE.

            itab_eban-zflag = space.

          ENDIF.

       

          UPDATE eban FROM itab_eban.

       

          CALL FUNCTION 'DEQUEUE_EMEBANE'

           EXPORTING

             mode_eban       = 'E'

             mandt           = sy-mandt

             banfn           = itab_eban-banfn

             bnfpo           = itab_eban-bnfpo

      *    X_BANFN         = ' '

      *    X_BNFPO         = ' '

             _scope          = '3'

      *    _SYNCHRON       = ' '

      *    _COLLECT        = ' '

                  .

        ENDSELECT.

      ENDFORM.                    " eban_update

  • Re: subroutine "eban_update"   Function Group XM02
    Shambu VS
    Currently Being Moderated

    Hi Holger,

     

    The code that you have given above, is called in a USER EXIT.

    Put a breakpoint at statement 'CALL CUSTOMER-FUNCTION' and go inside the User exit to see if the code is getting triggered. And yes, this is custom code, so this won't be in our systems.

     

    Thanks,

    Shambu

  • Re: subroutine "eban_update"   Function Group XM02
    Naresh Bammidi
    Currently Being Moderated

    Hi,

    Basically standard transaction calls multiple Function groups,it is not fixed to XM02.I have faced the same problem with ME21N transaction,somebody were implemented BADI's for triggering mail.So It was resulting Runtime error.I tried where used list,but There was no use.Finally decided to debug the standard transaction.After multiple attempts i found out from where the BADI is calling.So debug your transaction from the initial screen ,after multiple attempts you will come to know from where the Exit is calling.

     

    Thanks

    Naresh

  • Re: subroutine "eban_update"   Function Group XM02
    Daniel B
    Currently Being Moderated

    Hi,

     

    There is a code correction on a data declaration in your snippit of code, commented out

    * within ZXM02TOP

    * DATA gd_drad TYPE drad.

     

    is there any other data declarations in ZXM0TOP that you can do a where used search on to find a calling program?

     

    Did you check all the function exits in function group XM02 ?

     

    INCLUDE LXM02U01. "EXIT_SAPLMEREQ_001

    INCLUDE LXM02U02. "EXIT_SAPLMEREQ_002

    INCLUDE LXM02U03. "EXIT_SAPLMEREQ_003

    INCLUDE LXM02U04. "EXIT_SAPLMEREQ_004

    INCLUDE LXM02U05. "EXIT_SAPLMEREQ_005

    INCLUDE LXM02U06. "EXIT_SAPLMEREQ_006

    INCLUDE LXM02U07. "EXIT_SAPLMEREQ_007

    INCLUDE LXM02U08. "EXIT_SAPLMEREQ_008

    INCLUDE LXM02U09. "EXIT_SAPLMEREQ_009

    INCLUDE LXM02U10. "EXIT_SAPLMEQUERY_001

    INCLUDE LXM02U11. "EXIT_SAPLMEQUERY_002

    INCLUDE LXM02U12. "EXIT_SAPLMEREQ_010

     

    Or what is there any integration to other modules that create requisitions? PP or Plant Maintenance, maybe a user exit there. Or is the after hours update an MRP run, user exit there?