cancel
Showing results for 
Search instead for 
Did you mean: 

When the user Clicks the Modify button remaining Buttons should be dispayed

former_member670836
Participant
0 Kudos

Hi experts,

In my application I have 3 fields and three buttons(Modify ,save and cancel)...The 3rd field is DATE field ...i have to display only MODIFY..and the remaining 2 buttons should be disable mode at Runtime.

1) when the user clicks the MODIFY button....then only other two buttons should be visible in my current application.

2) when the user clicks the SAVE button....the 3rd field should displayed with current date or System date.

3)whenever the user modify the details using modify button...meanwhile if the user clicks the cancel button...all three fields goes to Read only mode...

Thanks In advance for all.

how can i write the logic for all these 3 requirements...can anybody plz help me...

Regards,

Praveena..

Edited by: s.praveena on Jun 14, 2010 7:36 PM

Edited by: s.praveena on Jun 14, 2010 7:39 PM

Edited by: s.praveena on Jun 14, 2010 8:01 PM

Accepted Solutions (0)

Answers (1)

Answers (1)

abhimanyu_lagishetti7
Active Contributor
0 Kudos

Basically you want to handl the visibility and read-only properties of the UI elements at runtime.

To handle visibility property create a context attribute of type WDUI_VISIBILITY and bind it with the UI element's visible property.

in MODIFY action handler set this context attribute to IF_WDL_CORE=>VISIBILITY_VISIBLE to make it visible

IF_WDL_CORE=>VISIBILITY_NONE to make it invisible.

Similarly to handle the read-only behaviour, create the context attribute of type WDY_BOOLEAN and bind it with the readonly property of the UI element.

and in action handler assign a value to the context attribute. ABAP_TRUE to make it readonly

ABAP_FALSE to make it editable.

former_member670836
Participant
0 Kudos

Hi Abhimanyu,

Hi i have created two attributes with WDUI_VISIBLE type one for MODIFY and i have bind This attribute to Visible property.

same as Save button allso.

but that modify button is not displaying in the application.

do i need to write any logic in the modify & save button, if yes can u tell me the logic..

Thanks in advance..

Regards,

Praveena.

abhimanyu_lagishetti7
Active Contributor
0 Kudos

the default visibility is NONE, so you have to set this attribute to VISIBLE in WDDOINIT

former_member670836
Participant
0 Kudos

HI Abhimanyau,

query

I have created 3 attributes with type : WDUI_VISIBILITY.

And i have assigned these three att to Visible property's .

And also i have assigned these values in the MODIFY method value is 0 remaining all 1 's i.e.

in INIT method i have assigned the value is 1 for MODIFY remaining all 0 's.

But it not working .

when i test the application, the buttons are not displaying in my app?

Could please help me how do i follow?

Thanks in advance ,,,

Regards,

Praveena.

abhimanyu_lagishetti7
Active Contributor
0 Kudos

The value for VISIBILITY_NONE is '01' and VISIBILITY_VISIBLE is '02'

Former Member
0 Kudos

Hi Praveena

I guess you will not use the visibility property for the remaining buttons else where. So i suggest you to follow these steps

1) Create one attribute of type WDY_BOOLEAN say REST_VISI

2) Assign the REST_VISI to the visiblility property of all the remaining buttons other than Modify

3) In the doinit method assign space to REST_VISI.

4) On click event of Modify button change the REST_VISI to 'X'.

Note : You can use CODE WIZARD and SET the value for REST_VISI

Hope this helps you

Thanks and Regards

Chaitanya.A

former_member670836
Participant
0 Kudos

HI Abhimanyu.

1 ) when i Click the modify button it will displaying the Save button.

If i enter some values, it is saved, but again i refresh the application those fields displaying Zeros.

my req is when the user saves the data once, that data will be available all ways.

in my case it is not possible.

2) If suppose user enters wrong data then Click the Cancel button in that case all so should be displayed old values.

Could you please let me know how to write the logic.