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: 

How to delete record from table control using BDC?

Former Member
0 Kudos

Hello friends,

I am running a BDC program to delete records.

I have file with following records and i got these records into t_itab.


Material	Plant	Start date	End date	Cost
MQ100001	S001	09/01/2008	09/31/2008	55.00
MQ100004	S002	09/01/2008	09/31/2008	56.00
MQ100008	S003	09/01/2008	09/31/2008	57.00

Now, I have BDC transaction in which table control screen which contains following structure.


MQ100001	S001	09/01/2008	09/31/2008	55.00
MQ100002	S002	09/01/2008	09/31/2008	56.00
MQ100004	S003	09/01/2008	09/31/2008	47.00	
MQ100005	S004	09/01/2008	09/31/2008	25.00
MQ100006	S012	09/01/2008	09/31/2008	76.00
MQ100007	S033	09/01/2008	09/31/2008	17.00
MQ100008	S011	09/01/2008	09/31/2008	95.00
MQ100009	S002	09/01/2008	09/31/2008	46.00

I have recorded from SHDB in which first record will be delete.

So, when i loop through t_itab,instead of deleting MQ100001,MQ100004 and MQ100008 from BDC screen,

it is deleting MQ100001,MQ100002 and MQ100004 (first record for each process ).

Which i don't want to.

Is there any facility in BDC to put records on top which i want to delete?

Please guide me.

Regards,

RH

1 ACCEPTED SOLUTION

0 Kudos

One option is to identify the table and find out the location as the number of row which should be deleted from the table and then in the bdc program instead of postioning the cursor on the row 1(using the statement perform bdc_cursor ....(01)), replace the 01 with the row number.

Second option is that if a filter control is available for the table control, then filter the data each and every time with the material number to be deleted and then delete the first row.

Regards

Farzan

4 REPLIES 4

kiran_k8
Active Contributor
0 Kudos

Ronny,

Sorry,I read it as table instead of table control.

K.Kiran.

Edited by: Kiran K on Sep 17, 2008 7:19 AM

0 Kudos

One option is to identify the table and find out the location as the number of row which should be deleted from the table and then in the bdc program instead of postioning the cursor on the row 1(using the statement perform bdc_cursor ....(01)), replace the 01 with the row number.

Second option is that if a filter control is available for the table control, then filter the data each and every time with the material number to be deleted and then delete the first row.

Regards

Farzan

Former Member
0 Kudos

Used filter

0 Kudos

Hello Ronny,

My answer solved your problem fully. Then why do you hesitate to give full points?

Each point adds food to somebody brother. So don't hesitate.

Regards

Farzan