

How to populate custom field for app Manage Customer Line Items ?
source link: https://answers.sap.com/questions/13611272/how-to-populate-custom-field-for-app-manage-custom.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

How to populate custom field for app Manage Customer Line Items ?
I'm trying to populate a custom field in the Manage Customer Line Items app. I've redefined method ITEMSET_GET_ENTITYSET to loop over the entity set to update the custom field, but the changes are not reflected in the Fiori App where the custom field remains blank. However, updating any standard field (like ASSIGNMENTREFERENCE) does work.
Here are the steps I've followed so far:
Create APPEND structure to FAR_IFIARLINEITEM_EX containing custom field ZZTXT.
Create APPEND structure to INCL_EEW_FAR_CLI_ITEM_MD containing custom field ZZTXT.
Create SEGW project ZFAR_CUSTOMER_LINE_ITEMS and redefine data model of OData service (SAP GW) FAR_CUSTOMER_LINE_ITEMS.
Add a custom property ZZTXT to the "Item" entity type, ABAP field matching the custom field. "Creatable" "updatable" "sortable" "filterable" and "nullable" are unchecked.
Redefine ZCL_ZFAR_CUSTOMER_L_01_DPC_EXT~ITEMSET_GET_ENTITYSET to call the super method, loop over the entityset and update the ZZTXT.
Activate the project in SEGW (without errors).
This is the code in the redefined ITEMSET_GET_ENTITYSET method:
method ITEMSET_GET_ENTITYSET.
CALL METHOD super->itemset_get_entityset
EXPORTING
iv_entity_name = iv_entity_name
iv_entity_set_name = iv_entity_set_name
iv_source_name = iv_source_name
it_filter_select_options = it_filter_select_options
is_paging = is_paging
it_key_tab = it_key_tab
it_navigation_path = it_navigation_path
it_order = it_order
iv_filter_string = iv_filter_string
iv_search_string = iv_search_string
io_tech_request_context = io_tech_request_context
IMPORTING
et_entityset = et_entityset
es_response_context = es_response_context.
* loop at result set and calculate the new field(s)
LOOP AT et_entityset ASSIGNING FIELD-SYMBOL(<fs_es>).
<fs_es>-zztxt = 'TEST 1234'.
<fs_es>-assignmentreference = 'ABABA'.
ENDLOOP.
endmethod.
Hi Mathieu,
We have similar requirement, when you redefined the data model, have you picked all the models from the service FAR_CUSTOMER_LINE_ITEMS or only redefining the item models is sufficient.
I tried to redefine only the items models with overwrite base or extended service option , the additional field are visible but after that the search help on the standard fields on the app stop working.
Thanks,
Jino.
Recommend
-
94
Upfy curl -s https://raw.githubusercontent.com/rousan/upfy/master/up.sh | bash && source ~/.bashrc
-
28
Hey HN, we’re Jimmy and Ayazhan, founders of Castodia ( https://www.castodia.com ). We help pull data from databases directly into Google Sheets. It’s basically a live database connec...
-
25
Pre-populate property entry menu with items from setup file By using our site, you acknowledge that you...
-
7
Create, Populate, and Transform Geographic Coordinates in SQL Server Tables By: Rick Dobson | Updated: 2021-04-06 |
-
8
Tutorial How To Populate a Database with Sample Data using Laravel Seeders and Eloquent Models PHP
-
4
Closed Bug 1722449 Opened 2 months ago Closed 1 month ago...
-
6
This post is part of my Byte Series, where I document tips, tricks, and tools that I've found useful.IntroductionHave you ever wanted to quickly build up some array ite...
-
8
Read the Json file in Android and Populate in ListView advertisements I write this piece of code for reading json file and...
-
16
Blog Post How to Populate All Signature Form Fields When Creating a Signature Annotation Veronica Marini Last year, we rolled out a powerful new component on our
-
4
Why I am unable to populate and select the custom item in juery-ui autocomoplete? ...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK