cancel
Showing results for 
Search instead for 
Did you mean: 

Disable the form when the table entry is not available.

Former Member
0 Kudos

Hi Gurus,

I have one table in the Layout, where I am displaying the years. Below that table I have an interactive form.

Suppose in the table I got 3 entries ( i.e 3 years ) . and for the 1st one the form is available and the 2nd one, the form is not available and for the 3rd one, also its not available.

If I click on the first entry in the table I am getting the form. which is working fine. when I click on the 2nd entry in the table, as the form is not available , I am placing the message as Form does not exist. I am getting the message, but below that I am getting the Previous form.

It is not clearing. it is happening same for the third case also. Please let me know the procedure how to handle this.

Waiting for the Quick response.

Thanks

Rahul

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Rahul,

The reason why it is not clearing is : the attribute u bind to the datasource of Interactive Form is not clearing.So when u

select a row in a table if data is empty ,clear the value stored in the binded attriburte. do it the same for 3 rd Row

Former Member
0 Kudos

Thank you Prakash,

Can you please provide me some code how to clear the value stored in binded attribute.

Rahul

Former Member
0 Kudos

Hi Rahul,

There wil be a method called SET_STATIC_ATRRIBUTES_NULL , try to call this method in ur code..

Some Thing like,,,,,

CALL METHOD lo_el_datasource->set_static_attributes_null.

Former Member
0 Kudos

Hi Prakash,

I have used that method, But I am facing an dump when I am executing this particular code.

Rahul

Former Member
0 Kudos

Hi Rahul

Can u post the code.....???

Former Member
0 Kudos

HI Prakash,

Right now I ma using the below code, but getting an dump for this method also.

call METHOD lo_el_context->SET_ATTRIBUTE_NULL

EXPORTING

Name = 'PDF_SOURCE'.

Earlier I called the method

call METHOD lo_el_context->SET_STATIC_ATTRIBUTE_NULL.

former_member628395
Active Participant
0 Kudos

Hi,

You must be using an attribute of type XString to display the form on the view. Before binding the data, on click of the line in the

table, clear the existing data from the attribute and then bind the new.

If the attribute is in a node, try invalidating the node before binding the new data.

Regards,

Sagar

Former Member
0 Kudos

HI Sagar,

I am using the attribute of type xstring. After clicking on the line of the table I checked in debugging the xstring data is empty.

Then also the uI element is getting that form.

Initially the form is getting form WDDOINIT method, but it is not clearing when an action of clicking on the table is getting happened.

Is there any way to disable the UI element , or clearing the data for that xstring

Thanks

Rahul