2010 Jul 30 11:37 AM
Dear friends & colleagues
i am new to abap language. i have created a report which consists of mat grp,creation date,mat num,plant and description.
My required output should come as mat grp not equal to CSTMEH and material num shld exclude 16*90(16 starting num and 90 as ending number).It should take all values excluding the condition.My output keeps on changing,so i can t put them in condition in programming . Is there any kind of pattern or any other way available in SAP. Guide Me
My sap version is 4.7 R/3
2010 Jul 30 12:10 PM
if you have a selection screen with matnr then you can use ur selection option as follows
s_matnr-low = '16*90'.
s_matnr-option = 'NP'.
append s_matnr.and for you s_mtgrp.
s_matgrp-low = 'CSTMEH'.
s_mtgrp-option = 'NE'
append s_mtgrp.you can use this when your selection data
Dear friends & colleagues
i am new to abap language. i have created a report which consists of mat grp,creation date,mat num,plant and description.
My required output should come as mat grp not equal to CSTMEH and material num shld exclude 16*90(16 starting num and 90 as ending number).It should take all values excluding the condition.My output keeps on changing,so i can t put them in condition in programming . Is there any kind of pattern or any other way available in SAP. Guide Me
My sap version is 4.7 R/3
2010 Jul 30 12:03 PM
you can use regular expressions in SAP ABAP if you search you will be able to find out how you can use it.
or else when you are selection you can use a range table where you can give a pattern like for 16%90 where it says you excluded then . you can do the same to mat group
2010 Jul 30 12:10 PM
if you have a selection screen with matnr then you can use ur selection option as follows
s_matnr-low = '16*90'.
s_matnr-option = 'NP'.
append s_matnr.and for you s_mtgrp.
s_matgrp-low = 'CSTMEH'.
s_mtgrp-option = 'NE'
append s_mtgrp.you can use this when your selection data
2010 Jul 30 12:18 PM
Thank you for replying... i don t want to change my programming because my requirement keeps on changing and my output shld come as it shld start as 16* but it shld exclude only 16*90 is it possible
2010 Jul 30 12:26 PM
Just create a RANGE table as pointed by Nafran. No need to change your selection screen.
Declare this RANGE table and before the select query itself populate the table as shown. Then use this RANGE table. This has nothing to do with selection screen
2010 Jul 30 12:41 PM
ya you can do that , if you do as i am explained above then you can do it . you can check that mara table on se11 it works.
you might have a selection screen on your report right and you might have matnr as a selection, you can append this to that selection
2010 Jul 30 12:21 PM
Dear friends
i forgot to add one main point
my output should start as 16* but it shld exclude only 16*90 is it possible???