Application Development and Automation 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: 
Read only

BDC for T-code CV02N

Former Member
0 Likes
850

Dear friends,

I have a requirement to delete data under object link tab through BDC.Under Object link tab there is a sub tab as Customer. Under Customer there is a table control in which there can be any no. of rows.

Now, recording is done for 1 row in table control and the code generated for selecting the row is like-

perform bdc_field using 'TAB_MARK(01)'

'X'.

In the above code field TAB_MARK(01) signifies the selection of 1 st row.

Now, if have 10 rows in my table control (which i can find using the table DRAD), how the code should be written to select the 10 rows of table control? I hope i am clear enough in my requirement.

Thanks & Regards,

Rishi

5 REPLIES 5
Read only

naimesh_patel
Active Contributor
0 Likes
809

Instead of the BDC, try to use the BAPI BAPI_DOCUMENT_CHANGE2.

Pass DOCUMENTTYPE, DOCUMENTNUMBER and fill your object links to be deleted in OBJECTLINKS.

Regards,

Naimesh Patel

Read only

Former Member
0 Likes
809

you have write ABAP code like below

you need to increase the lv_n based on number of records..

CONCATENATE '' 'TAB_MARK'(' '0' lv_n ')' INTO lv_char.

Read only

Former Member
0 Likes
809

Dear Rishi,

first u find out how many records to be deleted from DRAD into (say ) v_no.

In the BDC Steps, Follow this Code.

Loop at v_no.

CONCATENATE '' 'TAB_MARK ( ' v_no ' ) ' INTO v_val.

perform bdc_field using v_val 'X'

.......Continue here with the delete line step of BDC.

end loop.

clear v_no.

so that with in the loop all the rows will be deleted.

Read only

Former Member
0 Likes
809

Dear friends,

Problem solved. Thanks a lot for all your help.

Read only

Former Member
0 Likes
809

Problem solved.