on 2024 Sep 27 10:58 AM
hi,
i added a custom field in append in RIHAFVR structure.
But when i launch transaction IW47 the field is not displayed in alv.
How can i display the field?
thank you
Request clarification before answering.
There are two solutions to add a custom field to IW47 ALV:
Of course, you need to fill the new field of the internal table, do that wherever you want via the Enhancement Framework.
After that, empty the ALV field catalog buffer (run the program BALVBUFDEL) because IW47/RIAFRU20 uses the ALV buffer.
NB concerning the internal details of RIAUFR20. It calls the FM REUSE_ALV_FIELDCATALOG_MERGE with the parameter I_INTERNAL_TABNAME="OBJECT_TAB" to determine the initial field catalog, this FM considers all custom fields appended to the included structures (RIHAFVR) but not the fields appended by the Enhancement Framework, hence you need to do an enhancement to update the field catalog for these fields.
(*) NB the documentation of exit_saplirep1_001 says: "You can modify the field attributes in the field catalog IT_FIELDCAT using this customer exit. However, we must point out that the table as a whole should not be modified, that is, you should neither add nor delete rows."
NB: to consider the latest program modifications, you must restart the program (/NIW47 or /NSE38 RIAFRU20).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ok thank you, is there also a way to add the field without modifying the RIHAFVR structure?
I tried to add the field, but I get the following error:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
with DATA ztest TYPE ztest it is ok, but the execution dumps
do I have to do an append in the G_FIELDCAT_TAB table?
I implemented an enhancement by doing an append, is it correct?
this is the dump
in this point:
thank you @Sandra_Rossi
yes the enhancement is active, in fact if I deactivate it then it no longer goes into dump.
sorry I didn't understand the solution you proposed, do I have to change the method to do the append in the internal table g_fieldcat_tab ?
What is ES_RIAFRU20 ? I implemented enhancement in the report RIAFRU20
Thank you
I checked and it is active. However I saw that in debug I can not put a breakpoint on the enhancement that I created, is it normal? and in debug I only see the enhancement point and not my ZCustom_enanancement
Conclusion: I did the same code as you, i.e. extending OBJECT_TAB via the enhancement spot, adding the new field to the field catalog (CMOD IWOC0004 exit_saplirep1_001 ZXCSVU09), emptied the ALV field catalog buffer (BALVBUFDEL) because IW47/RIAFRU20 uses the ALV buffer, I ran the program, filled by debug the new field in OBJECT_TAB, and this value was displayed by the ALV of IW47.
Sorry, I can't do more.
NB: RIAUFR20 calls the FM REUSE_ALV_FIELDCATALOG_MERGE with the parameter I_INTERNAL_TABNAME="OBJECT_TAB" to determine the initial field catalog, this FM considers all custom fields appended to the included structures (RIHAFVR) but not the fields appended by the Enhancement Framework, hence you need to do an enhancement to update the field catalog for these fields.
NB: exit_saplirep1_001 documentation says "You can modify the field attributes in the field catalog IT_FIELDCAT using this customer exit. However, we must point out that the table as a whole should not be modified, that is, you should neither add nor delete rows."
thank you very much you were very kind 🙂
I'm just asking to be sure I understood, so to add a field I have to modify the RIHAFVR structure, is this correct?
and for this: "NB: to consider the latest program modifications, you must restart the program."
how can I restart the program?
thank you!
Did you also implement the user exit? CMOD IWOC0004 exit_saplirep1_001 ZXCSVU09?
| User | Count |
|---|---|
| 14 | |
| 8 | |
| 6 | |
| 6 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.