‎2007 Apr 30 3:06 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:14 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 /bend 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:16 PM
what exactly u mena by 'selected'.
are the records, displayed in a table control on a screen, and you want to upload only entries you select. ?
then just add an indicator for select in the internal table, and while calling bdc, do it only for thos elines where indicator is set.
els,e what exactly is ur case ? whatever it is, there must be some indicater which identifies the 'selected' records, right ?
‎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.
‎2007 May 01 2:10 PM
Hi
There should be some criteria to eliminate few records.
So set a flag to 'X' for those records.
And upload only those records where flag is initial.
Thanks,
Deepti
‎2007 May 01 7:52 PM
Hi
Just call the transaction for those records only which satisify your criteria.
Also, with session method, you can run it in mode-'A' and cancel whichever records you want to skip since you will have the screen running infront of you for every OK-code.
Reward points if helpful
Regards
‎2007 May 02 6:00 AM
hi,
just put one condition in the loop.
first you will have records in internal table.so put one condition depending on your requriement, i.e.for example if you want to upolad only first 20 records in that case
loop at itab where sy-tabix LE 20.
performs for upolading data.
call transaction.......
endloop.
‎2007 May 02 6:03 AM
‎2007 May 02 6:14 AM
HI,
Display your report to the user using ALV function module then user will check the records which want to be uploaded then process thro' call transaction.
Regards,
Suresh