cancel
Showing results for 
Search instead for 
Did you mean: 

Is there any way to read the field name,through the property binded to it.

Former Member
0 Kudos

Hi

I want to know that,is there any method exits with which i can find the field names of the screen,if i have the property attribute with me.

as my req is to make the validation for the property attr,& check how many fields are binded with the single property attr,i have read the property attr dynamically,now need to find the fields linked,& need to check how many fields have not field value,& through the error msg.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

hi Vipin,

If your more than one field is binded with same attribute then i dont think it is possible to get the names of those fields.

any method exits with which i can find the field names of the screen,

To get the names of UI elements on Screen, bind the text property of UI element with an attribute and read the attribute to get the field name.

Former Member
0 Kudos

hi

currently i have such 70 fields with 5-6 diff nodes & 70 respective property of wudi_state,binded with them.

now i am have all the 70 property name with me in table & want to check is the filed binded with it is initial or not,so that i can throw a error if its initial.

Edited by: Vipin on Oct 26, 2009 3:39 PM

Former Member
0 Kudos

hi,

Why you want to read field's name based on field property.

Directly read the attribute binded to field.

ex.

F1 F2 F3 F4 .... binded to A1 A2 A3.

Field's State property : S1 S2 S3 ....

Here you can directly read A1 to get the value of field1 .

Former Member
0 Kudos

hi

i have some req in which i am setting the fields property based on SPRO,so i have the list of property with me,so frm SPRO let say,if i get out of total 70 property 10 as required,i make set the property to req,i have binded the property with the respective fields,so after this,not i want to make check if the user not entering the data in these fields,error method shd be displayed,& its a dynamic process,i only have the property name,with me to do all the things.

so i can't read the fields as there are total 210 fields,in which just 70 are suppose to be at max as mandatory,based on SPRO.thus i can;t even read 70 fields directly,as based on user,these fields are also displayed or hided or become mandatory.

so i am just working in a way,if the fields are required,the filed name shd be validated if initial,shd throw error.

if have any doubt pls le me know.

Former Member
0 Kudos

check whether there is some table which shows the linkage between Field's Prpety and Field's name.

There should be one.

Otherwise i dont think it will be difficult.

Former Member
0 Kudos

Is there any method exits which display the all property binded with a field.if its shows the data in tabuldar form,it can be used.

Edited by: Vipin on Oct 27, 2009 11:28 AM

Former Member
0 Kudos

I dont thnk there is any method as such for this.

If you have binded the properites with some attributes then of course you can.

Former Member
0 Kudos

hi

yes with fields means that properties are binded with attr only,pls tell the method if exits.

Former Member
0 Kudos

just read the attribute binded to properties using code wizard ( Control + F7).

Code generalted will be like :

DATA lo_nd_cn_check TYPE REF TO if_wd_context_node.

DATA lo_el_cn_check TYPE REF TO if_wd_context_element.

DATA ls_cn_check TYPE wd_this->element_cn_check.

DATA lv_ca_check LIKE ls_cn_check-ca_check.

  • navigate from <CONTEXT> to <CN_CHECK> via lead selection

lo_nd_cn_check = wd_context->get_child_node( name = wd_this->wdctx_cn_check ).

  • get element via lead selection

lo_el_cn_check = lo_nd_cn_check->get_element( ).

  • get single attribute

lo_el_cn_check->get_attribute(

EXPORTING

name = `CA_CHECK`

IMPORTING

value = lv_ca_check ).

Here i have read attribute CA_CHECK.

Former Member
0 Kudos

hi

u have done it reverse,its return the field value,i need a method,which return the table which specify the property binded with it.

Former Member
0 Kudos

Hi Vipin,

Have you checked the tables in SE11 for these...I cannot really tell you the Whereused list of the property being used in the compoenent.

Just check out these tables if they are of any help to you -

WDY_CTX_ATTRIB

WDY_UI_PROP_DEF

WDY_UI_PROP_DEFT

WDY_UI_PROPERTY

Check out with WDY* for more information.

Regards,

Lekha.

Former Member
0 Kudos

Hi Lekha

i have tried out some other way for this,its almost solving my purpose.I have used check_mandatory_attr_on_view,to validate the fields.Things are fine,except the nos. of messages are too much,with the same message.

but at last it worked for me.

thanks for reply.

vipin.