on 2024 Mar 19 7:39 AM
Dear Experts,
BTP - ABAP Environment
I am currently testing the Factory Action - Copy of RAP.
When I select a record in the ListReport screen and click the CopyInstance button, it automatically navigates to the ObjectPage, which is in Draft status.
After clicking Save and returning to the ListReport, if I select the same record again and click the CopyInstance button, the error shown in the attached image appears.
However, the Copy action still executes successfully.
I would like to confirm the cause of this issue.
Please find the reference code snippet below.
factory action copyInstance[1];
METHOD copyInstance.
DATA: lt_head TYPE TABLE FOR CREATE znei_guia02head.
READ ENTITIES OF znei_guia02head IN LOCAL MODE
ENTITY a02head
ALL FIELDS WITH CORRESPONDING #( keys )
RESULT DATA(Headers)
FAILED DATA(Faileds).
LOOP AT Headers ASSIGNING FIELD-SYMBOL(<lfs_header>).
APPEND VALUE #(
%cid = keys[ KEY entity %key = <lfs_header>-%key ]-%cid
%is_draft = keys[ KEY entity %key = <lfs_header>-%key ]-%param-%is_draft
%data = CORRESPONDING #( <lfs_header> EXCEPT HeadID )
) TO lt_head ASSIGNING FIELD-SYMBOL(<lfs_newHeader>).
ENDLOOP.
MODIFY ENTITIES OF znei_guia02head IN LOCAL MODE
ENTITY a02head
CREATE FIELDS ( Canl SumFg criticality3 NetFg Bukrs Belnr Budat Mwskz Hwbas Hwste )
WITH lt_head
MAPPED DATA(mapped_create).
mapped-a02head = mapped_create-a02head.
ENDMETHOD.
Request clarification before answering.
Hello @Neil_Lee_057 ,
below are the following points I would check:
1. Factory data action is to be given in UI.Identification For Ex. type: #FOR_ACTION, label:'Copy', dataAction: 'copy' or at UI.Lineitem depending on where you want to position it.
2. Check if Redirection to parent is working as expected in the entity.
3. Check if alias mapping is properly assigned.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.