04-15-2013 2:39 PM
Hi,
I am new in ABAP and the scenario is i have a structure appended in table and I want to add the quantity filed VOLUM in that structure it gives me the error although i have mentioned the field name with the table name i.e. VBAP-VOLUM but it says type is ont active.
kindly help me in this regard.
Thanks
Mohammad Jawad
04-16-2013 11:01 AM
In your structure don't give type as VBAP-VOLUM but use data element VOLUM_AP and refer to unit VOLEH in table VBAP or copy also this field from VBAP to your append structure.
Also if this is a standard structure your field(s) must start with ZZ or YY (Note 16466 - Customer name range for SAP objects)
Regards,
Raymond
04-15-2013 3:29 PM
for qty field u have to give reference fieldname & reference tablename in Currency/Quantity field tab.
give MARA as reference fieldname
MEINS as reference tablename or u can give any other table fields.
04-16-2013 10:37 AM
define field name with data element and not with table reference VBAP-VOLUM. That why the system is saying it is not active.
Also give the reference of the quantity field as suggested by sai krishna.
04-16-2013 10:46 AM
VBAP contains a unit of measure field MEINS, why would you reference MARA for the unit of this new field? This reference field has meaning, just throwing some random field from another table just to complete the activation will compromise the functionality.
In fact, if I assume from the new field's name VOLUM that the field is to hold the volume of some material (e.g. metres cubed, cm cubed etc) then I think you need to add a new field to hold the unit as well and the quantity field to hold the amount.
Regards,
Nick
04-16-2013 10:41 AM
Hi there!
Can you give the piece of code. I will correct and give back to you.
Regards,
Khushboo
04-16-2013 11:01 AM
In your structure don't give type as VBAP-VOLUM but use data element VOLUM_AP and refer to unit VOLEH in table VBAP or copy also this field from VBAP to your append structure.
Also if this is a standard structure your field(s) must start with ZZ or YY (Note 16466 - Customer name range for SAP objects)
Regards,
Raymond
04-16-2013 2:54 PM
04-16-2013 2:54 PM
Matter resolved, we have to define field with data element and give reference table and the filed in the Currency/Quantity Tab... thanks to all for replies
04-16-2013 2:56 PM
Still can't understand why MARA is used as the reference table in this case.
As this has been flagged as the correct answer maybe someone could explain.
Thanks,
Nick
04-16-2013 3:27 PM
Hi Nick,
If you want to create a field like Quantity or currency you need to give a diff data type like QUAN, CUKY or UNIT.
In your case you are asking why mara is been used as reference table for this MEINS field.Because MARA is been a master data table and while VBAP is a transaction table.
Also you can use the same table VBAP as the reference table which dosen't make any difference.
Both are same and Sai answered it because he may be familiar with MARA and its not that using VBAP as reference will throw you an error.
if you can see NTGEW-Net Weight of the Item in VBAP table,the same table VBAP is given as reference which is also fine.
No need to Think a lot about it which is not going to impact anyway.
Hope your doubt is cleared.
Award points if it helped to solve your doubt.
Thanks,
Dinesh.
04-16-2013 4:04 PM
Hi,
Let me use elements from both answers;
"MARA was just an example...one can use the MARA because both have same data element"
"is not going to impact anyway"
What I'm saying is, it does impact, it is important which UOM field a quantity field references, maybe not if you only care about activating the table, but certainly if you care about how the data that gets added to the table is used.
If you are processing data from a quantity field you will need to display that value based on its UOM, as the attributes of the UOM will dictate the number of decimal places displayed. If you are totalling quantities you will need to know that you are only adding values expressed in the same unit (it would make no sense to add 15 kg to 5 cm). There's a reason adding this reference field is mandatory, it's because a quantity field without a unit is meaningless. Adding a reference field from an unrelated table is equally meaningless.
The correct answer is in fact from Raymond "refer to unit VOLEH in table VBAP or copy also this field from VBAP to your append structure".
Regards,
Nick
04-17-2013 7:03 AM
Thanks Nick, My Mistake as i mentioned i am new so i misunderstood it... thanks for the correction