cancel
Showing results for 
Search instead for 
Did you mean: 

Adding a custom field to Sales Order

Former Member
0 Kudos

All,

Is there a way we can add a custom field to a sales order? Here is what i am trying to accomplish.

We need a field in sales order which will record the original quantity of the order and should not change when user manually change the quantity due to low stock etc. This custom field will record the original quantity ordered and will not change even if we change the quantity in the line item.

This way when we pull up reports we can use this field to see what was the original quantity ordered.

'

thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

hi,

if you want to add a custom or own field in sales order then follow this procedure:

let us consider any one of the table which you want to add the VBAK or VBAP - first append teh structure and add the fields with ZZXXXXX.

1. please check the user exit on which screen you have to add the field.

if user exit is not there for that particular field then there is no another way of inserting that particular field in standard program directly.

then modify the standard program & insert the code over there with the help of an ABAPER and access key.

As per your requriment:

find out whether the user exit is there in SAPMV45A program in that particular screen if it is there then write a piece of code and insert that ZZXXXXX field there.

for Eg: original order quantity.

if you want to generate a report if the length of the fields and tables are more then go for Z report if the standard reports is not satisfiying your requriment or else go for go for ABAP query.

NOTE: SAP WILL NOT HELP IF STANDARD PROGRAM IS CHANGED ACCORDING TO OUR REQURIMENT.

hope this clears your issue

balajia

Former Member
0 Kudos

Balaji,

Thanks for your reply. Can you tell how i can check the user exit? and determine if it exists for the user exit or the field i am trying to setup.

Sorry i haven't done this before so not sure about the whole process.

Thanks

Former Member
0 Kudos

I am guessing you are trying to add this field to VBAP.. code your custom logic only for new line items ... USEREXIT_SAVE_DOCUMENT_PREPARE or USEREXIT_MOVE_FIELDS_TO_VBAP are some of the possibilities.. .Please check SDN threads or you can find out more in debug mode

Shiva_Ram
Active Contributor
0 Kudos

I assume this has been discussed in the past.

For example check this link

http://www.sapfans.com/forums/viewtopic.php?f=5&t=306294&st=0&sk=t&sd=a

Regards,

Former Member
0 Kudos

Thanks Shiva. Yea those post discusses adding new field but its not comprehensive. I was looking for directions or SOP to create such a field. thanks!