2007 Jan 22 7:02 AM
Hi All,
I need the function module to convert the currency to USD and the mandatory fields to be passed to the function module.
Thanks & Regards
Suresh
Hi All,
I need the function module to convert the currency to USD and the mandatory fields to be passed to the function module.
Thanks & Regards
Suresh
2007 Jan 22 7:04 AM
hi,
try:
CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
EXPORTING
CLIENT = 001
date = sy-datum
foreign_currency = wa-waers
local_currency = tcurr-fcurr
foreign_amount = wa-dmbtr
RATE = 0
type_of_rate = 'M'
READ_TCURR = 'X'
IMPORTING
exchange_rate = tcurr-ukurs
FOREIGN_FACTOR =
local_amount = wa-total
LOCAL_FACTOR =
EXCHANGE_RATEX =
FIXED_RATE =
DERIVED_RATE_TYPE =
EXCEPTIONS
no_rate_found = 1
overflow = 2
no_factors_found = 3
no_spread_found = 4
derived_2_times = 5
OTHERS = 6
.
2007 Jan 22 7:24 AM
Use FM 'CONVERT_TO_LOCAL_CURRENCY'
but for the the currency conversion rate (Exchnge rate must be maintained in the table TCurr for the currencies)
amit
2007 Jan 22 7:47 AM
CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
EXPORTING
* CLIENT = 001
DATE = sy-datum
FOREIGN_CURRENCY = wa-WAERS
LOCAL_CURRENCY = TCURR-FCURR
FOREIGN_AMOUNT = wa-DM_TOT
* RATE = tcurr-ukurs
TYPE_OF_RATE = 'M'
* READ_TCURR = 'X'
IMPORTING
EXCHANGE_RATE = tcurr-UKURS
* FOREIGN_FACTOR =
LOCAL_AMOUNT = wa-TOTAL
* LOCAL_FACTOR =
* EXCHANGE_RATEX =
* FIXED_RATE =
* DERIVED_RATE_TYPE =
* EXCEPTIONS
* NO_RATE_FOUND = 1
* OVERFLOW = 2
* NO_FACTORS_FOUND = 3
* NO_SPREAD_FOUND = 4
* DERIVED_2_TIMES = 5
* OTHERS = 6
2007 Jul 13 4:17 PM
hi,
Working With LSMW:
Use TCODE LSMW
Objects of LSMW:
Project ID with max of 10 char to Name the data transfer project.
Subproject Used as further structuring attribute.
Object ID with max of 10 Characters, to name the Business object .
Project can have multiple sub projects and subprojects can have multiple objects.
Project documentation displays any documentation maintained for individual pop ups and processing steps
User Guide: Clicking on Enter leads to interactive user guide which displays the Project name, sub project name and object to be created.
Object type and import techniques:
Standard Batch / Direct input.
Batch Input Recording
o If no standard programs available
o To reduce number of target fields.
o Only for fixed screen sequence.
BAPI
IDOC
o Settings and preparations needed for each project
Preparations for IDOC inbound processing:
Choose settings -> IDOC inbound processing in LSMW
Set up File port for file transfer, create port using WE21.
Additionally set up RFC port for submitting data packages directly to function module IDoc_Inbound_Asynchronous, without creating a file during data conversion.
Setup partner type (SAP recommended US) using WE44.
Maintain partner number using WE20.
Activate IDOC inbound processing.
Verify workflow customizing.
Steps in creating LSMW Project:
1) Maintain attributes choose the import method.
2)Maintain source structure/s with or without hierarchical relations. (Header, Detail)
3) Maintain source fields for the source structures. Possible field types C,N,X, date, amount and packed filed with decimal places.
Fields can be maintained individually or in table form or copy from other sources using upload from a text file
4) Maintain relationship between source and target structures.
5) Maintain Field mapping and conversion rules
For each Target field the following information is displayed:
o Field description
o Assigned source fields (if any)
o Rule type (fixed value, translation etc.)
o Coding.
o Some fields are preset by the system & are marked with Default setting.
6) Maintain Fixed values, translations, user defined routines Here reusable rules can be processed like assigning fixed values, translation definition etc.
6) Specify Files
o Legacy data location on PC / application server
o File for read data ( extension .lsm.read)
o File for converted data (extension .lsm.conv)
7) Assign Files to defined source structures
😎 Read data Can process all the data or part of data by specifying from / to transaction numbers.
9) Display read data To verify the input data being read
10) Convert Data Data conversion happens here, if data conversion program is not up to date, it gets regenerated automatically.
11) Display converted data To verify the converted data
Import Data Based on the object type selected
Standard Batch input or Recording
o Generate Batch input session
o Run Batch input session
Standard Direct input session
o Direct input program or direct input transaction is called
BAPI / IDOC Technique:
IDOC creation
o Information packages from the converted data are stored on R/3 Database.
o system assigns a number to every IDOC.
o The file of converted data is deleted.
IDOC processing
o IDOCS created are posted to the corresponding application program.
o Application program checks data and posts in the application database.
Finally Transport LSMW Projects:
R/3 Transport system
o Extras ->Create change request
o Change request can be exported/imported using CTS
Export Project
o Select / Deselect part / entire project & export to another R/3 system
Import Project
o Exported mapping / rules can be imported through PC file
o Existing Project data gets overwritten
o Prevent overwriting by using
Import under different name
for more information follow this link.
http://help.sap.com/saphelp_nw04s/helpdata/en/87/f3ae74e68111d1b3ff006094b944c8/content.htm
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |