Object-Key retrieval in subtype

Knoske George - NAO Florence Office SAP Analyst George.Knoske at zf.com
Tue Feb 10 09:57:11 EST 2004


Stephan,
Thanks for your quick response.  However, even when I reference object-key
(as you suggest) the value is blank.  Below is the logic in my subtype
implementation program.    I see object-key-number as blank when running in
debug mode.
 
*****Implementation of object type ZU1_FORMAB
INCLUDE <OBJECT>.
BEGIN_DATA OBJECT.
** only private members may be inserted into structure private
DATA:
  BEGIN OF KEY,
      NUMBER LIKE SWXFORMABS-FORMNUMBER,
  END OF KEY.
END_DATA OBJECT.
*
BEGIN_METHOD FORMDETAIL CHANGING CONTAINER.
DATA:  PERNR LIKE SWXFORMABS-PERNR.
  CALL FUNCTION 'ZU1_SWX_FORMABS_DETAIL'
    EXPORTING
      FORMNUMBER = object-key-number
    IMPORTING
      PERNR = pernr
       .
       .
       .
 
 
thanks for your continued suggestions.
 
George Knoske
SAP Analyst
 
 
 
 
-----Original Message-----
From: Becker, Stephan [mailto:stephan_becker.ext at siemens.com]
Sent: Tuesday, February 10, 2004 9:31 AM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Re: Object-Key retrieval in subtype
 
 
You don't need to do anything, you always have the object key in
"object-key". The macro you're using is for handling "non-self" objects.
 
Stephan
 
-----Mensaje original-----
De: Knoske George - NAO Florence Office SAP Analyst
[mailto:George.Knoske at zf.com]
Enviado el: 10 February 2004 14:39
Para: SAP-WUG at MITVMA.MIT.EDU
Asunto: Object-Key retrieval in subtype
 
Not sure if my question is specifically delegation related - SuperType to
SubType - but I am unable to access the Object Key within my subtype.  The
key field is empty/blank.
 
I created a subtype, ZU1_FORMAB, from SAP delivered object type FORMABSENC.
Within my subtype I have created a new method.  Within the implementation
program of my subtype I need to reference the FORMNUMBER, which is the key
for the object type FORMABSENCE, and thus, the key for my subtype ZU1_FORMAB
as well.  I need this key value, FORMNUMBER, in order to execute my new
method.  Prior to the call of my new method I have the following statement:
 
SWC_GET_OBJECT_KEY SELF FORMNUMBER.
 
I find that this macro calls function SWO_OBJECT_ID_GET, and returns a
structure, SWOTOBJID.  This structure has the field OBJTYPE filled with
ZU1_FORMAB, but the OBJKEY value returned is empty/blank.  I have made the
necessary delegation entry where FORMABSENC is the object type, and
ZU1_FORMAB is the delegation type.
 
Any suggestions you have as to how to retrieve or find the Object-key would
be much appreciated.
 
 
George Knoske
SAP Analyst
george.knoske at zf.com
 


More information about the SAP-WUG mailing list