on 02-02-2013 2:53 AM
Hi Experts,
I have a requirement to add custom fields to VBAP table and display those fields in Sales Order (customer order) item details.
I have managed to display those custom fields in Sales UI by modifying the configuration of LO_OIF_MAIN_APP. I created new tab under tab item details and using custom configuration for the UIBB which is copied from LO_OIF_FORM_ITEM. Lets say I copied the LO_OIF_FORM_ITEM into ZZ_LO_OIF_FORM_ITEM and use this configuration for my new custom tab which consists of several custom fields. Since those fields value need to be manipulated, then I also copied the standard feeder class of CL_LO_OIF_GUIBB_ITEM_FORM into ZZ_CL_LO_OIF_GUIBB_ITEM_FORM, then I modify the method GET_DATA and manipulate the CS_DATA ( I am unable to modify the field content using the BADI since CS_DATA is said to be obsolete).
What happen is the field content can be saved and retrieved successfully from table if I did not manipulate the data at all or if I change the data directly from the UI, but if I change the field content from my codes (programmatically by replace value of CS_DATA), then it will be displayed but wont be saved to the table. Is there any other way to manipulate custom field content?
Please share any of your experience and suggestion related to this matter.
Thank you.
Regards,
Leo
Leo,
Instead of copying the configuration and feeder class to new one and using it, we can add the custom fields directly to configuration layout by running web dynpro application Enhancement Workbench for LO API (LO_GAF4OIF_EWB_APPL, run with application configuration).
Before running this application, add all the custom fields to VBAP, then run the above application, it will guide how to do that.It will add entries to LORD_MAPPING table also.
Basically it adds all the fields to communication structures, so that those will be available in the configuration layout (Configure group), so that you can those fields in the order you need. so that we will have consistency in modifying those custom fields.
Thanks
Ram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ram,
Thank you for your reply. I have this step done and manage to add those custom fields. The problem is that I need to provide default values to those fields based on certain logic. I have managed to provide default values to those fields by copying feeder class CL_LO_OIF_GUIBB_ITEM_FORM into ZZ_CL_LO_OIF_GUIBB_ITEM_FORM and modify the GET_DATA method. But the table wont be updated. However it is still updated when I remove the code. After I trace it further, it seems that the value changes in my program only reflected to the UI, not the context.
Leo,
There is a BADI "BADI_SLS_LO_OIF_ITEM_FORM" can be used enhance the get_data/get_Defintion method. Just implement this BADI with new class,there you can write your own code
Thanks
Ram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i think you have to ehance feeder class intead of coping configuration
you can add field by enhancing GET_DEFINITION method of feeder class then you just need to enhance your configuration and add these field and check method is it using some specific structure for saving then you have to enhance that structure also
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
IF in your application you are using statndard Feeder class so you havE to enhance this method same as we ebhance normal standard class by using enhancement spot i thinK at start and before end there will be enhancemnet spot available in all feeder class method so you can use at end enhamncement spot and append your field in ET_FIELD_DESCRIPTION.
Actually I found a BADI related to this, but I don't know the concept to write the codes inside this method. Because if you take a look at class CL_LO_OIF_GUIBB_ITEM_FORM in method get_definition, it is not a simple code.
I have managed to add those custom fields by using the configurator, right now I need to know how to manipulate the value of these fields at PBO.
Thank you.
Regards,
Leo
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.