‎2009 May 11 1:07 PM
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
‎2009 May 11 2:10 PM
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
‎2009 May 11 3:52 PM
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.
‎2009 May 14 11:29 AM
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.
‎2009 May 14 2:42 PM
‎2009 May 14 2:49 PM