cancel
Showing results for 
Search instead for 
Did you mean: 

Aout the statements Comparing Strings

Former Member
0 Kudos

Hi,gurus,

How can I carry out that just show the field VBDKL-BSTK which just contain "RMA*R".

I try this statement:

IF &VBDKL-BSTKD& CS 'RMA*R'

....

But it seem can suit my request. Can someone help me to solve it...?

Thanks advance.

Larry

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Sorry, I tried it again , bur there is something wrong about the scrip or the abap program

Former Member
0 Kudos

Hi,

In ABAP '*' wont work while writing a program....to get dat hierarchy...use 'RMA%'

IN SCRIPT :

/: perform sub in program ztest

/: using &VBDKL-BSTK &

/: changing & text&

/: endperform

( instead of that field directly write this in two lines.)

&text&

in the program ztest write the coding as follows

IN SUB-ROUTINE POOL :

report ztest.

Form sub tables input structure itcsy

output structure itcsy.

read table input with key name = ' VBDKL-BSTK '.

if sy-subrc = 0.

if input-value CS 'RMA%R'

loop at output.

case output-name.

when 'TEXT'.

output-name = 'TEXT'.

output-value = input-value.

modify output.

endcase.

endloop.

endif.

endform.

Thanks,

NN.

Former Member
0 Kudos

Hi,

/: perform sub in program ztest

/: using &VBDKL-BSTK &

/: changing & text&

/: endperform

( instead of that field directly write this in two lines.)

&text&

in the program ztest write the coding as follows

report ztest.

Form sub tables input structure itcsy

output structure itcsy.

read table input with key name = ' VBDKL-BSTK '.

if sy-subrc = 0.

if input-value CS 'RMA*R'

loop at output.

case output-name.

when 'TEXT'.

output-name = 'TEXT'.

output-value = input-value.

modify output.

endcase.

endloop.

endif.

endform.

Thanks,

NN.

Former Member
0 Kudos

I tried, but it doesn't work!

Former Member
0 Kudos

Hi,

I think it can work.

CO, CP , NA , EQ, CS

all these can be used for individual character comparison and for string comparison also..

for more information check this link...

http://help.sap.com/saphelp_47x200/helpdata/en/d3/2e974d35c511d1829f0000e829fbfe/frameset.htm

Regards,

Shiva Kumar