cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

adding fields

Former Member
0 Likes
2,626

Hi All!

I am new to ABAP.Can anybody please explain me how to do the following.

Copying customer master fields to a sales document header:

new additional customer master fileds to be added are ZZKVGR6,ZZKVGR7.

I am being provided the following procedure to follow to add the fields:

Copying customer master fields to a sales document is carried out in two steps:

1. A field in the customer master table KNVV is first copied by INCLUDE (KUAGVZ) to the sold-to party, ship-to party or payer view (KUAGV). A value is assigned to the field via a user exit (V05EZZAG).

2. The field is copied to the sales order table (VBAK) from the respective customer view (KUAGV). A value is assigned to the field via a user exit in program MV45AFZZ (USEREXIT_MOVE_FIELD_TO_VBAK).

Note:

You can create new fields (ZZ...) in an existing table. This does not cause problems during puts because the additional fields are put at the end of the table and the name range cannot be overwritten. Make certain that field names begin with "ZZ"

Now my query is where shall i add the new fields in KNVV table or shall i add in KUAGV through include KUAGVZ.

Please advise.

regards

pavan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

Answers (3)

Answers (3)

Former Member
0 Likes

Hi All!

If i add these fields through the Include or append structure in KNVV table.Is this going to be reflected in the KUAGV view automatically.

Please advise

regards

pavan

Former Member
0 Likes

Nope.

But you can add the same append structure to the include KUAGV. Steps are the same as before.

Former Member
0 Likes

Hi anand!

In my spec there was a mention of structure KUAGVZ to be used for copying these fields.

1. A field in the customer master table KNVV is first copied by INCLUDE (KUAGVZ) to the sold-to party, ship-to party or payer view (KUAGV). A value is assigned to the field via a user exit (V05...).

If i add these fields individually to these table and view .Is it not going to make any problems.

please advise

regards

pavan kumar

Former Member
0 Likes

KUAGV is a structure and KUAGVZ is the field int he include/extension of this structure...

Maybe u are asked to copy all the KUAGVZ fields over to KNVV...Pls clarify with ur Fconsultant.

KUAGVZ -Customer Modifications:Sold-to Party View of Customer Master

has the following fields...

KVGR1

KVGR2

KVGR3

KVGR4

KVGR5 so maybe he wants u to copy the KUAVGZ to KNVV table....

Former Member
0 Likes

Lets take it one step at a time.

Code of V05EZZAG moves from KNVV to KUAGVZ to KUAGV. So the append structure will have to be added to the one in the middle too.

Similarly you will have to analyze what more structures are going to be affected.

Regarding problems, its not necessary that there should be one, as append structures have been specifically named as a technique to help you address such requirements. Please read through the documentation. However rigorous testing is definitely advisable.

PS: Make sure that the structures are always syntactically correct and active, otherwise SAP standard transactions will fail and you will have to face hell.

Former Member
0 Likes

Ok, one more idea that might help you.

There seems to be a bunch of structures that might have to be added to. These seem to have includes embedded. Go to the common denominator structure for all the structures and then add your custom structure; saves time and is cleaner. For ex: check for KUAGVZ, it is embedded inside KUAGV!

Former Member
0 Likes

Hi All!

I had added 2 custom fields to the structure KUAGVZ through custom append structure.Now the table KNVV is not getting reflected with the new fields and all the remaining fields in KUAGVZ i.e. KVGR1 - KVGR5 are getting reflected in the KNVV table.

What shall I do to get me custom fields reflected in the Table KNVV. or shall i do any DB update.

Please advise

Regards

Kumar

Former Member
0 Likes

What you are looking for is an 'append' structure.

Go to transaction Se11, enter table KNVV. Then press Goto -> append structure(F5). Give a new name and add required fields. Do follow naming conventions (start with ZZ).

Former Member
0 Likes

Hi Pavan, towards the end u have

.INCLUDE /BEV1/EMKNVV_I

/BEV1/EMLGPFAND /BEV1/EMGPFAND

/BEV1/EMLGFORTS /BEV1/EMGFORTS

YOu can use these extensions to add ypour new fields.

Shobana

Former Member
0 Likes

This was discussed 2 days back, you can go thru this...