cancel
Showing results for 
Search instead for 
Did you mean: 

Refreshing Header and Details table based on a event

Former Member
0 Kudos

Hi,

My WebDynpro application has two tables (Header and Details table).

Header and Details table are populated by executing a function module in SAP.The FM from SAP returns two tables (header and details)

These two table have a link and the key is Document No.

My requirement is,

1. When ever a user selects a entry in Header Table and clicks "DELETE" button, that entry in Header table and corresponding entries in Details table should be deleted.

2. After deleting the entries, the header and details should be refreshed so that it has the real time data from SAP.

3. If no entries are there in header table, both the table should not be visible.

Please let me know your thoughts.

Thanks

Senthil

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You can combine step1,2 and 3 in "Delete" click.

In the action you can call the FM that deletes the selected row and you can refresh the table with new data .

1. Delete the selected row.

2. Invalidate the Node

3. Bind the Table node with new data by calling the FM onceagain

4. Check if there are any rows in the node.If not make the tables invisible

Regards, Anilkumar

Answers (2)

Answers (2)

Former Member
0 Kudos

hi senthil,

For hiding the visibility of the table go to the

table node properties, in that the node type can be

changed.

click on the type property of the node and select the ... option.

<b>In the dictionary simple type-->click on the

com.sap.ide.webdynpro.uielement defenitions--->visibility.</b>

Inside ur hiding table condition just give this code.

wdContext.currentContextElement().setNode(WDVisibility.NONE);

Hope so this one solves ur problem senthil,

Regards,

Nagarajan.

Former Member
0 Kudos

Hi,

I know how to hide table, but i want to hide in this specific case (after deleting the last entry in header table).

Thanks

Senthil

Former Member
0 Kudos

Hi Anil,

Thanks for that.

As i understood you want me to do this

1.Delete the selected entry in Controller Context.

2.Invalidate the node.

3.Call FM again means, you want me to create a input element object and bind it to the input node and execute it again or just execute the FM again.

If any changes to the above please let me know.

Thanks

Senthil

Former Member
0 Kudos

Hi,

How you are deleting the entries in the table.Please post code also.

You mean if you navigate from top to bottom then you can able to delete all the entries whereas the same is not working if you navigate from bottom to top ?

Regards, Anilkumar

Former Member
0 Kudos

Hi Anil,

If you can give me your approach for this requirement it would be helpful.

Thanks

Senthil