2025 Jan 02 5:36 PM - edited 2025 Jan 03 8:33 AM
Hi,
i'am a beginner in RAP and I have the little curisously problem:
I have an managed application in which I want to enter values like /DMO/TEST or only TEST as a key value in a table. The application includes 5 Tables, and 3 works fine, but only two doesn't work correctly.
define table /***/chcklink {
key client : abap.clnt not null;
@AbapCatalog.foreignKey.screenCheck : false
key modul : /***/dt_modul not null
with foreign key /**/chcksmod
where client = /***/chcklink.client
and modul = /***/chcklink.modul;
key check_appl : abap.char(12) not null;
active : abap_boolean;
... }
define table /***/chcklink_d {
key client : abap.clnt not null;
key modul : /***/dt_pbs_modul not null;
key checkappl : abap.char(12) not null;
active : abap_boolean;
...}
This table is a child of the main-view.
When creating a new data record, everything works fine, the values are available as key or simple table-value in the draft table and it will show on the screen correctly. However, if I save it, the values are no longer transferred to the persistent table.
Example: in this case the key-value will be not trafnserfed. in an another case, one of 5 fields will be not tranfsered !?
Draft (create new entry):
/DMO/Test is the key-value. Its definied mandatory.
Values in draft-table:
--> now apply new associated entry
In the main-screen the new entry is visible, but the main-screen is still in edit-mode.
-->saving the main view / main object
Screen is changing from editable mode to readonly mode, and the new created Entry in the subtable disappears.
in the corresponging main-db-table is a new entry, without keyvalue.
When i try to create a new entry, it will produce a shortdump, cause dupplicate key (empty value as a key-value already exists )
All associated tables are definied simliar, but only this one doesn't work.
My question is now : Could someone tell me whats wrong ?
I've tried with an uuid and the missing field as a non-key-field, but without a solution.
thanks a lot
Adalbert
codings:
BHEV:
managed implementation in class /nnn/BP_R_CHCKSMOD unique;
strict ( 2 );
//strict;
with draft;
define behavior for /nnn/R_CHCKSMOD alias SMOD
//implementation in class /nnn/BP_R_CHCKSMOD unique
persistent table /nnn/chcksmod
draft table /nnn/chcksm000_d
lock master total etag Lastchangedat
etag master Lastchangedat
authorization master ( global, instance )
//authorization master ( instance )
{
create ( precheck );
update ( precheck );
delete;
draft action Edit ;
draft action Activate optimized;
draft action Discard;
draft action Resume;
draft determine action Prepare;
field ( mandatory : create ) Modul;
field ( readonly : update ) Modul;
association _CHCKLINK { create ( features : instance ); with draft; }
...
}//********************************************************************************
define behavior for /nnn/R_CHCKLINK alias CHCKLINK
persistent table /nnn/chcklink
draft table /nnn/chcklink_d
lock dependent by _smod
authorization dependent by _smod
etag master Locallastchangedat
{
update ( precheck );
delete;
association _smod { with draft; }
field ( readonly ) Modul;
field ( mandatory : create ) CheckAppl;
field ( readonly : update ) CheckAppl;
mapping for /nnn/chcklink corresponding;
}
Request clarification before answering.
after checking my behavior def i've found the reason for my case:
...
mapping for /nnn/chckmsgcfg corresponding;
...If the field-definition in the db-table is different to the data definitions, the transfer of values doenst not work.
🙈
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 4 | |
| 3 | |
| 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.