‎2007 Jul 06 10:26 AM
Hi,
I am working on a report where i have to select all the invoices from RSEG table with account assigment category equal to A,P,Z.How can i do that?
Regards,
Hema
‎2007 Jul 06 10:29 AM
Hi Hema,
While selecting data from data base table in Where condirtion hard code A,P,Z .
and select only those records where Accnt Assnmt Category is A,P,Z
Regards
Amber S
‎2007 Jul 06 10:29 AM
Hi Hema,
While selecting data from data base table in Where condirtion hard code A,P,Z .
and select only those records where Accnt Assnmt Category is A,P,Z
Regards
Amber S
‎2007 Jul 06 10:36 AM
Hi,
I have created constants C_A,C_P,C_Z for these values A,P,Z and used them in select statement.But i am getting error as 'C_A,C_P,C_Z are unknown and are not declared in the data statement.
Regards,
Hema
‎2007 Jul 06 10:41 AM
Hi
Use 'IN' Parameter
select belnr ebeln knttp from rseg into table itab where
knttp in ('A' ,'P','Z') .
Reward points for useful Answers
Regards
Anji
‎2007 Jul 06 10:50 AM
constants: C_A type rseg-knttp value 'A',C_P type rseg-knttp value 'P',C_Z type rseg-knttp value 'Z'.
types: begin of it,
ebeln type rseg-ebeln,
knttp type rseg-knttp,
end of it.
data itab type table of it with header line.
select ebeln knttp from rseg into corresponding fields of itab where knttp = C_A or knttp = C_P or knttp = C_Z.
append itab.
endselect.
loop at itab.
write:/ itab-ebeln,itab-knttp.
endloop.
‎2007 Jul 06 10:32 AM
select BUZEI EREKZ RBMNG BPRBM RBWWR MRMOK
from rseg into table t_outtab where KNTTP = 'A'
or KNTTP = 'P' or KNTTP = 'Z'.
Take an output table of required structure and then select the required fields.
Regards,
Pavan P.
‎2007 Jul 06 10:33 AM
select * from rseg
into table lt_rseg
where ( knttp eq 'A' or knttp eq 'P' or knttp eq 'Z')
Award poitns if found useful.
‎2007 Jul 06 10:34 AM
use
types: begin of it,
ebeln type rseg-ebeln,
knttp type rseg-knttp,
end of it.
data itab type table of it with header line.
select ebeln knttp from rseg into corresponding fields of itab where knttp = 'A' or knttp = 'P' or knttp = 'Z'.
append itab.
endselect.
loop at itab.
write:/ itab-ebeln,itab-knttp.
endloop.
‎2007 Jul 06 10:39 AM
Hi,
Move the category into a range and then use the select Statement....
Prabhu Rajesh....
‎2007 Jul 06 10:47 AM
Nice one..
DATA : R_KNTTP TYPE RANGE of KNTTP.
INITIALIZATION.
append 'IEQA' to R_KNTTP. " For KNTTP = 'A'
append 'IEQP' to R_KNTTP. " For KNTTP = 'P'
append 'IEQZ' to R_KNTTP. " For KNTTP = 'Z'
select BUZEI EREKZ RBMNG BPRBM RBWWR MRMOK
from rseg into table t_outtab where KNTTP in R_KNTTP.
‎2007 Jul 06 10:50 AM
Hi,
Please use KNTTP eq 'A' or KNTTP eq 'P' or KNTTP eq 'Z' in the select query or use KNTTP in ('A' , 'P' , 'Z')
Thanks and Regards,
Saurabh Chhatre