How to select data from structure
how to select data from structure
Hi Laxman,
Structure holds single record of data. You can acess data by using the syntax <b>Structure-field</b>
Please see sample.
data: wa_mara type mara.
select *
from mara
into wa_mara
up to 1 rows.
endselect.
write:/ wa_mara-mandt,
wa_mara-matnr,
wa_mara-maktl.
if helps plz reward points.
Regards
Bhupal Reddy
Similar Messages
-
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 select data from a table by passing document number from another tab
How to select data from a table by passing document number from another table.
for eg:-
I want to display name, adres, region from ADRC table
by using field delivery document number
Kind Regards,
Shanbagavalli.SHi Shanbagavalli,
There are multiple solutions to this questions a few i will try to answer and then you can take the best required for your requirements.
**Consider that you have a Internal table having document number from other table..
SELECT NAME ADRES REGION FROM ADRC
INTO IT_ADRC
FOR ALL ENTRIES IN IT_DOC
WHERE DOCUMENT_NO = IT_DOC-DOCUMENT_NO.
**Consider that you have 1 document number then
SELECT NAME ADRES REGION FROM ADRC
INTO IT_ADRC
WHERE DOCUMENT_NO = W_DOCUMENT_NO.
Hope this solves your problem.
Regards,
Kunjal -
How to select data from cluster table
hi experts,
I have a report which picks data from bseg (cluster table ) for a month report it is taking around 4 minutes to process.I feel it is not good when take the report after some months.
how to select data from these table???how to declare itab for these cluster tables????can we include any search condition or any other kind of internal table???
please advice.
maniHi Manikandan,
The following code may be helpful to understand how to select the data from cluster table.
Types: Begin of ty_kna1,
Kunnr type kna1-kunnr,
adrnr type kna1-adrnr,
end of ty_kna1,
begin of ty_bseg,
belnr type bseg-belnr,
kunnr type bseg-kunnr,
end of ty_bseg,
begin of ty_final,
belnr type bseg-belnr,
kunnr type kna1-kunnr,
adrnr type kna1-adrnr,
end of ty_final.
Data: it_kna1 type table of ty_kna1,
wa_kna1 type ty_kna1,
it_bseg type table of ty_bseg,
wa_bseg type ty_bseg,
it_final type table of ty_final,
wa_final type ty_final.
Select kunnr adrnr from kna1 into table it_kna1 where....
if sy-subrc = 0.
select belnr kunnr into table it_bseg for all entries in it_kna1 where kunnr = it_kna1-kunnr.
endif.
sort it_kna1 by kunnr.
Loop at it_bseg into wa_bseg.
move wa_bseg-belnr to wa_final-belnr.
read table it_kna1 into wa_kna1 with kunnr = wa_bseg-kunnr binary search.
if sy-subrc = 0.
move: wa_kna1-kunnr to wa_final-kunnr,
wa_kna1-belnr to wa_final-belnr.
endif.
append wa_final to it_final.
clear wa_final.
endloop.
Loop at it_final into wa_final.
write: / wa_final-belnr, wa_final-kunnr, wa_final-adrnr.
endloop.
Reward if useful.
Thankyou,
Regards. -
How to select data from Maintance View in Program
Dear All ,
How to select data from Maintance View V_T052 in abap Program.
Regards,
ArchanaTABLES: t179, t179t.
DATA: v_t179_int TYPE TABLE OF v_t179.
SELECT * FROM t179
JOIN t179t ON
t179prodh = t179tprodh
INTO CORRESPONDING FIELDS OF TABLE v_t179_int.
Reward points... -
How's to select data from structure data object?
Dear Guru,
If my data is kept in structure data object (not a table type). How can I select data from that kind of data object. Thank you.
Cheers,Hi,
Data cannot be stored in structure.
Structure is just like a view , so its a medium with which you can create a view relevant to your needs.
The fields that we need together , we put in a structure.
Structure is a medium where we collect all our relevant fields.
we can include the structure in internal table so that we can actually store data , process data and retrieve data.
hope this helps.
thanx,
dhanashri. -
How to select data from one nested table and into another nested table
create or replace
TYPE ctxt_code_rec as object
ctxt_header varchar2(10),
header_description varchar2(300),
status varchar2(30),
adjacent_code varchar2(300),
adjacent_desc Varchar2(400),
adjacent_flag varchar2(4000),
adjacent_text_href varchar2(4000)
create or replace
type ctxt_code_table as table of CTXT_CODE_REC
d_table ctxt_code_table ;
v_tab ctxt_code_table ;
Iam trying to select data from d_table to v_tab
using and bulk collect into
select m.*
bulk collect into p_code_result
from table(l_loop_diag_code_table1)m
order by 1;
Receiving error:
ora 94007 : not enoughvalues
Could you please let me know how to solve it?
Thanks,
in advance>
create or replace
TYPE ctxt_code_rec as object
ctxt_header varchar2(10),
header_description varchar2(300),
status varchar2(30),
adjacent_code varchar2(300),
adjacent_desc Varchar2(400),
adjacent_flag varchar2(4000),
adjacent_text_href varchar2(4000)
create or replace
type ctxt_code_table as table of CTXT_CODE_REC
d_table ctxt_code_table ;
v_tab ctxt_code_table ;
Iam trying to select data from d_table to v_tab
using and bulk collect into
select m.*
bulk collect into p_code_result
from table(l_loop_diag_code_table1)m
order by 1;
Receiving error:
ora 94007 : not enoughvalues
Could you please let me know how to solve it?
>
Not unless you provide the code you are actually using.
There is no definition of 'p_code_result' in your post and you say you 'trying to select data from d_table' but there is no code that loads 'd_table' in what you posted.
And the SELECT query you posted actuall selects from an object named 'l_loop_idag_code_table1' which isn't mentioned in your code.
Post the actual code you are using and all of the structures being used.
Also explain why you even need to use nested tables and PL/SQL for whatever it is you are really doing. -
How to read data from structure RSTXT
Hi Everyone..
I have some problem with read data from structure RSTXT.
I am using transaction code vl02n -> for delivery select <b>Item</b> in item
overview tab -> Go to -> Item -> text.
I want display "<b>RSTXT-TXLINE</b>" field in <b>ALV</b> report how it can be possible?
If anyone knows about it plz reply me with example.
Thanks in Advance.Hi,
Use FM READ_TEXT
( Once on the text, plz display it in plain page mode :
then > Go To> header : Here you'll get the FM parameters : ID, Object, Name, ... )
Sample code :
DATA: BEGIN OF TTLINE OCCURS 0.
INCLUDE STRUCTURE TLINE.
DATA: END OF TTLINE.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = L_ID
LANGUAGE = L_LANGUE
NAME = L_BL
OBJECT = 'VBBK'
TABLES
LINES = TTLINE
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8.
Regards,
Erwan -
How to select data from struture
hello experts,
here i stuk am in smart forms where i want to populate the data from struture.
here in our comp there is no functional guy so i face bit problem to find a perticuler table but at last i found
a struture from where my problem can be resolve so can u tell me if i want to select data from struture
so how it is possible...
thanks in advance....Hi,
ST05 is the transaction used for tracing the SQL...for the particular time between Swtich on and Switch off..
If it is still difficult for you..
Then use this approach..
Go to the structure in SE12.
Then double click on the data element of the field you are looking for.
Then whereused list of the data element and search in tables..
You might get the tables that is using this data element..
Thanks,
Naren -
How to retreive data from structure MDEZ in T.code CO09
As per our requirement 2 new columns are needed in a customize report .i.e
- u201Cinc. lot dateu201D
- u201Cavailable inc. lotu201D
u201Cinc. lot dateu201D:to get the values for inc.lot.date
From second screen of CO09(program: SAPLATP4 and screen number: 400) pick first date where MRP element is u201CPOitemu201D, u201CShpgNtu201D or u201CPrdOrdu201D.
u201Cavailable inc. lotu201D: to get the values for available inc.lot
Pick u201CCum. ATP QTyu201D from the same row.
These data are stored in structure MDEZ. Actually I want dat00 and MNG04 based on field DELB0. If DELB0 filed is POitem or Prdord or ShpgNt then only I should retrieve the dat00 and MNG04. IF there are more than one POitem in MRP element then we should pick the first POitems' mrp date and *** ATP qty .Can you please help me out how to get these data from the structure MDEZ.
input parameters to get the values are material number and plant.Hi,
First of all data is never stored in structure so there is no way you can retrive data from structure.
you are looking into the screen field and it is not mandatory that it will always point to a table.
Now the qestion remains how to get the data ? you need to find database table for that field there are many ways like SE84 or SE11 where used etc.
Try to find the table if you still have the problem feel free to get back.
Regards
Bikas -
How to select data from a PL/SQL table
Hi,
I am selecting data from database after doing some screening i want to store it in a PL/SQL table (temporary area) and pass it to oracle reports.
Is there any way to select the data from a PL/SQL table as a cursor. Or is there any other way of holding the temporary data and then pass it back as a cursor.
Regards
KamalA PL/SQL "table" is anything but a table. Whoever came up with this term in PL/SQL to describe what is known as dynamic arrays (the correct programming terminology that existed since the 70's if not earlier and what is used in all other programming languages I'm familiar with)... well, several descriptions come to mind and none of them are complimentary.
You cannot "select" from a PL/SQL dynamic array as it is not a table within the Oracle context of tables.
Thus you need to convert (cast) a PL/SQL dynamic array into a temporary Oracle data set/table in order to select from it. This is in general a Bad Idea (tm). Oracle tables and SQL and concurrency controls and all that are especially designed for processing data. PL/SQL arrays is a very simplistic data structure with very limited usage. Why would you want to use that in SQL via a SELECT statement when you can use Oracle tables (or proper temp tables) instead? Besides that, it is also slow to cast a dynamic PL/SQL array into an Oracle SQL data set structure (context switching, copying of memory, etc).
The proper way to use PL/SQL to generate data sets for use via the SQL engine is pipelined table functions.
This is not to say that you should never use PL/SQL arrays and casting in SQL.. simply that you need to make sure that this is the correct and scalable way to do it. And that will also always be an exception to the rule when you do. -
How to select data from cube by BAPI
Hi
now i want to select data from cube by selection
and the parameter is BAPI'S import.
I want to know how can i select data from which table the storage the cube's data
Thank you for your help !!Hi,
You can use FM: RSDRI_INFOPROV_READ.
BAPI_CUBE_GETDETAIL
Pls Check the below weblog
/people/dinesh.lalchand/blog/2006/06/07/reading-infocube-data-in-updatetransfer-rules
Regards,
CSM Reddy -
How to select data from view V_TCURR
Hi all,
how to fetch data from view V_TCURR.
I have to fetch 2 fieds: kursp and *tfact
(what does this * indicates in field name *tfact)The view is a maintenance view and it doesn't even have field tfact available.
Just select from the table directly
PARAMETERS: p_kursp for tcurr-kurst,
p_fcurr for tcurr-fcurr,
p_tcurr for tcurr-tcurr,
p_date for tcurr-gdate.
SELECT SINGLE
kursp
tfact
INTO ( lv_kursp, lv_tfact )
FROM tcurr
WHERE kurst eq p_kurst
AND fcurr eq p_fcurr
AND tcurr eq p_tcurr
AND gdatu le p_date.
Hope that helps,
Michael -
How to select data from Sql server 2005 database tableinto oracle database table
Hi,
I have table text1 in sql server database and text2 in oracle database (11g). Now how to move data from SQL Server table into oracle table. So please help me how to do it.
Thanks a lot in advance.
rk
OS: Windows 7 professionalHi,
you can use export/import wizard and specify sql server as a source and oracle as destination.
I hope this is helpful.
Please Mark it as Answered if it answered your question
OR mark it as Helpful if it help you to solve your problem
Elmozamil Elamir Hamid
MCSE Data Platform
MCITP: SQL Server 2008 Administration/Development
MCSA SQL Server 2012
MCTS: SQL Server Administration/Development
MyBlog -
How to select data from 3rd row of Excel to insert into Sql server table using ssis
Hi,
Iam having Excel files with headers in first two rows , i want two skip that two rows and select data from 3rd row to insert into Sql Server table using ssis.3rd row is having column names.CUSTOMER DETAILS
REGION
COL1 COL2 COL3 COL4 COL5 COL6 COL7
COL8 COL9 COL10 COL11
1 XXX yyyy zzzz
2 XXX yyyy zzzzz
3 XXX yyyy zzzzz
4 XXX yyyy zzzzz
First two rows having cells merged and with headings in excel , i want two skip the first two rows and select the data from 3rd row and insert into sql server using ssis
Set range within Excel command as per below
See
http://www.joellipman.com/articles/microsoft/sql-server/ssis/646-ssis-skip-rows-in-excel-source-file.html
Please Mark This As Answer if it solved your issue
Please Mark This As Helpful if it helps to solve your issue
Visakh
My MSDN Page
My Personal Blog
My Facebook Page
Maybe you are looking for
-
How do I get the Tab Group names to appear above the Tabs?
At one point the names of all my Tab Groups appeared above the Tabs. That is, on every page there's a horizontal list of open Tabs. Above that there used to be a similar looking horizontal list of all Tab Groups. Now that horizontal list of Tab Group
-
Photo Stream permanent master library Windows 8 PC
Up until recently I have been able to take pictures with an iOS device and have it sync to my photostream, then to a folder on my Windows PC. Once in my Windows folder the photo would stay there forever. Deleting the photo from iOS Photo Stream would
-
How I can attach files on a Web Form
Hi everybody, When I add a document on a web form, the document I have to attach from the workspace directory... the server is on Linux ... instead of put the files on linux server, exists the possibility to parameterize a local directory to be easie
-
Does scc sg04 have low pass filter?
Hi.. I am using SCC-SG04 for full bridge strain gauge with SC2345. I found the voltage output on oscilloscope with much noises when I directly measured from SCB 68 output which linked with SC2345. High frequency noises was reduced a lot when I used s
-
Full screen video on 2nd monitor blacks out 1st screen
When I play a video full screen on a second monitor, iTunes blacks out the first screen and I can't see the Windows desktop. Is there a way around this?