Smartform-currency field error.

Hi folks,
  In My smartform i want to print the net value from vbrp table ( netpr) .but when iam executing the form it is throwing error as " reference field netpr " is unknown in form..
where i have to declare reference field of netpr.
Thanks,
Neelima.N

hi ,
  use the following documentation for your help.
Displaying Fields That Refer to Currencies or Quantities
Use
In the ABAP Dictionary, you can assign a currency or quantity field to a table field if the table field contains a currency or quantity value. When printing these fields, SAP Smart Forms can take into account the assigned currency or unit:
If the value field is in the same table as the assigned currency or quantity field, SAP Smart Forms automatically recognizes this and, during output, formats the value field according to the currency or unit in the assigned field.
If the value field and the assigned currency or quantity field are stored in different tables, SAP Smart Forms cannot automatically recognize the relationship.
In the second case, you must inform SAP Smart Forms about the relationship.
Procedure
As mentioned above, you only have to perform the following steps if a value field that is to be displayed in a table (for example, VALTAB) has a relationship to a currency or quantity field in another table (for example, CURTAB). In this case, you have to specify the relationship explicitly:
In the form, define a global field of the same type as the table in which the currency or quantity field is stored, for example WA_CURTAB. Also define a work area for the output of your value field, for example WA_VALTAB.
If you use a table with a header line, you do not need to define a work area. Instead, you work through the following steps with the header line of the relevant table. In the following step, for example, you would specify the field VALTAB-VALUE instead of WA_VALTAB-VALUE under Field Name.
Create the relationship to the currency field by switching to the Currency/Quantity fields of the Global Definitions node and entering the following values:
Field name: WA_VALTAB-VALUE if this is the value field of VALTAB that is to be output
Reference field: WA_CURTAB-CURRENCY, therefore the currency field of CURTAB
Use the work area WA_VALTAB on the data tab page of your table node or loop node.
Create a program lines node before the event at which the value field is printed.
In the program lines node, assign the currency or unit in which you want to format the value field WA_VALTAB-VALUE to the currency or quantity field of the global field WA_CURTAB-CURRENCY. You have to either select the value of WA_CURTAB-CURRENCY afterwards or have already passed it to the form interface.
Display or print the value field WA_VALTAB-VALUE.
Result
During output, SAP Smart Forms formats the value field WA_VALTAB-VALUE according to the value assigned to the currency or quantity field of the global variable WA_CURTAB_CURRENCY.
regards,
Veeresh

