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

selection screen

Former Member
0 Likes
637

hi,

i want to filter my selection screen . i.e. when i enter data

P.O Creation date then it show all record which was created on that date .

now again i want to filter it by putting invoice number at selection screen so it has to show only data which i fill invoice number.

but it show all record within creation date.

how to filter it. ?

below is my code.

IF pr_vbel2[] IS NOT INITIAL. " Invoice Number select option.

LOOP AT it_final INTO wa_final.

DELETE it_final WHERE VBELN_INV IS INITIAL .

ENDLOOP.

ENDIF.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
620

It is better to select only the records based on pr_vbel2[] .

ie,

LOOP AT it_final INTO wa_final where <invoice> in pr_vbel2.

endloop.

5 REPLIES 5
Read only

former_member404244
Active Contributor
0 Likes
620

Hi,

try like this''

select podate invoicenumber from dbtable

into table itab

where podate in s_podate

and invoicenumber in s_invoicenumber.

regards,

Nagaraj

Read only

Former Member
0 Likes
620

Hi,

try this

IF pr_vbel2[] IS NOT INITIAL. " Invoice Number select option.

LOOP AT it_final INTO wa_final WHERE VBELN_INV IS INITIAL .

DELETE it_final.

ENDLOOP.

ENDIF.

Cheers,

Will.

Read only

Former Member
0 Likes
621

It is better to select only the records based on pr_vbel2[] .

ie,

LOOP AT it_final INTO wa_final where <invoice> in pr_vbel2.

endloop.

Read only

Former Member
0 Likes
620

You can filter data while fetching from table itself instead looping

anyway You've already defined SELECT-OPTIONS for PO creation date and Invoice.

For example


SELECT <fld1> <fld2> ... INTO CORRESPONDING FIELDS OF TABLE <itab>
FROM <dbtab>
WHERE <podate>  IN S_DATE AND
      <invnum>  IN S_INVOICE.

Read only

Former Member
0 Likes
620

thanks to all point has been gvn