on 09-24-2008 6:57 PM
On casting BUS1001006, I see that the methods used in steps from Z1001006 execute properly. However if I have created new attributes on Z1001006, in fact inherited attributes too, and use them in the steps, they do not show up. Is there something I need to do for this?
Here is my code for CreateMe method:
BEGIN_METHOD CREATEME CHANGING CONTAINER.
DATA:
OBJECTIN TYPE SWC_OBJECT,
OBJECTOUT TYPE SWC_OBJECT.
TABLES: MARA.
DATA: local_object_key LIKE MARA-MATNR.
SWC_GET_ELEMENT CONTAINER 'ObjectIn' OBJECTIN.
SWC_GET_ELEMENT CONTAINER 'ObjectOut' OBJECTOUT.
SWC_GET_OBJECT_KEY ObjectIn local_object_key.
SWC_CREATE_OBJECT ObjectOut 'ZB1001006' local_object_key.
END_METHOD.
My other observation is when I create the ObjectIn and ObjectOut parameters, the Object Type defaults to Z1001006. I can select the required 'Data Reference Type'.
Regards,
Gayathri
Hi Experts,
Thanks for your replies. The reason I was trying casting was because we have the automotive best practices packages loaded in our system. This package has delegated BUS1001006 to subtype ADB1001006. I do not want to extend ADB1001006 and I want to create my own subtype. I have an other question posted about subtyping bus1001006 itself in which one expert Tom Carruth suggested casting. I tried this. I was able to access methods of the subtype, but not the attributes. If any of you have any idea about casting please let me know with sample codes.
Thanks a bunch.
Regards,
Gayathri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the catch Ronit. If I create a 'Send Mail' step type and in the message I want to display an attribute 'General Item Category Group' which is defined only in the subtype Z1001006, I see this attribute only in the subtype and not the supertype. So Manish can you please explain your statement.
Tom Carruth suggested the idea of casting. Tom can you please answer my question. Anyone else is very welcome too.
Regards,
Gayathri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In your code and in your task you must use the original object type bus1001006.
In your code I saw that you used zb1001006 instead of z1001006.
Regards,
Ronit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.