Error with Select in ABAP
Hi All,
I am using the following query, zzglvstid and zzglvrole are primary keys for the table zfi_glv_notf.
Data: w_test_name type tdname-zfi_glv_notf
SELECT tdname FROM zfi_glv_notf
INTO w_text_name
WHERE zzglvstid = w_group_status
AND zzglvrole = w_role.
ENDSELECT.
When I do and extended program check it says " SELECT TDNAME HAS AN EMPTY BODY", I don't why.
Can any one help me in getting it through ...(do not want to use "#EC *)
Thanks
Hi
First corrrect the DATA decleration...
it should be like <b>tablename - field name</b>
<b>Data: w_test_name type zfi_glv_notf-tdname</b>
SELECT tdname FROM zfi_glv_notf
INTO w_text_name
WHERE zzglvstid = w_group_status
AND zzglvrole = w_role.
ENDSELECT.
<b>Reward Points if it is helpful.</b>
Thanks & Regards
ilesh 24x7
Similar Messages
-
Hi All,
I am getting the error 'Comma without preceding colon (after SELECT ?).' with the following select statement. Can someone help me with the error.
select single actdate_from actdate_to
into ( lv_actdate_from, lv_actdate_to )
from zsdcoop
where kunnr = wa-kunnr and pfnum = wa-pfnum.
if ( lv_actdate_from NE wa-actdate_from ) or ( lv_actdate_to NE wa-actdate_to ).
wa-block = 'X'.
Endif.
Thanks,
Veni.Typically, on statements like this, you want to use AND instead of OR. Google "truth tables" for a detailed explanation of why.
if ( lv_actdate_from NE wa-actdate_from ) or ( lv_actdate_to NE wa-actdate_to ).
wa-block = 'X'.
Should probably be:
if ( lv_actdate_from NE wa-actdate_from ) AND ( lv_actdate_to NE wa-actdate_to ).
wa-block = 'X'. -
I've been trying to call a stored procedure through Entity Framework and WCF Data Services (OData). It returns an entity not a complex type. Following walkthroughs found all over the web, I came up with this code inside my service:
[WebGet]
public IQueryable<Entity> GetEntitiesByParameterId(int parameterId)
return CurrentDataSource.GetEntitiesByParameterId(parameterId).AsQueryable();
Calling the proc this way: ~WcfService.svc/GetEntitiesByParameterId?parameterId=1 executes
the stored procedure and returns entities that should be returned. No problem there.
Everything works well until I try to use $select OData option ie. ~WcfService.svc/GetEntitiesByParameterId?parameterId=1&$select=name.
Upon debugging, the method above runs without any error but it returns an Operation could destabilize the runtime error upon reaching the
client. After so much research, apparently it is a very general error pointing to a lot of different causes. I haven't found one that really matches my particular problem. Closest are
http://stackoverflow.com/questions/378895/operation-could-destabilize-the-runtime
https://social.msdn.microsoft.com/Forums/en-US/d2fb4767-dc09-4879-a62a-5b2ce96c4465/for-some-columns-entity-properties-executestorequery-failed-with-error-operation-could?forum=adodotnetdataservices
but none of the solutions worked on my end.
Also, from the second article above:
This is a known limitation of WCF DS. ...
Second is that some of the queries won't work correctly because LINQ to EF needs little different LINQ expressions than LINQ to Objects in some cases. Which is the problem you're seeing.
It has been posted on 2012. If it its true, are there still no updates on this? And is there any other workaround to get the $select working on the stored proc call?
What works:
~WcfService.svc/GetEntitiesByParameterId?parameterId=1
~WcfService.svc/GetEntitiesByParameterId?parameterId=1&$top=1
~WcfService.svc/GetEntitiesByParameterId?parameterId=1&$skip-5
~WcfService.svc/GetEntitiesByParameterId?parameterId=1&$filter={filter query}
~WcfService.svc/GetEntitiesByParameterId?parameterId=1&$expand=SomeNavigationProperty
What doesn't work:
~WcfService.svc/GetEntitiesByParameterId?parameterId=1&$select=name
Tech details:
EntityFramework 5, WCF Data Service 5.0, OData V3
*I've also tried upgrading to EF6 and WCF 5.6.2 and it still didn't work.
Any help would be appreciated. Thanks!Someone from SO replied to my question there and said that $select is still not supported though I couldn't find any definitive documentation about it.
From what I gather and observed, $select breaks the stored procedure call because it tries to alter the data shape already gotten from the database and attempts to return a dynamic entity instead. Something about the stored proc returning an ObjectResult might
be messing it up. As I have said, these are merely my observations.
Workaround: I found a simple and elegant workaround for it though. Since my stored procedures are only getting data from the database and does
not alter data in any way (INSERT, UPDATE, DELETE), I tried using table-valued functions that returns a table equivalent to the entity on my EF. I've found that calling this function on the Service Operation method returns an IQueryable<Entity> which
is basically what is needed. $select also works now and so does other OData query options.
Steps:
Create a function on the database
Update EDMX -> Add function
Add new Function Import with Entity return type
Create service operation in WCF Data Service that calls CurrentDataSource.<FunctionName>()
Test in fiddler.
CODES
Database Function:
CREATE FUNCTION GetEntities(@parameter)
RETURN @entites TABLE(
[Id] [int],
[Name] [nvarchar](100),
AS
BEGIN
INSERT INTO @entities
SELECT [Id], [Name], ... FROM [EntityTable]
RETURN
END
WCF:
[WebGet]
public IQueryable<Entity> GetEntity(int parameter)
return CurrentDataSource.GetEntity(parameter);
It doesn't really solve the stored procedure problem but I'm marking this as answer until someone can provide a better one as it does solve what I'm trying to do.
Hope this helps others too. :) -
Hi Team
WE have a EBS 11.5.10.2 with DB 11.1.0,7 on HPUX 11.23.
And we have a error;
APP:
FRM-40735: ON_ERROR trigger raised unhandled exception ORA-01001
SQL> select fnd_web_sec.URLEncrypt('hello', 'world') from dual;
select fnd_web_sec.URLEncrypt('hello', 'world') from dual
ERROR at line 1:
ORA-03113: end-of-file on communication channel
Process ID: 10119
Session ID: 978 Serial number: 7
Regards,
GuidoModeration:
Stay with your original thread on this topic:
https://forums.oracle.com/thread/2595095
It is current and people have already tried to help you there.
This new duplicate post is locked. -
Error with select stmt.
Hi All,
I am getting this error , can you please tell me what I am doing wrong with the select stmt.
SELECT AFKDAT ANETWR B~KZWI1
FROM VBRK AS A INNER JOIN VBRP AS B ON
AVBELN = BVBELN
INTO (IOUT-FKDAT, IOUT-NETWR, IOUT-KZWI1)
WHERE B~VBELN = IOUT-VBELV
AND B~POSNR = ISDOC-POSNR.
Incorrect nesting: Before the statement "ENDIF", the structure
introduced by "SELECT" must be concluded by "ENDSELECT". -
Thanks
Veni.Hi All,
I tried INTO CORRESPONDING FIELDS OF IOUT
but with this also same error is comming. I am sending part of code.
Please help me.
Thanks
Veni.
TABLES: VBAK, VBAP, KNA1, VBRK, VBRP, VBFA.
DATA: BEGIN OF ISDOC OCCURS 0,
VBELN LIKE VBAK-VBELN,
POSNR LIKE VBAP-POSNR,
KUNNR LIKE VBAK-KUNNR,
ERDAT LIKE VBAK-ERDAT,
BSTNK LIKE VBAK-BSTNK,
MATNR LIKE VBAP-MATNR,
ARKTX LIKE VBAP-ARKTX.
DATA: END OF ISDOC.
DATA: BEGIN OF IOUT OCCURS 0,
VBELN LIKE VBAK-VBELN,
POSNR LIKE VBAP-POSNR,
KUNNR LIKE VBAK-KUNNR,
NAME1 LIKE KNA1-NAME1,
ERDAT LIKE VBAK-ERDAT,
BSTNK LIKE VBAK-BSTNK,
MATNR LIKE VBAP-MATNR,
ARKTX LIKE VBAP-ARKTX,
VBELV LIKE VBRP-VBELN,
FKDAT LIKE VBRK-FKDAT,
NETWR LIKE VBRK-NETWR,
KZWI1 LIKE VBRP-KZWI1.
DATA: END OF IOUT.
FORM getdata.
SELECT A~VBELN B~POSNR A~KUNNR A~ERDAT A~BSTNK B~MATNR B~ARKTX
FROM VBAK AS A INNER JOIN VBAP AS B ON A~VBELN = B~VBELN
INTO TABLE ISDOC
WHERE A~AUART IN SAUART
AND A~ERDAT IN SERDAT
AND A~KUNNR IN SKUNNR.
SORT ISDOC BY VBELN POSNR.
LOOP AT ISDOC.
MOVE-CORRESPONDING ISDOC TO IOUT.
CLEAR: KNA1.
SELECT SINGLE * FROM KNA1 WHERE KUNNR = ISDOC-KUNNR.
IF SY-SUBRC = 0.
MOVE KNA1-NAME1 TO IOUT-NAME1.
ENDIF.
SELECT VBELN INTO IOUT-VBELV FROM VBFA WHERE VBELV = ISDOC-VBELN
AND POSNV = ISDOC-POSNR
AND VBTYP_N = 'O'.
IF SY-SUBRC = 0.
SELECT A~FKDAT A~NETWR B~KZWI1
FROM VBRK AS A INNER JOIN VBRP AS B ON A~VBELN = B~VBELN
INTO CORRESPONDING FIELDS OF IOUT
* (IOUT-FKDAT, IOUT-NETWR, IOUT-KZWI1)
WHERE B~VBELN = IOUT-VBELV
AND B~POSNR = ISDOC-POSNR.
APPEND IOUT.
CLEAR IOUT.
ENDIF.
ENDLOOP.
ENDFORM. " getdata -
2 InfoPackages with selection via ABAP
Hello,
my problem is how to select data to be loaded in InfoPackage via ABAP?
One ODS is my Source-ODS containing lots of Data on customer.
Another ODS (calles selection-ODS) contains certain customer numbers.
In InfoPackage 1 I want to load from Source ODS to Goal-ODS 1 - Load contains all Customers (from Selection-ODS).
In InfoPackage 2 I want to load from Source ODS to Goal-ODS 2 - Load contains all Customers except those from Selection-ODS.
Since contents of Selection ODS changes - Selection in Infopackage 1 and 2 needs to be made via ABAP coding.
Can you please tell me how to do that?
Thank you very much,
AngelikaHi,
e.g.:
data: indx like sy-indx.
LOOP AT DATA_PACKAGE.
indx = sy-tabix-
select single * from selectods
where data_package-custno = selectods-custno.
if sy-subrc = 0. "found, okay
else. "not found, delete
DELETE DATA_PACKAGE index indx.
ENDIF.
ENDLOOP.
/manfred -
Error when select sheet for Excel file from Excel 2013 with visual basic
Dim AppXL As Object
Dim MyWorkBook as Object
Set AppXL = CreateObject("Excel.Application")
Set MyWorkBook = AppXL.Workbooks.Open("E:\MyFile.xls)
AppXL.Sheets("Sheet1").Select
The above code run with no problem when use in machines with Excel 2007 and Excel 2010.
But when run in machine with Excel 2013, error with "Out of Range" occur. Kindly advise for any solution.
TS LimWith your highlight on the AppXL.Workbooks.Open, I have solved the problem by re-position the statements.
Below are the 2 situation which works in for Outlook 2007, 2010 and 2013
Situation 1, work for Outlook 2007 and 2010 but d not 2013
With AppXL
Set WorkBookFrom = AppXL.Workbooks.Open("E:\MyFile.xls")
Set WorkBookTo = AppXL.Workbooks.Open("E:\MyFile2.xls")
WorkBookFrom.Activate
.Sheets("Sheet1").Select
.Range("A1:IV65536").Select
.Selection.Copy
WorkBookTo.Activate
.Sheets("Sheet1").Select
.Selection.PasteSpecial Paste:=-4163, Operation:=-4142, SkipBlanks:=False, Transpose:=False
.Range("A1").Select
WorkBookTo.Save
End With
Situation 2, work for Outlook 2007 and 2010 and 2013
With AppXL
Set WorkBookFrom = AppXL.Workbooks.Open("E:\MyFiel.xls")
WorkBookFrom.Activate
.Sheets("Sheet1").Select
.Range("A1:IV65536").Select
.Selection.Copy
Set WorkBookTo = AppXL.Workbooks.Open("E:\MyFile2.xls")
WorkBookTo.Activate
.Sheets("Sheet1").Select
.Range("A1").Select
.Selection.PasteSpecial Paste:=-4163, Operation:=-4142, SkipBlanks:=False, Transpose:=False
WorkBookTo.Save
End With
Thank you for indirectly help me to solve the problem.
TS Lim -
Load data error: Database selection with invalid cursor (sm21)
hi experts,
when I execute processchar, it occur some system error:
"Database selection with invalid cursor ",
"Documentation for system log message BY 7 :
The database interface was called by a cursor (in a FETCH or CLOSE
cursor operation) that is not flagged as opened. This can occur if a
COMMIT or ROLLBACK was executed within a SELECT loop (which closes all
opened cursors), followed by another attempt to access the cursor (for
example, the next time the loop is executed). "
the error msg occur when apply bw support package19.
data from DSO to CUBE, Transferred Recodes is not zero, but Added Recodes is zero.
Request status always yellow, process is running.
current sys info: BI7 and BW19, BASIS17,PI_BASIS17, the database is oracle10g R2.
thanks for your help.I have solved this issue, The Oracle checkpoint not complete.
thanks,
xwu. -
Processchar occur error: Database selection with invalid cursor (sm21)
hi,
when I execute processchar, it occur some system error:
"Database selection with invalid cursor ",
"Documentation for system log message BY 7 :
The database interface was called by a cursor (in a FETCH or CLOSE
cursor operation) that is not flagged as opened. This can occur if a
COMMIT or ROLLBACK was executed within a SELECT loop (which closes all
opened cursors), followed by another attempt to access the cursor (for
example, the next time the loop is executed). "
the error msg occur when apply bw support package19.
data from DSO to CUBE, Transferred Recodes is not zero, but Added Recodes is zero.
Request status always yellow, process is running.
current sys info: BI7 and BW19, BASIS17,PI_BASIS17, the database is oracle10g R2.
thanks for your help.I have solved this issue , The Oracle checkpoint is not complete.
thanks,
xwu. -
Conditional format with large data fails and show error as "Selection is too large" in Excel 2007
I am facing a issue in paste special operation using conditional formats for large data in Excel 2007
I have uploaded a file at below given location.
http://sdrv.ms/1fYC9qE
The file contains two sheets, Sheet "Data" contains the data on which formats are to be applied and sheet "FormatTables" contains the format tables which contains conditional formating.
There are two table in "FormatTables" sheet. Both have some conditional formats applied on it.
Case 1:
1. Select the table range of Table1 i.e $A$2:$AV$2
2. Copy it
3. Goto Sheet "Data"
4. Select data area i.e $A$1:$AV$20664
5. Perform a paste special operation on full range and select "Formats" option while performing paste special.
Result:
It throws error as "Selection is too large"
Case 2:
1. Select the table range of Table2 i.e $A$5:$AV$5
2. Copy it
3. Goto Sheet "Data"
4. Select data area i.e $A$1:$AV$20664
5. Perform a paste special operation on full range and select "Formats" option while performing paste special.
Result:
Formats get applied successfully.
Both are the same format tables with same no of column and applied to same data range($A$1:$AV$20664) where one of the case works and another fails.
The only diffrence is Table1 has appliesTo range($A$2:$T$2) as partial of total table range($A$2:$AV$2) whereas the Table2 has appliesTo range($A$5:$AV$5) same as of its total table range($A$5:$AV$5)
NOTE : This issue is only in Excel 2007Excel 2007 No Supporting formating to take a formatting form another if source table has more then 16000 rows and if you want to do that in more then it then you have ot inset 1 more row in your format table to have 3 rows
like: A1:AV3
then try to copy that formating and apply
Solution Case 1:
1.Select the table range of Table1 i.e AV21 and drage it down to one row down
2. Select the table range of Table1 i.e $A$2:$AV$3
3. Copy it
4. Goto Sheet "Data"
5. Select data area i.e $A$1:$AV$20664
6. Perform a paste special operation on full range and select "Formats" option while performing paste special -
Infoset with ldb IOC - error in selection parameter
Hi Expers,
could any of You pls help me with an issue - creating infoset with ldb, and get error in selection parameter definiton.
I am about to create an infoset than a query, using IOC logical database, and get a couple of error message related to selecion parameters - such as: error in sel. parameter P_PICK is - Statement concluding with "...TYPE" ended unexpectedly.
I do not really need this parameter for my selection, so I was to delete - but I could not find it amongst the selection fields in actual infoset. When I tried to create it, I got a message: it has already been created (of course), but where can I find / change it if not amongst listed selection parameters (Extras / Selection)
I suppose I can not make any changes in DBIOCSEL - because COOIS is also using this ldb - and it might have some unexpected effect there as well.
Later I started to create a Z*report via SE80, using same ldb, and it works fine.
So it is not a burning issue any more, but still interesting, why infoset has problem with the sel. parameter which is actually not in use.
All usefull answer is appreciated
BrHi,
the selection screen is coded without a number. Here's the code:
SELECTION-SCREEN BEGIN OF BLOCK selection WITH FRAME TITLE text-t11.
SELECTION-SCREEN BEGIN OF BLOCK persdata WITH FRAME TITLE text-t01.
SELECT-OPTIONS so_pernr FOR ls_pa0017-pernr.
SELECTION-SCREEN END OF BLOCK persdata.
SELECTION-SCREEN END OF BLOCK selection.
SELECTION-SCREEN BEGIN OF BLOCK input WITH FRAME TITLE text-t12.
SELECTION-SCREEN BEGIN OF BLOCK zeitraum WITH FRAME TITLE text-t02.
PARAMETERS pa_begda TYPE p0017-begda DEFAULT sy-datum OBLIGATORY.
PARAMETERS pa_endda TYPE p0017-endda DEFAULT '99991231' OBLIGATORY.
SELECTION-SCREEN END OF BLOCK zeitraum.
SELECTION-SCREEN BEGIN OF BLOCK gruppierungen WITH FRAME TITLE text-t03.
PARAMETERS pa_spebe TYPE p0017-spebe OBLIGATORY DEFAULT '1'.
SELECTION-SCREEN END OF BLOCK gruppierungen.
SELECTION-SCREEN BEGIN OF BLOCK zuordnungen WITH FRAME TITLE text-t05.
PARAMETERS pa_bukrs TYPE p0017-bukrs MATCHCODE OBJECT c_t001 DEFAULT '2000'.
PARAMETERS pa_gsber TYPE p0017-gsber MATCHCODE OBJECT h_tgsb DEFAULT '0001'.
SELECTION-SCREEN END OF BLOCK zuordnungen.
SELECTION-SCREEN END OF BLOCK input.
SELECTION-SCREEN BEGIN OF BLOCK attributes WITH FRAME TITLE text-t13.
PARAMETERS pa_test AS CHECKBOX DEFAULT 'x'.
SELECTION-SCREEN END OF BLOCK attributes.
Regards
Mark-André -
Load from Infoprovider with selection package error
Hello,
Requirement: Data transfer from one application to another application in BPC
Version: BPC 7.5 NW SP08
Source application: MGMT
Target Application: LEGAL
Transformation File: Yes
Conversation File: Yes for Location Dimension
Source records: 103 (The data is for only one Location)
When I run Load from Infoprovider with selection Package (/CPMB/LOAD_INFOPROV_UI package) i am able to load 99 records loading and 4 records are getting error.
Error Message: 121 ,41513000,,N,AVER,Y,2011,,1030,1030,,,0.0000000
Line 121 :Dimension:LOCATION member: convert failed in line 121; rejected
Analysis: Location conversion is already in place and other 99 records are able to success on the same conversion rule. I have checked transformation, Conversion files. When I validate the transformation file with data then also i am seeing same error.
Note: I am using same package to load data from BW Cube to MGMT application that time i am able to load without error, When I load the same data from MGMT to LEGAL then this error is coming.
I appreciate any clue on this error.
Thanks,
Sri
Edited by: sribpc on Oct 10, 2011 8:02 PMWe are able to solve the problem,
In the Account Dimension for one of the property we maintained some value with comma in it. That created a bad data and system throwing error.
After changing Account dimension attribute then the package is working fine.
Thanks for the support. -
ABAP/4 run time error with error code SNAP_NO_NEW_ENTRY
Dear All,
I've installed SAP R/3 IDES on Oracle on Windows 2003 server.After clicking Log on button , I should be asked to enter client,user and password.But, my system does not display such details.Instead I get ABAP/4 run time error with error code SNAP_NO_NEW_ENTRY that too after a long time.
Can you please address what is the reason for this problem and how to over ride it?
Regards,
S.SureshHi,
the most probable reason is an archiver stuck. Backup the archived redo log files and delete them afterwards.
The database will archive some more logs after this. Handle them in the same manor. For complete explanation search for brtools.
Regards
Ralph Ganszky -
ORA-20001:Error fetching column value:Query must begin with SELECT or WITH
Hi all,
I have implemented an application with a master-detail form using Apex 3.1.2 and I imported that to Apex 3.2 on different server. Everything else seems to be fine except when I add detail record (clicking on Add Rows), I am getting following error.
=================
report error:
ORA-20001: Error fetching column value: ORA-20001: Query must begin with SELECT or WITH
====================
Both the databases have same version 10gR2. I didn't make any change after importing it as well. Can someone let me know what could be the issue? Thanks in advance.
SHYMay we know your first name?
Can you put the application in your workspace on apex.oracle.com so we can take a look?
Scott -
LOV with Select Union - ERROR 30049
Hi, guys.
I'm facing some troubles to deal with Select Union in a Lov.
When I'm trying to run the forms, it shows me the error FRM-30049 in column mapping properties.
Actually, I don't know if Forms supports it. The code below worked out in ORACLE SQLPLUS.
Follows the code:
SELECT (SUBSTR(cust_name,1,15) ||' - '||'Customer'),
cust_cod
FROM customers
UNION
SELECT (SUBSTR(supl_name,1,15)||' - '||'Supplier'),
supl_COD
FROM suppliers;
May someone give me a hint?
Thanks in advance.I'm sorry.
I've found my error. It was just necessary adjust the column mapping long propertie.
Now, it's working.
Sorry, again.
Have a nice day.
Thanks anyway.
Maybe you are looking for
-
Problema de validação na contingência (Switched to Contingency)
Bom dia! Por gentileza, poderiam me ajudar? Estou com problema para colocar uma NF em contingência através do monitor, segue procedimento realizado: 1) Criei uma NF writer 2) No monitor, selecionei a NF e pressionei o botão u201Ccontingencyu201D, inf
-
What Tech Specs are needed for iOS developement and other game developement?
I am looking to buy a new macbook pro most likely the retina because it has a much higher resolution and flash storage which will make it much faster than a regular macbook pro. I am going to use this computer for programming including iOS developeme
-
Rcv_transactions not populated
Hi all, We have a problem with receiving. When I tried to receive one of our intercompany requisitions, although receive shipment headers and lines tables are populated, no records were created in receive transactions table. Also there are no records
-
Guidance on Microsoft-Windows-Hyper-V-Worker-Admin ID=3322
Running server 2012 in a 2 node failover cluster with a 2012 R2 vdi setup. 'abc-VMP33': Cannot allocate more memory to the virtual machine because of failure to extend the memory contents file '\\abcSOFSCAP0.abc.forest.org\VDI\DesktopStorage\Personal
-
When i open an app, it is kicking me back to main screen after 5-10 seconds?
such as Facebook, Weather channel, etc. Email seems fine. Wireless is strong signal.