Function module RFC_READ_RABLE and currency fields

I am using RFC_READ_TABLE to access table BSEG on a remote system.  My problem is retrieving field PSWBT which is a currency field.  The value is returned as 20202020203.43 and overwrites part of the next field too.  The value should be 4,083.33
Does anyone have any experence with currency fields in this situation and can offer any advice?
Thanks & regards.

Hi everyone,
Thank you for your help.  I have now resolved the issue.
Yes I was using table FIELDS.  Wim was correct that I also needed to use field PSWSL but this alone did not solve the problem.  I had to define the currency field PSWBT as char 13.  When the field was retrieved using RFC_READ_TABLE, I condensed the field and then moved it back to a currency field.  As follows:
TYPES  : BEGIN OF ty_accdoc,
          pswbt(13),
          pswsl           type pswsl,
        END OF ty_accdoc.
DATA   : wa_accdoc         TYPE ty_accdoc,
         i_accdoc         TYPE TABLE OF ty_accdoc.
DATA   : wa-pswbt          TYPE pswbt.
wa_fields-fieldname = 'PSWBT'. APPEND wa_fields TO i_fields.
wa_fields-fieldname = 'PSWSL'. APPEND wa_fields TO i_fields.
u2026u2026u2026 Call function u2018RFC_READ_TABLEu2019u2026u2026u2026u2026
CONDENSE wa_accdoc-pswbt NO-GAPS.
wa-pswbt = wa_accdoc2-pswbt.
Kind regards,
Alison

