Skip to main content

 Hi,
I have issue with $ADD clause containing Conditional compilation.
$END of conditional compilation is not generated in code.

@Overtake Core
PROCEDURE Validate_Payment_Plan_Amount (
company_ IN VARCHAR2,
invoice_id_ IN NUMBER,
known_p_dom_amount_ IN NUMBER DEFAULT NULL )
IS
$ADD
$IF Component_Payled_SYS.INSTALLED $THEN
CURSOR get_czsk_sum_dom_amount IS
SELECT
full_dom_amount
FROM
ledger_item_tab
WHERE
invoice_id = invoice_id_
AND company = company_;
$END
$END
BEGIN
...

 

!!!Package Body PAYMENT_PLAN_API Created With Compilation Errors
PLS-00177: '$IF' preprocessor directive does not end properly error at line no :3820

 

 

$APPEND works well

@Overtake Core
PROCEDURE Validate_Payment_Plan_Amount (
company_ IN VARCHAR2,
invoice_id_ IN NUMBER,
known_p_dom_amount_ IN NUMBER DEFAULT NULL )
IS
$SEARCH
tax_curr_rate_ NUMBER;
$APPEND
$IF Component_Payled_SYS.INSTALLED $THEN
CURSOR get_czsk_sum_dom_amount IS
SELECT
full_dom_amount
FROM
ledger_item_tab
WHERE
invoice_id = invoice_id_
AND company = company_;
$END
$END
BEGIN
...


IFS Developer Studio 22.2.9114 (Build 2022-11-15 08:07)
22R2 GA  (same with EA)
SU 22.2.1

HI @InfFilipV 

 

Please refer to https://docs.ifs.com/techdocs/

we use $ADD if we cannot use $SEARCH/REPLACE APPEND or PREPEND.  If you can use then go for it.  $ADD doesn't support complex text as you have given.

“If you want to add a declaration but the method in a lower layer has no declarations, you can use $ADD.”

/Harshini


Hi @IFS Global Consulting Services,
thanks for response.

My code is not related to any lower layer code, so why I have to use $SEARCH section on code what could be changed/removed in next SU/RU and broke my code.

I expect that $ADD should be used always, when there is no reference to code before or after.

There is no logic in why this construction should work in append/prepend/replace and not in add.

What if Core method will not contain any code in declaration section? - It is not safe to write it right in declaration section without $ADD - what if next SU/RU will add some code to this section?

 

You are talking about this:

 $SEARCH (ifs.com)

 

But Cursor definition is also “Declaration”, so I do not expect, that this documentation text means that cannot be done by ADD.

Oracle / PLSQL: Procedures (techonthenet.com)


 

I cannot search it:

 

And I do not know, how to properly use it, because of broken documentation:

Overtake using Search & Replace - Technical Documentation For IFS Cloud

 

BR
Filip


Reply