Curr and Quantity fields
Hi Experts ,
Why do we have to declare the Type of CURR and QUAN field in the smart form declarations.
TIA
Abhishek
Hi,
Because for those fields there is reference field and table in the database,
why referecnce field and table means:
The reference table and reference field are the fields which specify the currency key or Unit of Measure. Suppose if the user specifies a currency amount say 1000$, the currency amount field would indicate the amount 1000 and the currency key indicates that the currency specified is in Dollars.
seshu.
Similar Messages
-
Runtime error in Dynamic internal table with AMOUNT and Quantity Fields..
Dear friends,
I am attempting write a dymanic Select Statement (with joins).
And the sleect query looks like this..
SELECT (LT_SEL_LIST)
INTO CORRESPONDING FIELDS OF
TABLE <DYN_TABLE>
FROM (LT_FROM_LIST)
WHERE (LT_WHERE3).
Here the into table is a dynamically created internal table..
which is created by ...this
CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
EXPORTING
IT_FIELDCATALOG = IT_OUTPUT2[]
IMPORTING
EP_TABLE = DY_TABLE.
the it_output2 contains the the fieldcatlog information of dynamically given fields :-
like:-
TABNAME
FIELDNAME
DATATYPE
LENG
INTTYPE
ROLLNAME
DECIMALS
REFTABLE
REFFIELD
i mean the internal table is constructed with reference to all the bove metadata.
Problem:- This query run fine with all the fields Except AMOUNT AND QUANTITY fields....
When the selection list contain VBAK-NETWR or MSEG-MENGE..It throws a runtime error.
"The data read during a SLECT access couldnt be inserted into the target field,either conversion is not supported for
the target field's type or the target field is too short."
after this I even tried to construct the dynamic table with CFILEDNAME and QFIELDNAME in the Fieldcatalog.
so now my fieldcatlog looks like this:---
LOOP AT IT_DD03L..
IF IT_DD03L-DATATYPE = 'CURR'.
TABLEFIELD-CFIELDNAME = IT_DD03L-FIELDNAME .
ENDIF.
IF IT_FIELDCAT3-DATATYPE = 'QUAN'.
TABLEFIELD-QFIELDNAME = IT_DD03L-FIELDNAME .
ENDIF.
TABLEFIELD-TABNAME = IT_DD03L-TABNAME.
TABLEFIELD-FIELDNAME = IT_DD03L-FIELDNAME.
TABLEFIELD-DATATYPE = IT_DD03L-DATATYPE.
TABLEFIELD-INTLEN = IT_DD03L-LENG.
TABLEFIELD-INTTYPE = IT_DD03L-INTTYPE .
TABLEFIELD-ROLLNAME = IT_DD03L-ROLLNAME.
TABLEFIELD-DECIMALS = IT_DD03L-DECIMALS.
TABLEFIELD-REF_TABLE = IT_DD03L-REFTABLE.
TABLEFIELD-REF_FIELD = IT_DD03L-REFFIELD.
APPEND TABLEFIELD.
CLEAR TABLEFIELD.
ENDLOOP.
Note:- this is a test code so ignore performance issues...
Please help me with some code ...to avoid the Runtime erorr.
Thanks,
jeevan.Hi Jeevan,
Why are moving only few fields from DD03L table to your field catalog? Why don't you use move-corresponding? The following code works for me in ECC6.0.
data: it_dd03l type table of dd03l initial size 0,
ls_dd03l type dd03l,
lt_fldcat TYPE lvc_t_fcat,
ls_fldcat TYPE lvc_s_fcat,
ls_where(72) TYPE c,
lt_where LIKE TABLE OF ls_where,
lt_fld LIKE TABLE OF ls_where,
lt_data_dy TYPE REF TO data.
field-symbols: <ft_data> TYPE STANDARD TABLE.
select * into table it_dd03l from dd03l
where tabname = 'VBAK'
and ( fieldname = 'VBELN' or fieldname = 'NETWR' ).
check sy-subrc eq 0.
loop at it_dd03l into ls_dd03l.
move-corresponding ls_dd03l to ls_fldcat.
append ls_fldcat to lt_fldcat.
move ls_dd03l-fieldname to ls_where.
append ls_where to lt_fld.
if ls_dd03l-fieldname = 'VBELN'.
clear ls_where.
concatenate ls_dd03l-fieldname ' <> ''''' into ls_where.
append ls_where to lt_where.
endif.
endloop.
check not lt_fldcat is initial.
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = lt_fldcat
IMPORTING
ep_table = lt_data_dy
EXCEPTIONS
generate_subpool_dir_full = 1
OTHERS = 2.
IF sy-subrc <> 0.
RAISE no_configuration_data.
ENDIF.
ASSIGN lt_data_dy->* TO <ft_data>.
check sy-subrc eq 0.
select (lt_fld) from VBAK into corresponding fields of table
<ft_data>
where (lt_where).
Thanks
Bala -
Help for search help and currency and quantity fields
hi,
please help me for creating search help and when the currency and quantity fields are used please expalin this with steps as i am a learner..
regards
raj.Hi Rachu,
Welcome To SDN
Help On Search Help
Go to se11
Select radio button Search help
click on create
and select elementary seacrh help
selection method---->tablename or viewname
press f1 in search help exit we will get a FM named as
F4IF_SHLP_EXIT_EXAMPLE.copy that FM from se37 in to Zprogram.we have a record_tab for copying the view by using this tab we can restrict the values from the view or table.this values are populate into another table .Then ,
come to se11
and in our seacrh help we will pass components of the search help
Source: https://forums.sdn.sap.com/click.jspa?searchID=14985345&messageID=5618016
Help On Currency and Quantity Fields:
Whenever you have to maintain fields for currencies and quantites u need to refer them to currency key and quantity key which also have to be present in the table.
If suppose you are creating a table for Employee. And suppose that fields would be like :
EMPID -
employee id
EMPNAME
employee name
DEPARTMENT --- department
SALARY -- salary ( Data Type u2013 CURR )
WEIGHT -
weight of the employee ( Data Type -- QUAN )
Now the fields SALARY AND WEIGHT fields should refer to currency and quantity keys. So you need to have two more fields like
CURRKEY --- Data Type ( Cuky )
Quantity --- Data Type ( Unit )
Now we have to attach the field Currkey to the field Salary
And the field Quantity to the field Weight
So when u create a table you can see a tab Currency / Quantity fields.
Here You can give the reference table and the reference field against the salary and weight fields.
Source: https://forums.sdn.sap.com/click.jspa?searchID=14985456&messageID=5692074 -
Currency and quantity field allignment in smartforms
hi experts
i am facing problem in smartforms allignment for currency and quantity fields. these fields are not coming exactly on the same line of the other fields with char types. please help me resolving it.
Moved to Crrect Forum
Edited by: Vijay Babu Dudla on Apr 6, 2009 4:38 AM&wa_vbap-kwmeng(C)&
adjust with left and right alignment.
it will definately work.
what happend? isn't ur problem solved?
Edited by: MONIKA DHUMAL on Apr 6, 2009 4:38 PM -
Amount and Quantity field during MIR7
Hello Experts,
My client wants to keep Amount and Quantity field in display mode for particular user during parking of Invoice(MIR7)
Is there any way to achieve this.
Thanks and Regards
Gyaneshgo for varients
in SHD0 transaction
here you can try to make fields display mode -
Problem with currency and quantity field
Hi,
I have done a couple of BDC and watched that if some currency or quantity field is there and i want to run the BDC the particular currency/quantity field will not populate the value inspite of i have declared the same table field that it refers to in the screen in the internal table.
But, if i declare a character string in the internal field having same length as the screen field it will populate at run time. Why so?
Regards
SandeepHi,
Even i have experienced the same problem many a times and use a character string as a work around to solve it.
I guess one reason for it is for the currency and quantity fields, the actual defined length and the output length are different with output length being 3 or 4 bytes greater than that of actual lenght and also the fact that these fields are always right justified. hence some bytes of the field is getting truncated which the system does not allow and discards the whole value.
regards,
Mahesh -
Currency and Quantity fields in Nested Table
Hallo Experts,
I have created a Interface with import Sturcture SLS_PRT_COM. This Sturcture have many nested Sturctures. Now I created a Table type ZEBFO with line type VBDPA. VBDPA has many currency and quantity fields such like GEWEI.
Now I have created internal Table of ZEBFO.
Declare the nested Quantity field in the Currency/Quantity Fields section, using the autofiller (the buttons to the right of the field).
Create an adobe form for it and a program and execute it.
Dump
The following syntax error occurred in program "/1BCDWB/SAPLSM00000034 " in
include "/1BCDWB/LSM00000034F01 " in
line 1769:
"Field "VBDPA-GEWEI" unknown. "."
can somebody help me what shall I do.
Thanks
Best regards
Waseem Rana
Edited by: ranawaseem165 on Feb 17, 2012 9:14 AMHi,
When Creating a Structure ,include currency and quantity Fields in the same structure and Refere those as currency and
Quantity Fields.
In the Form when click on Currency/Quantity Fields,they automatically visible and you can add them .
Thanks.
uma -
About Currency and Quantity Fields
How does the Currency and Quantity fields are set to a field in a Table, created in SE11
can you please send examples of each
Thankyouhi,
its same like any other field.
but one difference :- <i>the reference field is requires.</i>
<i>why reference field?</i>
The reference field is used for the output, the output/input format of a currency field depends on the value of its reference field.
For example if you create a screen using the field KONV-KBETR :
the reference field is RV61A-AWEI1:
if you set RV61A-AWEI1 = 3
the value in KONV-KBETR is beeing shown with 3 decimals
So you could see 3,000 but this value is automatically stored as 30.00
if you set RV61A-AWEI1 = 2
the value in KONV-KBETR is beeing shown with 2 decimals
All this convertions are automatically made in according to the value setted in reference field.
You can see this using the statament WRITE with options CURRENCY, try this:
PARAMETERS P_KBETR LIKE KONV-KBETR.
WRITE: P_KBETR CURRENCY '3'.
WRITE: / P_KBETR CURRENCY '2'.
WRITE: / P_KBETR CURRENCY '1'.
Hope u gor the idea
Rgds
Anver -
Currency and quantity fields in Smartforms
Hi Experts,
How to refer currency and quantity fields , in my form i am using FAKING and NETWR fields,
in global definitions one tab is there currency and quantity fields in that in filed name column what i have to give and reference filed , PLease can u you give some examples, so that i can understand easily...
Useful answers are awarded.
ThanksThe 'Currency/Quant. Fields' tab in the Global definitions allows you to link the field containing a value to the field containing its unit of measure.
For example, my purchase order has two line items, one is for 6 eggs (which have unit of measure PC) and 2.5 kilogramms of flour (UOM is KG). When these are written on the output the eggs have no decimal places, the flour has 2 (this is defined in configuration). So;
Eggs 6 PC
Flour 2.50 KG
This happens only if I specify in the 'Currency/Quant. Fields' tab the field that holds my quantity and the reference field that hold the UOM, and specify data type QUAN. Same concept applies for currency where they have different numbers of decimal places (for example Japanese Yen is always expressed as a whole number with no decimals).
Regards,
Nick -
Currency and Quantity fields problem in FM
Hi ALL
<b>Can anyone help me on this. Very Urgent</b>
I created a FM, in that i used NETPR,MENGE,WEMNG.(CURRENCY , QUANTITY ) fields.
When i am trying to activate, it is asking for reference fields.
I don't know how to resolve it...
Regards
Prabhakarhi,
pls refer to this thread for use...
how can create a function module for currency and quantity fields
Message was edited by: Ganesh Sundarakrishnan -
Can u pls tell what r the currency and quantity fields in detail.
hi to all can u pls teell
can u pls tell what r the currency and quantity fields in detail.
what is reference table .and reference fields .why we r giving theese reference table names while creating the currency fields .Hi,
Currency amount fields and quantity fields are numeric fields which each have a currency or unit field assigned to them. The correct interpretation of the values in these fields depends on its currency or unit of measure. Therefore, you can decide whether you want their corresponding currency/unit of measure to be displayed before or after the field, or not at all. Proceed as follows:
1. Select the field.
2. Choose one of the options from the window on the lower left (before, No currency field/unit, or after).
3. Choose Apply.
For more information check the following link:
http://help.sap.com/saphelp_nw04/helpdata/en/0b/5da4e42cf511d5b692006094192fe3/frameset.htm
Following are system variables of currency:
SY-CCURS
R/2 - exchange rate and result field for CURRENCY CONVERSION. Not filled in R/3.
SY-CCURT
R/2 - table exchange rate for CURRENCY CONVERSION. Not filled in R/3.
SY-CDATE
R/2 - exchange rate date for CURRENCY CONVERSION. Not filled in R/3.
SY-CTABL
R/2 - exchange rate table for CURRENCY CONVERSION. Not filled in R/3.
SY-CTYPE
R/2 - exchange rate type for CURRENCY CONVERSION. Not filled in R/3.
SY-DCSYS
Dialog system of the R/2 System. Not filled in R/3.
SY-WAERS
Formerly the company code currency after reading a posting segment. Not filled in R/3.
Regards,
Bhaskar -
Handling currency and quantity fields in smartforms
Hi,
can i know how to handle currency and quantity fields in smartforms.
i have to display ZMENG field of VBAP table but it is not getting displayed.
i have given the details in CURRENCY AND QUANTITY tab in the GLOBAL DEFINITIONS.
Thanks,
BJR.Hi
Did u pass that value in the INPUT and OUTPUT parameters where u r calling that field...
if u have not included that in The Currency/Quant Tab will get an Error Message.....
and &VBAP-ZMENG& ..in the text
surya -
Problem in currency and quantity field
Hi,
I have done a couple of BDC and watched that if some currency or quantity field is there and i want to run the BDC the particular currency/quantity field will not populate the value inspite of i have declared the same table field that it refers to in the screen in the internal table.
But, if i declare a character string in the internal field having same length as the screen field it will populate at run time. Why so?
Regards
SandeepHi Sandeep,
This is a common problem, when carrying out BDC.
For example, while recording you met with the 2 fields --> MSEG-DMBTR (Curr) and MSEG-MENGE(Quantity).
Go to SE11 --> MSEG --> Search for DMBTR --> Double click on the Data Element i.e. DMBTR --> Double Click on the domain WERTZ --> You can see under the block Output Characteristics : Output Length = 16.
While declaring the TYPES Structure, make it CHAR(16).
Similarly for MENGE --> Data Element : MENGE_D --> Domain : MENGE13 --> Output Length = 17.
Make it CHAR(17).
Consider this technique as the Rule-of-Thumb while doing BDC.
Regards,
Abir
Don't forget to award points * -
How can create a function module for currency and quantity fields
hi,
i want to create a function module with some fields.when i activated it give some errors for
netpr,menge,wemng fields(currency, quantity fields).error is it asks for reference fields.
please send me solution for it.
sreenu.Hi Sreenu,
While creating CURRENCY/QUANTITY fields in the DataBase Table, you have to enter a REFERENCE TABLE and a REFERENCE FIELD to the field.
For that, after entering the field name and the data type in the correcponding columns, you have to place the cursor on the data type of the required field and click the CURRENCY/QUANTITY FIELDS tab. You will find two columns called REFERENCE TABLE and a REFERENCE FIELD.
you have to enter a reference table in which a currency/quantity field is used and a reference field which is a currency/quantity field in that table.
For Example, below is the table details.
FIELD DATATYPE LENGTH DEC.PLACES REF.TABLE REF.FIELD
1.SNO CHAR 5
2.AMOUNT CURR 10 2 T001 WAERS
3.NOS QUAN 5 KNA1 /VSO/R_PAL_UL
Here Field 2(AMOUNT) is a CURR field whose Ref. Table is T001 and Ref. Field is WAERS and Field 3(NOS) is a QUAN field whose Ref. Table is KNA1 and Ref. Field is /VSO/R_PAL_UL.
Hope this will help you.
Regards,
Vaitheeswaran -
Possible bug? Nested tables and quantity fields in the nested table.
Hey guys,
I have witnessed a weird bug, maybe someone can clarify this for me.
1. Create a nested table. The inner table contains a quantity field of type DZIEME (FROM VBAP-ZIEME).
2. Create your interface and just put this table in the import section. Try to activate. It will work.
3. Create an adobe form for it and a program and execute it. You'll get a short dump saying that VBAP-ZIEME is unknown and that there are errors in the dynamically generated function.
Second test.
1. Create a nested table. The outer table contains a quantity field of type DZIEME (FROM VBAP-ZIEME).
2. Create your interface and just put this table in the import section. Try to activate. It will NOT work.
You have to make the addition of the quantity fields in Currency/Quantity Fields.
From this I see that the checker, doesn't look into nested tables for quantity/currency fields and just activates the interface.
Third test
1. Create a nested table. The inner table contains a quantity field of type DZIEME (FROM VBAP-ZIEME).
2. Create your interface:
2.a. Put this table in the import section.
2.b. Declare the nested Quantity field in the Currency/Quantity Fields section, using the autofiller (the buttons to the right of the field)
2.c Try to activate. It will work.
3. Create an adobe form for it and a program and execute it. You'll get a short dump which for some reason has no info.
From this, I understand that the Currency/Quantity Fields section may not declare the quantity fields, from nested tables, correctly.
What do you guys think? What am I doing wrong?
Thanks,@Anne Kathrine P...
By nested tables I mean creating table types, in the dictionary (se11) then in the interface>Import section adding a parameter X TYPE B_T.
i.e.
Structure A
Table type of structure A, A_T
Structure B containing a field of table type A
Table type B of structure B, B_T.
The issue can be easily solved for Z tables by changing the component type from quantity to decimal type.
Maybe you are looking for
-
How do I display a list of all emails without the thread indetations?
I must have accidentally clicked the wrong thing. Now one of my email folder listings has the emails with the same subject line all indented in what I suppose is the THREAD format. I want to keep it simple and just list them in date/time sequence. Ho
-
MB129LL/B Composite AV Cable with my new iPod Touch 32GB to my Samsung TV
I bought a new Samsung T240HD 24" LCD HD Monitor TV and when I hook my iPod Touch to it with a genuine Apple MB129LL/B Composite AV Cable, the picture is not very good on my tv, matter of fact, it's not even in color. Does anyone have any suggestions
-
Hello, I have deployed the designed mapping into XI server after generating the .sda file Now the problem is I am not getting the Functional Ack generated for the message and also payload is not getting generated as separate attachment If
-
Vaio tap 11 doesn't keep up with clock
the lastest of my problems with this tap model number svt11226cxb is after wake up from sleep the system time is always behind of minutes or even hours, i checked the bios and shows the same time, if its the cmos battery that needs replacement im scr
-
Hi all; I am facing a dificult problem, and I am breathing hard.........Plz help. I am using an user-exit QQMA0014 for notification, in the enhancement, I was adding an email sent function module which is SO_NEW_DOCUMENT_ATT_SEND_API1. When a new not