Question for ABAP coding

Hi,
I have a report that I am making that I am stuck on. I have to select a date range, sales org, and currency to view the report in.  I have coded it and it looks right to me, but I don't get the correct results.  In stead i get a message after the inputs that says "Enter rate / USD rate type M for 27.11.2007 in the system settings"
where usd is the user input currency and 27.11.2007 is the second range of the input date.
Here is my code:
*& Report  ZDCA01FN2                                                   *
REPORT  ZDCA01FN2 MESSAGE-ID ZD01.
*create type with wanted fields
TYPES: BEGIN OF VBRK_TYP,
              SORG     TYPE VBRK-VKORG,
              TAX_AMT  TYPE VBRK-MWSBK,
              CURRENCY TYPE VBRK-WAERK,
              SDATE    TYPE VBRK-ERDAT,
             END OF VBRK_TYP.
DATA:        WA_DVBRK TYPE VBRK_TYP,
             ITAB_VBRK TYPE STANDARD TABLE OF VBRK_TYP,
             LOCAL_AMOUNT TYPE VBRK-MWSBK.
*select range of dates
SELECT-OPTIONS: PDATE FOR WA_DVBRK-SDATE OBLIGATORY.
*user select currency value use value and sales organization
PARAMETERS:  CURRENCY TYPE VBRK-WAERK OBLIGATORY VALUE CHECK,
             SALEORG TYPE VBRK-VKORG OBLIGATORY.
*select all first before function call and collect appropriate fields
*into itable
SELECT * FROM VBRK INTO CORRESPONDING FIELDS OF WA_DVBRK
             WHERE VKORG = SALEORG AND
             ERDAT IN PDATE.
COLLECT WA_DVBRK INTO ITAB_VBRK.
ENDSELECT.
*error check to see if needed to perform sub & function
IF SY-SUBRC NE 0.
  MESSAGE A000.
  EXIT.
ELSE.
PERFORM SUB_WRITE.
ENDIF.
FORM SUB_WRITE.
DATA: TOTAL_SALES TYPE VBRK-MWSBK,
      MISSING_RATE TYPE I VALUE '5'.
LOOP AT ITAB_VBRK INTO WA_DVBRK.
CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
EXPORTING
    DATE = SYST-DATUM
    FOREIGN_AMOUNT = WA_DVBRK-TAX_AMT
    FOREIGN_CURRENCY = WA_DVBRK-CURRENCY
    LOCAL_CURRENCY = CURRENCY
    RATE = 0
    TYPE_OF_RATE = 'M'
IMPORTING
    LOCAL_AMOUNT = LOCAL_AMOUNT
EXCEPTIONS
    MISSING_RATE = 5.
*check to see if conversion worked
IF SYST-SUBRC = MISSING_RATE.
   MESSAGE A000.
*output report records
ELSE.
   WRITE: /10 WA_DVBRK-SORG,
           20 WA_DVBRK-CURRENCY,
           20 WA_DVBRK-SDATE,
           30 WA_DVBRK-TAX_AMT.
*add total sales for report
TOTAL_SALES = LOCAL_AMOUNT + TOTAL_SALES.
ENDIF.
ENDLOOP.
SKIP 4.
*write added total sales
WRITE: / TEXT-004,
         TOTAL_SALES,
         TEXT-005,
         CURRENCY.
*FOOTER
SKIP 1.
ULINE: /02(70).
WRITE:  /15 TEXT-001, SY-UNAME.
WRITE:  /15 TEXT-002, SY-DATUM.
WRITE:  /15 TEXT-003, SY-UZEIT.
ENDFORM.
Thanks for the help

Dear David,
It appears that configuration is missing for currency USD.
Consult your functional consultant to resolve the same.
In IMG (Transaction SPRO) under
SAP Netweaver -> General Settings -> Currencies -> Check Exchange Rate Types
SAP Netweaver -> General Settings -> Currencies -> Enter Exchange Rates
Regards,
Naveen.

