on 12-11-2007 10:07 PM
hi there,
i have a SUPERTYPE called LSO_TRAINI. i created a subtype Z_LSO_TRAIN and delegated supertype to subtype.
so far, so well.
but: in supertype there is a attribute lso_traini.begindate. i have to use this attribute in my subtype, how is this possible ?
the generated code for my program in Z_LSO_TRAIN in SWO1-transaction includes only the object-key from supertype ! not the attributes of it.
any ideas ?
reg, Martin
Hmm... I checked the thread Ravi was pointing to and couldn't see the question you ask here in that thread. So I'll give you an answer, but also request that you try to study some SAP code to learn from it before posting your next question here. When you are new to workflow there are many things you don't know the answer to. Quite often you will find the answer by looking at SAP code. (Actually, also when you have been working with workflow for more than 5 years there will still be many things you don't know the answer to - but at least you will then know most of the basics regarding object types, delegation, events etc.)
The answer is that you should access attributes the same way always, by using the SWC_GET_PROPERTY macro. Anything else is unsafe. In the attribute code you (or SAP) will either use a value that has been retrieved already, or retrieve the value. Then the container element will be filled with the value. If you access the object-* elements directly the value may not have been retrieved yet (no-one has requested it).
<i>Message was edited by Kjetil Kilhavn:</i>
Always.... it's a dangerous word. If the attribute is a multiline attribute you need to use SWC_GET_TABLE_PROPERTY of course.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Martin
Here's a response...
hemalatha nagha...
Posts: 30
Questions: 4
Registered: 6/7/07
Forum points: 22
Re: changing workflow for LSO
Posted: Dec 11, 2007 9:20 PM in response to: Martin Svik Reply E-mail this post
Hi Martin
You have to create a subtype...the i'll <b>automatically inherits all the attributes,methods and events from the supertype(SAP Standard Business object).
Then you have to create your own attribute or method or event...After that you should delegate the subtype to supertype</b>...
Regards,
Hemalatha
The attributes are available to the subtype. I felt you would get the hint...
Ravi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
71 | |
26 | |
10 | |
9 | |
7 | |
6 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.