Skip to Content
0

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

Nov 28, 2017 at 11:56 AM

110

avatar image
Former Member

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Lucas Costa Nov 28, 2017 at 07:36 PM
0

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".

Share
10 |10000 characters needed characters left characters exceeded