Similar Messages

  • Docs for ABAP coding for BW

    Hello Gurus,
    I need some documents or links where i can find enough info to learn abt ABAP coding in transfer, update rules, ABAP routine in infopackage and in the start routine etc. Can any one help me with this?
    Looking for some basic concepts of ABAP.
    Thank you,
    Kumar
    [email protected]

    Hi,
    Please check the following links that may be useful for you.
    http://help.sap.com/saphelp_46c/helpdata/en/d3/2e974d35c511d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/printdocu/core/Print46c/en/Data/htm/english.htm.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/4493c4a6-0301-0010-62a2-efd6ded61e04https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/60cecb1d-0a01-0010-8289-b14fd99062fa
    http://www.bwexpertonline.com/downloads/ABAPCodeforRuvinskyarticle.doc
    http://www.bwexpertonline.com/downloads/Extractor_Source_Code.doc
    http://www.bwexpertonline.com/downloads/Nissen.doc
    https://www.sdn.sap.com/irj/sdn/abap
    http://www.sap-img.com/abap/more-than-100-abap-interview-faqs.htm
    http://www.sapgenie.com/faq/abap.htm
    Regards,
    ®

  • Can anybody help me out for sample questions for ABAP certification

    Hi
    i am going to appear for ABAP certification exam , i just wanted to have a look of types of questions asked in exam. can you please tell me where can i find these kind of questions.
    Thanks

    Refer this thread from SDN and a lot more are there on ABAP certification exam details and material.
    /message/515239#515239 [original link is broken]
    /message/279409#279409 [original link is broken]
    There is a pdf called ABAP certification.
    http://www.esnips.com/web/SAP-ABAP?
    If you have a firm stand in the ABAP dictionary (BC430), have already done some programming (BC400) and know the basics of ABAP-OO (BC401) you are on the safe side for the exam.
    Also have a look at below links:
    http://www.sap.com/services/education/index.epx
    http://www.sap-img.com/ab040.htm
    http://www.sapdomain.com/testimonials.php
    http://www.planetsap.com/Abap_certification_requirements.htm
    http://www50.sap.com/useducation/curriculum/group.asp?tid=8
    http://www50.sap.com/useducation/curriculum/curriculum.asp?rid=256&TID=
    http://www.amazon.com/exec/obidos/ASIN/0071341617/qid=1120754726/sr=2-1/ref=pd_bbs_b_2_1/103-7699884-1772649
    I hope it helps.
    Best Regards,
    Vibha
    *Please mark all the helpful answers

  • Any good books for abap coding

    Hi..
    Any one can tell me the good books on routines,user exists,mailny for abap code used in BW.Sap press books also.I dont known the abap.if any docs is ther please sent me to my mail id:[email protected] simens or reliance material.will assign points.
    Advance Thanks,
    Madhavi

    Hi Madhavi,
    First check the link in below then your email
    <a href="http://www.sap-press.com/library.cfm?account=&library=H1968">The ABAP Collection</a>
    Regards,

  • New Question for ABAP....( &1 and &2 )....

    Dear Sir And Madams,
    Cool Hii to all of you....Here once again i have stuck with a little probem... kindly help me out if you had solutons....
    In one module pool coding i have found one strange thing and it is that :
      LOOP AT &1.
        &1-SEL = &2.
        MODIFY &1.
      ENDLOOP.
    END-OF-DEFINITION.
    DEFINE SET_SELECTION.
      &1-SIGN   = 'I'.
      &1-LOW    = &2.
      &1-HIGH   = ' '.
      &1-OPTION = 'EQ'.
      APPEND &1.
    END-OF-DEFINITION.
    DEFINE TOTAL.
      LOOP AT &1.
        &2 = &2 + &1-AMOUNT.
      ENDLOOP.
    END-OF-DEFINITION.
    DEFINE GET_DOC.
      CLEAR: IT_DOCMSTRT, &2 .
      READ TABLE IT_DOCMSTRT WITH KEY DOC_CODE = &1.
      &2 =  IT_DOCMSTRT-&3.
    END-OF-DEFINITION.
    DEFINE GET_DOCL.
      CLEAR: IT_DOCMSTRT, &2 .
      READ TABLE IT_DOCMSTRT WITH KEY DOC_CODE = &1.
      IF SY-SUBRC = 0.
        &2 =  IT_DOCMSTRT-&3.
        &2P = 'X'.
      ENDIF.
    END-OF-DEFINITION.
    DEFINE CHARGE_SET.
      CLEAR:&2.
      CASE &1.
        WHEN 'B'.
          &2 = CON_BEN.
        WHEN 'P'.
          &2 = CON_APL.
      ENDCASE.
    END-OF-DEFINITION.
    : Here will you explain me what is meant of '&1' and '&2' ???? by double clicking on it... navigates no where.... and asking for creating an object as per procedure of standard SAP.....
    Take care....
    Warm Regards,
    Nirav Parekh

    Hi Nirav,
    All the piece of code below refers to definition of Macros.
    Here &1 and &2 are the parameters that need to be passed to the macro.
    Remember the Formal and actual parameters funda.
    The Parameters &1 and &2 are the formal parameters and they will take the actual values once the Macro is used.
    e.g. SET_SELECTION S_OPTION 2.
    In this SET_SELECTION is the macro and S_OPTION is the actual parameter which will take place of &1.
    Hence the coding will convert to
    S_OPTION-SIGN = 'I'.
    S_OPTION-LOW = 2.
    S_OPTION-HIGH = ' '.
    S_OPTION-OPTION = 'EQ'.
    APPEND &1.
    Regards,
    Himanshu

  • ABAP-Coding for EVERY Key figure in infocube 0RT_C02

    Hello gurus;
          Does anybody know which is the reason for Abap-coding for every key figure in infocube 0rt_c02 from InfoSource 2lis_13_vditm?
    Thanks in advanced!
    Csr

    Hi,
    this is done like this in the business content because the extractor is providing the data with a process key; this process key is then translated into meaningfull business objects (key figures);
    fro instance ProcessKey 202 in application SD is reflecting Credit memos:
    * Credit Memo
      IF COMM_STRUCTURE-PROCESSKEY = '202'
        AND COMM_STRUCTURE-BWAPPLNM EQ 'SD'.
    * currency convert
        IF COMM_STRUCTURE-COST <> 0.       "Value in document UNIT
          PERFORM LOC_CURR_CONVERT
            USING    COMM_STRUCTURE-COST   "Value in doc UNIT
                     COMM_STRUCTURE-TRANS_DATE     "Date for exchange
                     COMM_STRUCTURE-DOC_CURRCY     "Document Currency
                     COMM_STRUCTURE-LOC_CURRCY     "Local currency
    *                COMM_STRUCTURE-EXCHG_RATE     "Exchanging rate
                     COMM_STRUCTURE-/BIC/ZEXRATEAC "Exchanging rate Acctn
            CHANGING RESULT.
    * the KPI's must be turned to positive because the SD-extractors
    * allways deliver them neg. if it's a process back (e.g. return order)
          RESULT = RESULT * ( -1 ).
          UNIT = COMM_STRUCTURE-LOC_CURRCY.
    * if the returncode is not equal zero, the result will not be updated
          RETURNCODE = 0.
        ELSE.
    * if the returncode is not equal zero, the result will not be updated
          RETURNCODE = 4.
        ENDIF.
      ELSE.
    * if the returncode is not equal zero, the result will not be updated
        RETURNCODE = 4.
      ENDIF.
    the above routine is quite self explaining the code.
    hope this helps...
    Olivier.
    Message was edited by:
            Olivier Cora

  • Post Comments About Web Dynpro for ABAP Tutorials Here

    Are you familiar with the <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/developerareas/abap?rid=/library/uuid/02e1fa45-0801-0010-10a0-f1cf47e8c943">web Dynpro for ABAP Knowledge Center</a>? Do you find the tutorials on that page useful?
    Please give us your comments and expectations so we can build more and better tutorials to show you the joys of Web Dynpro for ABAP coding
    cheers,
    Marilyn

    Got past problem with tutorial 1. 
    Now on tutorial 4. 
    METHOD get_bookings .
      DATA:
        itab_bookings    TYPE if_componentcontroller=>elements_bookings,
        stru_bookings    LIKE LINE OF itab_bookings,
        stru_flightlist  TYPE if_componentcontroller=>element_flight_list.
      parent_element->get_static_attributes(
             IMPORTING static_attributes = stru_flightlist ).
      itab_bookings = CL_WDABAP_FLIGHT_MODEL=>get_bookings(
          carrid   = stru_flightlist-airlineid
          connid   = stru_flightlist-connectid
          fldate   = stru_flightlist-flightdate
      node->bind_table( itab_bookings ).
    ENDMETHOD.
    Getting Error:
    the type CL_WDABAP_FLIGHT_MODEL=>get_bookings(  is unknown.

  • Coding in webdynpro for abap  - reference documents

    Hi,
    Kindly let me know where can I get the reference documents for coding in web dynpro for ABAP ?
    im specifically looking for continuation of these four documents - [link|http://www.octavia.de/fileadmin/octavia_files/content_bilder/Hauptnavigation/SAP_NetWeaver/WebDynpro/Web_Dynpro_Part_II.pdf]
    thanks
    B

    Hi,
    Kindly let me know where can I get the reference documents for coding in web dynpro for ABAP ?
    im specifically looking for continuation of these four documents - [link|http://www.octavia.de/fileadmin/octavia_files/content_bilder/Hauptnavigation/SAP_NetWeaver/WebDynpro/Web_Dynpro_Part_II.pdf]
    thanks
    B

  • ABAP coding in defining start condition for action.

    Hi Everybody,
    Can anyone tell me if ABAP coding is possible for giving condition for action? If yes, where? Is it in condition editor? I have 3 validations to be done:- 1) Filter service contract (transaction type USC), 2) Filter the active contracts, 3) Filter contracts which doesn't have billing cycle in current month.
    So, do you think these validations can be done in start condition of action? First two validations are static in nature and thus can be done. But, how about the last condition?
    Please help.
    Regards,
    Sanj.

    Hi Sanj
    I would do this.
    1. The transaction type cannot be changed, therfore I will set this up in the scheduling condition.
    2. Active contracts. Depends on teh definiton of active. If it is based on some status then I will use scheduling condition.
    3. use one of the dates in the date profile to determine if the billing date is in the current month or not.
    See if this helps.
    Thanks

  • Web Dynpro For ABAP Question

    Hi all,
    I'm creating Adobe Interactive forms in Web Dynpro for ABAP.
    <b>Problem:</b>
    <b>Context defined in the created "View" is not displayed in the 'templates' (Adobe Interactive Form in the "Data View" tab.</b>
    I'm following the exact steps used in the following e-learning class:
    <b>https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/c766e918-0b01-0010-99b1-c2b78cd059b3</b>
    Except I'm creating 'string' fields instead of numeric fields like in the above e-learning class and creating my forms in Adobe Livecycle designer first then importing them to the web dynpro for abap - 'templates'.
    The 1st form I created went well and works fine.
    <b>Question:</b>
    For my second and third form I'm unable to map my context fields they are not displayed in the "Data View" anyone know why this is not possible?
    Cheers,
    Dharm

    Hello,
    are you creating the form via forward navigation from webdynpro abap?
    When you do that the context of the form should be created automaticaly.
    What Basis SP level are you using?
    Best regards,
    Dezso

  • Dynamic form in Webdynpro for ABAP - Context Cardinality question

    Hello -
    I have an adobe form in a webdynpro for ABAP application which I want to be able to be dynamic. Basically I want to be able to use a Webdynpro context node with a cardinality of 1-N and the form will take each node of the context and create a page for each one. I am able to do a static form with a context node that has a 1-1 cardinality, but once I change my cardinality to 1-N on the node the static form no longer works (there is no data). Is what I want to do possible? I've looked through all the documentation I could find and could not get a definite answer. Any help would be appreciated.
    Widget (1-N)
         -Widget_info (1-1)
              *Name
              *Sku
              *Description
         -Widget_plant (1-M)
              *Plant_Code
              *Plant_State
              *Plant_City
         -Widget_pic (1-1)
              *Picture
    ... So I want to have a form which can print a page for each widget in the context (the number of which can vary). That form would have the Name, sku, description, plant_code, plant_state, plant city and the picture on it. (This is just a generic example of what I need to do)
    Regards,
    - Jason

    Ok, I think I found a bug... It seems for adobe forms in WD4A, the root context node must be 1-1 and you must nest the 1-n node within that... Not sure why, but it worked. So in my case my context would look like this:
    FOO_NODE (1-1)
         Widget (1-N)
              -Widget_info (1-1)
                   *Name
                   *Sku
                   *Description
              -Widget_plant (1-M)
                   *Plant_Code
                   *Plant_State
                   *Plant_City
              -Widget_pic (1-1)
                   *Picture

  • Web Dynpro for ABAP iview window question ...

    Hi,  I have a web dynpro for abap iview that calls a web dypro for abap program in ECC that generates a PDF document. 
    It works perfectly, except when the iview is launched it opens a blank iview page and then opens a separate window in which the PDF is displayed.  Does anyone know how to suppress the blank iview window? 
    Can I suppress it in the ABAP for Web Dynpro program in ECC or is there something on the portal in the web dynrpo for abap iview that I can do? 
    Thanks
    Angie.

    Hi,
    Please check the same issue at the WD4A side-
    Generating PDF in Web-Dynpro   - empty window popup
    Or
    In the IF_WD_WINDOW_MANAGER try to use the method -create_internal_window method.
    Regards
    Lekha

  • ABAP Coding for RFC inputs

    Hi,
    I am new to ABAP coding. I use the WebDynpro ABAP . In that I need to call a RFC and get the data into the portal. I need to pass some input paramer to RFC. How could I do in the ABAP programming ?
    thanks
    Suresh

    Hi suresh,
    What you are asking is a not a wdbdynpro specific doubt but it is more related to abap.So i think you need to get some information about creating and using FM and RFC  in abap.
    Well i would just try to give you the steps that you should follow.
    Step 1) Create a function module by using T CODE se37 make it remote enable i.e make it a RFC (you will ust need to check a radio button in properties tab)
    Step 2) In rfc try to define the importing and exporting parameters and write your logic in the coding section.
    Step 3) After creating RFC successully now u craete your webdynpro component and create a view inside the component.In view accrding to your business requirement you call this RFC in any of the methods i.e either in hooks methods or your custom methods .And pass the parameters to that rfc and get the results from the rfc.
    Well i think i have just given you the overview of the process so while development if get any problem feel free to ask
    regards
    PG

  • Can somebody give some real time questions for alv report

    hi guru
    can somebody give some real time questions for alv report.
    answers also.
    regards
    subhasis.

    hi,
    The ALV is a set of function modules and classes and their methods which are added to program code. Developers can use the functionality of the ALV in creating new reports,  saving time which might otherwise have been spent on report enhancement
    The common features of report are column    alignment, sorting, filtering, subtotals, totals etc. <b>To implement these, a lot of coding and logic is to be put. To avoid that we can use a concept called ABAP List Viewer (ALV).</b>
    Using ALV, we can have three types of reports:
       1. Simple Report
       2. Block Report
       3. Hierarchical Sequential Report
    <b>Reward useful points</b>
    Siva

  • ABAP coding in LSMW

    Hi All,
    A)Is it possible to  write ABAP coding in LSMW, if yes where can we do this. and
    B)During the First Step of LSMW we come across 1. Standard/Batch Direct Input
                                                                          2.Batch input recording
                                                                          3.Business Object Method (BAPI)
                                                                          4.IDOC(intermediate document)
    which one to use and when to use?
    C) what are the advantages/disadvantages of LSMW compared to other data transfer methods like BDC.
    please let me know the answers for above.
    useful answers will be rewarded for the same.
    Regards,
    Yellappa.

    hi
    for q posed to ashvinder, its used only for validation of the input records and their corresponding processing, i will explain a simple scenario,
    1. if u want to transfer data a part of which has already been created in the system. You
    want to decide at runtime whether the data is created or changed.
    u can write this coding in corresponding field
    2. You want to "skip" a record depending on a certain condition, i.e. this record shall not be converted and transferred to the output file.
    3. Duplicate a Record
    If want complex pricing procedures u cant do that in LSMW, u need to go for BDC's
    for ur question about what to use, BAPI or IDOC, check this link
    http://www.sap-img.com/abap/ale-bapi.htm
    http://searchsap.techtarget.com/generic/0,295582,sid21_gci1089362,00.html?bucket=ETA&topic=299357
    award points if found helpful
    Message was edited by:
            Rahul Kavuri

