Skip to Content

Dynamically binding in Formcalc


please help with followting problem.

I need to change a binding of a text field (bedrate) dynamically depending of value of another field (FKART).

I can already change a caption of a field (bedrate) but not a value:

if ([0].Seite1.FKART.rawValue == "ZIFS") then

bedrate.caption.value.#text = "Service Tax %";

$ =?????


How can I update binding for field (bedrate) to $.DATA.SUMS.SER_RATE?

Do I need to use "record" or smth else?



Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Jan 09, 2014 at 01:21 PM

    Hello guys,

    as you mentioned above, I changed a print program to link another field.

    Thanks a lot for suggestions.


    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 07, 2014 at 01:21 PM

    Hello Evgenij,

    Click on the BEDRATE field in DATA sub form of the table. Write the below Javascript code.

    if ( this.parent.FKART.rawvalue == "ZIFS" )


    this.rawvalue = "changed value";


    You can also do it in Formcalc as shown below.

    if ( $.parent.FKART.rawvalue eq "ZIFS" ) then

    $.rawvalue = "changed value"


    Add a comment
    10|10000 characters needed characters exceeded

    • Hello Evgenij,

      I totally agree with Florian. For such kind of requirement it is always good to handle the code in the driver program or Form Interface. It even increases performance as compared to scripts.

      Now coming to the script section, I mentioned the Initialization event since this processing will occur in buffer before the table has been approved in the layout. For your requirement even the script will work for every position because you are writing the script directly on the field itself(i.e the code will be triggered for each value in every row). I dont know about FormCalc debugging but if you want to explore how to debug Javascript you can refer the below link.

      How do I set a value dynamically in SAP Adobe Forms using JavaScript - Stack Overflow

      But the conclusion is that, for such a requirement even I would recommend the code change in the Driver program or Form Interface.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.