on 07-05-2011 1:03 PM
Hi everyone,
can a context attribute datatype be a dictionary structure?
I would like to create a node whose attributes, namely user, is a custom dictionary datatype made up of two fields: firstname and lastname.
I know I can create a context node with two attributes, firstname and lastname, but I would like to create just one attribute with a complex dictionary datatype which I have already created.
This is syntactically possible. However, how can I assign values to these attributes?
Thanks!
Hi..
yes, dictionary structure can be datatype .
and about user name combination of first name and last name, there is a data type called cname is combination of first name and last name in infotype p0002.
you can assign values to attibute in normal way using set_attribute method.
Regards
Srinivas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Yes you can create attribute of any dictionary type. just try once you will get idea.
Wile creating node-in node properties you wil find Dictionary structure - there you can give any table or stucture, and select
fields from that table or struct.
Cheers,
Kris.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
as I said before, I already knew that is possible and I did it.
However, how can I set the value for such an attribute ?
Specifically, I've coded the following/
ls_item_ref-label_name = 'Created by: '.
ls_item_ref-value_path = 'PO_HEADER.CREATED_BY'.
APPEND ls_item_ref TO lt_items_ref.
but created_by is a structure made up of Firstname, Lastname and Fullname.
How can I refer to, let's say, Fullname?
If I code something like this:
ls_item_ref-value_path = 'PO_HEADER.CREATED_BY.FULLNAME'.
it dumps, since FULLNAME is not an attribute, it's a component of the structure which is the data type of the attribute.
Any idea?
HI,
I probably forgot to mention that my question is related to FPM - IDR (Identification Region).
In fact I'm trying to add an item dynamically to IDR:
DATA:
lt_items_ref TYPE if_fpm_idr=>t_items_ref,
ls_item_ref TYPE if_fpm_idr=>s_items_ref,
lo_idr ?= lo_fpm->get_service( cl_fpm_service_manager=>gc_key_idr ).
ls_item_ref-label_name = 'Created by: '.
ls_item_ref-value_path = 'PO_HEADER.CREATED_BY'.
APPEND ls_item_ref TO lt_items_ref.
and this is dumping since CREATED_BY is not a simple attribute, but a structure. How can I access its components?
User | Count |
---|---|
87 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
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.