cancel
Showing results for 
Search instead for 
Did you mean: 

SapScript Invoice changes need in input (ABAP)

Former Member
0 Kudos

Hi All.      I SapScript Invoice I have to do one change,there is one remark which is fill by the user, I have given this remark in parameters like    Parameters: remark1 Type c,                       remark2 Type c. When this Remark is fill by User byfefault is taking ALL INPUT IN CAPITAL LETTERS.But User want only first letter should be Capital letter and rest in small. The text User has to fill is written here in original Invoice. "INVOICE DONE AS PER NEW MINUTES DATED 16/1/2013. THE ABOVE OUTSTANDING IS AGAINST MOU DATED 16/1/2013 ONLY.PREVIOUS OUTSTANDING AGAINST PREVIOUS AGREEMENT SHOULD BE PAID SEPARATELY."  User want in this way----or what ever way he fill the remark.. " Invoice done as per new minutes dated 16/1/2013. The above outstanding is against MOU dated 16/1/2013 only. Previous outstanding against previous agreement should be paid separately".  Which ever way user want to fill it has to fill,but by default is taking CAPITAL only. pls suggest me how to do.   I have use this code but its not working.. DATA: v_remarks1(95) type c,       v_remarks2(95) type c.  check not v_remarks1 is initial. Translate v_remarks1 to lower case.    Regards Sankil

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Sankil,

You can achieve your requirement. Try using below code .....

parameters : w_str(255). " type string.

while w_str+0(1) is initial.
  

     shift w_str by 1 places.

endwhile.

translate w_str to lower case.

translate w_str+0(1) to uppler case.

" w_str Pass the output to the script. Please reward points if this helps and revert in case of issues.

Thanks

Vivek


  

Former Member
0 Kudos

I have done the same but its taking all the input in small only. But I want whatever the way user going to input same way it has to take.  just like first letter should be capital and rest letter is small in the word.  EXample: ORIGINAL: INDIA HAS SEVERAL STATES. getting thru your code: india has several states. What I want: India has several states.

Former Member
0 Kudos

Here mou come in small case but i need in UPPER CAse. my mean what ever the way user will fill its has to display.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello,

Your requirement is user based. Here is what you can do

Along with the text box where suer is entering the text provide a check box which says "Keep text as it is". When this is selected, just transfer the text as it is. Other wise use the FM to convert it to proper case. Give a try for FM "STRING_UPPER_LOWER_CASE".

Let me know if this helps.

best regards,

swanand

Former Member
0 Kudos

hi  I have tried this i need after every fullstop(.),first letter should be capital.

Former Member
0 Kudos

Hi Mr Lakka,       can you plz give detail desc regarding check box, what you have written   Regards Sankil

Abhijit74
Active Contributor
0 Kudos

Hello,

Please go through http://http://scn.sap.com/thread/26451 if you want as title text.

Thanks,

Abhijit

Former Member
0 Kudos

Its done now  thank you all for response

Abhijit74
Active Contributor
0 Kudos

Hello,

It will be better to call the external subroutine from your sap script.

*Call to Subroutine:*Perform <subroutine> [(<program>)] [TABLES <actual table list>]

                                                                                 [USING <actual input list>]

                                                                                 [CHANGING <actual output list>]

Subroutine Code: Form <subroutine> [TABLES <formal table list>]

                                        [USING <formal input list>]

                                        [CHANGING <formal output list>]

Inside the perform call ISM_CONVERT_TO_LOWER_CASE function module to convert your text from upper case to lower case.

Hope this will help.

Thanks,

Abhijit