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

Any pattern available in SAP???

Former Member
0 Likes
863

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
837

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

6 REPLIES 6
Read only

Former Member
0 Likes
837

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

Read only

Former Member
0 Likes
838

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

Read only

0 Likes
837

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

Read only

0 Likes
837

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

Read only

0 Likes
837

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

Read only

Former Member
0 Likes
837

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???