ā2014 Dec 01 5:12 AM
Hi gurus, I have a requirement for table entries uploading based on a particular status.
actually we have an exising table in sap. In this table for particular field has 'status' (eg. 1,2,3,5,7).so i need to upload the data in a New table for only 'Status' = '7'.
which method i need follow...?
please suggest me.
Thanks in advance...!!
Regards
Vasant
ā2014 Dec 01 5:47 AM
Hi Vasant,
What exactly you want to do? Are you talking about internal table with these statuses 1,2,3,4... and you want to insert the only the entries with status 7 in a transparent table?
Best regards,
Saurabh
ā2014 Dec 01 6:02 AM
Dear Saurabh,
Already i have Database Table with Status like 1,2,3,7..I want to create a New Database Table to upload the data for Status = '7'. for mass upload. so which method i need to follow...
Thanks in advance.
Regadrs
Vasant
ā2014 Dec 01 6:25 AM
Hi,
If it is for the already existing entries, then please write a program to fetch data from the database table with the specified status = '7' and then insert everything to new table in one shot.
For doing it further, it can be done in table maintenance as mentioned earlier.
ā2014 Dec 01 8:27 AM
Hi Vasant,
The easiest approach is to go and create a DB table with the same structure type as the table with statuses 1,2,3,4 etc.(in se11) And write a small program to transfer the enteres to the new db table.
data lt_itab type table of <old_table>.
select * from <old_table> into table lt_itab where status = '7'.
if sy-subrc is initial.
insert <new_table> from table lt_itab.
else.
message 'No entries found' type I.
endif.
where <old_table> and <new_table> are the names of the new and old transparent/db table.
Best of luck.
Saurabh
ā2014 Dec 01 5:48 AM
hi vasanth,
I think you should use table events.
Please check this link.
TABLE MAINTENANCE GENERATOR and ITS EVENTS - ABAP Development - SCN Wiki
ā2014 Dec 01 5:58 AM
Hi,
Whenever it is Status = '7' , after successful uploading of entries, have another insert statement update the new table in PAI in table maintenance generator.
You can use events as well for this.