on 08-13-2019 7:17 PM
Hello Folks,
I am trying out some transaction app coding on SAP ABAP CP. Could you plese help in the new model how do we send messages and how do we now handle the old BOPF actions in the new RESTful model?
Thanks in advance.
Update on 17/08/2019-
Okay so no more traditional BOPF like code, great!!
Add annotaion in CDS for the button-
@UI: { lineItem: [ { position: 10, label: 'Booking ID', importance: #HIGH }, { type: #FOR_ACTION, dataAction: 'SET_STATUS', label: 'Set Status'} ], identification:[ { position: 10, label: 'Booking ID' } ] }
the BDL code will look like
implementation unmanaged;define behavior for YI_BOOKING_xxx implementation in class y_i_booking_xxxlock master etagLastChangedAt{ field(mandatory)CustomerName, DateOfBooking, DateOfTravel, EmailAddress;create; update; delete; action set_status result[1] $self; }
The implementation looks like-
CLASS lhc_YI_BOOKING_xxx DEFINITION FINAL INHERITING FROM cl_abap_behavior_handler. PRIVATE SECTION. METHODS create FOR MODIFY IMPORTING entities FOR CREATE YI_BOOKING_xxx. METHODS delete FOR MODIFY IMPORTING keys FOR DELETE YI_BOOKING_xxx. METHODS update FOR MODIFY IMPORTING entities FOR UPDATE YI_BOOKING_xxx. METHODS lock FOR LOCK IMPORTING keys FOR LOCK YI_BOOKING_xxx. METHODS read FOR READ IMPORTING keys FOR READ YI_BOOKING_xxx RESULT result. METHODS modify FOR BEHAVIOR importing keys for ACTION YI_BOOKING_xxx~set_status RESULT result. ENDCLASS.CLASS lhc_YI_BOOKING_xxx IMPLEMENTATION. METHOD modify. ENDMETHOD
But wait on clicking on the button on my Fiori UI, I get a new error-
Precondition required for action in entity CDS~YI_BOOKING_XXX - use "If-Match" header
Can any kind hearted gentle man or woman help me ?
Update: This UI error is because of ETag mismatch. The only question is how to how my own custom messges?
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.