abap - Sap Code Inspector how to use cl_ci_objectset class -
i tried use cl_ci_objectset class reference set of objects run inspection afterwards:
data: lr_ci_objectset type ref cl_ci_objectset. call method cl_ci_objectset=>get_ref exporting p_objsnam = 'ztest' receiving p_ref = lr_ci_objectset exceptions ... exception list ... if sy-subrc <> 0. message i005(zsci). * fehler beim ermitteln der objektmenge raise cancel. endif. * prüfen, ob es überhaupt objekte in der sci objektmenge gibt if lr_ci_objectset->iobjlst-objects[] initial. write 'object menge leer'. * in diesem fall kann auch nichts geprüft werden return. endif. write 'object menge nicht leer'.
the set 'ztest' exsisting in system public object set.
after more testing found solution.
if lr_ci_objectset->iobjlst-objects[] initial.
is wrong array objset , therefore used.
if lr_ci_objectset->objectsinf initial.
is functional.
you can't check whether "an object set empty" easily. object sets can either discrete sets of objects (just contents of transport) or set of selection criteria. latter might or might not yield list of objects when selection executed - resulting object list may empty, if object set not.
Comments
Post a Comment