How Implement The WHERE-USED LIST Functionality in Program
How Implement The WHERE-USED LIST Functionality in Program
(http://w
ww.sap.c
Products
om/) (https://www.sap.com/products.html)
Industries (https://www.sap.com/industries.html)
upport
Services and Support (https://www.sap.com/support.html)
Community (https://www.sap.com/community.html)
Developer (https://developers.sap.com/index.html)
Partner (https://www.sap.com/partner.html)
About (https://www.sap.com/corporate/en.html)
Ask a Question (https://answers.sap.com/questions/ask.html) Write a Blog Post (https://blogs.sap.com/wp-admin/post-new.p
Hello Experts,
https://archive.sap.com/discussions/message/13380273#13380273 1/13
09/04/2019 how implement the WHERE-USED LIST functionality in program ???
I am trying to implement the WHERE-USED LIST's functionality in my program, i got few FMs also while
debugging the where-used list. But i want that if i enter say name of data element then program checks in
database where this data element is used. And i want this without any screen or pop-up like its
happening in background.
Ankur Sharma
Former Member
July 10, 2012 at 07:32 AM
2 Likes
Correct Answer
(https://people.sap.com/sharath.yaralkattimath)
Hi Ankur,
I have written a program which may serve your purpose, You can implement the code from that.
Regards,
Sharath
1
View this answer in context (/discussions/message/13380273#13380273)
Helpful Answer by
Kesavadas Thekkillath (/discussions/message/13381071#13381071) , Kesavadas Thekkillath
(/discussions/message/13381292#13381292)
//answers.sap.com/questions/ask.html?primaryTagId=833755570260738661924709785639136)
https://archive.sap.com/discussions/message/13380273#13380273 2/13
09/04/2019 how implement the WHERE-USED LIST functionality in program ???
19 replies
(https://people.sap.com/kumar.saurav)
Hi Ankur,
You may check FM RS_EU_CROSSREF and go through the Documentation for that
same as it contains one example.
Thanks.
Kumar Saurav.
(https://people.sap.com/subrahmanyashyamkumar.pindiproli)
Copy Code
Regards,
Shyam
https://archive.sap.com/discussions/message/13380273#13380273 3/13
09/04/2019 how implement the WHERE-USED LIST functionality in program ???
I know these FMs and am trying to find solution with it, but the problem is that pop up
screen are coming asking what to find or where to find. I do not want any screens or
pop-ups.
Correct Answer
(https://people.sap.com/sharath.yaralkattimath)
Regards,
Sharath
ZWHEREUSEDLIST.txt.zip (/attachment/46724)(1456 B)
(https://people.sap.com/kesavadas.thekkillath)
Refer program RSHDCF00 and also go through this wiki post SAP
Community Network Wiki - ABAP Development - ABAP program to
read where-used lists
(http://wiki.sdn.sap.com/wiki/display/ABAP/ABAP+program+to+read+
where-used+lists)
https://archive.sap.com/discussions/message/13380273#13380273 4/13
09/04/2019 how implement the WHERE-USED LIST functionality in program ???
Any suggestions???
(https://people.sap.com/kesavadas.thekkillath)
Thanks Kesavadas and Sharath, i got the info of where the data element is being use,
can you help me in one more thing?
according to me: while looping at IT to WA i can use FM to scan the prog and apply
fuzzy logic to change the name in prog.
https://archive.sap.com/discussions/message/13380273#13380273 5/13
09/04/2019 how implement the WHERE-USED LIST functionality in program ???
(https://people.sap.com/kesavadas.thekkillath)
You can read the f1 help on "Replace in table". But after this you
have to save & activate the changed program programatically. It
goes on
Helpful Answer
(https://people.sap.com/kesavadas.thekkillath)
EXPORTING
exact_spelling = 'X'
https://archive.sap.com/discussions/message/13380273#13380273 6/13
09/04/2019 how implement the WHERE-USED LIST functionality in program ???
IMPORTING
TABLES
EXCEPTIONS
NOT_FOUND = 2
i am trying to test run this FM from past half an hour but all time i get is 'No occurences
found'.
pls suggest.
Helpful Answer
(https://people.sap.com/kesavadas.thekkillath)
Copy Code
https://archive.sap.com/discussions/message/13380273#13380273 7/13
09/04/2019 how implement the WHERE-USED LIST functionality in program ???
https://archive.sap.com/discussions/message/13380273#13380273 8/13
09/04/2019 how implement the WHERE-USED LIST functionality in program ???
48. OBJECTTAB = it
49. EXCEPTIONS
50. NOT_FOUND = 01
51. NOT_EXECUTED = 04.
52.
My objective is to find the name of data element in program and replace it with new name.
(https://people.sap.com/kesavadas.thekkillath)
https://archive.sap.com/discussions/message/13380273#13380273 9/13
09/04/2019 how implement the WHERE-USED LIST functionality in program ???
This is what i did. I just changed the program name and data element name.
KFIND(79) TYPE C,
MARK(1) TYPE C,
NAME(61) TYPE C,
DYNNR(4) TYPE C,
PROGTYPE(1) TYPE C,
OBJ_STATE(1) TYPE C,
END OF TY.
WA TYPE TY.
WA-PROGRAM = 'Y_WARERR22'.
APPEND WA TO IT.
OBJECT_TYPE = 'R'.
KFIND = 'ULINE'.
FINDSTRINGLEN = '6'.
KREPLACE = 'ABC'.
REPLACESTRINGLEN = '3'.
EXPORTING
MODE = 'FREE'
OBJECT = WA-PROGRAM
https://archive.sap.com/discussions/message/13380273#13380273 10/13
09/04/2019 how implement the WHERE-USED LIST functionality in program ???
OBJECT_CLASS = 'ABAP'.
ENDLOOP.
EXPORTING
OBJECTTYPE = OBJECT_TYPE
FINDSTRING = KFIND
FINDSTRING_LENGTH = FINDSTRINGLEN
METHOD = 'STRING'
EXACT_SPELLING = 'X'
REPLACESTRING = KREPLACE
REPLACESTRING_LENGTH = REPLACESTRINGLEN
I_FIND_OR_REPLACE = 'REPLACE'
MONITOR_ACTIVATION = 'X'
TABLES
OBJECTTAB = IT
EXCEPTIONS
NOT_FOUND = 01
NOT_EXECUTED = 04.
IF SY-SUBRC EQ 0.
WRITE:'SUCCESS.'.
ENDIF.
(https://people.sap.com/kesavadas.thekkillath)
https://archive.sap.com/discussions/message/13380273#13380273 11/13
09/04/2019 how implement the WHERE-USED LIST functionality in program ???
Hi Kesavadas, the problem was i was giving the program which is in some other
package. It searches in same package only.
https://archive.sap.com/discussions/message/13380273#13380273 12/13
09/04/2019 how implement the WHERE-USED LIST functionality in program ???
(https://www.facebook.com/sapcommunity) (https://twitter.com/SAPCommunity)
(https://www.youtube.com/c/SAPCommunities) (https://www.linkedin.com/company/sap)
(http://www.slideshare.net/SAP) (https://instagram.com/sap/) ()
use.html)
https://archive.sap.com/discussions/message/13380273#13380273 13/13