Read Staement
Hi All,
I have to write the read statement like below.
" Read table vbak WITH key vbeln = '123434567980' POSNR = '10' OR '20' OR '30'."
I need to check whether particular vbeln contain any of the items..
could you tell me , how to write read statement for above requirement.
Regards,
Siddivinesh
Hi ,
Read table it_vbak WITH key vbeln = '123434567980'
POSNR = '10' binary search.
IF sy-subrc <> 0.
Read table it_vbak WITH key vbeln = '123434567980'
POSNR = '20' binary search.
IF sy-ubrc <> 0.
Read table it_vbak WITH key vbeln = '123434567980'
POSNR = '30 binary search'.
IF sy-subrc <> 0.
Write / 'No items presesent'.
Endif
Endif.
Endif.
Similar Messages
-
hi guriji,
i have writeen one query .
loop at itab.
read table itab2 with key kostl = itab-fictr
hkont = itab-acc_code .
kostl1 = itab2-kostl+6(4).
hkont1 = itab2-hkont+4(6).
if kostl1 = itab-fictr and hkont1 = itab-acc_code.
itab-dmbtr = itab2-dmbtr.
modify itab transporting dmbtr .
clear itab-fictr.
clear itab-acc_code.
clear itab2-dmbtr.
clear itab-dmbtr.
clear kostl1.
clear hkont1.
endif.
when the read statement execute it reads only 2nd line value of itab2. but according to read statement reads whole internal table value.
plz tell me .
thanks.>
Sachin Rathore wrote:
> loop at itab. "" dont use header line table,,use work area..
> read table itab2 with key kostl = itab-fictr
> hkont = itab-acc_code .
>check sy-subrc eq 0. ""<< add this
> kostl1 = itab2-kostl+6(4).
> hkont1 = itab2-hkont+4(6).
> if kostl1 = itab-fictr and hkont1 = itab-acc_code.
> itab-dmbtr = itab2-dmbtr.
> modify itab transporting dmbtr .
> clear itab-fictr.
> clear itab-acc_code.
> clear itab2-dmbtr.
> clear itab-dmbtr.
> clear kostl1.
> clear hkont1.
> endif.
> thanks. -
I have a inernal table gt_itab which is filled with data and i sorted this table with a field(suppose id of empoyee) now i want to transfer some data to another internal table gt_itab1(similar as gt_itb)
comparing the field id of employee(supposed field).
1.now if i will use read statement and transfer it to other internal table it will read one row at a time and the performance will get slow .
can any one please tell more efficient way to tansfer the data from one internal table to onother internal table of same kind or any other method by which i can transfer data in a single command.Hi Pankaj,
I can suggest a technique but involves more than one statement
Imagine you have 2 internal tables int_source , int_dest
int_source has your data
option(1)
if you want to transfer all the data
use int_dest[ ] = int_source[ ].
option(2)
if you need to transfer data for a specific employee with multiple records for the same employee...it is not wise to use the read staement.
loop at int_source to workarea where employeeid = required_id.
append workarea to int_dest.
endloop.
in the above case all the records for the "required_id" only will get transferred.so if you can pass the correct required_id using a logic then you will get only the records for them.....
option(3)
Declare ranges r_range and append to them only the employee ids you need or if you have a select options(s_range) which contains only the employee numbers you need..then you can use it directly
then do int_dest[ ] = int_source[ ].
then..do a filter like
delete int_dest where employeeid not in r_range.
or
delete int_dest where employeeid not in s_range.
Option(3) is easier with select-options since ranges are considered to be obselete in the later ABAP versions......
Reward if helpful
Regards
Byju -
hi,
i want to know how can i check the performance of a report?Hi,
Check this link..
http://www.sap-img.com/abap/performance-tuning-for-data-selection-statement.htm
Run SE30/ABAP Runtime Trace
1 Selection CriteriaUser should enter several different sets of selection criteria, and try different radio buttons. For example, run with and without blanket orders. If there are match code buttons, try to access the list of possible selection criteria. If you normally use a report variant, please test that.Does selection criteria work properly?
2 HeaderAfter the report is executed, the user should review the information shown in the report Header. Is it accurate? Is key information included?Does accurate header information appear? Is key information included in header?
3 Body Is the information in the body of the report accurate? Is key information included in the body of the report? For summary level reports, the information should be compared to the summary statement, DTR, and/or GL44 to check accuracy.
4 Subtotals/TotalsAre the subtotals correct? Are the totals correct? Are calculated charges accurate on actuals Are calculated charges accurate on commitments?
5 DrilldownIf the report has drilldown functionality, try drilling down to various information.Does drilldown bring you to an appropriate location? Is the drilldown accurate?
6 Expand/CollapseIf there are expand and collapse buttons, try expanding and collapsing on various areas.Does the expand and collapse work properly?
7 Sorting/ConsolidatingIf the report provides sorting or consolidating, try both on various sections.Does the report sort properly? Does the data consolidate properly?
8 Download If there is download functionality, download the report and save as a local file. Compare the downloaded file to the displayed report.Does the file download properly? Does the downloaded report match the report output?
9 Other Report Toolbar ButtonsIf the report has other buttons on the toolbar check that they work properly. Do the other report tool bar buttons behave as expected?
10 SAP Toolbar ButtonsWhile displaying the report try the buttons on the SAP toolbar. These buttons include the back arrow, the cancel button, exit, etc.Do the SAP tool bar buttons behave as expected?
11 Printing Print the report and check the printout for accuracy. If there are different print options (such as portrait and landscape) print the report in both layouts to make sure the printouts are correct. Does the format look correct? Does the report properly print the portrait layout? Does the report properly print the landscape layout? Does the printed report include all the required report information? Do key master data fields on the printed report match the screen output? Do the totals on the printed report match the screen output? Do the subtotals on the printed report match the screen output?
run RTA or sql trace and see what is taking more time.. either select statement or the rest of the code.. if it is the select statement.. check to see if you are using proper primary keys on the select.. if it is in the program code other than the select then check to see if you can avoide too many loops. and see if you have read staements and u r uing the binary search functionlaity..
Please use ST05 and SE30 Transactions :
Check the below links :
FAQ - The Future of SAP NetWeaver Business Intelligence in the Light of the NetWeaver BI&Business Objects Roadmap
Business Intelligence Performance Tuning [original link is broken] [original link is broken] [original link is broken]
http://help.sap.com/saphelp_nw04/helpdata/en/06/b5f8926ba22b45bc9eaa589f1c835b/content.htm
Nice web logs by Vikas Please do check this. On number range buffering,
/people/vikash.agrawal/blog/2006/04/05/load-lots-of-data-147faster148-with-buffering-number-range
docs bw loading performance material
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/1955ba90-0201-0010-d3aa-8b2a4ef6bbb2
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3a699d90-0201-0010-bc99-d5c0e3a2c87b
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/4c0ab590-0201-0010-bd9a-8332d8b4f09c
and don't miss bw performance knowledge centre, there are e-learning
Business Intelligence Performance Tuning [original link is broken] [original link is broken] [original link is broken]
A nice weblog by Vikas Please do check this.on number range buffering,
/people/vikash.agrawal/blog/2006/04/05/load-lots-of-data-147faster148-with-buffering-number-range
Pls do check the link where have u can all the performance issues and sloution
Business Intelligence Performance Tuning [original link is broken] [original link is broken] [original link is broken] -
N8 Message Icon / Missed call FIX READ HERE! (Sta...
really simple way to fix the somewhat annoying bug in the N8 where it dosent display the missed calls or new messages on the Screensaver
just switch the screensaver mode to MUSIC PLAYER (dont worry it still displays the time but in a smaller font :/)
(Seeting> Themes> general> Screen Saver> Music PLayer)
hope this helps you guys cause i know this was really annoying me...
If you found this post or any other psot helpful please press the green kudus starDoes it show them without having to press the menu key (as in while the clock is moving around the screen) like the C6 or E series?
If you found this post or any other psot helpful please press the green kudus star -
How to get report of a sequence steps running in STA
Hello Everyone!
I am new here and don't know how to post a new question so please reply me.
I am calling a sequence in STA and cannot get report of its steps. If i run indivisual steps from the sequence than there is report but when i run whole sequence there is no report of steps in it.
I am using HTML report options and calling functions from a .Net API.any help guys..
-
Reading Locked records from HR table using LDB PNP
Hi,
I am trying to read the table pa0168 using LDB PNP.
But the problem is that get pernr staement does not retrieve locked records i.e where PA0168-sprps eq "X'.
Can anybody help me with this.
I have to use LDB so i don't want a solution of writing a select * for the pa0168 table.
hence i have to use get pernr statement but it should also retrieve locked records.
how can i achieve that.? please help
Thanks
GT
Message was edited by: GTHi GT,
In the START-OF-SELECTION event, set the parameter value
pnp-sw-ignorelockedrecords = 'N'.
Good Luck,
Suresh Datti
( Pl award points if the answer helps you ) -
Sample code to read a text file from UNIX directory.
I am using 9i Developer Suite, application server is 9.0.4. I want some help on how to read a flat file from UNIX environment. A sample code could be very helpful.
In windows, i use this kind of code:-
I declare an object & then write to a file using these sample staements:-
file_handle text_io.file_type;
filename := 'd:\ran\egs\uninvoiced.txt';
file_handle:=text_io.fopen(filename,'w');
text_io.put_line(file_handle, 'MOBILE NO '||'COUPON NO ' || 'DATE');
I hope, my question is clear. Please help in solving the doubt.
Regards.filename := 'd:\ran\egs\uninvoiced.txt';This is a Windows directory, so it won't work on Unix.
For the rest of the code: see examples in the Forms Builder Online Help. -
Getting UTL FILE error trying to read from User_TUNE_MVIEW
I am trying to set up a materialized view using the dbms_advisor.tune_mview which works and populates the user_tune_mview table. Supposedly I am supposed to be able to extract the suggested SQL from that table by
a) logging on as sysdba and
i) create directory MYDIR as 'C:\';
ii) grant read,write on directory mydir to grantee (in my case aradmin)
b) logging back on as aradmin (the user) and running,
c)
exec_dbms_advisor.create_file(dbms_advisor.get_task_script('TASK_Number'),
'MYDIR','FIXME.txt');
the last step does not work:
instead I get a cascade of errors other people must have also encountered which are:
ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 475
ORA-29283: invalid file operation
ORA-06512: at "SYS.PRVT_ADVISOR", line 140
ORA-06512: at "SYS.DBMS_ADVISOR", line 527
ORA-06512: at line 2
Since this is a called oracle package I am at a loss and hope that someone else ran into this and solved it.
thanks in advance.What version pof the database are you using and what documentation are you reading regarding exec_dbms_advisor. I can not find anything.
This may be related:
Oracle Server Performance Technical Forum
Thread Status: Active
From: [email protected] 09-Nov-05 07:59
Subject: Broken SQL Access Advisor
RDBMS Version: 10.2.0.1.0
Operating System and Version: MS Windows XP SP2
Error Number (if applicable): ORA-13600
Product (i.e. SQL*Loader, Import, etc.): SQL Access Advisor
Product Version:
Broken SQL Access Advisor
When I try to create SQL Access Advisor task
VARIABLE task_id NUMBER;
VARIABLE task_name VARCHAR2(255);
EXECUTE :task_name := 'MYTASK';
EXECUTE DBMS_ADVISOR.CREATE_TASK ('SQL Access Advisor', :task_id, :task_name);
I get this error
begin DBMS_ADVISOR.CREATE_TASK ('SQL Access Advisor', :task_id, :task_name); end;
ORA-13600: error encountered in Advisor
ORA-13635: The value provided for parameter ADJUSTED_SCALEUP_GREEN_THRESH cannot be converted to a number.
ORA-06512: at "SYS.PRVT_ADVISOR", line 3902
ORA-06512: at "SYS.DBMS_ADVISOR", line 102
ORA-06512: at line 1
From: Joze Senegacnik 09-Nov-05 21:59
Subject: Re : Broken SQL Access Advisor
Ivo,
I think you have encountered a bug. I get the same error on my 10.2. The ADJUSTED_SCALEUP_GREEN_THRESH parameter is defined in SYS.WRI$_ADV_DEF_PARAMETERS table having value 1.25. The other similar parameter OVERALL_SCALEUP_GREEN_THRESH has value of 1.5 (this one also causes a procedure crash). Both should be converted to a number type but obviously can't be. If you change their values to 1 and 2 respectively then the procedure successfully completes. Therefore I suspect that this is a bug and the best idea is to log a TAR. If you will not do it, I'll log it.
Regards, Joze
From: Joze Senegacnik 10-Nov-05 07:16
Subject: Re : Broken SQL Access Advisor
Ivo,
Hmmmm..., in my previous post I overlooked the fact that the problem is the NLS setting for decimal point. If you set NLS_LANG=american_america.us7ascii then things work correctly. I would expect that Oracle would do a proper NLS handling inside their package.
The other possibility is to properly set nls_numeric_characters parameter and then run your code.
alter session set nls_numeric_characters='.,';
Sorry for misleading information in my previous post.
Regards, Joze
From: [email protected] 10-Nov-05 07:24
Subject: Re : Broken SQL Access Advisor
That's it! There is a problem with decimal point, while we use comma (',') in Czech as decimal point, and therefore the conversion of '1.25' to number is unsuccessful...
I'm not sure, if this a bug (looks like not-very-clever feature), if you think so, please create a TAR.
Thanks for your help.
From: Joze Senegacnik 10-Nov-05 07:41
Subject: Re : Re : Broken SQL Access Advisor
I don't consider this behaviour a bug. However, I would expect that Oracle would use proper NLS settings internally in the package.
Regards, Joze -
Problems with Vista and Reader 8.12 - unusual problem need help
I can't seem to find anyone to help me or any record of someone else having this problem. As soon as I install reader 8.12 on my new system (Vista) it begins 'hijacking' other files. In other words other icons on my desktop (e.g., the icon for AOL IM) turn into PDF icons and so when I try to launch an .exe file - Reader launches instead and of course tells me it can't open the file. This is so maddening. I've installed and unstalled the program several times and have rebooted. I've tried to contact Adobe but they will not provide support, I've contacted Gateway and they say it's an Adobe issue and Microsoft won't speak with me because Vista was pre-installed on the computer. If anyone has any ideas and can assist me I'd greatly appreciate it. For now I just have to leave the program uninstalled and therefore can't open any PDFs.
AnitaIt seems that in Vista bad things may happen if you ever choose a
program to open downloaded EXE files.
This may help with the EXE issue:
http://www.winhelponline.com/articles/165/1/Restore-the-exe-file-association-in-Windows-Vi sta-after-incorrectly-associating-it-with-another-application.html
Aandi Inston -
The Coded Ui Test Method is runnung in Single Thread Apartment(STA) Mode of COM
Hi,
when running tests with CUIT,and after a timeout in the previous tests we noticed the following error:
lass Initialization method TestSuite2.MyClassInitialize threw exception. Microsoft.VisualStudio.TestTools.UITest.Extension.UITestException: Microsoft.VisualStudio.TestTools.UITest.Extension.UITestException: The Coded UI Test is running in Single Thread Apartment (STA) mode of COM. In this mode, all the playback calls should happen from the TestMethod thread only and UITestControl should not be shared across TestMethods..
Stack Trace:
at Microsoft.VisualStudio.TestTools.UITest.Playback.ScreenElement.ThrowExceptionIfCrossThreadAccess(IScreenElement uiElement)
at Microsoft.VisualStudio.TestTools.UITest.Playback.ScreenElement.InitPlayback()
at Microsoft.VisualStudio.TestTools.UITesting.Playback.Initialize()
at RapArtTest.Tests.Generic.GenericTestsTemplate.ClassInit(TestContext context)
at TestSuite2.MyClassInitialize(TestContext context)Please note that we get this error if we have 10 tests failing with a timeout issue previously, after that all our tests suite fail with the same STA error.is there a way to workaround this ?Hi kaki2000,
>>Please note that we get this error if we have 10 tests failing with a timeout issue previously.
Which VS IDE did you use, VS2010 or high version?
Do you run your coded UI tests in VS IDE or you add them to a load test? If you run your coded UI tests one by one in VS IDE, how about the result?
>>The Coded UI Test is running in Single Thread Apartment (STA) mode of COM. In this mode, all the playback calls should happen from the TestMethod thread only and UITestControl should not be shared across TestMethods..
After a test method is finished, please call the clean playback. Then the later test method can reload UIMap and find exactly one on testing.
Reference:
http://blog.csdn.net/marryshi/article/details/8815025
https://social.msdn.microsoft.com/Forums/en-US/ea5a2bd0-dbae-4256-b8c3-25d6eb45257a/codedui-single-thread-apartment-sta-mode-of-com-issue?forum=vsautotest
In addition, do not call UI actions from the ClassCleanup method.
Reference:
http://stackoverflow.com/questions/16667350/coded-ui-test-single-thread-apartment-sta-error-occurred-while-executing-clas
Note: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you.
Microsoft does not control these sites and has not tested any software or information found on these sites;
Therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there.
There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.
Best Regards,
Jack
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
JDBC Sender adapter is reading but then there isn't the message in SXMB_MON
Hi,
I have a JDBC to RFC async scenario. All configured.
Now the JDBC Sender adapter is reading the database table and if I go to communication channel monitoring ther is a "Processing finished succefully" message and an message ID like that: "0e4fd3b0acba11ddb65e0002a5adffd2".
But then I go to SXMB_MONI or message monitoring in RWB and there isn't a message to check...
What's happening? How can I know what the JDBC adapter has read and why there isn't an error but there isn't a message?Hi
Well u r that means no polling happening with u r Select statement
may be format is correct i agree ,,can u able to get resultset using the Select staement running on SQL PLus ??
check wether status flag is set right
paste u r slect statement and update statement
rgds
srini -
Problems with reading information sent from a servlet to an applet
Ihave just created an applet and servlet. i want the servlet to send some data back to the applet so i can read it and just check to see whether the servlet has done the required job.
here is part of the applet and servlet code.
applet:
url = "http://localhost:8080/servlet/Option1Servlet?Firstname="+firstname.getText()
+"&Lastname="+lastname.getText()+"&Staffstudentid="+staffstudentid.getText()
+"&Position="+position.getText()+"&Email="+email.getText();
Vector servletInfo = new Vector();
ObjectInputStream inputFromServlet;
try{
String inputLine;
System.out.println(url);
URL urlocation = new URL(url);
URLConnection uc = urlocation.openConnection();
BufferedReader in = new BufferedReader(new InputStreamReader (uc.getInputStream()));
while((inputLine=in.readLine()) != null) {
servletInfo.add(inputLine);
System.out.println("recieved info from servlet about ot process!");
inputFromServlet = new ObjectInputStream(uc.getInputStream(checking));
checking = (int)inputFromServlet.readInt();
System.out.println(checking);
in.close();
catch(java.io.IOException ex) {ex.printStackTrace();}
if (checking == 0) {
Regcomplete f5 = new Regcomplete();
f5.setSize(500,400);
this.setVisible(false);
f5.setVisible(true);
else if (checking == 1) {
firstname.setText("ERROR HAS OCCURED! CLICK CANCEL");
lastname.setText("");
staffstudentid.setText("");
position.setText("");
email.setText("");
servlet:
public void sendCheckingValue(HttpServletResponse res, int checking) {
ObjectOutputStream outputToApplet;
try {
outputToApplet = new ObjectOutputStream(res.getOutputStream());
System.out.println("Sending int to applet ... ");
outputToApplet.writeInt(checking);
outputToApplet.flush();
outputToApplet.close();
System.out.println("Data transmission complete.");
System.out.println("Checking value sent = " + checking);
catch (IOException e) { e.printStackTrace(); }
i get this exception when i run the code: this exception is thrown in the applet when it attempts to read the input data that has been sent:
C:\My Documents\logina>appletviewer Login.html
http://localhost:8080/servlet/Option1Servlet?Firstname=nnnnnnnnn&Lastname=nn&Sta
ffstudentid=99&Position=mm&Email=mm
recieved info from servlet about ot process!
java.io.StreamCorruptedException: Caught EOFException while reading the stream h
eader
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:845
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:168)
at Option1.actionPerformed(Option1.java:252)
at java.awt.Button.processActionEvent(Button.java:329)
at java.awt.Button.processEvent(Button.java:302)
at java.awt.Component.dispatchEventImpl(Component.java:2593)
at java.awt.Component.dispatchEvent(Component.java:2497)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:339)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:131)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:98)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)
can anyone help me please its urgent
thansk
fahadcan some one help me plz, its urgent, i get the error at this point in my code what am i doing wrong here.
inputFromServlet = new ObjectInputStream(uc.getInputStream()); -
Hi ,
Test case scenario : STA-AP Concurrent test case.
1. STAUT interface of CSR-DUT connected to Cisco-AP1252AG and T.P Ref Station Atheros-9462 connected to APUT-CSR.
2. Run Rx traffic between Cisco-AP1252AG to STAUT-CSR and Atheros to APUT-CSR ( i,e TCP Rx/RX ) Simultaneously .
Observations :
1. Re transmission bit is set for packets transmitting for first time -- As seen in sniffer , Please find the attached file -- Retransmission_bit_error_capture for the instance show like wise we have many instance of the issue occurrence .
2. There might be chance where sniffer is missing these packets but at the same time DUT cannot miss and we should be able to see Block ACK from DUT and this is not happening and more over it is happening at many instances also refer the attached sniffer capture -- TCP_rx-rx-25-19Mbps for further investigation on the issue.
Please some one help us to understand / solve the above issue explained.
Thanks,
JagadeeshRather hard to put the pieces together without seeing the entire capture.
-
as sta.ted above i cannot download the Reader software from the Adobe website.there is nothing saved in nthe Windows downloads folder nor is there any sign of the Downloads box. We hnave W7 on the pc so know what to expect. Have even tried saving it in ano9ther location. Stil no good. Currently have the new Firefox and Windows and Mcaffe dowloads are happening automatically. Any ideas? Using an Acer Aspire one netbook
Try to boot the computer in Windows Safe mode with network support (press F8 on the boot screen) as a test to see if that helps to download the Adobe Reader file.
*http://windows.microsoft.com/en-US/windows7/Advanced-startup-options-including-safe-mode
If that still fails then you will have to use another computer to download the file and use an USB stick too transfer the file.
Maybe you are looking for
-
Get column values from list of values programmatically
hi all how i get column values from list of values programmatically in the returnPopupDataListener method
-
Please HELP iMac 17" (non isight)
Keeps freezing up. Haven't done anything different today than any other day. Came home from work, wanted to check email. Froze right on the spot, dashboard, nothing responds, shut off several times with power button. Just replaced this hard drive no
-
How to find a T Code in an authorization Role
Dear Experts , I want to find a role in which a particular T Code has been assigned . How can i do it ? Regards Anis
-
[SOLVED] Default Gnome File Manager
Hello, I installed Thunar and it has become the default file manager in Gnome, how can I change this back to Nautalis? Thanks. Last edited by RAH (2009-02-16 20:10:26)
-
PSE8 aborts after uploading files to photosharing sites
I am having a completely reproducable problem in PSE8. If I am uploading images to SmugMug (or another photosharing site), lose my Internet connection, specify 'try again latter,' and reboot my computer, I cannot restart PSE8; the program aborts and