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

Parameter Defination

Former Member
0 Likes
1,028

Hello,

I defined the parameters as :

   PARAMETERS : p_name(40) type c.

What ever the name I enter, it is getting converted to CAPS.

My requirement is to retain the original case.

Eg: MiCHaeL should be taken as it is entered. No all Upper or No all Lower.

Any help?

Thnx              

Moderator message: please do more research before posting, e.g. read ABAP documentation for PARAMETERS, there is a LOWER CASE option.

Message was edited by: Thomas Zloch

4 REPLIES 4
Read only

Former Member
0 Likes
996

Hi Pranu,

Please do as mentioned below you will be able to get the text as 'MiCHaeL'.

1. create a data element with domain as 'TEXT40'.

     data element name: ZTEST_CHOLL

     Domain will be : TEXT40

2. Activate the data element and go to the program and declare the parameter as below.

     PARAMETERS: P_CHAR TYPE ZTEST_CHOLL.

now, you will be able to get the text as you wished (MiCHaeL).

Thank You.

Shyam

Read only

Former Member
0 Likes
995

Hi,

No need to create data element. Just directly reference it to TEXT40. Try this:

PARAMETER: name TYPE text40.

WRITE: name.

Output will be:

Regards,

Jake

Read only

0 Likes
995

Thanks jake... TEXT40 solves the purpose. However I opted for data element because I can give my custom field labels.

Read only

Former Member
0 Likes
995

Hi Pranu,

Yes, TEXT40 will serve your purpose.

In future if you want to do this to a different parameter, say 50 in length, you can create a domain and make sure the Lowercase flag in domain is checked. Then you will be able to distinguish between upper and lower case.

Thanks,

Shambu