How to select only one record at a time in ALV
Hi all,
I have to use ALV report. Each record on the report output should have a button (or radio button) which will allow the record to be selected. My requirement is to select only one record at a time.
please guide me how to proceed further.
regards
manish
hi
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/sampleCheckBoxProgram
Regards
Pavan
Similar Messages
-
Selecting only one row at a time
Hi experts,
i have following doubt regarding selecting rows from a db:
Is there any way of selecting only one row AT A TIME from a dabase just to collect the data in rows instead of in a unique document containing all the rows?
I would like you to ellaborate on this as i need to send only one row to the IE, and then other row, and so on... without throwing any error!
I have seen that there are SELECT SINGLE and SELECT UP TO 1 ROW, but these two methods are only useful when retrieving only one row, and that does not match my requirements. I need to process all the rows but one by one..
I know that we can use the receiver jdbc adapter as if it was a sender by means of its specific datatype, but how to do it row by row??
Hope i had explained well..
Thanks in advance and best regards,
DavidHi kiran,
Yes, my table has 5 not null fields but i am selecting and updating fixes values so i think that I will definetely go for the next solution:
SELECT * FROM t1 WHERE status='0' and ROWNUM<2;
UPDATE t1 SET status='1' WHERE status='0' and ROWNUM<2;
My only concern is if the update will take the same row that the select.... BTW, I think it will
..What do you guys think?
I ve been trying to operate with your proposed queries but i received some errors. Your queries are very interesting but i think that with the above ones i meet my requirements as the status field will be 0 for not processed rows and 1 for precessed ones (and the update will look for the row that meets the same 'where' clause than the select, and then, and only then, it will set status='1').
The only thing i have to care about is what i questioned before.
Thanks a lot and best regards,
David -
Return only one record at a time
I am new to crystal reports so any help would be appreciated. I have a .net app that is a order processing system. When the user is in a record, they want to be able to click on a button an open a crystal report showing only that orders details. I created a crystal report that has the following fields:
Order ID, Product ID, Unit Price, Sell Price, Hours.
The Order ID is the primary key in the database. The report runs fine when clicking the report button in the app, but returns the details for every order in the database. We just need the details of the order that the user is processing. How do I setup the report to only show that order's details? I am using VB 2005 and Crystal v9.
Edited by: sking on Mar 6, 2009 1:12 AMBrian,
Thank you for all your help. I have been able to setup the report to return only one record at a time. In my app, when I click the report button the PDF opens perfectly with only one record. However, when I go to another record and open the PDF it returns the information from the record id that was set as the default parameter value (crReportDocument.SetParameterValue("Orders", 67). How do I get it to return the report for a different record? Here is the code I'm using. I think I'm really close with your suggestions but I'm just missing one step.
#Region "CrystalReport"
''' <summary>
'''Override the CrystalReportButton_Click and call DisplayReportAsPDF_CrystalReportButton function
''' </summary>
Public Sub CrystalReportButton_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Dim crReportDocument As CrystalDecisions.CrystalReports.Engine.ReportDocument = New CrystalDecisions.CrystalReports.Engine.ReportDocument
Dim fileName As String = "test.rpt"
Try
If fileName.Substring(1).StartsWith(":\") Then
crReportDocument.Load(fileName)
Else
crReportDocument.Load(Me.Page.MapPath(fileName))
End If
Catch ex As Exception
Dim errMsg As String = ex.Message.Replace(Chr(13).ToString(), "").Replace(Chr(10).ToString(), "")
errMsg += " Please make sure the dlls for Crystal Report are compatible with the Crystal Report file."
BaseClasses.Utils.MiscUtils.RegisterJScriptAlert(Me, "BUTTON_CLICK_MESSAGE", errMsg)
End Try
Try
Dim paramValue As CrystalDecisions.Shared.ParameterDiscreteValue = New CrystalDecisions.Shared.ParameterDiscreteValue()
paramValue.Value = "67"
crReportDocument.SetParameterValue("Orders", 67)
DisplayReportAsPDF_CrystalReportButton(crReportDocument)
Catch ex As Exception
Dim errMsg As String = ex.Message.Replace(Chr(13).ToString(), "").Replace(Chr(10).ToString(), "")
errMsg += " If this is a deployment machine, make sure network service has permissions to read or write to the windows\temp folder."
BaseClasses.Utils.MiscUtils.RegisterJScriptAlert(Me, "BUTTON_CLICK_MESSAGE", errMsg)
End Try -
How to display only one record.
Hi Gurus,
Here my requirement is i have 2 pages.
first page having project_number lov,create and tableRN.
once u select the projectnumber and click on the create button it is navigate to secound page,here enter the data and click on the submit button it ll insert into database table and navigate to fitst page and display the data in tableRN what ever u insert the data(this part is over).
but the problem is, in tableRN displays all the records(previous records also displayed)
my requirement is display only one record(click on the submit button at the time of record only).
Plz help me
its very urgent.
Thanks
Seshu.
Edited by: its urgent on Jan 3, 2012 10:52 PMSeshu,
Do u want to display the inserted row...
Regards,
Gyan
www.gyanoracleapps.blogspot.com
www.querenttech.com -
JDBC: How to select only those records which contains col1 is NULL
Hi All,
In JDBC SELECT scenario.
I wants to select only those records which contains col1 is NULL.
I am trying as follows:
<key>
<col1 isNull="TRUE" />
</key>
but in moni/monitoring i am getting Following Error
006-12-01 19:35:20 Error Unable to execute statement for table or stored procedure. 'BG_SALARY_SEND_SAP_D' (Structure 'SELECT') due to java.sql.SQLException: FATAL ERROR document format: structure 'SELECT', key element 'key' contains no values
2006-12-01 19:35:20 Error Exception caught by adapter framework: Error processing request in sax parser: Error when executing statement for table/stored proc. 'BG_SALARY_SEND_SAP_D' (structure 'SELECT'): java.sql.SQLException: FATAL ERROR document format: structure 'SELECT', key element 'key' contains no values
Please suggest how to do select rows with col1 is null.
RegardsRohan,
isNull= true is used to make the KEY element not mandatory.
In your case, if the select query is
select emp from emptest where empno is null
, then the datatype will be,
<root>
<StatementName>
<dbTableName action=SELECT>
<table>emptest</table>
<access>
<emp></emp>
</access>
<key1>
<b><empno hasQuot="NO">is null</empno></b>
</key1>
</dbTableName>
</StatementName>
</root>
I dont have a DB access to try this, but I think this should work.
If this doesnt work, then you would need to use SQL_QUERY,
<root>
<StatementName>
<anyName action= SQL_QUERY>
<access>select emp from emptest where empno is null</access>
</anyName >
</StatementName>
</root>
http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
Regards,
Bhavesh -
Question about selecting only one tree at a time...Please help
Hi , guys
does anybody know how to make only one tree selected in an application which shows three trees simultaniously.
Untill now I can select both trees at a time (the third one is not implemented yet ) This is probably so because the trees are showed in different panels I have no idea....Please give me some hints or ideas.
I thank you in advance.write a TreeSelectionListener which knows all Trees in your application. add the listener to all three Trees. within the valueChanged method, check the events source to evaluate the tree, which fired the event. close all selections of all trees ( method clearSelection() ) except the one, which fired the event.
regards,
stefan -
hello,
i've got a select query which returns a couple of rows.
now i would like for the query to return only one row (the first match it can find).
how do i do that?
thank you!
my sample of my data as below , the first and seconde record is equal and i want to display all the colomn for the first row and ignore the second row .
84A8E46E8C97 9410 20110812
84A8E46E8C97 9420 20110813
84A8E46E8C6E 9410 20110816
84A8E46E8AFA 9400 20110819876602 wrote:
my sample of my data as below , the first and seconde record is equal and i want to display all the colomn for the first row and ignore the second rowThere is no row order in relational database tables. Same query canreturn rows in different order next time you run it unless you specify ORDER BY. Only ORDER BY guarantees order, so when you say first row/second row you must provide ordering criteria.
SY. -
HOW TO SELECT ONLY THOSE RECORDS WHERE NOT AVAILABLE ON SECOND TABLE
hi
i have two tables one name is menus and second name is UGroupDetail. Actually i have created it for user role privileges for my application
USE [LedgerDB]
GO
/****** Object: Table [dbo].[Menus] Script Date: 03/28/2015 13:45:27 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Menus](
[RightID] [int] NOT NULL,
[RightName] [nvarchar](200) NULL,
[GroupID] [int] NULL,
CONSTRAINT [PK_Menus] PRIMARY KEY CLUSTERED
[RightID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
second table is
USE [LedgerDB]
GO
/****** Object: Table [dbo].[UGroupDetail] Script Date: 03/28/2015 13:46:12 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[UGroupDetail](
[RightID] [int] NOT NULL,
[RightName] [nvarchar](200) NULL,
[GroupID] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[UGroupDetail] WITH CHECK ADD CONSTRAINT [FK_UGroupDetail_Menus] FOREIGN KEY([RightID])
REFERENCES [dbo].[Menus] ([RightID])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[UGroupDetail] CHECK CONSTRAINT [FK_UGroupDetail_Menus]
GO
ALTER TABLE [dbo].[UGroupDetail] WITH CHECK ADD CONSTRAINT [FK_UGroupDetail_UserGroup] FOREIGN KEY([GroupID])
REFERENCES [dbo].[UserGroup] ([GroupID])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[UGroupDetail] CHECK CONSTRAINT [FK_UGroupDetail_UserGroup]
UGroupDetail have many groups as assigned to a new user but Menus table has only default groups which is 90 records
Menus table is a primary table and UGroupDetail is a Foreign key table
now i want to combined these tables and want to get only remaining records for each group
for example i have assigned 5 roles to GroupID 2 and now when i apply select commands the result should be 85 out 90 for GroupID 2
but i have not idea how to modify select query for get desired resultI don't really understand the tables. What is GroupID doing in the Menues table? And what does an entry without a RightName mean? Shouldn't that column be NOT NULL?
The UGroupDetail does not have any primary key. From your description, I would expect the PK to be (RightID, GroupID). But strangely enough, GroupID is nullable. So is RightName, but I think this column is redundant and should be removed.
Anyway, if I understand your question correctly, you need something like:
SELECT UG.Name, M.RightName
FROM UserGroups UG
CROSS JOIN Menus M
WHERE NOT EXISTS (SELECT *
FROM UGroupDetail UGD
WHERE UG.GroupID = UGD.GroupID
AND UG.RightID = M.RightID)
Erland Sommarskog, SQL Server MVP, [email protected] -
URGENT: Selecting only 25 records at a time from a table
URGENT !!!!
Hi,
Im having a RFC which selects records from a table (say table_A) and depending on these selected records, further processing is done within that RFC.
Now my problem is, this table_A contains around 200 matching records. Due to this entire logical processing consumes lot of time. Hence my RFC is taking huge time to produce result. (apprx 10 mins).
Can i select these matching records in batch of 25 and display result for these 25 records??
I'll give this batch size as input to RFC?
Do anybody have any idea about how to tackle this situation and reduce response time?
If u hav any better solution than this then pls pls let me know ASAP..
Regards,
AmeyAmey Mogare ,
Do One thing , create a new importing parameter in your RFC , say current_trans_id. NOw on the first call pass the initial value for current_trans_id.
then inside the logic .. change the select to
select upto 25 rows where trnascation id > current_trans_id.
next time when u call teh rfc.. send the last selected id as a value for current_trans_id.
i think you can some how use this logic
Regards
Sarath -
How to open only one clip at a time in the source monitor?
Ok the answer to this question may be simple.. hopefully...
At the moment each time I open a clip in the source monitor it adds it to the dropdown list.
Fine... but I am opening and closing hundreds of clips in a day and after a while I noticed it seemed to be slowing down the whole PPCS5.5 system.
It appears that PP seems to be keeping each clip I open... active.
Is there a way to allow only one clip to be open at a time in the source monitor... other than having to close them all first??? (would be ideal if there was some kind of shortcut like shift-doubleclick)SonyZ7's can record to compact flash cards as well as tape, so I generally log and transfer from the cards.
So I guess I should do a bit more research on workflow's in Pr
No probs, here's a bunch of MediaInfo...
General
Complete name : /Volumes/Rugged 1TB/Business/WAPLES 10.October/Check It 2011 Event/Check It 2011 event footage/001 CheckIt2011.mov
Format : MPEG-4
Format profile : QuickTime
Codec ID : qt
File size : 195 MiB
Duration : 1mn 0s
Overall bit rate : 26.9 Mbps
Encoded date : UTC 2011-09-08 21:37:37
Tagged date : UTC 2011-10-28 11:50:04
Writing library : Apple QuickTime
Original source medium : Check It event CF2
©TSC : 2500
©TSZ : 100
Video
ID : 1
Format : DV
Codec ID : hdv3
Duration : 1mn 0s
Bit rate : 25.0 Mbps
Width : 1 416 pixels
Original width : 1 440 pixels
Height : 1 062 pixels
Original height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 25.000 fps
Color space : YUV
Chroma subsampling : 4:2:2
Scan type : Interlaced
Scan order : Top Field First
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.665
Stream size : 181 MiB (93%)
Language : English
Encoded date : UTC 2011-09-08 21:37:37
Tagged date : UTC 2011-09-08 21:37:37
Material_Duration : 61560
Material_StreamSize : 192330610
Material_FrameCount : 1539
Audio #1
ID : 2
Format : PCM
Format settings, Endianness : Little
Format settings, Sign : Signed
Codec ID : sowt
Duration : 1mn 0s
Bit rate mode : Constant
Bit rate : 768 Kbps
Channel(s) : 1 channel
Channel positions : Front: L
Sampling rate : 48.0 KHz
Bit depth : 16 bits
Stream size : 5.57 MiB (3%)
Language : English
Encoded date : UTC 2011-09-08 21:37:37
Tagged date : UTC 2011-09-08 21:37:37
Material_Duration : 61560
Material_StreamSize : 5909760
Audio #2
ID : 3
Format : PCM
Format settings, Endianness : Little
Format settings, Sign : Signed
Codec ID : sowt
Duration : 1mn 0s
Bit rate mode : Constant
Bit rate : 768 Kbps
Channel(s) : 1 channel
Channel positions : Front: R
Sampling rate : 48.0 KHz
Bit depth : 16 bits
Stream size : 5.57 MiB (3%)
Language : English
Encoded date : UTC 2011-09-08 21:37:37
Tagged date : UTC 2011-09-08 21:37:37
Material_Duration : 61560
Material_StreamSize : 5909760
Menu
ID : 4
Language : English
Encoded date : UTC 2011-09-08 21:37:37
Tagged date : UTC 2011-09-08 21:37:37 -
One of 100 records in file has error. How to reprocess only one record??
Hi All
I have a scenario where, i receive data in a file, and we create invoices in SAP system from the data records in the file. My file contains 100 records and if there is an error in processing record number 43, how XI can be set up to restart when there are errors?
Re-start of file processing has to commence from the failed record. This should avoid the possibility of double posting of interface records.
Thanks
ChandraHi Chandra,
I am not sure,if this option is useful for you.
But we do this for Inventory Report(INVRPT) in our case because we have the same requirement.
We receive an EDIFACT file and a record can have errors.Then we don't want to reprocess full file again.
In order to avoid this,we create an IDoc for each line item.
If there is an error in one line item,this IDoc will fail and can be corrected and reprocessed later.
Kindly let me know if this is of any use to you.
Thanks.
Regards,
Shweta -
How to get only one record per machine
I have this SQL statement that works.
SELECT
cn.Name0 AS [Computer Name],
cn.Model0 AS [Model],
cn.Manufacturer0 AS [Manufacturer],
bios.SerialNumber0 AS [Serial Number],
rs.Operating_System_Name_and0 AS [OS Type],
--ld.FreeSpace0 AS [Free Disk Space],
--ld.Size0 AS [Actual Disk Size],
x86.TotalPhysicalMemory0 AS [Total Memory],
aa.SMS_Assigned_Sites0 AS [Assigned Site]
FROM
v_GS_COMPUTER_SYSTEM cn INNER JOIN v_GS_LOGICAL_DISK ld on cn.ResourceID = ld.ResourceID
INNER JOIN v_GS_PARTITION gs ON cn.ResourceID = gs.ResourceID
INNER JOIN v_GS_X86_PC_MEMORY x86 ON gs.ResourceID = x86.ResourceID
INNER JOIN v_R_System rs ON gs.ResourceID = rs.resourceID
INNER JOIN v_GS_PC_BIOS bios ON rs.resourceID = bios.ResourceID
INNER JOIN v_RA_System_SMSAssignedSites aa ON bios.ResourceID = aa.ResourceID
WHERE
cn.Model0 LIKE '%780%'
ORDER BY
cn.Name0
The problem is whent his runs it returns multiple rows for each serial number/machine it finds. So I'll have 5 or 6 rows for the exact same machine. How do I make it only give me 1 row for each serial number/machine?
mqh7... because you added v_GS_PARTITION gs (which results in multiple rows per resource) and then you are doing the inner join blues.
This should be better:
SELECT
cn.Name0 AS [Computer Name],
cn.Model0 AS [Model],
cn.Manufacturer0 AS [Manufacturer],
bios.SerialNumber0 AS [Serial Number],
rs.Operating_System_Name_and0 AS [OS Type],
--ld.FreeSpace0 AS [Free Disk Space],
--ld.Size0 AS [Actual Disk Size],
x86.TotalPhysicalMemory0 AS [Total Memory],
aa.SMS_Assigned_Sites0 AS [Assigned Site]
FROM
v_GS_COMPUTER_SYSTEM cn
-- INNER JOIN v_GS_LOGICAL_DISK ld on cn.ResourceID = ld.ResourceID
--INNER JOIN v_GS_PARTITION gs ON cn.ResourceID = gs.ResourceID
INNER JOIN v_GS_X86_PC_MEMORY x86 ON x86.ResourceID = cn.ResourceID
INNER JOIN v_R_System rs ON rs.ResourceID = cn.resourceID
INNER JOIN v_GS_PC_BIOS bios ON bios.resourceID = cn.ResourceID
INNER JOIN v_RA_System_SMSAssignedSites aa ON aa.ResourceID = cn.ResourceID
WHERE cn.Model0 LIKE '%780%'
ORDER BY
cn.Name0
Torsten Meringer | http://www.mssccmfaq.de -
Chp Play lists - how to play only one chapter at a time
CS4
The setup:
2 timelines
1 menu
1 chapter playlist
3 buttons (all, wedding, reception)
I'm not seeing how to make the DVD return to the main menu after playing chp 1 (Button 2 [wedding]), if user clicks button 2 which is linked to chapter 1 thru a playlist on timeline 1.
That is, I can set the end action of timeline 1, I can set the end action of the playlist, and I can set the end action of ch1 by way of the playlist panel.
It appears ch1 wants its end action set to start playing chp2 (button 3 [reception]) to provide thru play if the `All' (button 1) has been used.
How then can cause chapter one to be played and at the end return to main menu instead of going an to button 3 as It would if user had hit button 1.
(all).
What I end up with is a situation where if user wants to view only chapter 1 by hitting button 2 (wedding).... it still continues on to button 3 (reception) at the end.
Since I needed this project done now... I took the hardway around and ground out another piece of video containing only chapter 1.
Now I get the result I was after, but it seems very inefficient. Ch1 on in the playlist is just setting there unused and I suspect there is a smarter way to do it.
To cut down on the amont of data on the DVD, I guess I could have gone ahead and made a piece of video contaiing only ch 2 (button 3 [reception]).
But still that too, although I've saved considerable data being written to DVD, it still seems pretty inefficient. And I suspect the playlist is provided just so I don't have to do it this way.
Can anyone outline how to deal with multiple chapters so that the DVD returns to the main menu after chp1 or any other chapter that has chpters following it. (If user so desires)?Stan Jones wrote:
The chapter playlist will be one chapter, which you appear to have set up.
Set the END ACTION of that CHAPTER PLAYLIST to last menu.
Yes I have. Are you saying that if I set the End action of ch_PlayList to last menu, that then when a user hits button 2 which is linked to chp1 on the playlist, that play will stop after chp1 (button 2) has played?
As apposed to what I have done as descripted... setting Ch_plylist end action to Main menu/default.
In that setup pressing buttob2 ends up playing right thru the whole thing rather than stopping at the end of ch1.
PS - I'm busily coping a project to a test area now, but how can test that without having to play clear thru chp1 to see what happens?
OH Wait.. are you saying NOT to include chp2 in the playlist?.... ahhh now that makes sense.
Thanks for the input. -
How to delete one record at a time
hi all,
Please tell me how i do delete only one record at a time.After deleting the record the jsp page should show only the remining items to be deleted.Where do u want to delete the record - database?
If so use the rpimary Screen identifying each record and use that to delet that record -
Regarding Select query to select only 1000 records in Internal Table.
Hello Friends,
Please explain me to how to Select only 1000 records from data base table?
For Example
SELECT * INTO TABLE ITAB OR SELECT * INTO ITAB
FROM EKKO FROM EKKO
WHERE EBLEN IN S_EBLEN. WHERE EBLEN IN S_EBLEN
(Currently i am using) UP TO 1000 ROWS.
ENDSELECT. (I do not want to use)
In this case Internal table may be store more then 1000 records. But i want to select first 1000 records.
Please explain me.
Regards
AmitHi,
TABLES : ekko.
selection-screen begin of block b1 with frame title text_t01.
SELECT-OPTIONS: S_EBELN for ekko-EBELN.
selection-screen end of block b1.
DATA itab TYPE STANDARD TABLE OF ekko.
SELECT *
FROM ekko
INTO TABLE itab
UP TO 1000 ROWS
WHERE EBELN IN S_EBELN.
Thanks,
Sri.
Maybe you are looking for
-
MacBook no longer connects to T.V. after Thunderbolt 1.2 update
I recieved a 13 inch, mid 2012 MacBook Pro for my birthday on Dec. 20th 2013. A few days later I bought a Nexxtech Mini DisplayPort to HDMI adaptor which was working fantastically for a couple weeks when connecting my MacBook to my Insignia TV. After
-
Request for info regarding MAC address population in computer objects
Hi, I am trying to determine how MAC address information is populated in computer objects. I had assumed initially that the hardware scan would be used, but observation shows this information to be obtained prior to any hardware inventory. I have l
-
Adobe Camera Raw 6.2 and Olympus E-510 camera profile
Hi all! When I open a raw file captured from my Olympus E-510 with Adobe Camera Raw 6.2 and go to Camera Calibration tab, ACR doesn't display any profile for my camera, althouth Adobe (http://www.adobe.com/products/photoshop/cameraraw.html) says it s
-
Hi everyone, We are currently running VC on 2004s SP8. I would like to have my table be able to scroll or page through the many records. The table is being populated with data but the paging toolbar does not show up. Scroll buttons is set to 'Show' (
-
Hi how do I adjust my camera on a video call
Me