11-29-2007 8:47 AM
hi
i want to read kunnr from kuagv structure and link this with vbak, how to declear internal table and how to fetch data from structure,
expecting code pl
thanx
rocky
11-29-2007 8:50 AM
HI
The structure will not have any data..It is a just a template..You need to select the data from the database table
The structure will only have data if it has been loaded elsewhere, such as if the structure was populated by a function call or BAPI.
If not, you will have to load data into the structure using SQL Select or by calling the approriate function call/method/BAPI etc.
If the structure already has data, you access that data by referencing the structure name and the component
e.g.
w_field = struct-field1.
This will load the value of the component field "field1" in structure "struct" into a separate work field "w_field".
This is how you refer to components of a structure.
structure_name-component_name
Consequently, you should not use a dash "-" in the name of a field or structure. If you need to separate words in the name use an underscore "_".
If you do attempt to use the dash "-" in the name of a field or structure in a Unicode program, you will get a warning message.
11-29-2007 8:56 AM
Hi.
In structure datas will be stored in Run time only..
In case , If u populate KUAGV strucutre from any of the database table means. Then by using the FOR ALL ENTRIES u may fetch Data from VBAK table by using KUNNR .
For eg:
Data : kuagv type table of kuagv.
data : itab type table of vbak.
populate the structure kuagv**
select * from vbak into corresponding fields of table itab for all entries in kuagv where kunnr = kuagv-kunnr.
Regards
Bala..