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

ABAP HELP!!!!?

Former Member
0 Likes
846

Dear All,

I have a couple of issues:

1) Can we use any FM to convert Character from lower Case to UPPER case

Please share the names of those Function module ex: Golden = GOLDEN

2) I have a code (IF statement) which is not working can you Please tell me WHY

Do I need to use ( ).

if sy-subrc = 0 and it_summ-spmon <> sy-datum+0(6) .

it_summ-begin_inv = it_summ_new-enroute_inv + it_summ_new-whse_en_inv.

endif.

Please HELP!!!!

7 REPLIES 7
Read only

Former Member
0 Likes
818

Hi

1) Can we use any FM to convert Character from lower Case to UPPER case

Please share the names of those Function module ex: Golden = GOLDEN

TRANSLATE <string> TO UPPER CASE.

Max

Message was edited by:

max bianchi

Read only

Manohar2u
Active Contributor
0 Likes
818

1. AIPC_CONVERT_TO_UPPERCASE

2. move to local variable and compare

Read only

Former Member
0 Likes
818

hi,

1) use the FM SWA_STRING_TO_UPPERCASE.

regards,

priya.

Read only

Former Member
0 Likes
818

Hi,

1. No need FM. You can use translate statement.

TRANSLATE <fieldname> to UPPERCASE.

2. You can not compare SPMON with SY-DATUM0(6) if SPMON4(2) is week/accounting period instead of month.

Regards,

Ferry Lianto

Read only

Former Member
0 Likes
818

1) Can we use any FM to convert Character from lower Case to UPPER case

Please share the names of those Function module ex: Golden = GOLDEN

<b>

Use TRANSLATE command to convert case.</b>

2) I have a code (IF statement) which is not working can you Please tell me WHY

Do I need to use ( ).

Try this:

<b>if sy-subrc EQ 0.

if it_summ-spmon NE sy-datum+0(6) .

</b> it_summ-begin_inv = it_summ_new-enroute_inv + it_summ_new-whse_en_inv.

endif.

Thanks,

Santosh

Read only

Former Member
0 Likes
818

Hi

Check the field it_summ-spmon perhaps it's long 7 char,

SY-DATUM(6) = '200702'

IT_SUMM-SPMON = '2007002'.

They are the same meaning but different value.

Max

Read only

Former Member
0 Likes
818

Thanks for everyone who took time to answer my question...