Skip to Content
Former Member
Jul 02, 2007 at 03:37 AM

how to avoid hard coding


Hello experts,

I am retrieving the data from bseg, bkpf and bsad tables into 3 different internal tables.. like.. first of i took the data from bseg table (BELNR, BUKRS, GJAHR, CPUDT, CPUTM) into one internal table ITAB1.

for all entries in ITAB1, I selected the data from BSEG table (BELNR, GJAHR, BUKRS, DMBTR, SHKZG, KUNNR, UMSKS, UMSKZ, AUGDT, AUGBL, GUONR, BUZEI) into another internal table ITAB2.

based on itab2 key fields i retrieved the data from BSAD table (XBLNR, REBZG, PRCTR, VBELZ, ZUONR, KUNNR, XREF1, XREF2, XREF3) into itab3.

Now my problem is ... I have to filter the data based on the fields of BSAD.

Eg: BSAD-XREF3 <> 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379 or 325 delete the records......... from itab3.

My requirement is to avoid this hard coding how to do it... where to specify all those values and how to pass that variable in the select statement... please can anyone guide me

its very urgent