Reg : CONVERT_TO_LOCAL_CURRENCY  Fun Module

Hi All,
   I am passing the values date 31.01.2009
                             foreign currency GBP
                            local currency USD
                           Foreign amount 100
the remainig parametrs are default.
but I am not getting any result.
Please help mein this, I have searched the forumand tried withs everal combinations.
but no result came.
Any suggestions wil be helpful.
Regards
Abhilash.

Hello,
First the exchange rates should be maintained in the table TCURR. Please check this.
Also check the below sample.
DATA : L_NETWR TYPE VBAP-NETWR.
CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
     EXPORTING
          DATE             = SY-DATUM
          FOREIGN_AMOUNT   = '18'
          FOREIGN_CURRENCY = 'EUR'
          LOCAL_CURRENCY   = 'USD'
   TYPE_OF_RATE            = 'M'
     IMPORTING
          LOCAL_AMOUNT     = L_NETWR
     EXCEPTIONS
          NO_RATE_FOUND    = 1
          OVERFLOW         = 2
          NO_FACTORS_FOUND = 3
          NO_SPREAD_FOUND  = 4
          DERIVED_2_TIMES  = 5
          OTHERS           = 6.
WRITE: L_NETWR.
Cheers,
Vasanth

Similar Messages

  • Reg: Exception (ALT NOT FOUND) in the fun.module CS_BOM_EXPL_MAT_V2

    Hi Experts,
    I called the fun. module CS_BOM_EXPL_MAT_V2 in SE38.
    While executing the function module, it is giving output for some types of material like (TP0331-).
    But it is raising the exception ALT NOT FOUND for some types of material like 'TB1000-'
    But for all types of material, it is giving correct output in SE37.
    I gave the input parameter's,
    CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
    EXPORTING
       CAPID                       = 'PP01'
       DATUV                       = sy-datum
       EMENG                       = '1'
       MKTLS                       = 'X'
       MEHRS                       = 'X'
       MTNRV                       = 'TB1000-'
       STLAL                       = '1'
       STLAN                       = '1'
       SVWVO                       = 'X'
       WERKS                       = '0010'
       VRSVO                       = 'X'
      TABLES
        stb                         = it_stpox
    EXCEPTIONS
       ALT_NOT_FOUND               = 1
       CALL_INVALID                = 2
       MATERIAL_NOT_FOUND          = 3
       MISSING_AUTHORIZATION       = 4
       NO_BOM_FOUND                = 5
       NO_PLANT_DATA               = 6
       NO_SUITABLE_BOM_FOUND       = 7
       CONVERSION_ERROR            = 8
       OTHERS                      = 9
    Can you please suggest me, why for the particular types of material, these function module is executing correctly in SE37 not in SE38.
    Whether i need to give some more inputs in SE38.
    Please guide me,
    Thanks in advance,
    Vijay.R

    hi,
    i have done the code like this,
    CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
    EXPORTING
    CAPID = 'PP01'
    DATUV = sy-datum
    EMENG = '1'
    MKTLS = 'X'
    MEHRS = 'X'
    MTNRV = 'TB1000-'
    STLAL = '01'  """" i have changed the value as 01 instead of 1.
    STLAN = '1'
    SVWVO = 'X'
    WERKS = '0010'
    VRSVO = 'X'
    TABLES
    stb = it_stpox
    EXCEPTIONS
    ALT_NOT_FOUND = 1
    CALL_INVALID = 2
    MATERIAL_NOT_FOUND = 3
    MISSING_AUTHORIZATION = 4
    NO_BOM_FOUND = 5
    NO_PLANT_DATA = 6
    NO_SUITABLE_BOM_FOUND = 7
    CONVERSION_ERROR = 8
    OTHERS = 9
    it is a small problem..
    whether u need any more information..
    please let me know.. still it is not working means,
    paste your code.. i will check
    regards
    vijay

  • Fun module to change the ' sales area field(AUFSD) ' in BP transaction

    Hi all,
    this  is anil reg fun module to change BP.
    I need to change the value for a field AUFSD in BP transaction.
    Could anyone please list the function module that can be used?
    Regards,
    Anil.

    Dear Rhesa,
    I said you also have to add the division, distribution channle and the tupples (combination of div and dis. channel) under the particular sales org.
    T code: ppoma_crm
    Double click on your sales org...you can see 4 tabs are there...click on attribute tab....choose the relevant attribute maintainance scenario (sales/service/marketting)..then add the division, distribution channle and the tupples (combination of div and dis. channel)..save it...
    If still you face the problem, please send me the screen print at [email protected]..
    Thanks,
    Atin

  • Heading  during downloading into local file using GUI_DOWNLOAD fun.module

    Hi Guru's
    we have a requirement that we want the plant description as a heading (first line of the file) in the local file. iam using "GUI_DOWNLOAD" function module for downloading data for which iam passing the charecter type internal table. before downloading iam passing all the filed headings to that table and then appending the internal table data into it. now iam getting data properly with field headings . but before that heading i want one more description for a plant field which iam using in my selection screen
    in the fun.module "GUI_DOWNLAOD"
    we have HEADER file but it is of XSTRING type so it is taking only 2 char.
    so how to use this . Plz help me.
    thanks well in advance.
    UR's
    GSANA

    Hi,
    Please check the below link,
    header in 'gui_download'
    Also check Manoj kumar's reply in the link,
    header information to gui_download
    Hope this helps.
    Best Regards.

  • SAP beginner !! steps to create a fun module which accept int table

    steps to create a fun module
    1. which accept internal  table and a flag value
    2. based on flag value it calls screen.
    3. if flag value is ' D' it displays the internal table in Table Control in Display Mode
    4. if flag value is ' E' it edits the table control also the internal table,
        it can also append a new row in table control or delete it.
    5. the function module should then send the output the internal table which has changed.
    plz if any one can provide solution to this do it for me
    thnk u

    Hi Shailesh,
        U just create 2 table control (one in Display Mode & the another in Change Mode ).While sending the Internal Table values, u send the values to the corresponding Table Control based on the Flag Value.

  • SAPGUI_PROGRESS_INDICATOR what is use of this fun module when sending data

    dear ,
    what is use of
    SAPGUI_PROGRESS_INDICATOR  fun module when sending data to FTP SERVER . POINTS MUST BE GIVEN

    Dear ,
    when i am trying to send data in internal table of type charterter declared below(i.e iresult) to FTP SERVER program giving the DATA ERROR = 3 when 'FTP_R3_TO_SERVER' fuction module is exected and file it not creating in ftp server . plz help me pointS must be given .
    the FTP_CONNECT ,FTP_COMMAND function modules are executing properly giving handle 1 and its sy-subrc = 0 .
    when 'FTP_R3_TO_SERVER' is executed it is giving SY-SUBRC = 3 ( DATA ERROR ) i.e it is failing to out internal table data in FTP SERVER . PLZ HIDE ME ITS URGENT .
    THIS IS CODE I USED .
    DATA : BEGIN OF iresult OCCURS 5,
    rec(450),
    END OF iresult,
    DATA :
    dest LIKE rfcdes-rfcdest VALUE 'SAPFTP',
    compress TYPE c VALUE 'N',
    host(64) TYPE c.
    DATA: hdl TYPE i.
    DATA: BEGIN OF result OCCURS 0,
    line(100) TYPE c,
    END OF result.
    DATA : key TYPE i VALUE 26101957,
    dstlen TYPE i,
    blob_length TYPE i.
    host = p_host .
    DESCRIBE FIELD p_password LENGTH dstlen IN CHARACTER MODE.
    CALL 'AB_RFC_X_SCRAMBLE_STRING'
    ID 'SOURCE' FIELD p_password ID 'KEY' FIELD key
    ID 'SCR' FIELD 'X' ID 'DESTINATION' FIELD p_password
    ID 'DSTLEN' FIELD dstlen.
    CALL FUNCTION 'FTP_CONNECT'
    EXPORTING
    user = p_user
    password = p_password
    host = host
    rfc_destination = dest
    IMPORTING
    handle = hdl
    EXCEPTIONS
    not_connected = 1
    OTHERS = 2.
    IF sy-subrc = 0.
    CONCATENATE 'cd' ftppath INTO ftppath SEPARATED BY space .
    CALL FUNCTION 'FTP_COMMAND'
    EXPORTING
    handle = hdl
    command = ftppath
    TABLES
    data = result
    EXCEPTIONS
    command_error = 1
    tcpip_error = 2.
    IF sy-subrc = 0 .
    CLEAR result .
    REFRESH result .
    CALL FUNCTION 'FTP_COMMAND'
    EXPORTING
    handle = hdl
    command = 'ascii'
    TABLES
    data = result
    EXCEPTIONS
    command_error = 1
    tcpip_error = 2.
    IF sy-subrc = 0 .
    DESCRIBE TABLE iresult LINES lines.
    blob_length = lines * width .
    clear : lines.
    Delete the existing file
    CONCATENATE 'del' ftpfile INTO delfile SEPARATED BY SPACE.
    CALL FUNCTION 'FTP_COMMAND'
    EXPORTING
    handle = hdl
    command = delfile
    TABLES
    data = result
    EXCEPTIONS
    command_error = 1
    tcpip_error = 2.
    *End of deleting the existing file
    CALL FUNCTION 'FTP_R3_TO_SERVER'
    EXPORTING
    handle = hdl
    fname = ftpfile
    blob_length = blob_length
    TABLES
    blob = iresult
    EXCEPTIONS
    TCPIP_ERROR = 1
    COMMAND_ERROR = 2
    DATA_ERROR = 3
    OTHERS = 4.
    IF sy-subrc 0 .
    WRITE 'Error in writing file to ftp' .
    ELSE.
    WRITE 'File downloaded on the ftp server successfully'.
    ENDIF.
    ENDIF.
    ELSE.
    WRITE : 'Path on ftp not found : ' , ftppath .
    ENDIF.
    CALL FUNCTION 'FTP_DISCONNECT'
    EXPORTING
    handle = hdl.
    CALL FUNCTION 'RFC_CONNECTION_CLOSE'
    EXPORTING
    destination = 'SAPFTP'
    EXCEPTIONS
    OTHERS = 1.
    ELSE.
    WRITE 'Could not connect to ftp' .
    ENDIF.
    ENDFORM. " FTPFINANCEACCESS_DOWNLOAD
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
    IF screen-name = 'PASSWORD'.
    screen-invisible = '1'.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.

  • A sample prg for fun module Z_GET_N_APPROVER

    hi,
    i need a sample prog for the fun module GET_N_APPROVER.

    Is it a standard one? the same suggests that its a custom built one? if you need help with this you may have to post the code of this FM
    Regards
    Raja

  • To get fun module for Creating prebooking

    Hi friends,
        Here is my query,
    My requirement is a person will prebook the employees for the events from portal
      & i need to provide the RFC for that.
      I got 2 fun modules for creating prebookings
    1) RH_PARTICIPATION_PREBOOK
    2) HRIQ_PARTICIPATION_PREBOOK
      but these fun modules POPS UP a window after providing the i/p's to it to select the button of prebooking.......
    But these is not possible as the SAP screen can't be popped up in portal....
      So how do i proceed with this problem??

    Hi,
    See the source code of FMs. Inside somewhre it must be calling other FM which collects actual data. Use that FM.
    Reward if useful!

  • Reg  Fun Modules in 4.6C?

    Hi All,
              I am working in a support project with 4.6C version.
    In some programs I have encountered the following function modules.
    CONTROL_FLUSH and CLPB_IMPORT.
    Could any body tell me the importance of these function modules?
    In which scenario we will use these?
    Thanks in advance.
    Regards
    Abhilash.

    found myself.

  • Reg. Generic delta using fun module

    Hello Experts,
    I am creating function module for generic delta (both Full, Delta) using RSAX_BIW_GET DATASIMPLE. My generic field is AEDAT.
    When I check this function module, there is no logic to maintain Delta load excapt Full. Where as this Delta functionality is available in another function module RSAX_BIW_GET_DATA. Now my question is:
    Can we use RSAX_BIW_GET DATASIMPLE for Delta load also?
    If yes, How to maintain delta based on AEDAT field?
    Do we need to maintain this Delta specific field AEDAT in Extract structure?
    Can anybody please clarify my doubts.....
    Thanks in advance,
    Zak.

    Hi,
    Please check the blog:
    /people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
    Also check :
    Re: Delta update - rso2
    -Vikram

  • Reg Plant Maintenance Module

    There is a smartform developed for my client instead of SAPSCRIPT for program RIPCT00(i.e TCODE - IW32).  In smartform client wants to have 2 fields.
    1 - How many Maintenance order created of the eqiupment
    2 - Last Maintenance order of selected equipment.
    But for both fileds they have mentioned as Max of AFIH-AUFNR.
    Experts can you please suggest me what will be the solution.
    Ex: if there are 2 records with AUFNR as 21 and 22.
    My guess is for 1 is by calculating no of records in AFIH. i.e 21 and 22 so value is 2.
    My guess is for  2 should i take 21 or 22 as Last maintenance order.
    Is my guess is in right direction because i am new to PM module. Please give me your valuable suggestions.

    Hi,
    1 - How many Maintenance order created of the eqiupment
    general logic will be to count the total number of AUFNR in the table
    2. Last maint order of selec equipment.
    This you have to check on the below logics
    Based on Created date.
    Based on Order start date.
    based on Order number.
    So for this you need to discuss with the business owner and document them in the FS correctly.
    Reg
    dsk

  • How to print the texts retrived by using READ_TEXT fun module in Smartform

    Please tell me how to print the text which is rertrived by using the READ_TEXT function module in smartform.
    I have coded all things in the program lines and in that i am retriveing the long texts.
    I am getting the text lines in my internal table clearly, the thing is that I am not able to pass these lines to the text.
    I have to print the trouble ticket. in that the notes log I have to pass.
    its urgent. Points will be rewarded for any type of clue. whether it will work or not.

    There are a few ways to do it. If you need to take all of the text in the text type, in your SF text element choose "Include Text".
    Populate the fields with the data that corresponds to the text type. It is similar to the interface to the FM "Read_Text.
    Text Name
    Text Obje
    Text ID 
    Language
    Encase any variables with the "&" symbol.
    If you have already coded the call to the FM "READ_TEXT" and loaded the text into an internal table, create a loop and loop through the itab. Inside of the loop create a text element and add a variable in the text element for the field you are looking to output.

  • How to print text rertrived by using the READ_TEXT fun module in smartform

    Please tell me how to print the text which is rertrived by using the READ_TEXT function module in smartform.
    I have coded all things in the program lines and in that i am retriveing the long texts.
    I am getting the text lines in my internal table clearly, the thing is that I am not able to pass these lines to the text module.
    its urgent. Points will be rewarded for any type of clue. whether it will work or not.

    loop the table into which u have retrieved the text .
    in the form interface of the smartform ... in importing parameter give the that table name .
    and in smartform whereever u want to print there insert the data into work area and pass to fields for dispaly .
    decalre ur work area in global defintions
    thnaks .

  • Selection of Folder/File name using the same Fun.Module

    Please let me know if there is a function module which can fetch folder name/File name  from the directory path when f4 option of selection screen field is selected. Currently I am able to get the file name using FM F4_DXFILENAME_4_DYNP but the requirment is like I have to select either folder name or the file name depending on user selection.
    Note: Please let me know if there is a single Function module which can get folder name or the file name based on the user selection.i.e, if the user want to select a folder he can select or he can select files in the folder for processing

    Hi sridhar
    try this:
    PARAMETER : TXT_FILE(100).
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR TXT_FILE.
    PERFORM GETFILE.
    start-of-selection.
    PERFORM GETDATA.
    FORM GETDATA.
      DATA : FILENAME TYPE STRING.
      FILENAME = TXT_FILE.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          FILENAME                      = FILENAME
         FILETYPE                       =  'ASC'
         HAS_FIELD_SEPARATOR           = 'X'
        HEADER_LENGTH                 = 0
        READ_BY_LINE                  = 'X'
        DAT_MODE                      = ' '
        CODEPAGE                      = ' '
        IGNORE_CERR                   = ABAP_TRUE
        REPLACEMENT                   = '#'
        CHECK_BOM                     = ' '
      IMPORTING
        FILELENGTH                    =
        HEADER                        =
        TABLES
          DATA_TAB                      = IT_UPLOAD
      EXCEPTIONS
        FILE_OPEN_ERROR               = 1
        FILE_READ_ERROR               = 2
        NO_BATCH                      = 3
        GUI_REFUSE_FILETRANSFER       = 4
        INVALID_TYPE                  = 5
        NO_AUTHORITY                  = 6
        UNKNOWN_ERROR                 = 7
        BAD_DATA_FORMAT               = 8
        HEADER_NOT_ALLOWED            = 9
        SEPARATOR_NOT_ALLOWED         = 10
        HEADER_TOO_LONG               = 11
        UNKNOWN_DP_ERROR              = 12
        ACCESS_DENIED                 = 13
        DP_OUT_OF_MEMORY              = 14
        DISK_FULL                     = 15
        DP_TIMEOUT                    = 16
        OTHERS                        = 17
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.
    FORM GETFILE.
      CALL FUNCTION 'WS_FILENAME_GET'
       EXPORTING
        DEF_FILENAME           = ' '
         DEF_PATH               = '.'
        MASK                   = ' '
        MODE                   = ' '
        TITLE                  = ' '
       IMPORTING
         FILENAME               = TXT_FILE
        RC                     =
      EXCEPTIONS
        INV_WINSYS             = 1
        NO_BATCH               = 2
        SELECTION_CANCEL       = 3
        SELECTION_ERROR        = 4
        OTHERS                 = 5
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.
    <b>This is a part of my BDC program its working for me u try n reply if it works for u.</b>
    regards
    vijay

  • Reg Sender AS2 module configuration for text file

    Hi Experts,
    I am working on an inbound scenario where Sender is AS2 and Receiver is SAP system in PI7.4. The Sender Trading Partner is Sending a text file which should be converted to xml. I have added the module parameter localjbs/PlainConverterModule .It is throwing the error as per the attached file.
    Could anyone please guide me on this issue. Also Please let me know whether any configuration needs to be set in EDI content Manager.
    Cheers,
    Neethu

    Hi Neethu,
    according to the b2b help the module is used to convert EDIFACT message standards into XML. I your case you have flat file comming from AS2. you can use message transform bean to convert flat file to XML in sender as2 adapter. Or you need to define ED XML converter. Please refer the below link
    SAP PI: Using the B2BADDON EDI<>XML Convertor Modules - Basics
    You configure the communication channels of any Process Integration adapter with the PLAIN-XML converter module to convert business documents encoded in EDIFACT message standards into XML and the other way round. It must be configured in the sender and receiver channels based on the business scenario. The PLAIN-XML converter module runs on the SAP NetWeaver Process Integration Adapter framework.
    You use this procedure to configure the parameters of the PLAIN-XML converter module.
    source - Configuring the PLAIN-XML Converter Module - SAP NetWeaver Process Integration, business-to-business add-on 1 - SAP Libr…
    regards,
    Harish

Maybe you are looking for

  • XI_J2EE_ADAPTER_FILE

    When I do a File to File Scenario, I am getting the following error. <b>Error Category XI_J2EE_ADAPTER_FILE Error Code PROCESSING_ERROR</b> <b>2007-03-26 15:34:15 Error Attempt to process file failed with java.io.IOException: Permission denied 2007-0

  • Production Order Error: "Unable to cast COM object of type 'System.__ComObj

    Hi all, I have the following code: Dim oProdOrders As SAPbobsCOM.Documents oProdOrders = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oProductionOrders) after the second line I get a system exception: {"Unable to cast COM object of type 'Syste

  • Video converter won't conv

    The video converter I got with my Zen V Plus will not convert the .avi file I want to convert. I have tried converting it into .divx and then converting it and also using another converting technique but none seem to work. Any help out there?

  • Photoshop CS SDK Extension crashing Photoshop Windows CS6

    Photoshop Windows CS6 is crashing when using our Photoshop CS SDK extension, but not Mac and not CS5 or CS5.5. Anyone seen similar problems with Photoshop CS6 Windows? - Mark

  • I need help In my project

    Hi Iam computer engineering student, Iam working on design course The idea of my project is to use both speech to text and text to speech code to help deaf people to communicate with others using a telephone. Can u tell me if I can use java code for