2008 Jan 22 8:16 AM
hi all ,
In my FM , i have a importing parameter kna1-kunnr
i want to select a field from table knvp
based on my importing parameter
how do i use it??
select field from knvp where ""
can anybody help me with this
thnkx
bhanu
Bhanu,
Decalre the internal table with fields which you require from KNVP table.
FOR ex: In FM if you gave v_kunnr
select required fields into table
i_knvp from knvp
where kunnr EQ v_kunnr.
Don't forget to reward if useful...
2008 Jan 22 8:20 AM
Hi,
If the name of ur Importing parameter is kna1-kunnr then
select fields
from knvp
where kunnr = kna1-kunnr.
if the name of ur importing parameter is i_kna1-kunnr then
select fields
from knvp
where kunnr = i_kna1-kunnr.
Hope this helps.
Regards,
Ismail.
2008 Jan 22 8:28 AM
2008 Jan 22 8:28 AM
hi,
select field from knvp where kunnr = kna1-kunnr.
try this
tables:kna1,knvp.
data itab like knvp occurs 0 with header line.
select kunnr from knvp into itab where kunnr = kna1-kunnr.
endselect.
reward if its helpful
Edited by: Rajasekhar Reddy on Jan 22, 2008 2:02 PM
Edited by: Rajasekhar Reddy on Jan 22, 2008 2:07 PM
2008 Jan 22 8:36 AM
import parameter name may be gv_kunnr.
then ur select statment should be
select kunnr from knvp into table itab where kunnr = gv_kunnr.
Madhavi
2008 Jan 22 8:33 AM
Hello Bhanu,
Just create a data object like kna1-kunnr.
ex: kunnr1 like kna1-kunnr.
assign the value from importing parameter of function module to kunnr1.
then write query like:
select <field> from knvp where kunnr eq kunnr1.
hope it works.
Reward If Helpful.
Regards
--
Sasidhar Reddy Matli.
2008 Jan 22 8:35 AM
Bhanu,
Decalre the internal table with fields which you require from KNVP table.
FOR ex: In FM if you gave v_kunnr
select required fields into table
i_knvp from knvp
where kunnr EQ v_kunnr.
Don't forget to reward if useful...
2008 Jan 22 9:23 AM
Hi Dear,
You have 2 use the inner join Bcaz ur using
two tables.
1.First u create the structure for the fields which
u r gng to select from the KNVP table.
In this structure mention u r import parameter
field also.
Eg: Begin of x_KNVP,
Kunnr type Kunnr,
field2 type dataelement,
field3.....
End of x_KNVP.
2.Now write the select query like this
Select Field1
Field2
.
Fieldn
into corresponding fields of table it_KNVP
from KNVP as C
inner join KNA1 as D
on CKUNNR = DKUNNR.
I hope it will help you.If it helps reward me points.
Regards
AshokChowdhary.M
2008 Jan 22 9:32 AM
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |