Moderator message: please use a more meaningful subject in future.
Hi Experts,
I am using module pool programming and I have designed a screen having PDC No,Cheque No and fiscal year as i/p fields,none of them are mandatory.
I have written select query based on above i/p fields which is :
SELECT * FROM zft_pdcdtls CLIENT SPECIFIED
INTO CORRESPONDING FIELDS OF TABLE it_pdc
WHERE mandt = sy-mandt
AND bukrs = zft_pdcdtls-bukrs
and pdc_no = zft_pdcdtls-pdc_no
and chect = zft_pdcdtls-chect
and gjahr = zft_pdcdtls-gjahr
where zft_pdcdtls-bukrs,zft_pdcdtls-pdc_no,zft_pdcdtls-gjahr are screen fields.
Now the problem is , if user keeps zft_pdcdtls-pdc_no field blank and enters value in chect and gjahr field,values dont get populated in internal table(it_pdc) since there are no records in zft_pdcdtls database having pdc_no blank.
I want data to be selected from database table based on whichever field value user enters somewhat like 'IN' operator we use in reporting.
Please suggest.
Regards,
Kaustubh.
Edited by: Matt on Nov 19, 2008 2:35 PM