2007 Mar 28 7:46 PM
Hi guys,
Is there a function module that checks if a PD (O, S, C) object exists based on its short text?
Thanks,
~Mark
2007 Mar 28 8:24 PM
I couldn't find any function modules that seemed to fit what you're looking for. I haven't tried this, but I wonder if you might be able to do a select directly from the table. Something along these lines perhaps:
SELECT objid INTO wa_objid FROM HRP1000 WHERE STEXT CS 'insert special wording here'.
ws_found = 'X'.
ENDSELECT.
This would search for whatever string of special wording you put between the apostrophes. I haven't worked much with infotype 1000, so I'm not sure if this is possible. But maybe it will help
- April King
2007 Mar 28 7:50 PM
2007 Mar 28 7:54 PM
Hi Naren,
I am creating PD objects and using special names in the short text of these objects. I want to check if I am not recreating an existing object by checking the short text as I dont have any other way of testing it.
I hope it makes sense
Thanks,
~Mark
2007 Mar 28 8:24 PM
I couldn't find any function modules that seemed to fit what you're looking for. I haven't tried this, but I wonder if you might be able to do a select directly from the table. Something along these lines perhaps:
SELECT objid INTO wa_objid FROM HRP1000 WHERE STEXT CS 'insert special wording here'.
ws_found = 'X'.
ENDSELECT.
This would search for whatever string of special wording you put between the apostrophes. I haven't worked much with infotype 1000, so I'm not sure if this is possible. But maybe it will help
- April King
2007 Mar 28 9:19 PM
I would agree with April.. a small correction to the SELECT though..
data: w_text(4) value 'TEST',
w_objid type objid.
SELECT objid INTO wa_objid up to 1 rows
FROM HRP1000 WHERE STEXT like w_text.
ENDSELECT.
if sy-subrc eq 0 .
Object laredy exists.
endif.
~Suresh
2007 Mar 28 9:29 PM
Are you looking for something like RH_GET_OTYPE_TEXT which gives you the text of a object type that you can compare with your text?
2007 Mar 28 9:30 PM