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

write select querries?

Former Member
0 Likes
863

Hi All,

i want to add select-option as Posting Date Invoice"for one report as per this condition " needs to be added, Select-Option to field RBKP-BUDAT,

checks for EKES and EKET in GET EKPO

, data selection: EKBE with EKPO-EBELN and EKPO-EBELP and BEWTP="Q" -> RBKP with EKBE-BELNR and EKBE-GJAHR -> finally check RBKP-BUDAT against new selection field -> if o.k. proceed, if not o.k. exit

how can i write select statments for above requirement?

plz suggest me proper solution?

Thanks in advance

Regards,

Oorvi

7 REPLIES 7
Read only

Former Member
0 Likes
826

any answer?

Read only

0 Likes
826

Hi,

Can you just explain your requirement little bit clearly?

and show me your code.

Thanks.

Read only

Former Member
0 Likes
826

hi

can u be little more clear ..

reg

Rmay

Edited by: Ramya S on Feb 17, 2009 5:25 AM

Read only

Former Member
0 Likes
826

i ahve added ine select-option as posting date from RBKP-BUDAT .

for that i wrote the querry as



select single ebeln ebelp bewtp into w_ekbr from ekbe 
where ebeln = ekpo-ebeln 
and ebelp = ekko-ebelp 
and bewtp = 'Q'.

and



select single belnr gjahr from rbkp where belnr = ekbe-belnr and
                                                       gjahr = ekbe-gjahr

now i ahve to check rbkp-budat against the new selection field. if it's ok then proseed otherwise exist.

how i can implement this condtion?

Edited by: oorvi joshi on Feb 17, 2009 5:56 AM

Read only

Former Member
0 Likes
826

Hi,

Tables :

RBKP.

select-options:

s_budat for RBKP-BUDAT.

data :

begin of fs,

belnr type rbkp-belnr,

gjahr type rbkp-gjahr,

end of fs.

data itab like standard table of fs.

select a~belnr

a~gjahr

from ( rbkp as a inner join ekbe as b

on abelnr = bbelnr and

agjahr = bgjahr )

into table itab.

Read only

Former Member
0 Likes
826

how i can i give this condition?

Read only

0 Likes
826

Hi,

Select BUDAT in ur selection from RBKP table.

And then u can filter the data by using following logic.

DELETE IT_RBKP WHERE BUDAT NOT IN S_BUDAT.  " S_BUDAT IS SELECT-OPTION POSTING DATE

Pls let me know if any queries reg this.

Thanks & Regards,

Syed.