Rupesh Kadge
SAP Technical Consultant
How is
Read
in RAP
works ?
Rupesh Kadge
SAP Technical Consultant
01
The read statement in RAP is completely different
than ordinary ABAP.
1) The read operation is performed on the transactional
buffer.
2) Read statements have special parameters such as
%key, %control and %tkey many more depends on
operations.
3) Read consist of two additional components
which store result and failed based on the
process of read operation.
Rupesh Kadge
SAP Technical Consultant
02
4) The current syntax of read operation is using FROM VALUE
statement as an internal table to filter the required entries
Just like where condition.
The read operation is on CDS entity ‘ZI_TRAVEL_RAP_B' whose
key field is TRAVELID. Which is why the special parameter will
show only one field as %key field.
Note:
If the CDS view entity has more key fields then during all %key
fields need to provide.
The %control special parameter is basically used to mark all
required fields for which data is fetched.
This %control is specific to the record which is fetched from
%key operation. Just like a where condition these special
parameter behave in RAP.
Just to mark filed an interface is used "if_abap_behv=>mk-on"
which hold value '01'.
Rupesh Kadge
SAP Technical Consultant
03
Note:
The %control is specific to the single record validation applied based
on the %key field. Which means if any new value is added as a
second record in FROM VALUE clause, For that specific record
%control can be different.
Once the read operation is being processed, If any error
occurred then such case read consist of two separate inline
declaration internal tables to store the failed and Success
records. Based on the fail and success case of Read
statement.
1) Result : When Read processed Successfully.
2) Failed : When Read Got failed.
Rupesh Kadge
SAP Technical Consultant
Thank You
& Stay
Tuned.
SAVE AND
SHARE