on 2023 Dec 25 4:04 AM
Dear Experts,
(Environment: S/4HANA CLOUD Public 2308)
I have done "Posting" with standard App - Post Outgoing Payments at Fiori Launchpad
But In my business logic, I have to get the same result with my program.
So I tried this Business Object Interface
https://api.sap.com/bointerface/I_JOURNALENTRYTP
The scenario: Account Type/Account ID column is Supplier
May I inquire whether the i_journalentrytp interface is capable of handling scenarios involving posting payments to suppliers?
Do you have any example programs available?
The following is my test program, but it dumps before MODIFY ENTITIES during execution.
METHOD if_oo_adt_classrun~main.
DATA: lt_je_deep TYPE TABLE FOR ACTION IMPORT i_journalentrytp~post,
lv_cid TYPE abp_behv_cid.
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 = '6310' " Success
documentreferenceid = 'BKPFF'
createdbyuser = 'CB9980000038'
businesstransactiontype = 'RFBU'
accountingdocumenttype = 'KZ'
documentdate = sy-datlo
postingdate = sy-datlo
accountingdocumentheadertext = 'TEST rules'
_glitems = VALUE #(
( glaccountlineitem = |001|
glaccount = '0011008000'
HouseBank = 'TWDP1'
HouseBankAccount = 'TWDPA'
ValueDate = sy-datlo
_currencyamount = VALUE #( ( currencyrole = '00'
journalentryitemamount = '-26,250'
currency = 'TWD' ) ) ) )
_apitems = VALUE #(
( glaccountlineitem = |002|
Supplier = '0063100088'
GLAccount = '5100000024'
_currencyamount = VALUE #( ( currencyrole = '00'
journalentryitemamount = '26,250'
currency = 'TWD'
) ) ) ) ).
MODIFY ENTITIES OF i_journalentrytp
ENTITY journalentry
EXECUTE post FROM lt_je_deep
FAILED DATA(ls_failed_deep)
REPORTED DATA(ls_reported_deep)
MAPPED DATA(ls_mapped_deep).
IF ls_failed_deep IS NOT INITIAL.
ELSE.
COMMIT ENTITIES BEGIN
RESPONSE OF i_journalentrytp
FAILED DATA(lt_commit_failed)
REPORTED DATA(lt_commit_reported).
COMMIT ENTITIES END.
ENDIF.
ENDMETHOD.
ENDMETHOD.
How can I do to fixed this issue.
Thank you in advance for your help.
Request clarification before answering.
There is not an API for outgoing payment.
For functionality not part of the standard design.
Best Regards,
Owen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
12 | |
10 | |
8 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.