‎2007 Apr 30 3:05 PM
Hi ALL,
Hope all are doing fine!!!
This is an interview question ,,,this is as follows:-
<b>if there are some records in internal table ,,,,,i want to upload only selected records ,not all records into the database tables via transaction...thru BDC..how is it possible in session and call transaction methods?? pls remember that only selected records should be uploaded </b>
Pls provide the answer
Quick solutions are highly appreciated and points wil sure be rewarded.
Regards,
ABC XYZ.
‎2007 Apr 30 3:08 PM
Hi,
Once you have the internal table with all the records, since you said it is a selectable data, there must be some single chracter field which would be set to 'X' if selected.
So, you can upload onlt those recrods which have an 'X' in that field.
loop at itab where sel = 'X'.
*Build bdcdata structure.
*Call transaction or bdc_insert..
endloop.
Regards,
Ravi
‎2007 Apr 30 3:17 PM
Hi,
Thanx Ravi,,,,
but but i want to select records while uploading in the transaction,,,that means i shud provide an option so that user can select the record(s) while uploading online..
pls provide solution ..
Regards,
ABC XYZ
‎2007 Apr 30 3:19 PM
HI..,
Use the <b>BDC SESSION method</b> with <b>FOREGROUND Processing</b> ( all screens )...
Now u can watch each and every session and if u dont want a particular record (transaction) to get updated then just give<b> /N</b> in the <b>BDC_OKCODE</b> and press enter.. then this particular record will not get updated and it starts the next record..
if u enter<b> /bend </b>and press enter the whole session ( total records will not get updated )
This works only with BDC SESSION METHOD.
regards,
sai ramesh
‎2007 Apr 30 3:20 PM
first upload the records and display the same in an ALV report. Also, give a checkbox to teh ALV report. Now, user can select the records.
loop at itab where checkbox = 'X'.
here u need to use these records to upload to SAP using BDC.
endloop.
hope it clears.
reward points and avoid duplicate threads.