Application Development 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: 

table maintain with amount

rt50896
Participant
0 Kudos
238

Dear all,

when table maintain with amount,i have a situation that amt may need to convert by currency which decimal place is 0. ex. JPY 100 --> 1.00 save into table.

but i don't want to add field <b>local currency</b> in table maintain because this field may be input wrong with company code define. How can i create a table maintain that no local currency field and amt also convert for internal format?

Tks!

Regina

1 ACCEPTED SOLUTION

Former Member
0 Kudos
54

Hi,

you need to write the code in the Table maintanence Generator Events, in the evetns you can write the code,

Look at the link

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8129f164-0a01-0010-2a8e-87652872...

Regards

Sudheer

2 REPLIES 2

Former Member
0 Kudos
55

Hi,

you need to write the code in the Table maintanence Generator Events, in the evetns you can write the code,

Look at the link

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8129f164-0a01-0010-2a8e-87652872...

Regards

Sudheer

rt50896
Participant
0 Kudos
54

Tks for reply soon,I try to use this way but not ok --

1. create table(ZTAB) with no local currency field

2. table maintenance generate

3. add event(01,05,08,18) and add subroutine for amt convert to internal format

when i convert the amt by local currency which get from company code,table maintain by SM30 also see the internal format,this will make confusing...

ex. company code A000(ZTAB-BUKRS) --> local currency is JPY(decimal place is 0),enter amt 100,through <b>convert subroutine</b> change amt to 1.00(ZTAB-AMT)...is there other way to solve this problem?

<b>convert subroutine</b> code as follow:


FORM CONVERT_AMT.
SELECT SINGLE WAERS INTO T001-WAERS FROM T001 WHERE BUKRS = ZTAB-BUKRS.
CALL FUNCTION 'CURRENCY_AMOUNT_IDOC_TO_SAP'
   IMPORTING
       CURRENCY = T001-WAERS
       IDOC_AMOUNT = ZTAB-AMT
   EXPORTING
       SAP_AMOUNT = ZTAB-AMT.

ENDFORM