‎2007 Sep 12 10:37 AM
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
‎2007 Sep 12 1:27 PM
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
Regards
Sudheer
‎2007 Sep 12 1:27 PM
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
Regards
Sudheer
‎2007 Sep 13 2:33 AM
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