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

Character

Former Member
0 Likes
508

Hi,

I have a internal table with one field.

I have to check for each entry in table

Each value can contain only A - Z , 0 to 9 or - (dash) , if any other character , do not use it.

Is there any FM or some logic ..?

Thanks

Bijal

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
486

Hi,

code

data:
  w_char(72) type c value 'AB----Z1--------9-'.

loop at internal table into wa.

if wa-field1 co w_char.

steps.

endif.
endloop.

regards

ravi

3 REPLIES 3
Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
486

Hi,

You can use the following logic.

DATA: number(11) TYPE C value '0123456789-'.
       DATA: lv_string type string.

CONCATENATE sy-abcde number INTO lv_string.

*Assuming you have internal table with header line it_tab
loop at it_tab.
IF it_tab-field CO lv_string.
* satisfies your condition.
ENDIF.
endloop.

Regards,

Sesh

Read only

Former Member
0 Likes
487

Hi,

code

data:
  w_char(72) type c value 'AB----Z1--------9-'.

loop at internal table into wa.

if wa-field1 co w_char.

steps.

endif.
endloop.

regards

ravi

Read only

Former Member
0 Likes
486

Hi bijal parmar ,

Make meaning ful subject line go thru Terms & condtions of SCN.

Regards,

Suneel G