Maybe you are looking for

  • Office Web Apps - Preview Sharepoint 2010 documents in Sharepoint 2013 Search Results

    Hi, We have a Sharepoint 2013 search site collection. The content sources for the Search service application includes some Sharepoint 2010 sites. We also have Office Web Apps server deployed. When searching for documents, the OWA preview works for al

  • Creation of previews/thumbnails of PSD files not working in v3.0.1

    I'm using Aperture 3.0.1, PS 4 to edit photographs. My workflow will be the usual, Photo > Edit with Adobe PS, in my Aperture browser thumbnails/previews will be created for the PS file. When I save my work in PS, the thumbnails and previews in Apert

  • TVAC and other TV utilities not recognizin​g wireless card -- even after reinstall attempts

    so first things first, im on a T61p, XP pro SP3, Intel 4965AGN i guess we'll start from the top... 1.) TVAC works great, im happy. 2.) i go to update all my system drivers through the update utility. wireless driver update hangs midway through, and w

  • Shared Objects for Threads

    Hi, Currently studying for SCJP exam and wondering is there a different between the following codes public class Test extends Thread static Object obj = new Object(); static int x, y; public void run()    synchronized(obj)      for(;;)       x++; y++

  • Dashboards - Transport methods

    Hello We have imported the Best Practice Dashboards and Crystal reports using our ECC development system as the datasource. Does anyone have a method or approach to transporting these into QAS and Production without the need to individually map each