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

HRGPBS_HER_FORMAT_AMOUNT

Former Member
0 Likes
618

Hi,

Please give some code or example on usage of Function Module HRGPBS_HER_FORMAT_AMOUNT.

Hi,

Please give some code or example on usage of Function Module HRGPBS_HER_FORMAT_AMOUNT.

3 REPLIES 3
Read only

Former Member
0 Likes
566

Reward points..

Read only

0 Likes
566

this is the thread from where i got this function module...

but i'm not able to use this function module.. to convert numeric string into desired Decimal notation...

so please tell me how to use HRGPBS_HER_FORMAT_AMOUNT.. if possible.. with example...

Read only

Former Member
0 Likes
566

Hi

USE THIS CODE: IT TAKES CARE OF DECIMAL NOTATION BASED ON USER PROFILE.

WHAT EVER MAY BE THE USER PROFILE FOR DECIMAL NOTATION.

FIELD_NUM = 1,233.50

OR

FIELD_NUM = 1.233,50

OR

FIELD_NUM = 1 233,50

***************************************

SELECT SINGLE DCPFM FROM USR01

INTO VAR_DCPFM WHERE BNAME EQ SY-UNAME.

IF VAR_DCPFM EQ 'X'.

REPLACE ALL OCCURRENCES OF ',' IN: FIELD_NUM WITH ''.

  • TRANSLATE FIELD_NUM USING ','.

ELSEIF VAR_DCPFM EQ ''.

REPLACE ALL OCCURRENCES OF '.' IN: FIELD_NUM WITH ''.

  • TRANSLATE FIELD_NUM USING '.'.

TRANSLATE FIELD_NUM USING ',.'.

ELSEIF VAR_DCPFM EQ 'Y'.

TRANSLATE FIELD_NUM USING ',.'.

ENDIF.

***************************************

THIS CODE WILL WILL RESULT INTO :

FIELD_NUM = 1233.50

<b>Reward if usefull</b>