cancel
Showing results for 
Search instead for 
Did you mean: 

Can I using context node for saved data for multiple items on sub nodes.

Former Member
0 Kudos

Dear Expert Webdynpro ABAPers,

I have requirement to building ESS/MSS for Purchase Order Transaction which is once we are creating PO we have 1 Header and posible have many items, then each item have several item detail.

And now at save button clicked, how to get header, multiple items and each item detail which we are creating before.

Could be Context node save all data for this requirement?

Note: I was trying using several technics and i can't solve this problem. Is there anything that can provide solutions?

Cause i thing context node just saved data at runtime.

Best regards,

Virtinova

Indonesia ABAPer

Edited by: Virtinova on Oct 13, 2010 5:52 AM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,Virtinova.

I think maybe you can declare your context node as following.

Just one simple example:


   PO (Type: Context Node. Cardinality: 1...1 )
      |-PO Item ( Type:Context  Node. Cardinality: O..N)
            |-PO Item Detail ( Type: Context Node. Cardinality: 0..N)
                    |-Delivery Time. (Type: context attribute )
                    |-Delivery Qty. (Type: context attribute )
                    |-Address info. (Type: context attribute )
                    ............
            |-Item No. (Type: context attribute )
            |-Material No. (Type: context attribute )
            |-Material Unit. (Type: context attribute )
            |-Material Price. (Type: context attribute )
             ............
      |-PO No. (Type: context attribute )
      |-POrg (Type: context attribute )
      |-Vendor (Type: context attribute )	
      |-PO Date(Type: context attribute )	
      |-Company(Type: context attribute )
      |-Purchasing Group(Type: context attribute )
       ............

Best wishes.

Edited by: Can Tang on Oct 13, 2010 6:22 AM

Answers (3)

Answers (3)

Former Member
0 Kudos

Link to my WDA screen: http://i55.tinypic.com/2n1uc6p.png

Link to Context node mapping: http://i54.tinypic.com/r1kiuo.jpg

If you see WDA screen, Items in ALV editable are bound with ALV context node. So ALV Context node has 0-n cardinality because 1 PO can have several items.

And then each record or element on ALV context node (items) have several item details. Now, how to save and then get data from user input.

e.g: i create PO with item 1, and then enter the item details field (Material data, Account assignment, condition, etc). And now, if i create another item, called item 2 and then enter the item detail fiel for item 2, How i get item detail value of item 1? cause if we get elements of related context node, we just get elements or records which runtime (in this case, get elements just returning values of elements for item 2). How about item 1 detail?

But thanks you so much Can Tang for your respon.

Former Member
0 Kudos

Thanks Can Tang for your respon.

I was done to create context node before. But if we are create PO, we have several items, and each item have several items detail. Once again, for context node design like cardinality, etc has be done. Now how to save item 1 and item 1 detail, item 2 and item 2 detail, and so on. Cause when i get elements of items node when create PO, i just get item and item detail which is at runtime. another items and items detail when create before can't be taken.

Best regards,

Agnis Virtinova Avency

Former Member
0 Kudos

hi, Virtinova.

Sorry, i am confused about what you want.

If you want to save the data of Context, you can get all the elements of context node first, then get all the data of every element.

Just use the following EXAMPLE coding:


     ta_elem                             like table of elem_attributes,
     node_attributes                     TYPE REF TO if_wd_context_node,
     elem_attributes                     TYPE REF TO if_wd_context_element,

** get elements
   ta_elem = node_attributes->get_elements( ).

   LOOP AT ta_elem INTO elem_attributes.
     elem_attributes->get_static_attribute( )...
     "you can do anything as you want.
   ENDLOOP.

I am not very certain about your requirement.

If am wrong, pls forgive.

Best wishes.

Former Member
0 Kudos

I got 1 technic. We can creating attribute which have internal table type. So when we select another element or item, we must update that attribute to saved data from context node. Is there any solution for my problem?

Thanks,

Virtinova