Similar Messages

  • BAPI function module name and mandatory fields

    Give the name of BAPI function module for pricing change into the transaction VA05 ?
    What are the mandatory fields ?
    Please give a exemple code to do this.

    Hi,
    VA05 is for list of sales order. But if you want to change pricing of material stocks go for follwoing fn module.
    BAPI_SALESORDSTCK_PRICE_CHANGE
    If you want other BAPI for sales related, just go to SE37, give BAPISALE and press F4, you will get all the BAPI fn modules.
    Rewards points if helpful.
    Regards,
    CS.

  • What is the Function MOdule that returns the fields in database table order

    Hello Folks
      I have a dynamic internal table with fields ( which are not in order). I want to display them in the order of which they are present in the database table? Is there any function module that returns the fields in database order?
    FAQ. Please search before posting your question.
    Edited by: Suhas Saha on Oct 10, 2011 10:19 PM

    Hi,
    You can use this BAPI.
    <b>BAPI_SALESORDER_GETLIST</b>
    Reward if useful.
    Regards,
    Vimal

  • MS Word Web Service Interface: bad format of date and currency fields

    Hi,
    I am using MS Word Web Service interface to create contract documents. However, my date and currency fields show in a strange format. Date is in"YYYY-MM-DD" format, while currencies always have "." as decimal separator (probably technical values). My user settings are "DD.MM.YYYY" for dates and "n.nnn,dd" for decimal numbers.
    My workaround is to create a Z structure for WS interface with char fields and then do conversion through CRM_WST_RT_BADI->OUTBOUND_PROCESSING method. This works, but requires a lot of custom development.
    Is there a way to "tell" the interface to use correct formats in MS Word without doing it all manually through custom fields?
    Thanks!
    KR,
    Igor

    Oh, indeed!
    We might be closer than you think - I live close to Croatian-Slovenian border so we might pop out for a drink! But we can discuss this out of forum... 
    Now work again:
    Is there any documentation on possible formatting keywords? I suppose it's possible to set up decimal places, custom date formats etc.
    Cheers,
    Igor

  • Function Module, Group and Method

    Hello All,
    I have a problem which I do not know why it's happening. I have an Interface method which calls a Function Module. This interface method does not have any syntax errors.
    In the Function Module itself there is field which is definied in the FUNCTION TOP INCLUDE. So It should be visible during the call of the FM. But when executing the method it dumps on the field that is in the FUNCTION TOP INCLUDE. Can someone explain why it's happening?
    Best regards,
    Guido Koopmann

    Guys,
    Everything was active, the strange thing is that when I cal the FM in an normale executable program, everything is ok.
    I do not get this.
    Hope someone can help me out.
    Best regards,
    Guido Koopmann

  • How to delete zeros in layout for quantity and currency fields

    Hi All
    Iam getting zeros in place of quantity and currency field records, which i doesnt require in layout SAP-Script.
    Please let me know if any one has an idea.
    Regards
    Bhaskar

    Hi,
    Add NO-ZEROES statement to it.
    or
    U can use CONDENSE statement.
    Cheers,
    SImha.

  • Attach function module to a table field

    Hi guys,
            I need to add a function module to a table field as a F4 help.
    The function module i like to attach is K_GROUP_SELECT.
    Like it works in the transaction KS13
    Function module-->   ‘K_GROUP_SELECT’
    Please reply urgent will be rewarded with full points.

    Use the TCode SE11  & create a <b>search help</b> for the Table field in question.
    ~Suresh

  • Function modules Exit and Init

    Hi Friends,
    What is the purpose of function modules init and exit in the "Exit" functions.
    why two function modules are using in the Exit functions?
    Please give me relevant secanarios?
    will assign the points.
    Thanks
    BPS

    <b>FM Initialization</b>:
    A function module to initialize the planning function. This function module is optional. It is only required if new transaction data records are to be generated in the planning function that are different, in terms of the combinations of values, to characteristics in the previous transaction data that are not to be changed. The keys for these new transaction data records are delivered by the function module in the table ETO_CHAS. The keys are supplemented by the keys of the transaction data that already exist. The data objects for which the planning function is called up are formed from these keys. They also influence how often and with which combinations of transaction data the second function module is called up.
    <b>Function Module:</b>
    A function module that is called up several times and that changes transaction data records. This function module receives a package of transaction data records in each case. These differ only in their characteristics to be changed. They have the same values as far as all other characteristics are concerned. The transaction data is in table XTH_DATA. Only the existing records are transferred. If key combinations were returned by the initialization function module, and no transaction data exists for these, then table XTH_DATA is empty. The key combination is in the table ITO_CHASEL.
    Its not necessary to write a init FM unless you need to generate new records by the exit function.
    regards,
    sanjay.

  • Function modules INIT and EXEC

    Hi ,
    Can anybody provide me the purpose of two function modules INIT and EXEC?
    How it works?
    Thanks
    sg

    thanks for ur reply Ravi.
    but what is the using two function modules.
    Please provide me some inputs on FM like UPR_COST_PLAN_EXEC and UPR_COST_PLAN_INIT.
    whey we use two FM's in the cost cneter retraction.
    thanks
    sg

  • Function module to convert currency to USD

    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,
    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
    8) 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

  • Functions in Calculation and Summary Fields

    Hi,
    I'll give a bit of background to my situation before describing the advice I'm looking for here.
    I am experienced Mac user and I have used AW a fair bit in the past, but since I've been working in a job which has Windows machines and uses a complex custom-written relational database for its main tool, I use it less often than I did, so I am a little rusty. It is the shortcomings of the complex relational database (which I do not have admin rights to) that has led me back to AW and its database module.
    Essentially, I am a complaints investigator, and the relational database provided by my employer is used to keep track of correspondence and various metadata associated with the investigation of the complaint. However, although it is called a Complaints Management System (CMS), it does not help me manage my caseload very well. I've previously tried to create an Excel spreadsheet that would help me manage my work, but it is not a database (or I am not sufficiently skilled with Excel) and I cannot get it to provide me with what I want.
    So, my problems.
    I have complaints (cases) assigned to me to investigate. These cases have differing priorities, which means differing time limits for completion of the investigation. The priorities and time limits are set out below:
    J (jurisdictional issues) - time limit = 1 month
    D (discretion not to investigate) - time limit = 3 months
    1 - time limit = 4 months
    2 - time limit = 6 months
    3 - time limit = 12 months
    The priority field in my AW DB is currently a 'pop-up menu' field, but I could change this to another type if this would be advisable.
    I have a date-type field in which I enter the date the complaint was received. I have an calculation-type field in which I calculate the age of the complaint using the function:
    =(NOW()-'DateReceived')
    This returns an age in days, which I input into a separate calculation field that divides the result of 'age in days' by 30, to give a rough approximation of the number of months old the complaint is (If AW has an equivalent to Excel's 'workdays' variable, I'd love to hear about it). This latter field is the one that I display in the main data entry view of the database.
    Given the priority assigned to the complaint, and the age of it, I am either 'On Target' or 'Over Target' for completing the investigation.
    Each month I have a meeting with my manager to review progress, and since the reports that can be extracted from the CMS are not very useful for this purpose, I want my AW database to help me generate reports that can form the basis of discussion in these meetings.
    Part A of My Query
    At present, I have a manually operated field, in the form of a pop-up menu, to indicate for each record (complaint) whether I am over or on target for completion of the investigation. I would like to make this a calculated field, so that the database keeps track of this for me automatically. Unfortunately, I'm either too dense, or not good enough with the syntax of AW functions, to be able to write a function which essentially does the following:
    IF 'Priority'=1 AND 'Age in Months'<4 THEN 'On Target' ELSE 'Over Target'
    - and then repeats that for the other priority possibilities.  It seems likely that the 'IF' function is what I'm after, but I haven't been able to get the syntax right to combine 'Priority' and 'Age in Months' in the format spelt out in the AW help, which is:
    =IF(logical,true value,false value)
    Getting the syntax of one part of this function right would be a good start. However, I suspect that I have a larger problem, in that I have 5 priorities to measure against and I need the overall calculation (that produces the 'On Target' or 'Over Target' results) to report in one result field. This means nesting the functions that look at the 5 priorities and 5 age limits. I've tried and failed to get the syntax of such nesting right, so advice on this is doubly welcome.
    Unfortunately, I have a sneaking suspicion that unless the answer is much more concise than I imagine it to be, there will be an additional problem: AW appears to have a character limit for the length of a function string in a calculation field which may be too short for my needs.  If you think this is an issue but that it can be solved through the use of intermediate fields (which don't need to be displayed in the main 'data entry' layout), I'm happy to give that a shot.
    Part B of my Query
    Even if the problem above cannot be solved, and I have to manually enter whether a complaint is 'On Target' or 'Over Target', I have a separate but related question for the reports I have to present to my manager.
    On these reports, I would like to have a summary at the top of the first page (in a grand-summary part, I assume) which gives a count of how many complaints are 'On Target' or 'Over Target' for each priority. Below that is a sub-summary part, ordered by the type of action that must next be taken in the investigation. (Getting that right may be a subject of a separate post at a later date.) The report must, of course, only report on those complaints that are still being investigated ('open complaints') and not those which have been completed ('closed complaints'). So, I need a function in a summary field which will present an accurate count of the number of open complaints that are 'on target' for priority J (with separate summary fields that do the same thing for priorities D, 1, 2, and 3), and a separate set of summary fields that will present a count of open complaints that are 'over target' for each type of priority.
    It might look a bit like this table below, with figures from the summary fields populating the cells in the third row:
    Priority
    J
    D
    1
    2
    3
    In / Out of Target
    In
    Out
    In
    Out
    In
    Out
    In
    Out
    In
    Out
    Number of Complaints
    My guess is that it is easier to have the summary field simply count all the complaints that are on or over target for a given priority, regardless of whether they are open or closed, since the report could be based on a saved search (match) which strips out all closed complaints. But if I'm off-beam with that idea, I'm happy to have another way of cracking this nut.
    Many thanks in advance to any Community members that take the time to try and help me with this.
    Andrew
    PS Cross posted in AWUG forum too, if people prefer to answer there.

    Hi Andrew,
    Part A:
    I've done some restating of the question, and distributed the calculations among several fields, not all of which need to be included on the visible layout. Other than formatting the Date fields and moving the 'Completed Date' field and its label, I've left this in the default "Layout 1" produced by AppleWorks.
    Field List:
    Priority: Popup menu with six items: 00, J, D, 1, 2, 3  Defaults to 00
    TL (time limit in months): Calculation:  CHOOSE('Priority',0,1,3,4,6,12)
    Received: Date. Option: Automatically insert today's date (ie. Date Record created) (may be edited)
    Target Date: Calculation:
    DATE(YEAR('Received')+INT(MONTH('Received')+'TL')/12,MOD(MONTH('Received')+'TL', 12),DAY('Received'))
    Remaining (Days): Calculation: INT('Target Date'+1-NOW())  (see revision below)
    Completed: Checkbox. Set default value to Unchecked.
    Completed Date: Date: Entered manually
    OnTarget: Calculation: IF('Completed',IF('Completed Date'<'Target Date',"On Target","Over"),IF(INT(NOW())>'Target Date',"Over","On Target"))
    The On Target field shows the current status of the case while still open, and the state on the closing date when it was closed.
    Having done that, I was unhappy with the Remaining field continuing to calculate an ever larger negative number after the case had been closed. Hence this revision below:
    Remaining: Calculation: IF('Completed','Target Date'-'Completed Date',INT('Target Date'+1-NOW()))
    Shows the number of days remaining while the case is open, the days remaining at completion if the case has been marked Completed and the completion date entered.
    Rsults (and some further formatting of the Layout) below.
    Part B:
    You will need Subsummary parts when sorted on Completed and on On Target. Fields can appear on  a Layout only once, so each subsummary part will need a separate Summary type field for each field to be summarized.
    Regards,
    Barry

  • Function Module for REBDBU0012-BU Field Modification Criteria - Sample reqd

    We are using three distinct type of Business Entities to look after three types of business of client. For this we have defined three number ranges for each such BE. Now, we wish to use Transaction code "REBDBU0012-BU Field Modification Criteria " and wish to define the field status of based in BE number range criteria.
    I have discussed this in detail with my developer but he is unable to find any help/functional module. Is there any sample object available with in SAP library or if any member from SAP community could help us in it.
    Regards
    Rohit Goel

    Hi Rohit,
    function module that gets field status für BU in standard is REBU_REBU_EVENT_FMOD2.
    There is no such function module that fulfills your requirement available yet.
    For your requirement you have to develop your own function module with the same parameters and in the function module you have to insert the logic to determine the field status as you require it.
    You may use REBU_GET_BUSOBJ to get the data of the object and so you should have all necessary information. As I already mentioned you can use RERO_RERO_EVENT_FMOD2_USAGE as an example.
    Hope that helps.
    Regards, Franz

  • To find function module to update the field kbetr.

    hello friends  ,
                                i have a problem , i want to update kbetr field in konp table and  i am searching for a function module  .  Is there any function module with which we can update kbetr field in konp table.

    Hi,
    check th thread:
    Problem with BAPI_PRICES_CONDITIONS

  • Function Module to convert currency

    Hi all,
    I need to convert all currency to 'EURO'.Could you please anybody help me in this regard.whather is there any function module?.
    Regards.
    Reddy Prasad.

    HI,
    Please try this .
    FWOS_CURRENCY_DECIMALS_READ :All the currency amounts are stored in SAP tables as CURR(n,2) (the same as DEC(n,2)). So before any arithmetic operation value should be adjusted using the real decimals number for the given currency (stored in TCURX).
    Conversion Rates by type and date are stored in TCURR (+factors). Standard type is M. Date is stored in inverted format (the most recent date has the numerically smallest value). ABAP code to convert dates:
    convert date p_date into inverted-date w_date.
    convert inverted-date w_date into date p_date.
    CONVERT_TO_LOCAL_CURRENCY :the only difference between CONVERT_TO_LOCAL_CURRENCY and CONVERT_TO_FOREIGN_CURRENCY seems to be the following:
    Foreign currency is TCURR-FCURR (From Currency)
    Local Currency is TCURR-TCURR (To Currency)
    So result will be slightly different for the both functions (two rates stored in the TCURR: e.g. JPY->USD rate is 0.00880, USD->JPY rate is 122.00000). Better to use CONVERT_TO_LOCAL_CURRENCY, because multiplication is more exact operation than division.
    CONVERT_TO_FOREIGN_CURRENCY :Both conversion functions can return also selected rate and factors
    reward all helpfull answers,
    regards .
    Jay

  • Enhancing datasource for qty and currency fields gives error

    Hi Everyone
    i need some advice on the following
    i am  enhancing a datasource which contains some currency and quantity fields
    when i check my datasource i get the following error
    specify reference table AND reference field
    below is more detail on it  but i am not sure i know what is means
    Diagnosis
    You must specify reference tables and reference fields for fields containing currency amounts or quantity data. You have specified either only the reference field or the reference table and have not maintained either entry.
    Procedure
    Add the missing entry. You can do this with the single field maintenance function of the table.
    i have tried ua=sing data element instaed of field name but still no luck
    can anyone help?
    Thankyou
    PG

    Hi,
    When you enhace datasource for currency/quantity fields, you have to give reference fields and tables for that.
    Please specify the reference field and reference table for the currency/quantity field.
    Are you enhancing generic DS?
    Thanks,
    Praveen Tati

Maybe you are looking for

  • Report region with column link that opens a pdf doc based on report query

    Hello I'm building a report table that displays info about a customer - simple select - and, for each record, has associated column links based on report queries that receive ID as parameter. When clicked, it opens the report in pdf extension. My pro

  • Use of CL_XML_DOCUMENT

    Hi, I want to get an xml file information using the class CL_XML_DOCUMENT, but I do not know how to use it, could someone help me? Thank you very much! Isabelle.

  • ?? iTunes + QT, cancels my QT-Pro license?

    So I have been happily using my QT-Pro I PAID for a few years back. I get an IPOD and what does apple do? They tunr around and say I either have to PAY for a new QT-Pro licnese that uses their newer version, OR not be able to use iTunes. What's up wi

  • Query in Method Name

    Hi all,         In the names of some methods of a class I find IF....for example in the class CL_SMARTFORM_BCS there are methods like IF_DELETE_BCSDELETE , IF_COPY_BCSCOPY , IF_DOCUMENT_BCS~GET_BODY_PART_COUNT etc...At the same time there are methods

  • Character Strings in Sap Script

    Hi, how to create character strings in Sap Script? thanks, fractal