Similar Messages

  • Currency Field Error

    Hello Friends
    IF i do posting through FB60 than it is showing Currency as INR but in grey
    But i want to make posting through F-43, than Currency field is hidden over there
    How to make currency field visible in F-43, i also check for f-02,F-22, in all these currency field is hidden
    Thanks
    SAPUSER5

    Hi,
    It seems that the field "Documents only in Local currency" is selected for your user master record. Use Transaction FB00 and deselect this field located under Document Entry tab.
    Regards,
    Chintan Joshi

  • HOW to include a reference currency fields in a view ?

    Hello Experts,
    <b>I am having Currency fields error in generic extraction</b>
    I have table where I am trying to extract data to BW via generic extraction. When I tried
    to extract with the TABLE its giving me an error
    <b>Invalid extract structure template RPSCO of DataSource ZBW_REP3_TEST
    You tried to generate an extract structure with the template structure RPSCO. This operation failed, because the template structure quantityfields or currency fields, for example, field WLP00 refer to a differenttable</b>.
    Now I created a view with all the fields same as my table.
    But its still giving me the same error and taking all the fields as a primary keys. I have over 12 currency fields in the table. I am confused how to fix this issue and add a currency field to my view?
    hOW to include a reference currency fields in a view ?
    All inputs are much appreciated.
    Thanks and Regards,
    Harish

    Thank you for your responce,
    Can you please check my view and let me know where I am going wrong     
    View    Table   Field  Dataele  Data
    field                    type                                            0                                                                
    WLP01     RPSCO     WLP01     BP_WPL     CURR     15     Period value in ledger currency
    WLP02     RPSCO     WLP02     BP_WPL     CURR     15     Period value in ledger currency
    WLP03     RPSCO     WLP03     BP_WPL     CURR     15     Period value in ledger currency
    WLP04     RPSCO     WLP04     BP_WPL     CURR     15     Period value in ledger currency
    WLP05     RPSCO     WLP05     BP_WPL     CURR     15     Period value in ledger currency
    WLP06     RPSCO     WLP06     BP_WPL     CURR     15     Period value in ledger currency
    WLP07     RPSCO     WLP07     BP_WPL     CURR     15     Period value in ledger currency
    WLP08     RPSCO     WLP08     BP_WPL     CURR     15     Period value in ledger currency
    WLP09     RPSCO     WLP09     BP_WPL     CURR     15     Period value in ledger currency
    If I add a
    Table TCURC against any field what would be the view field and data element
    Do I need to tick MOD?
    Please suggest.
    Kapadia,
    If I do that its still taking all the fields are a primary keys and bringing 6 lakh records to where I originally have 49 records in a table
    Thanks and Regards,
    Harish

  • Currency fields in Smartforms.

    Hi All,
    This is the problem i encountered:
    1) I create two internal tables of type EKKO and EKPO giving the names IH_EKKO and II_EKPO where EKKO and EKPO are the header and the item table for the purchase order respectively.
    2) Then i use the FM SSF_FUNCTION_MODULE_NAME and give the smart form name.
    3) Then i pass the internal tables to the FM generated by the smartform.
    4) In the smart form i declare the workarea ZH_ITAB and ZI_ITAB.
    The problem is that when i try to print the respective document number it throws up an error saying that the "Field ZI_ITAB-NETWR is unknown" and if i remove both the fields NETPR and NETWR from printing it works fine and it shows the print preview. I have also tried putting &ZI_ITAB-NETWR& in lower case as it had worked sometimes but not now.
    What could be the problem ? Am on 4.7
    Thanks in Advance
    Sudhi

    Hi Nablan,
    yes the work area ZI_ITAB if of type stucture EKPO. I went through the standard smart form for Purchase order and SAP has made use of field symbols for the currency fields.. Is that necessary?

  • CRVS2010 Beta - Error in report with currency field in WPF viewer

    When using CRVS2010 with one of my applications I discovered that an InvalidOperationException happens everytime I try to load a report that contains a Currency Field database entry in the WPF viewer.
    To be sure, I made a simple report just with the Currency field and the error happens the same way.
    The exception that I receive is:
    This Pop operation has no corresponding Push to remove from the stack because the stack depth of the DrawingContext is zero.
    And the Stack trace is:
    at System.Windows.Media.RenderDataDrawingContext.Pop()
       at SAPBusinessObjects.WPF.ViewerShared.PageRender.drawFieldObjectInstance(FieldObjectInstance fieldObjectInstance, VisualCollection visuals)
       at SAPBusinessObjects.WPF.ViewerShared.PageRender.drawReportObjectInstance(ReportObjectInstance instance, VisualCollection visuals, Rect sectionClipRect)
       at SAPBusinessObjects.WPF.ViewerShared.PageRender.drawSectionInstance(SectionInstance section, VisualCollection visuals)
       at SAPBusinessObjects.WPF.ViewerShared.PageRender.Render(VisualCollection visuals)
       at SAPBusinessObjects.WPF.ViewerShared.PageView.Render()
       at SAPBusinessObjects.WPF.ViewerShared.PageView.set_PageObj(PageObject value)
       at SAPBusinessObjects.WPF.Viewer.DocumentView.ShowNthPage(Int32 PageNumber, Boolean hasAnimation)
       at SAPBusinessObjects.WPF.Viewer.ReportAlbum.OnCreateNewDocumentViewComplete(CreateNewDocumentArgs args)
       at SAPBusinessObjects.WPF.Viewer.DelegateMarshaler.<>c__DisplayClass6`1.<Invoke>b__4(Object )
    This problem happens in the WPF viewer, but not in the WinForms viewer.
    Please, if you know, tell me what I am doing wrong.

    This seems to be a bug in the software.  We will provide a fix in the final release. 
    -Mandeep

  • Error in smart form with currency  fields

    while i am using with currency fields in samrt forms error is comming in while i am giving print-preview in se38 "<b>Reference field WA_EKPO-NETPR unknown in form."</b>

    In smart forms if we want to display quantity and currency fields. We cannott directly display currency field and quantity fields.
    To display the mdo like this
    Ex: GLOBAL Definitions
    WA_NETPR LIKE EKPO-NETPR
    For that we have to create an extra variable in global definitions
    Ex: netpr FIELD of EKPO
    CREATE program lines and specify WA_NETWR = itab-netpr.
    Close the thread once your question is answered.
    Regards,
    SaiRam

  • Currency field in smartforms

    hi guyz,
    i have a field total_amount when iam putting in my text node it saying total_amount is unknown in the form...where as all other fields in the textnode works.
    total_amount is  currency field..
    plz advice
    regards

    Hi Sudheer,
    Declared it at the Global definitions.
    Initialize some value there itself.
    Just before the text node create one program lines node,
    and that,<b>In the import and export parameters of it give total_amount</b>.
    Regards,
    Rama.Pammi

  • Smartforms currency key problem

    friends help
    I declared in the smartform as below.
    gt_itab like zitab. "zitab is a structure and gt_itab is a table i am getting from program.
    I have declared the field kbetr in structure as follows
    component componenttype  datatype refenrencetable reffield
    KBETR        KWERT       CURR               KOMK         WAERK
    In the smartform I am looping at gt_itab into gw_itab and printing the data in the table in main window.
    At the time of display smartform is giving error like below.
    Reference field gw_itab-kbetr unkown in the form
    Please tell how to correct this error.

    Hi,
    Please go through below link for the better understanding, why you need to define currency/ quantity field in the Tab Currency/Quant. Fields. It is explained in that thread.
    [Currency and quantity fields in Smartforms;
    Regrads,
    Lokesh.

  • Smartforms Reference fields

    Hello all,
    I have made a smartform with some currency and amount fields. When I´m calling the form from the report, I´m getting the error, that I haven´t declared reference fields. I can remember, that I have done that before, but I can´t find the place to declare these fields!
    I´m working on a 4.6C System. Shouldn´t be there a special option in the global data area?
    Regards Michael

    Hi,
    For calculation purpose you can use the same field, but for printing a quant/curr field u need to pass it to a variable of type c of same length and then use it for printing in smartforms.
    Declare a variable as the same type of the currency field of the table which u are using in Global Definition-Global Data
    For example:
    v_variable type vbrp-fkimg.
    Chk this link for a detailed explanation:
    Re: Smart Forms-----Curr and Quan Fields
    Regards,
    Anjali

  • Currency Field in Smart Form

    Hi,
    How to Display Currency Field in SmartForm  and how to declare

    You can display a field in GLOBAL data of TYPE I (v_menge).
    then in the related window of that Quantity field create PROGRAM LINES and in that write a small code such that
    MOVE ITAB-MENGE to v_menge.
    Now display this field v_menge in the smartform
    Regards
    Anbu B

  • To calculate average for a currency field in alv

    Hi,
    I have a requirement in which i need to find the average of a currency field in alv. For the particular field, i'm passing the value of DO_SUM = 'C' in thr field catalog(as suggested in many threads); but I'm not able to calculate the average. it still shows me summation when i click on summation button.
    What could be the possible error??? Is there any other method we can do the same??
    Thanks in Advance.
    Jaspreet

    Hi
    U can try this way.
    *& Report  Z_DEMO_JG
    *& Display average in ALV report
    REPORT  z_demo_jg LINE-SIZE 80 LINE-COUNT 50
                                         NO STANDARD PAGE HEADING.
    TABLES: sflight.
    TYPE-POOLS: slis.
    * Data declaration
    DATA: i_flight TYPE STANDARD TABLE OF sflight,
          i_catalog TYPE slis_t_fieldcat_alv,
          w_flight TYPE sflight,
          w_catalog TYPE slis_fieldcat_alv.
    DATA: v_repid TYPE syrepid.
    * Selection screen
    SELECT-OPTIONS: s_carrid FOR sflight-carrid.
    START-OF-SELECTION.
    * Fetch data from sflight table
      SELECT *
       FROM sflight
      INTO TABLE i_flight
      WHERE carrid IN s_carrid.
      CHECK sy-subrc = 0.
      v_repid = sy-repid.
    * Build field catalog for ALV report
      PERFORM build_catalog.
    * Display ALV report
      PERFORM display_report.
    *&      Form  build_catalog
    *       Build field catalog for ALV report
    *       None
    FORM build_catalog .
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
          i_program_name         = v_repid
          i_structure_name       = 'SFLIGHT'
        CHANGING
          ct_fieldcat            = i_catalog
        EXCEPTIONS
          inconsistent_interface = 1
          program_error          = 2
          OTHERS                 = 3.
      IF sy-subrc = 0.
    *   For average populate 'C' as value in
    *   field DO_SUM
        w_catalog-do_sum = 'C'. " C = Average
    *   Modify record with new value
        MODIFY i_catalog FROM w_catalog TRANSPORTING
        do_sum WHERE fieldname = 'PRICE'.
      ENDIF.
    ENDFORM.                    " build_catalog
    *&      Form  display_report
    *       Display ALV report
    *       None
    FORM display_report .
      IF i_catalog[] IS NOT INITIAL.
    *   Call ALV grid
        CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
          EXPORTING
            i_callback_program = v_repid
            it_fieldcat        = i_catalog
          TABLES
            t_outtab           = i_flight
          EXCEPTIONS
            program_error      = 1
            OTHERS             = 2.
        IF sy-subrc = 0.
        ENDIF.
      ENDIF.
    ENDFORM.                    " display_report
    Edited by: meetjoe on Sep 15, 2009 7:17 PM

  • Problem of currency field in ALV grid

    Hi,
       Actually I am working on ALV gird editables. I have passed the CURR 17,2 type to the i_fcat table. But when I am trying to edit a new value to this field with a new value. i.e. '12345' it takes its value as '123.45'. and whenever I am entering a value '123.45' it gives error message that decimals 0 place. I am not able to make out this problem.
         Even while I am doing get_cell_value, I am getting its returning 0.00 as e_value.
          Any help in this regard will be helpful to me...
    regards,
    Brijesh Patel

    Hi Brijesh,
    Are you using the FM "REUSE_ALV_GRID_DISPLAY" to populate field catalogue? if so, define this in your field catalogue for that particular field.
    g_t_fieldcat-CFIELDNAME = 'X'
    where <b>g_t_fieldcat</b> is your custom defined field catalogue. CFIELDNAME here refers to that column in the field catalogue as currency field and SAP automatically adjusts the decimal places.
    Hope this helps and let me know if you need more details.
    Regards,
    Vicky
    PS: Award points if helpful

  • OOPs ALV report Fieldcatalog Editing a currency field

    Hi all,
    I have created an OOP's ALV report. I have made one of the currency field editable. when I am changing the value in any cell and go out of the cell(or move to other cell using arrow keys or click some were in the grid) it is taking '.' after 2 digits from the right.
    for example if I take 10 it is converting to 0.10, if I take 100 it is becomnig 1.00, if I take 100.00 it is becoming 1.00. If I take 123.45 I am getting a pop up box with message "Too many decimal places"
    the fieldcatalog values are as follows
      WA_FIELDCAT-FIELDNAME   = 'ORD_VAL'.
      WA_FIELDCAT-SCRTEXT_M   = 'Ord Value'.
      WA_FIELDCAT-COL_POS     = 11.
    wa_fieldcat-no_zero     = 'X'.
      WA_FIELDCAT-OUTPUTLEN = 14.
       WA_FIELDCAT-CURRENCY  = 'INR'.
      wa_fieldcat-decimals_o = '2'.
      wa_fieldcat-no_zero = 'X'.
      WA_FIELDCAT-EDIT   = 'X'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR  WA_FIELDCAT.
    Can anybody please help me. As If I edit the field it should take the values what I input.
    Thanks in Advance.

    Hi ,
    The CURR field is the currency unit field in the table ITAB.
    I am just confused with your answer. in my case the final internal table is T_CHKQTY1 shall I take that or anything else. I have taken WA_FIELDCAT-CTABNAME = 'CURR'. but the system is thrownig an error as The data object has no component with CTABNAME but there is a component called TABNAME.
    Can you please currect me.

  • How to enter negative value in a currency field

    Hi Experts,
    Please help me how to allow to enter negative value in a field on report selection.
    I created a currency field on a report selection using PARAMETERS.
    I can enter positive value in the field. But, I cannot enter negative value.
    SAP shows an error message 00 126 "Specify positive values only".
    I know I can place check ON at "with sign" option of the field in case I create the screen by myself.
    However, I cannot do it on screen 1000 created by report program.
    Thanks,
    George

    Hi ,
    I know I can place check ON at "with sign" option of the field in case I create the screen by myself.
        Prabhu--> Just Create a new Domain( select "WITH SIGN") and date elemet,And Use Data Element in your report.
    regards
    Prabhu

  • Referencing currency fields in a view

    When trying to unhide currency fields of a custom extractor in RSA6, we get an error saying 'OLTP source still has errors.'  I believe the errors are associated with the unit/currency referencing of these key figures.  How did you reference the key figure fields the currency/units?

    Hi Khanh-Dong Vo,
    Fields CURR1, CURR2 and CURR3 might not have been appended into your extract structure. That should be done if the field has a reference field from a table like T882G.
    After doing this these fields obviously would appear into the RSA6 list too, there we need to check these CURR1, CURR2 and CURR3 fields for the property "Field only known in Exit".
    This would definitely solve your problem.
    Regards,
    Kiran Kumar Somaroutu

Maybe you are looking for