on 06-22-2007 7:31 AM
Hi Workflowers, help sought..
Can anyone show me how I can access the <u>value</u> attributes of a <u>multiline object reference</u> attribute.
For example, I want to create a new multiline attribute in the <i>SalesOrder</i> object (ZBUS2032) called <b>LineQuantities</b>. ZBUS2032 has a multiline <u>object reference</u> attribute called <i>Items</i>. I want to place the QUANTITY attributes of all of the <i>Items</i> of the SalesOrder into my new <b>LineQuantities</b> attribute. What is the syntax to retrieve all the QUANTITY attributes of the <i>Items</i> to my new multiline attribute of the SalesOrder?
Can I use something like
SWC_GET_TABLE_PROPERTY self 'Items' <b>it_quantity</b>
to retrieve a list of the <i>Items</i> quantity attributes? In that case, <b>it_quantity</b> would need to be defined as a table of object references, and I would still need to get the quantity attribute from each object somehow. There is probably straightforward way to do this, if someone can enlighten me.
Not sure how to do it, any pointers much appreciated.
Hi Tony,
'fraid you have to go the long way, just as you would with internal tables:
Something like:
SWC_GET_TABLE_PROPERTY self 'Items' lt_items
loop at lt_items into lv_item.
append lv_item-qty to lt_lineqtys.
endloop.
object-linequantities = lt_lineqtys.
Hope that helps,
Mike
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hai Tony Bramhill
SWC_GET_TABLE_PROPERTY <Object> <Attribute> <AttributeValue>.
The value of the specified DWWULEXWH is established. If it is a YLUWXDO DWWULEXWH, this is done
dynamically.
You must pass the object reference in <Object> and the attribute or key field to be
read in <Attribute>. You must declare <Object> with type SWC_OBJECT.
The value of the attribute or key field is returned in the variable <AttributeValue>.
SWC_GET_PROPERTY returns a single value, SWC_GET_TABLE_PROPERTY returns a
multiline value in an internal table
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tony,
Please confirm, First of all did you copy as Subtype of BUS2032. Don't copy directly.
define virtual attribute for Quantity, then you can use multiline container element.
Check this Link for more details:
http://help.sap.com/saphelp_nw2004s/helpdata/en/c5/e4acd5453d11d189430000e829fbbd/frameset.htm
Thanks and Regards,
Prabhakar Dharmala
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.