Application Development and Automation 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: 
Read only

report

Former Member
0 Likes
917

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
Read only

former_member198270
Active Contributor
0 Likes
876

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
Read only

former_member198270
Active Contributor
0 Likes
877

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

Read only

0 Likes
876

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

Read only

0 Likes
876

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

Read only

0 Likes
876

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.

Read only

Former Member
0 Likes
876

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.

Read only

Former Member
0 Likes
876

select * from rseg

into table lt_rseg

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

Award poitns if found useful.

Read only

former_member188827
Active Contributor
0 Likes
876

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.

Read only

Former Member
0 Likes
876

Hi,

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

Prabhu Rajesh....

Read only

Former Member
0 Likes
876

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.

Read only

Former Member
0 Likes
876

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