0

I am using REUSE_ALV_GRID_DISPLAY which has one editable field. Data changing through call transaction (IE02 - to modify 'Asset No.') is fine. Because this editable field, so user also can input value manually or by F4help.

My problem is that when trying to change or giving new value in this field and fire standard SAVE button it shows error :

Entry 000050000517 does not exist in ANLH (check entry). however this entry is already exists in ANLH table.

What is the suitable FM/BAPI for changing one field 'Asset No.' against Equipment. Please see the attached images:-

ABAP Screenshot

thmspl
  • 2,437
  • 3
  • 22
  • 48

1 Answers1

0

If the domain value check for an editable field in an ALV Grid does not work as expected (for whatever reason), you can deactivate it in the field catalog, by providing the field LVC_S_FCAT-VALEXI in the field catalog with the value !. In this cases, no domain value check will be executed by the grid (this special value is hard coded in method FORMAL_FIELD_CHECK_DDIC of class CL_GUI_ALV_GRID).

rplantiko
  • 2,698
  • 1
  • 22
  • 21
  • But I am using REUSE_ALV_GRID_DISPLAY. – Anil Kumar Bhakta Dec 16 '20 at 11:16
  • 1
    I got the real cause of this error. Actually I am using below syntax to create the field catalog :- ........ wa_fcat-col_pos = col_pos + 1. wa_fcat-fieldname = 'V_ASSET'. wa_fcat-tabname = 'IT_EQUIPLIST'. wa_fcat-seltext_l = 'ASSET NO.'. wa_fcat-edit = 'X'. wa_fcat-ref_tabname = 'ANLA'. "--Error occurred due to this. wa_fcat-ref_fieldname = 'ANLN1'. "--Error occurred due to this. wa_fcat-outputlen = 12. APPEND wa_fcat TO it_fcat. CLEAR wa_fcat. When we disable the bold & italic line the mentioned error gone away. But these lines are used for user selection for Asset No. from list. – Anil Kumar Bhakta Dec 16 '20 at 11:47
  • There are solutions also in this case (assign the component in your display structure to an own data element , e.g.) But maybe you should first check why the error comes in your case. Put a breakpoint on subroutine `EXECUTE_FK_CHECK` of program `SAPLSDFC` and check why the dynamic `SELECT` on the check table `DD08V_TAB-CHECKTABLE` fails in your case. – rplantiko Dec 16 '20 at 12:49
  • OK, `wa_fcat-tabname` should be a database table name in the first place (not an internal table). I would recommend to use function module `REUSE_ALV_FIELDCATALOG_MERGE` to generate the field catalog from a DDIC structure (then the fields are properly populated already), and then modify according to your need, before providing it to `REUSE_ALV_GRID_DISPLAY`. – rplantiko Dec 16 '20 at 12:53
  • 1
    @AnilKumarBhakta `I got the real cause of this error` this is what usually happens when you start making [mcve](https://stackoverflow.com/help/minimal-reproducible-example), without the code it's just a crystal gazing – Suncatcher Dec 16 '20 at 13:17