Application Development and Automation 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: 
Read only

Adding fields to transaction VA01 & also to database table

Former Member
0 Likes
2,225

Hi all,

can we add some fields to database tables like vbap, vbak if we will get key from sap?

will it create any problem in future?

crea

i need to create some new fields in VA01 so that i can populate those fields while creating sales order.generally, these fields r not present in VA01.but i want to add some fields in this transaction.

These fields r not present in any database tables. if i will populate these fields in VA01, then how i can update the database table?

actually, i want to add some new fields in transaction VA01 & i want to update the database while creating the sales order.but there is no such fields in database tables.

plz suggest me the most possible ways to do this?

it's urgent.plz suggest.

Thanks

pabi

4 REPLIES 4
Read only

Former Member
0 Likes
1,148

Depending on if you want to add the fields at the header or item level, you can do append structure to VBAK or VBAP. You can add fields to the header and item screens to capture those values using screen exits provided on the header additional data screen and the item additional data screen.

You can then pass those values from the screen to the database in user exits provided through out the VA01 program (SAPMV45A) like MV45AFZZ etc.

Read only

Former Member
0 Likes
1,148

you can create new z fields and u can append it into Standards ABAP tables.

Read only

Former Member
0 Likes
1,148

Hi,

This is for XD01 like that you can do for the va01.

Creating Custom Screen in XD01

Go to Transaction SPRO à Logistics – General à Business Partner à Customers à Control à Adoption of Customer’s own Master Data fields à Prepare Modification à Free enhancement of Customer Master Record.

Following screen appears:

Go to CHANGE mode and Click ‘New Entries’ button. Then add a Screen Group (SK here)and meaningful description. Save the entry and then SELECT that entry and Click on ‘Label Tab Pages’.

Add a Label Tab Page i.e. enter a Screen Number, Function Code and Meaningful Description.

Save the entry and come back to the SPRO screen. Click Business Add-in: Processing Master Data Enhancements

Create one Implementation by giving implementation name (must start with Z. ZSURESHKUMAR here). Give meaningful description and press enter. The following screen appears.

Go to Interface and Click on ‘CHECK_ADD_ON_ACTIVE’ method. Add the following code and save.

method IF_EX_CUSTOMER_ADD_DATA~CHECK_ADD_ON_ACTIVE .

data: l_flg_active type BOOLE-BOOLE.

if i_screen_group = 'SK'.

e_add_on_active = 'X'.

endif.

endmethod.

Activate that and come back to SPRO initial screen. Click Business Add-in: Customer Subscreens

The following screen will appear. Create one implementation (ZSURESHKUMAR1 here).

Press enter. The following screen will come. Enter a meaningful Description and Screen Group (which we created earlier) as shown below.

Then go to Interface

Create a Function Pool SAPLZSURESHKUMAR. (See the code of the program for other details). Create a Screen ‘1111’ with field old Customer Number – screen group PSK (SE51)

Click on GET_TAXI_SCREEN method and add the following code.

method IF_EX_CUSTOMER_ADD_DATA_CS~GET_TAXI_SCREEN .

case i_taxi_fcode.

when 'SK_TAB'.

e_screen = '1111'. "Eart + Objekt

e_program = 'SAPLZSURESHKUMAR'.

e_headerscreen_layout = ' '.

endcase.

endmethod.

Activate and leave the transaction.

Go to KNA1 (Customer Master) table and add a custom field as shown below. Activate the table.

Now go to XD01 transaction.

The screen we created will appear as shown in the above screen-shot. Click the button. The following screen will appear.

Enter a customer number and save the transaction. Now go to KNA1 table and check the value of the Old Customer Number field’s value. The value you entered in this screen will appear on there.

Until now, we wrote code for creating the Custom field. Now we need to disable that field when we are opening the transaction in DISPLAY mode.

Go to include – LZSURESHKUMARTOP and enter the following code and activate the program.

Now execute the Transaction in display mode and check the output.

*************Rewards

Rgds,

P.Nag

Read only

Former Member
0 Likes
1,148

Hi Pabitra rout,

<b>You have 2 options to include the Fields 1) Append Structure 2) Include structure</b>

Append Structure:- An append structure is a structure assigned to just one table. When a table is activated, all append structures for the table are found and appended to the table. Append structures are used to add customer fields to SAP tables.

http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eb61446011d189700000e8322d00/content.htm

Include Structure:- Include structures are used to add fields in the middle also.where as append structures adds fields only at the end.In addition to listing the individual fields, you can also include the fields of another structure in tables and structures. Individual fields and includes can be mixed as required.

http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eb61446011d189700000e8322d00/frameset.htm

http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eb61446011d189700000e8322d00/frameset.htm

<b>Here is the detailed preocedure to add fields/structure to Database table:</b>

just follow this to add structure to the database table,

<b>go to the se11 ->,

provide the table name ->,

go for display ->,

select GOTO option at the menu ->,

select Append structure ->,

provide the Append name ->,

Enter ->,

provide stort text and fields to the structure ->,

then save and activate,</b>

now check the table, now u can see the table with new structure at the last.

Hope this helps you about how to add fields to Database tables like VBAK,VBAP…

<b>Reward points if it helps you.</b>

Regards,

Rama chary.Pammi