Hi guys,
I'm often looking to find where a specific pfile object is created, deleted etc. That is a filtered "where use" report.
In the GUI version I create a "Where used" report, copy it to a text file and execute some simple code like (in case of Delete):
DEFINE VARIABLE ich AS CHARACTER NO-UNDO.
INPUT FROM c:\temp\xref_i.txt.
OUTPUT TO c:\temp\xref_o.txt.
REPEAT:
IMPORT UNFORMATTED ich.
IF INDEX(SUBSTRING(ich,81),"D") > 0 THEN
PUT UNFORMATTED ich SKIP.
END.
INPUT CLOSE.
OUTPUT CLOSE.
Is there a more simple way that I have overlooked?
Regards,
Bo
Hi Bo.
If I understand, you would like an easier way to not only see where an Object (PFILE in this case) is used, but want the ability to only display references for a specific type of usage?
"Computer, show me everywhere a Customer record is deleted."
Is that correct?
Hi Jeff,
Yes, that's what I need :-)
//Bo
Thanks for the clarification. :)
There is no "easier" way right now as the filter criteria is just based on the type of reference and not the action. That is a pretty good idea though.
The reports (and report UI) are available as source so it may be feasible to modify as needed for your requirements. Take a look at rtb/p/rtb_rpt_xref.p and rtb/w/rtb_objxrefsrpt.w.
Thanks for the input Jeff. If I change the files rtb/p/rtb_rpt_xref.p and rtb/w/rtb_objxrefsrpt.w in a way that is generally useable I will upload them in this thread.
And yes I think is a pretty good idea also, and wonder why no one came up with it within the last 10 years, but maybe we all just program it? Carl?
I will add it to our CR list.
The tabletop Where Used view is sortable by action so that may help you group them together.
Hi Jeff,
I did sort (as the first) on action, but that did not help me much. The D is anywhere in the sequence of action letters, and in our case it was in around 20 out of 1000 objects.
:-) Bo