cancel
Showing results for 
Search instead for 
Did you mean: 

Adding Custom Fields in Standard View - How to save data to Table

Former Member
0 Kudos

Dear Experts,

One View is having UI elements from a standard table /RPM/ITEM_D. Added 2 custom fields in this table using enhacement. Now enhanced that standard View and added these 2 custom fields. When I am saving the application, these 2 fields values aslo should be saved. In the context all fields are present from table /RPM/ITEM_D except the custom one. Can you please help me out how to acheive this.

Thanks and Regards

Sumesh

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Add new two fields to context, and bind it. In coding update these two fields also.

Cheers,

Kris.

ashish_shah
Contributor
0 Kudos

Hi Sumesh,

What you need to do is :

1) add these two new fields in the same context node where the field from table /RPM/ITEM_D are added.

2) in your UI , bind values to these new attributes.

If current application is using and BAPI / Class method to update the table ,

this new fields will also be passed to that bapi and will update table.

Regards,

Ashish Shah

Former Member
0 Kudos

Hi Ashish/KIsnna,

Thanks for answers. But the standard context in my component is coming from USED Component and the same is copied to Current Component Controller. In this case, if I will add these 2 fields in the current Component Context - How it will take care while Saving.

Thanks and Regards,

Sumesh

ashish_shah
Contributor
0 Kudos

Did you locate the method which does the data update.

If this method is being called from USED component , then you will have to enhance used component as well.

To transfer data of your custom node to USED component you will have to use Singleton class.

Check my blog for using singleton class : [ABAP Class using Singleton pattern - used in WDA Enhancements|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/20671] [original link is broken] [original link is broken] [original link is broken];

Regards,

Ashish Shah