Hi,
I had create custom application in which i am looking for CDS or API to post GL in public cloud sap. below service i had tried but it doesn't worked .
DATA: lt_je_deep TYPE TABLE FOR ACTION IMPORT i_journalentrytp~post,
lv_cid TYPE abp_behv_cid.
data:lt_je_val type TABLE FOR FUNCTION IMPORT i_journalentrytp~validate.
TRY.
lv_cid = to_upper( cl_uuid_factory=>create_system_uuid( )->create_uuid_x16( ) ).
CATCH cx_uuid_error.
ASSERT 1 = 0.
ENDTRY.
APPEND INITIAL LINE TO lt_je_deep ASSIGNING FIELD-SYMBOL(<je_deep>).
<je_deep>-%cid = lv_cid.
<je_deep>-%param = VALUE #(
companycode = '1000' " Success
documentreferenceid = 'BKPFF'
createdbyuser = 'TESTER'
businesstransactiontype = 'RFBU'
accountingdocumenttype = 'RE'
documentdate = sy-datlo
postingdate = sy-datlo
accountingdocumentheadertext = 'RAP rules'
_glitems = VALUE #( ( glaccountlineitem = |001| glaccount = '0021121001' _currencyamount = VALUE #( ( currencyrole = '00' journalentryitemamount = '-100.55' currency = 'INR' ) ) )
( glaccountlineitem = |002| glaccount = '0021121001' _currencyamount = VALUE #( ( currencyrole = '00' journalentryitemamount = '100.55' currency = 'INR' ) ) ) )
).
lt_je_val = CORRESPONDING #( lt_je_deep ).
READ ENTITIES OF i_journalentrytp
ENTITY journalentry
EXECUTE validate FROM lt_je_val
RESULT DATA(lt_check_result)
FAILED DATA(ls_failed_deep)
REPORTED DATA(ls_reported_deep).
MODIFY ENTITIES OF i_journalentrytp
ENTITY journalentry
EXECUTE post FROM lt_je_deep
FAILED ls_failed_deep
REPORTED ls_reported_deep
MAPPED DATA(ls_mapped_deep).