cancel
Showing results for 
Search instead for 
Did you mean: 

Trigger RTC(S4hana) Business rule using planning sequence via AO.

Former Member
0 Kudos

Hi,

I was trying to trigger business rule(Carry forward) via Planning function of type /cpmb/launch_logic from AO .

I configured all the RTC model and Master data setup.

Everything was working fine till i save data from AO after executing Planning Sequence from AO.

After pressing save button which triggers write back class in which new generated data from buffer is being inserted into ACDOCC by class CL_RTC_CORE_CONS_JOURNAL=>POST_DOC .

This class is calling AMDP Method POST_DOC which is calling another method -

CALL "CL_RTC_CORE_CONS_JOURNAL=>INSERT_DOC" ( it_acdocc => :lt_acdocc, et_msgs => :et_msgs ) ;

:lt_acdocc - has new data which was generated by business rule.

But after execution of this method no data is inserted and no error is given on the contrary it is showing data saved message in AO .

METHOD INSERT_DOC BY DATABASE PROCEDURE FOR HDB LANGUAGE SQLSCRIPT USING acdocc.

DECLARE EXIT HANDLER FOR SQLEXCEPTION

BEGIN

et_msgs = SELECT 'E' AS MSGTY, 'RTC_DOC_POSTING' AS MSGID, '007' AS MSGNO, ::SQL_ERROR_CODE AS MSGV1, ::SQL_ERROR_MESSAGE AS MSGV2, '' AS MSGV3, '' AS MSGV4, '' AS MSG_TEXT FROM dummy;

END;

INSERT INTO acdocc SELECT * FROM :it_acdocc; ENDMETHOD.

I couldn't figure out why it is not able to run Insert statement.

Regards,

Prateek

Accepted Solutions (1)

Accepted Solutions (1)

lucas_costa3
Active Contributor

CL_RTC_CORE_CONS_JOURNAL is posting API.

First thing I recommend when having issues posting the consolidation documents is to go RTCMD with your model and "Renew Posting API" or "Generate all Objects".

Answers (0)