on 2024 Jul 23 4:53 AM
Hi everyone,
In some SAP Blog posts and SAP Notes, it's mentioned to use class CL_CHDO_READ_TOOLS to read Change Document information.
Today, I created a test class to read change documents for object EINKBELEG (Purchasing Documents) and got some exception "You are not authorized to display change documents".
I did a test by reading a Custom Change Document and the code worked perfectly.
I have read all standard documentation mentioning class CL_CHDO_READ_TOOLS, but none of the pages mention any restriction related to reading Standard Change Documents.
SAP Help - Reading Change Documents
This is my code:
CLASS zktest2 DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
INTERFACES if_oo_adt_classrun.
ENDCLASS.
CLASS zktest2 IMPLEMENTATION.
METHOD if_oo_adt_classrun~main.
TRY.
cl_chdo_read_tools=>changedocument_read(
EXPORTING
i_objectclass = 'EINKBELEG'
IMPORTING
et_cdredadd_tab = data(lt_cdredadd_tab)
).
CATCH cx_root INTO DATA(lo_root).
DATA(lv_message) = lo_root->get_text( ).
out->write( lv_message ).
ENDTRY.
ENDMETHOD.
ENDCLASS.
has anyone faced this issue?
Hi Diego,
I tried to replicate the same code which you have pasted in a Dev 080 system of SAP S/4HANA Cloud Public Edition and I am able to see that usage of this class is allowed for cloud development
Could you try this again?
This could also be because you do not have the roles to access the object class 'EINKBELEG'
Thanks,
Prasanth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
69 | |
12 | |
11 | |
10 | |
9 | |
8 | |
7 | |
6 | |
6 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.