Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

report

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

former_member198270
Active Contributor
0 Kudos

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

10 REPLIES 10

former_member198270
Active Contributor
0 Kudos

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

0 Kudos

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

0 Kudos

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

0 Kudos

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.

Former Member
0 Kudos

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.

Former Member
0 Kudos

select * from rseg

into table lt_rseg

where ( knttp eq 'A' or knttp eq 'P' or knttp eq 'Z')

Award poitns if found useful.

former_member188827
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

Hi,

Move the category into a range and then use the select Statement....

Prabhu Rajesh....

Former Member
0 Kudos

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.

Former Member
0 Kudos

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