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
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
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
Hi Holger,
In order to determine the caller for the given subroutine , just double click on FORM eban_update i.e. highlighted part of the FORM .
Also you can search for string PERFORM eban_update inside Main Program. (by selecting Main Program radio button while searching ) .
Dear Sachin,
pls. look at my first write: I wrote:
Subroutine EBAN_UPDATE not found in Programs (possibly dynamic calls!)
I have already searched as you mentioned.
Regards
Holger
Hi Holger,
In that case, please put breakpoint on FORM EBAN_UPDATE and when control reaches to break point, check ABAP and Screen Stack section of debugger where you can see how your subroutine is getting called and what are the screens/events which are getting executed before calling subroutine EBAN_UPDATE.
Dear Adak
this is not easy, because this zflag in the purchase requisition is not immediately visible
as well as in the table EBAN. It is set after hours, I also have checked via SM37 if not any jobs are
running in the background, but could not find out any interesting thing relating this issue.
I don't have an idea how I could reach this breakpint, by which program etc.What program
should run in this case in order to reach FORM EBAN_UPDATE.
Regards
Holger
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
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
Dear Friends
increasingly it seems to be a hopeless case. I still haven't find the caller. What else can I
do. Is there a any another possibility e.g. to trace EBAN table to see who has made the change
or to see/log what programs were executed between a time period etc in the system.
Hopefully that has nothing to do with some magic
Regards
Holger
Hi,
Can you please tell me the Development Package of the XM02 Function Group and also the transaction code which you are using currently?Basically it will call the exit using the statement CALL CUSTOMER FUNCTION <three digit literal>,here give the literal and use Where used list to search the string and let me know what was happened.
Thanks
Nareh
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?