cancel
Showing results for 
Search instead for 
Did you mean: 

Script in Adobe Form Layout does not work.

Former Member
0 Kudos

Hi All

I am changing a Adobe form that already exist and works.

There are scripts written for fields that already exist and they work too.

I am trying to get the monthly salary and multiply with 12


----- data.Master.Page1.SECOND_BLOCK.ZPAY_AMOUNT::ready:form - (FormCalc, server) ------------------
data.Master.Page1.SECOND_BLOCK.ZPAY_AMOUNT = data.Master.Page1.SECOND_BLOCK.ZPAY_AMOUNT * 12

Kindly give me pointers as to why it is not working.

Thanks a million

Sriram

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

Try the code in Calculate event instead

Former Member
0 Kudos

Thanks a million guys

I tried to change Run At to "Client". It complained for many times in different ways.

I deleted the script on Form Ready and activated it

Changed to calculate on the events and it automatically had Run at as client

and it works now. Great stuff

I would like to know more as to when to set "Run At" to Client/Server

When to choose the events and more about the scripting bits.

I do not find any proper documentation from SAP on these grounds

Can you guys point me in the right direction?

jiri_vitek_hci
Explorer
0 Kudos

Thank you. Trying different event seems to be quite a universal hint. It helped me also.

I was facing the issue when for the table field the script was working on the first page only (and not on the next page).

The solution was to use ready:layout (layout ready) event instead of ready:form (form ready) - run at client for both cases.

Answers (3)

Answers (3)

OttoGold
Active Contributor
0 Kudos
jiri_vitek_hci
Explorer
0 Kudos

URL is not working anymore

OttoGold
Active Contributor
0 Kudos

Hello,

first: run it on client, not server

second: use JS code to simplify: this.rawValue = this.rawValue * 12;

third: I don´t think you have to script this, why don´t you do this calculation in the backend/ ABAP?

Regards, Otto

Former Member
0 Kudos

Hi,

Try executing the same code by choosing from the drop down the "Client' option from Run at.

If this doesnt work, check if your script is in the correct event, for that particular field.

Regards,

Runal.