on 2021 Jun 11 7:56 AM
In SAP CPQ, can we do simple calculation during Quote document generation, if yes then which Tags we can use.
For example, i have two custom fields in Quote (A = 2, B=3). In Quotes "Document Generation Template", when i am generating the document for Customer, i want to show the value as A*B, i.e. 6 should be shown. So are there any Tags (Q Tags, C Tags etc...) available for us to use in Documents ?
Other workaround is to create a new Quote Custom Field (C) and using Iron Python script (on certain event), we can calculate the value of C = A*B and save it. Then later use this C field in Documents via tag "<<Q_TAG(<*CTX( Quote.CustomField(C) )*>)>>". We want to avoid creating unnecessary custom fields, if possible.
Request clarification before answering.
Hi jain_adesh
For this scenario you can use Eval tag in the document generation template, so it will do the calculations on the fly while document is getting generated.
For example it will be like -
<* Eval(<*CTX( Quote.CustomField(A) )*> * <*CTX( Quote.CustomField(B) )*> ) *>
Hope this helps,
Nikhil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nikhil,
Thanks for your response.
EVAL tags are working only in the Quote context but i could not figure out on how to call this under the Q_TAG during Document generation. As per the SAP Help Portal, they have mentioned various tags we can use in Documents
I tried using EVAL directly in the Quote documents, it doesn't work. Even tried using EVAL inside <<Q_TAG()>>, it doesn't work either.
OnHelp site its mentioned to use CTX inside the Q_TAG, but not sure how to use EVAL inside the CTX directly.
Hi jain_adesh
You can use it in the below format, I just tested and it worked perfectly fine for me.
<<Q_TAG( <* Eval(<*CTX( Quote.CustomField(A) )*> * <*CTX( Quote.CustomField(B) )*> ) *>)>>
Please make sure your field type is free form and contains the integer/float values.
Hope this helps,
Nikhil
User | Count |
---|---|
8 | |
4 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.