How to delete entries from a itab using values in another itab?
Hi All,
I am having two internal tables itab1, itab2 with one common field. Also two tables contains some records, what i want is to delete the entries from itab1 which are not in itab2.
Example:
itab1
A B C
1 a b
2 z a
3 e t
4 d r
itab2
A D E
1 s d
3 f g
After the deletion itab1 should only contain records 1 & 3.
I know we can do this using loop and read, but i want to know if there is someother better way to do this...
Thanks in advance...
Regards
Karthik D
Hi Karthik,
this code should do it.
data : temp type sy-tabix.
clear temp.
loop at itab1. "if internal table with header line
temp = sy-tabix.
read table itab2 with key A = itab1-A.
if sy-subrc = 4.
delete itab index temp.
endif.
endloop.
*else if without header line
data : temp type sy-tabix.
clear temp.
loop at itab1 into wa_itab1. "if internal table is without header line
temp = sy-tabix.
read table itab2 with key A = itab1_wa-A into wa_itab2.
if sy-subrc = 4.
delete itab index temp.
endif.
endloop.
Similar Messages
-
How to delete entries from search help for a field
hi guys
how r u all doing.
i have some questions for u.
1. How can i delete some entries(from a list of many) from search help of a field with out (writing)going to a program.
2.in PA10 (Personnel File),when i try to display data for a pernr,i am getting an error saying that infotype 122 doesnot exist.
3.Again in Pa20,when i try to display data for a custom infotype,it leads me to short dump saying that load program does not exist.
any help in this regard,wud be appreciated.
thanksFollow this
What to do before selling or giving away your iPhone, iPad, or iPod touch - Apple Support -
HT204022 how to delete photos from my iphone using a personal computer
How can i delete pictures from my iphone 4 from my personal computer
Well, if they were synced fomr a computer then the iPhone says the computer "owns" them for instructional purposes. You have two options.
1) Plug your iPhone up to any computer with iTunes. You can get itunes at www.itunes.com Then tell it to sync photos, but then select no photos or an empty folder. This will override what the previous computer put on your iPhone.
2) Go to Settings > General > Reset > Erase All Content & Settings and say goodbye to everything including those synced photos. If you make a quick backup first in iCloud (be sure it finishes) then you can restore form your iCloud backup via Wifi and those synced photos wont be there. How to backup: http://support.apple.com/kb/ht1766 -
How to delete data from a DSO using start or end routine
Is it possible to delete records from a DSO in the start or end routine.
My example: I have order 123, item 10, sched line 1. This gets loaded into the DSO.
Next day I have order 123, item 10, sched line 2 coming in.
I want to delete the first one (with sched line 1) from the DSO and load the second one (with sched line 2).
Can code be put in the start or end routine to do this?unless I can do it within the start routine I don't want to have to create new records.
In the start routine I am comparing records coming in with what are already in the DSO. If there is a match on order and item and the sched line is different, then I want to delete the record from the DSO and load the new one. Is there code that I can put in a start routine to accomplish this? -
Cannot delete entries from custom Infostructure using OLIX
Hi,
I have created a custom info structure S970 for MRP. The data is being populated to this info structure using an ABAP program which reads from an excel file input by the user. Insert / Modify are used to write from itab to S970 in the program. The data is being read in file and written to S970 correctly. Version is specified by the user using a parameter like S970-VRSIO.
However, when I try to delete these entries using transaction OLIX, it does not show version or delete data. E.g., version is 002. In F4 help for field source version in OLIX, it is not showing version 002, only 000 - Actual data and A00, active version. If I input 002 manually and try to delete it gives me a message saying that deletion is successful. However, when viewing in SE11/SE16, S970 still shows all entries with version 002. Help is greatly appreciated, thanks.
RegardsFacing same issue here.. please some one help me how to solve this issue?
-
How to delete data from a file using IO package
Hi All,
i am trying to remove some content of the file.
this content is not at starting of file not even at end of file.
can anybody tell me how can i delete number of lines from file using IO package.iam having some data in text file .ex:in flowrist.txt
12/5/07,500,300,6000 like many set of datas are
there.In these if i want to delete the data based on
the date which i specified.How to do this specific
deletion?You need to open a stream to read in the file and then use the indexOf method provided in the Sting class to check if the line contains the date or whatever String you are looking for, if so then skip that line and store or re-write the lines you wish to keep, as well as some extra lines you may wish to add.
Take a look below at this example found on Google.
http://www.java-tips.org/java-se-tips/java.io/how-to-read-file-in-java.html
The above read a file line by line and prints it to console. You should be able to modify this, instead of using System.out to print the line you should use index of to check the lines for a date/String. Index of return -1 if the String you specify is not in the line you parse. -
How to delete record from table control using BDC?
Hello friends,
I am running a BDC program to delete records.
I have file with following records and i got these records into t_itab.
Material Plant Start date End date Cost
MQ100001 S001 09/01/2008 09/31/2008 55.00
MQ100004 S002 09/01/2008 09/31/2008 56.00
MQ100008 S003 09/01/2008 09/31/2008 57.00
Now, I have BDC transaction in which table control screen which contains following structure.
MQ100001 S001 09/01/2008 09/31/2008 55.00
MQ100002 S002 09/01/2008 09/31/2008 56.00
MQ100004 S003 09/01/2008 09/31/2008 47.00
MQ100005 S004 09/01/2008 09/31/2008 25.00
MQ100006 S012 09/01/2008 09/31/2008 76.00
MQ100007 S033 09/01/2008 09/31/2008 17.00
MQ100008 S011 09/01/2008 09/31/2008 95.00
MQ100009 S002 09/01/2008 09/31/2008 46.00
I have recorded from SHDB in which first record will be delete.
So, when i loop through t_itab,instead of deleting MQ100001,MQ100004 and MQ100008 from BDC screen,
it is deleting MQ100001,MQ100002 and MQ100004 (first record for each process ).
Which i don't want to.
Is there any facility in BDC to put records on top which i want to delete?
Please guide me.
Regards,
RHOne option is to identify the table and find out the location as the number of row which should be deleted from the table and then in the bdc program instead of postioning the cursor on the row 1(using the statement perform bdc_cursor ....(01)), replace the 01 with the row number.
Second option is that if a filter control is available for the table control, then filter the data each and every time with the material number to be deleted and then delete the first row.
Regards
Farzan -
Read data from ODS table using value mapping
hi all;
can anyone help on how to read data from ODS table using value mappingMudit,
Take a look at this blog,
<a href="/people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler">DB Lookup in Mapping</a>
Regards,
Bhavesh -
How do I delete photos from my iPad using iOS 8
how di I delete photos from my iPad using iOS 8?
I don't know why the TV Show Tab would be unresponsive. Try force closing the Videos App, then reset the iPad and try again.
In order to close apps, you have to drag the app up from the multitasking display. Double tap the home button and you will see apps lined up going left to right across the screen. Swipe to get to the app that you want to close and then swipe "up" on the app preview thumbnail to close it.
Reset the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider if it appears on the screen - let go of the buttons. Let the iPad start up.
Something else address is why you don't see the videos in the settings, but if you can't get into the TV section of the Videos app, it really doesn't matter yet. Just to be sure, go to Settings>iTunes & App Store>Show All>Videos>OFF. Make sure that is set to OFF. -
Is there any BAPI or function module to delete entries from a table (VBAK)
Hi Everybody,
this is my first thread in SDN...
my problem follows...
A report is be created that selects all sales orders created by e-Sales that are more than 20 minutes old and still have a delivery block:
tables:
VBAK sales document: header data
selection fields:
VBAK-LIFSK ≠ <BLANK>
VBAK-ERNAM = userID used by e-Sales / IVE
(EP-BATCH / EAI-BATCH)
VBAK-ERDAT <= Current system Date
VBAK-ERZET <= Current system Time - 20 minutes
These orders should be deleted from SAP system.
This report should be scheduled to run regularly every 10 minutes.
my doubt : is ther any BAPI or Function module to delete entries from a standard table...if no what is the way to delete the enteries from a std table...
best replies will be rewarded....
regards
ReddyHi Vasanth ,
thanks for your reply.
i tried in the same manner what u mentioned.
but how to pass only one parameter to the functionmodule..
here in this case we have to pass only update flag as 'D'..
i did the same it giving dump..
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', was
not caught and
therefore caused a runtime error.
The reason for the exception is:
The call to the function module "BAPI_SALESORDER_CHANGE" is incorrect:
In the function module interface, you can specify only
fields of a specific type and length under "ORDER_HEADER_INX".
Although the currently specified field
"INT_ORDER_HEADER_INX" is the correct type, its length is incorrect.
my pgm :
*& Report YNEW_ORDER_DELETION
REPORT ynew_order_deletion.
TABLES:vbak.
PARAMETERS:
p_lifsk LIKE vbak-lifsk DEFAULT '02'.
SELECT-OPTIONS:
s_lifsk FOR vbak-lifsk DEFAULT '10',
s_ernam FOR vbak-ernam,
s_erdat FOR vbak-erdat,"DEFAULT sy-datum.
s_erzet FOR sy-uzeit.
*PARAMETERS:
p_erzet LIKE sy-uzeit.
s_erdat like vbak-erdat,
s_erzet like vbak-erzet.
DATA:
BEGIN OF int_final OCCURS 0,
w_vbeln TYPE vbak-vbeln,
END OF int_final.
DATA:
int_return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
DATA: int_order_header_inx LIKE bapisditmx OCCURS 0 WITH HEADER LINE.
DATA:
wf_time TYPE sy-uzeit.
INITIALIZATION.
s_ernam-low = 'KULKARMA'.
s_ernam-sign = 'I'.
s_ernam-option = 'EQ'.
APPEND s_ernam.
s_ernam-low = 'EAI-BATCH'.
s_ernam-sign = 'I'.
s_ernam-option = 'EQ'.
APPEND s_ernam.
wf_time = sy-uzeit - 1200.
p_erzet = sy-uzeit - 1200.
p_erzet-low = wf_time.
APPEND s_erzet.
int_order_header_inx-updateflag = 'D'.
APPEND int_order_header_inx.
START-OF-SELECTION.
SELECT vbeln FROM vbak
INTO TABLE int_final
WHERE lifsk EQ p_lifsk
AND ernam IN s_ernam
AND erdat IN s_erdat
AND erzet IN s_erzet.
IF sy-subrc = 0.
LOOP AT int_final.
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
salesdocument = int_final-w_vbeln
ORDER_HEADER_IN =
order_header_inx = int_order_header_inx
SIMULATION =
BEHAVE_WHEN_ERROR = ' '
INT_NUMBER_ASSIGNMENT = ' '
LOGIC_SWITCH =
NO_STATUS_BUF_INIT = ' '
TABLES
return = int_return
ORDER_ITEM_IN =
ORDER_ITEM_INX =
PARTNERS =
PARTNERCHANGES =
PARTNERADDRESSES =
ORDER_CFGS_REF =
ORDER_CFGS_INST =
ORDER_CFGS_PART_OF =
ORDER_CFGS_VALUE =
ORDER_CFGS_BLOB =
ORDER_CFGS_VK =
ORDER_CFGS_REFINST =
SCHEDULE_LINES =
SCHEDULE_LINESX =
ORDER_TEXT =
ORDER_KEYS =
CONDITIONS_IN =
CONDITIONS_INX =
EXTENSIONIN =
ENDLOOP.
LOOP AT int_return.
WRITE:/ int_return-type,
int_return-id,
int_return-number,
int_return-message.
ENDLOOP.
ENDIF.
please help me ..its a very urgent issue to be solved...
am waiting for ur reply...
regards
gangareddy -
How to select data from a table using a date field in the where condition?
How to select data from a table using a date field in the where condition?
For eg:
data itab like equk occurs 0 with header line.
select * from equk into table itab where werks = 'C001'
and bdatu = '31129999'.
thanks.Hi Ramesh,
Specify the date format as YYYYMMDD in where condition.
Dates are internally stored in SAP as YYYYMMDD only.
Change your date format in WHERE condition as follows.
data itab like equk occurs 0 with header line.
select * from equk into table itab where werks = 'C001'
and bdatu = <b>'99991231'.</b>
I doubt check your data base table EQUK on this date for the existince of data.
Otherwise, just change the conidition on BDATU like below to see all entries prior to this date.
data itab like equk occurs 0 with header line.
select * from equk into table itab where werks = 'C001'
and <b> bdatu <= '99991231'.</b>
Thanks,
Vinay
Thanks,
Vinay -
How to delete entries in the T030 table with LSMW?
Hi all,
I need to delete 600 entries from T030 table (Fix account table), Tcode OBYG, and I want to use a legacy for this,
but I don´t know how or if is possible delete entries from a table with a legacy.
Thanks in advance!You Can Use SCAT instead.
-
How to delete elements from a cluster?
Hello. I would like to know how to delete elements from a cluster. I got stuck with this problem. There is its own order of each element in a cluster. I tried to initiate an array but it seems like too complicated. In the attached file, I want to obtain only the data from "flow" not "pressure". I try to use array programming but it doesn't work. Would be nice if you help me to fix the file. Thanks
Solved!
Go to Solution.
Attachments:
test 1.vi 16 KBBombbooo wrote:
What about if I want to store data into the pressure array too? Do I have to create another loop or it can be done in the same loop as the flow loop?
Try this, for example. Modify as needed.
LabVIEW Champion . Do more with less code and in less time .
Attachments:
test1MOD2.vi 9 KB
SelectFlowOrPressure.png 7 KB -
I need to delete photos from my iPad that were synced with an old version of iTunes on a computer that is no longer functioning. Please help.
Alos, I need to move many photos from my iPad to storage place. Any recommendations on backup drives for an iPad 2?The links below have instructions for deleting photos.
iOS and iPod: Syncing photos using iTunes
http://support.apple.com/kb/HT4236
iPad Tip: How to Delete Photos from Your iPad in the Photos App
http://ipadacademy.com/2011/08/ipad-tip-how-to-delete-photos-from-your-ipad-in-t he-photos-app
Another Way to Quickly Delete Photos from Your iPad (Mac Only)
http://ipadacademy.com/2011/09/another-way-to-quickly-delete-photos-from-your-ip ad-mac-only
How to Delete Photos from iPad
http://www.wondershare.com/apple-idevice/how-to-delete-photos-from-ipad.html
iPhoto for iOS (iPad): Delete photos from iPhoto
http://support.apple.com/kb/ph3137
How to: Batch Delete Photos on the iPad
http://www.lifeisaprayer.com/blog/2010/how-batch-delete-photos-ipad
(With iOS 5.1, use 2 fingers)
How to Delete Photos from iCloud’s Photo Stream
http://www.cultofmac.com/124235/how-to-delete-photos-from-iclouds-photo-stream/
~~~~~~~~~~~~
There are some wireless external hard drives that can be used with the iPad.
Best iPad External Hard Drive Storage Options
http://www.unlocktips.com/2012/11/best-ipad-mini-external-hard-drive-memory-stor age-options/
Another option:
Expand your iPad's storage capacity with HyperDrive
http://www.macworld.com/article/1153935/hyperdrive.html
On the road with a camera, an iPad, and a Hyperdrive
http://www.macworld.com/article/1160231/ipadhyperdrive.html
Cheers, Tom -
Reg:-How to delete PO from Table
Hi,
I need to know how to delete PO from the table.I know for item deletion.
Edited by: Venkadesh on May 22, 2009 2:53 PMHi
PO's cannot be deleted from the table, we can only archive them from the data base being used.
Deletion flag in the PO will not remove data from table.
Thanks & Regards
Kishore
Maybe you are looking for
-
Importing existing MP3 files from my My Music folder to iTunes
I added a bunch of music from cd to my My Music folder using WMP. How can I get the iTunes program to import all of the music (60 or 70 cds worth) and convert it without having to do it one song at a time? Didn't it do the same thing the first time I
-
IPhone 5 battery life and speaker issues
Hey guys. Not sure if anyone else is having this issue but firstly. The battery life *****. And really *****. I let phone completely drain at least twice a month. Then fully charge it. Not a huge user but data I know eats it. We are talking literally
-
How do i get my itunes account to link to my clash of clans game
how do i get my itunes account to link to my clash of clans game
-
Quick par upload NWDS ERROR Unexpected end of file from server
Hi: I can´t deploy my par file from NWDS, this is the error: 28.04.09 / 08:24] #ERROR LEVEL# com.sap.portal.developmentTools.ideSpecific.eclipse.wizards.sapmakepar.SAPMPWizard$1 > No Information java.net.SocketException: Unexpected end of file from s
-
Dear all, I am facing an error when trying to save the query "error: query is too large" and the below is the text help given in the documentation. Diagnosis Query ZYYYYYYY contains 8192 differing selection cells. However, only 8191 selection cells c