Application Development 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: 

assigning a value to a string

Former Member
0 Kudos

Hi Friends,

How to assign a value to a string. Coz I need to compare the strings with the user entered string and process the logic.

Example : p_pass TYPE string p_pass = 'APPLE'.

Regards,

SMP

7 REPLIES 7

Former Member
0 Kudos

data p_pass TYPE string p_pass value 'APPLE'.

Former Member
0 Kudos

p_pass TYPE string value 'APPLE'

Former Member
0 Kudos

data p_pass TYPE string value 'APPLE' ,

at selection-screen,

if string co "APPLE".

eooo1 message.

endif.

0 Kudos

Hi,

I tried this but cannot work, even if it is not apple it is executing the next statement.

Regards,

SMP

0 Kudos

data : p_pass TYPE string value 'APPLE'.

check the condition as

If tring EQ p_pass.

endif.

former_member386202
Active Contributor
0 Kudos

Hi,

Try like this.

parameters : p_pass TYPE string value 'APPLE'.

at selection-screen on p_pass.

If p_pass co 'APPLE'.

statement

endif.

Regards,

Prashant

0 Kudos

Hi Prashant,

This is a module pool program. I tried to assign p_pass = 'APPLE'.

System shows no syntax error but value is not capturing in the variable p_pass.

Can you tell me what could the reason.

Regards,

SMP