Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Table control new entries

Former Member
0 Kudos

Hi,

Please send the sample logic for the following

1.How can set the cursor at the new line in Table control when i press NEW ENTRIES icon?

I need this logic in sy-ucomm ... WHEN 'NEWENTRIES'.

2.How can i delete one/multiple rows selected in Table control?

I need this logic in sy-ucomm ... WHEN 'DELETE'.

Please help me ASAP.

Appreciate ur help.

Madhu

3 REPLIES 3

raja_thangamani
Active Contributor
0 Kudos

Check this sample program

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.highlightedcontent?documenturi=...CodeSamples/TableControlin+ABAP.pdf

Raja T

Message was edited by:

Raja Thangamani

ferry_lianto
Active Contributor
0 Kudos

Hi Madhu,

Please check this demo programs.

RSDEMO02 (Create new entry)

DEMO_DYNPRO_TABCONT_LOOP_AT (Delete entry)

Hope this will help.

Regards,

Ferry Lianto

raja_thangamani
Active Contributor
0 Kudos

<i>1.How can set the cursor at the new line in Table control when i press NEW ENTRIES icon?</i>

You need to get the cursor line by using the command:

GET CURSOR FIELD <field name> LINE <line>.

This gives you the line in the table control where the cursor is but you also need to consider if the user has scrolled the table control entries. The code below will give you the true cursor line for your table control.

GET CURSOR LINE <line>.

cursor_line = <table_control>-top_line + <line> - 1.

Raja T