‎2006 Aug 11 5:35 AM
hi guys,
The parameter converts the value into UPPERCASE. Is it in Settings that I need to configure? Or is it in BASIS side? How?
I was able to handle this when I code
employee search. but when i used a standard bapi. it converts to uppercase and it doesn't return a record. Of course I can't edit the standard bapi and placed a select-option to ignore the case.
And there are some cases that they require lower case in modifying dbase.
Please guide me. Thanks!
‎2006 Aug 11 8:36 AM
Thanks guys! but i can't apply this in function modules in creating a record
‎2006 Aug 11 5:48 AM
Hi Bayog,
Just declare the parameter as
PARAMETERS PROGRAM LIKE SY-REPID lower case.
Is this what u r looking for ?
and i doesnt think that Database updation will be case sensitive....
Regards,
Sridhar
‎2006 Aug 11 5:48 AM
Hi,
This is the default setting when you parameters.
This can be overridden using the addition.
... LOWER CASE
<i>Effect</i>
The parameter allows case-sensitive input.
Ex:
PARAMETERS: snode TYPE pvs_pnode LOWER CASE. Regards,
AS
‎2006 Aug 11 5:52 AM
HI,
use the following function module to change your case from the upper to lower or lower to upper.
<b>EDITOR_LINE_TRANSLATE_CASE</b>
<b>data: a type RSTXP-TDLINE.
data: b type RSTXP-TDLINE.
a = 'ABDCCC'.
CALL FUNCTION 'EDITOR_LINE_TRANSLATE_CASE'
EXPORTING
I_LINE = a
WANTED_CASE = 'LOWER'
IMPORTING
O_LINE = b.
write:/ b.</b>Regards,
HRA
‎2006 Aug 11 6:42 AM
Thanks guys! But the user's input is mixed-case. Like, Firstname Lastname Jr.
‎2006 Aug 11 6:54 AM
Hi Maui,
Hi,
The additon
... LOWER CASE<i>Effect</i>
The parameter allows <b>case-sensitive</b> input.
Conisder this code,
REPORT zztest_sdn_1 .
PARAMETERS: name(50) TYPE c LOWER CASE DEFAULT 'ArUn SaMbArGi'.
START-OF-SELECTION.
WRITE : / name.
Output:
ArUn SaMbArGiRegards,
<b>AS</b>
‎2006 Aug 11 7:14 AM
Hi Bayog,
Better use this statement
<b>parameters</b> p1 type matnr .
start-of-selection.
<b>TRANSLATE</b> p1 to lower case.
write p1.
This should work...
Regards,
Sridhar
‎2006 Aug 11 8:36 AM
Thanks guys! but i can't apply this in function modules in creating a record
‎2006 Aug 11 8:40 AM
Hai Bayog,
Could u elaborate in detail what exactly u need..
Regards,
Sridhar
‎2006 Aug 11 8:48 AM
Hi Sridhar!
I'm doing a bapi where in you will create an employee record. But when I input a name in the parameter it automatically converts the name into UPPERCASE. They want an output of whatever case they input it would reflect in the database.
‎2006 Aug 11 9:53 AM
Hi Bayog,
It is possible u can insert into data base table the way user enters in the input...
If the Domain referring the field of the database table has an option as Lower Case .. then only it allows the way user entered will be updated into database...
First check whether the databse table u r inserting has
<b>SE11</b> --> <b>enter table</b> --> <b>F7</b> --> now for field <b>double click</b> the DataElement --> and <b>Double click the Domain</b> --
and <b>check Lower case check box is sele</b>cted...
If this is selected then whatever is entered in Parameters will be inserted into data base ...
If the domain has Lower case check box selected then u can insert as user enters ( say SaMplE)
Now this works as i tested
Report XYZ.
tables Ztest_1.
PARAMETERS name1 type ZTEST_1-ename lower case.
entered SaMplE
ztest_1-ename = name1.
Insert ztest_1
try once by createin ZTest_1 with files ename and Dataelement and Domain as mentioned
ename refers Dataelement ZXYZ and Lowercase option selected for domain of DE
This definitely will solve u r problem...
if not u r welcome ....
Regards,
Sridhar
‎2006 Aug 11 10:39 AM
Thanks sridhar!
But can I use this in a function module? the name is in the import param.
‎2006 Aug 11 11:21 AM
Hi Bayog,
Yes u can use this in Function module also...
Try this ...which has successfully done according to u r req.
REPORT ZSDFSD .
tables Ztest_1.
PARAMETERS name1 type ZTEST_1-ename lower case.
entered SaMplE
CALL FUNCTION 'ZTEST125'
EXPORTING
NAME = name1
EXCEPTIONS
RECORDEXISTS = 1
OTHERS = 2
.
IF SY-SUBRC = 1.
write:/ 'The name already exists'.
ENDIF.
**in FM ZTEST125 source code is
tables ZTESt_1.
ztest_1-ename = NAME.
Insert ztest_1.
if sy-subrc <> 0.
RAISE recordexists.
endif.
Regards,
Sridhar
‎2006 Aug 11 11:34 AM
Thanks sridhar,
But in a function module, we declare parameter in the import tab where you specify the data type not in codes. And from there, it converts to UPPERCASE. How will I include lower case in the data declaration?
‎2006 Aug 11 11:37 AM
Thanks sridhar,
But in a function module, we declare parameter in the import tab where you specify the data type not in codes. And from there, it converts to UPPERCASE. How will I include lower case in the data declaration?
I can't use your code 'coz it is already declared in the import parameter.
PARAMETERS name1 type ZTEST_1-ename lower case.
‎2006 Aug 11 1:12 PM
Hai Bayog,
U can declare in the FM also ...
In se37 --> Import parameters --> parameter name --> name ,type type and asscociated type ZTEST_1-ENAME..
And if not solved pls. do elaborate more what actual u need from the program by calling FM...
Regards,
Sridhar
‎2006 Aug 14 9:55 AM
ei sridhar,
Actually I'm doing a FM wherein the import parameter: Name must be entered in LOWERCASE. But then once I hit F8 it conerts to UPPECASE. Is there a data element that I can put in the associated type that it doesn't convert the value into UPPERCASE and will append in the table in LOWERCASE?
‎2006 Aug 14 10:18 AM
Hi Mayog,
Eventhough we assigh to the domain lowercase option it doesnt work...so better option is to use translate statement within the FM..
Try this within the source code of FM...
tables ZTESt_1.
ztest_1-ename = NAME.
translate ztest_1-ename to lower case.
Insert ztest_1.
if sy-subrc <> 0.
RAISE recordexists.
endif.
Regards,
Sridhar
‎2006 Aug 14 10:50 AM
Im sorry.Not just a lowercase but I want to consider the mixed-case. Like in the Import parameter:
Name: Firstname Lastname.
but when I hit F8.
Name: FIRSTNAME LASTNAME.
‎2006 Aug 14 12:41 PM
Hi Bayog,
That is not possible..
Reason >> the FM internally converts the data entered into caps...
and one thing u will call the Function module from the Program (SE38-- so here pass the values as mentioned previously) and then only it works.according to ur req..and we will never execute the FM directly in Real time Scenarios(only in test cases)
But when u directly execute the FM in SE37 this doesnt work and will never work..
SO be clear Try calling the FM from the Program itself(always this is standard)... and as mentioned in earlier mail pass the parameters value or field referring to the DataElement...
Regards,
Sridhar
‎2006 Aug 14 10:07 AM
Hey,
Let`s say your fm updates a certain table ZNAMES and field NAME1 has to accept lower cases, then at the domain level check the check box lowercase. This will set the values to be updated in the database table without any conversion of Case as supplied by the FM.
Reward if helpful.
Regards