on 03-06-2007 8:40 AM
Hello,
I'm new in (ABAP) WebDynpro and I have a problem with displaying data - particularly with HROBJECTs from our e-Recruiting system.
In my WebDynpro-Component i read some data of candidates into my context. One table (with candidate-infos) which i save in my context includes a field which is datatype of HROBJECT. After I've read this infos into my itab, I bind this table to my context. All this works fine! But as soon as I bind this context to a table-ui-element in my layout, i get a error message "Data Type Is Not Valid for Input", when i start the application.
If I delete the binding with the attribute which is a HROBJECT, it works.
Runtime Errors UNCAUGHT_EXCEPTION
Exception CX_WDR_CONVERSION_EXCEPTION
...
Information on where terminated
Termination occurred in the ABAP program "CL_WDR_CONVERSION_UTILS=======CP" -
in "IF_WD_CONVERSION_UTILS~TO_STRING".
The main program was "SAPMHTTP ".
In the source code you have the termination point in line 138
of the (Include) program "CL_WDR_CONVERSION_UTILS=======CM00G".
The termination is caused because exception "CX_WDR_CONVERSION_EXCEPTION"
occurred in
procedure "IF_WD_CONVERSION_UTILS~TO_STRING" "(METHOD)", but it was neither
handled locally nor declared
in the RAISING clause of its signature.
The procedure is in program "CL_WDR_CONVERSION_UTILS=======CP "; its source
code begins in line
1 of the (Include program "CL_WDR_CONVERSION_UTILS=======CM00G ".
...
136 WHEN cl_abap_typedescr=>typekind_struct1 "'u' " structure
137 OR cl_abap_typedescr=>typekind_struct2. "'v'. " structure
>>>> RAISE EXCEPTION TYPE cx_wdr_conversion_exception exporting textid = cx_wdr_conversion_
139 * raise exception type cx_wdr_conv_unsupported exporting type_name = l_type.
....
Please Help.
Thanks
Hi Chris,
Can you please check the cardinality of the context node you are trying to bind to table UI element .. i hope it is either 0:N or 1:N .. else it will not work and you need to change it ..
Regards,
Anoop
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You should not use the HROBJECT as an inputfield, but split the structure.
eg.
in your table design, you give as datasource the context node which has the structure
of the HROBJECT. then you click right on the table element in your element list (top right)
and click create binding. here you can select the seperate fields of the structure in
an inputfield one by one. You can't have a context attribute with the structure type,
but should have a context node with the structure type, including the structure elements.
grtz
Koen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi, tanks for answering. But I have no InputFields in my table. I only use TextViews. I won't enter something, i only want to display the data of my context.
What have I to do? (musst I really split the HROBJECT? ....that would mean, that I have to write/read into/from 2 different context-nodes, or not?)
Yes, the cardinality is 0:N
Perhaps i should mention, that viewing the context-node with ALV isn't possible, too. I allway get " The ASSERT condition was violated".
Message was edited by:
Chris Rukar
-REQUISITIONS 0:N
-CANDIDATE 0:N
>CDCY_HROBJECT: HROBJECT here occours the error
>CDCY_STATUS_TXT: RCF_S_LIST_CANDIDACIES_X-CDCY_STATUS_TXT
>CAND_NAME: RCF_S_LIST_CANDIDACIES_X-CAND_NAME
>POSTCODE1: AD_PSTCD1
....
>HROBJECT
>HEADER
The requisitions-node is displayed with alv. Here i get no error(only with alv). But although i've selected the whole node with the hrobject-attribute, only the header-attr. is displayed. But no error!
Hi,
HROBJECT should be a node with datatype HROBJECT, or you should remove the HROBJECT and replace it with the 3 fields, bind the values together with the other
attributes and select in your table binding (create binding) the celleditor textview,
this way, you can display them.
If the table purely contains the hrobject values, make a seperate node with structure
grtz
Koen
Hi Chris,
As per my understanding of your requirement you want to display complete data of your REQUISITIONS node in one Table UI element .. right ?? But you are storing data in your node CANDIDATE .. and as you know the data in node CANDIDATE is dependent on entry in REQUISITIONS node .. now if you want to display all the information of CANDIDATE then bind this to one table UI element and keep changing the entries depending on the selected row in another table UI element which has been bound to REQUISITIONS..
Hope this helps.
Regards,
Anoop
Hi Chris,
Good to know that we are on right track
Now Chris just to check if you actually are getting all the data take this candidate node out as an independent node and then try displaying the data of this node in table UI element .. this way you would know if the fault is with how the data has been mapped/bound or with the way we are trying to display it ..
Regards,
Anoop
well chris you can bind your data in WDDOINIT method if you donot want to use supply function .. and the behaviour remains same..
also check out the last post by me in this thread for some more info ..
Also Chris if possible please post your supply function here .. may be we can find out something from it ..
Regards,
Anoop
More info provided
Message was edited by:
Anoop Singh Saini
rqst for supply function code
Message was edited by:
Anoop Singh Saini
now i've tried it with a independent candidate node (without) supply funciton. =>
The same error: "Data Type Is Not Vailid for Input"
Here's the code of my supply-function:
(probably not the best coding - but it works until i want to display a hro.)
METHOD get_cand_info .
DATA: lr_cdcy TYPE REF TO cl_hrrcf_candidacy_bl,
lr_cand TYPE REF TO cl_hrrcf_candidate_bupa_bl,
stru_requisitions TYPE if_componentcontroller=>element_requisitions ,
lt_h_cdcy_list TYPE rcf_t_list_candidacies_x,
ls_h_cdcy_list TYPE rcf_s_list_candidacies_x,
lt_cdcy_list TYPE if_componentcontroller=>elements_candidate,
ls_cdcy_list TYPE if_componentcontroller=>element_candidate,
lt_addr TYPE rcf_t_addressdata_bp,
ls_addr TYPE rcf_s_addressdata_bp,
lt_email TYPE rcf_t_emaildata_bp,
ls_email TYPE rcf_s_emaildata_bp.
* get all declared attributes
parent_element->get_static_attributes(
IMPORTING
static_attributes = stru_requisitions ).
CALL METHOD cl_hrrcf_candidacy_bl=>get_instance
RECEIVING
return = lr_cdcy.
CALL METHOD cl_hrrcf_candidate_bupa_bl=>get_instance
RECEIVING
return = lr_cand.
* Hole Kandidatur-Informationen der Kandidaten
TRY.
lr_cdcy->get_candidacy_list_x(
EXPORTING
ps_req_hrobject = stru_requisitions-hrobject
* ps_cand_hrobject =
* ps_appl_hrobject =
* p_exclude_draft = 'x'
IMPORTING
pt_candidacies_x = lt_h_cdcy_list
).
CATCH cx_hrrcf .
ENDTRY.
* Ergänzen der Informationen mit BusinessPartner-Infos
LOOP AT lt_h_cdcy_list INTO ls_h_cdcy_list.
TRY.
lr_cand->get_contact_data(
EXPORTING
ps_cand_hrobject = ls_h_cdcy_list-cand_hrobject
IMPORTING
pt_addressdata = lt_addr
* pt_telefondata =
* pt_faxdata =
pt_emaildata = lt_email
).
CATCH cx_hrrcf .
ENDTRY.
READ TABLE lt_addr INDEX 1 INTO ls_addr.
READ TABLE lt_email INDEX 1 INTO ls_email.
MOVE-CORRESPONDING ls_h_cdcy_list TO ls_cdcy_list.
ls_cdcy_list-postcode1 = ls_addr-postl_cod1.
ls_cdcy_list-city1 = ls_addr-city.
ls_cdcy_list-email = ls_email-e_mail.
APPEND ls_cdcy_list TO lt_cdcy_list.
ENDLOOP.
CALL METHOD node->bind_table
EXPORTING
new_items = lt_cdcy_list.
ENDMETHOD.
Hi Chris,
In my openion the reason why get to see only one line of your requisition is because thats what you fetch initially .. in the form of a structure and then you retrieve candidate information based on the HROBJECT in this retrived requisition ... and in the end you are trying to bind data of your candidate node to the table UI element .. but then this table has already been bound to requisition node so the UI element ultimately gets nothing and hence results into the error you are getting ..
<b>So to solve this issue I would suggest the following .. and this is based on the below mentioned understanding ..</b>
<u>I ASSUME that for EVERY requisition you have a list of students which you store in the Candidate node .. And you want to display information about every candidate based on the requisition selected ..</u>
Now if the above mentioned understanding of mine is correct then please do the following to resolve the issue you are facing ..
1) Create two table UI elements one for Requisitions and other for Candidates based on those reuisitions ..
2) Fetch all the requisitions,only, and bind them to the node using Supply Function, if you like..
3) Now go to OnSelect of table UI element which deals with Requisition and write the piece of code which would first fetch the selected Requisition and then fetch the candidate information based on this requisition, here you can use the same logic as in your current Supply Function, and then bind this data to node Candidates ..
once you have done this much every time you will select an entry in requisition table you will get the updated entries in Candidates related table UI element..
I hope this helps you and yes please do award points if you think this post is worth it ..
Have a great day .. And I bet this post is longer than some of the blogs here
Regards,
Anoop
first - thanks for your postings!
...."I ASSUME that for EVERY requisition you have a list of students which you store in the Candidate node .. And you want to display information about every candidate based on the requisition selected .." => that is right!
but nervertheless i'm not sure if you really know what i'm want
"see only one line of your requisitoin" ...that's not right at all. The table which is bound to my requisition-node includes all requisitions (but ALV only display the "header-attribute" and not the hrobject of the requisitons (have a look at my context structure above) - but that's not so important, because the requi.context is correctly filled with hro+header.)
next step is displaying the candidate-infos for each candidate which depend on the requisition-node. And this works fine too, as long as i'm not binding a hrobject from the candidate(-node) to the table.
Sry for the huge amount of questions, but i don't get it work newbie
Have a nice day, too.
ah .. thts why i hate text communication .. anyways now we have clear understanding of the two issues at hand .. 1) Display of HROBJECT ( which has got 3 fields inside it..right ??) 2) binding a hrobject from the candidate(-node) to the table ..
well we will consider the easier one first i.e first one .. for this Chris you need to take your elements of the node HROBJECT out and create context attribute like your header attribute, using attributes of table HROBJECT which you would have used for creating HROBJECT node, under the Requisitions node .. this will solve our problem number 1..
Try same thing for second issue as well ..
Hopefully this will work ..
Regards,
Anoop
Hi Chris.
Just another point of view and I think it is what Koen already stated some posts
above.
When you bind your requsistion node to a table the table only displays the
attributes of the node -> not the chuild nodes as per one attribute you get one
column. The error occurs because the table displays string and tries to convert the
hrobject struct to string which is not possible.
When you set the hrobject node's cardinality 1..1 you have one hrobject per
canditate. Then you can add colums per hand to your table and map the coulumn
to a field of the hrobject node.
I guess this is what Anoop and Koen stated above.
I hope I did not makes things more unclear.
Cheers,
Sascha
Message was edited by:
Sascha Dingeldey
well but it's very difficult for me to splitt the hrobject context-attribute into its 3 fields. Because receive a structure which includes serveral HROs and i don't really know how to fill this splitted fields.......
But know I have solved this problem in a different way. I only changed the datatype of the .. HROBJECT-attributes in the candidate-node from HROBJECT into String. I know that this is not the best way, but in this case it works and it's sufficient.
Thanks for all your great help !!!
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.