Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Adding Quantity field in Appended struncture

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

raymond_giuseppi
Active Contributor
0 Kudos

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

11 REPLIES 11

Former Member
0 Kudos

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.

former_member205060
Active Participant
0 Kudos

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.


0 Kudos

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

Former Member
0 Kudos

Hi there!

Can you give the piece of code. I will correct and give back to you.

Regards,

Khushboo

raymond_giuseppi
Active Contributor
0 Kudos

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

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

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

Former Member
0 Kudos

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

0 Kudos

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.

0 Kudos

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

0 Kudos

Thanks Nick, My Mistake as i mentioned i am new so i misunderstood it... thanks for the correction