‎2015 Jan 23 4:22 PM
Hi,
I need to change a BOR-Business object and the object does not have a method to do exactly what I want. The requirements I have are, that I, if possible, do not change any business objects.
I know that I can directly read attributes and their values and invoke methods by using the FM SWO_INVOKE after I got an instance using SWO_CREATE. What I am searching for is a way to edit the attributes in a similar way.
What I tried up to now is to use SWO_INVOKE as well with parameters:
- Access: P
- Object: An instance I got using SWO_CREATE
- Verb: The attribute name
- Tables: The attribute with the new value and its properties like length and type
Whenever I try this, I get the message that the object does not support the given verb. I am not sure whether I am calling it wrong or if an edit operation is not supported? Maybe another FM can do this?
Thanks in advance for your help
Best Regards
Jonathan
‎2015 Jan 26 7:28 AM
‎2015 Jan 26 6:41 AM
‎2015 Jan 26 7:23 AM
Hi Jonathan,
have you tired calling the function module SWO_QUERY_VERBS to see which verbs are supported by the BOR object?
Besides that, if the object doesn't have a method to perform you requirements I'd always recommend to extend. This will result in better maintainable code compared to "misusing" existing methods.
Best,
Christian
‎2015 Jan 26 7:39 AM
Hi Christian,
Yes, SWO_QUERY_VERBS is a FM i tried. The attribute I want to change appears in the list. That is why I guess that the problem is the combination between verb and access mode (P / Change).
Extending is something I also thought about, here I will try Raymonds approach as that sounds promising.
Best,
Jonathan
‎2015 Jan 26 7:28 AM
‎2015 Jan 26 7:35 AM
Finally solved it by using a child BOR-Object, the inheritance was what I was looking for - even if the "No programming"-restriction does not hold completely. Thank you!