11-24-2014 8:26 PM
Hi,
I have one requitrement regarding Adobe Forms. There is an Internal table IT1 having field f1, f2, f3. F1 is flag. On form I have a form field that would display data from IT1 based on flag "F1". If F1 is initial form field display data from F2, if F1 is not initial it will display data from F3.
Can you tell me how to do this?
Thanks
Piyush
11-24-2014 10:41 PM
Hi Piyush,
You can add conditions in the context tab of the form as in this (silly) example:
Regards,
Custodio
11-25-2014 12:17 PM
Hi Custodio,
First thanks for your response. Have a look at snapshot of requirement.
Internal Table IT_Totaldue have 3 fields WAERS, TBAL and L_TBAL. On form there is one cell (field) named L_TBAL for output. I have to display data either of TBAL or of L_TBAL in output field like below condition:
if waers = USD then
display output_field = TBAL
else
display output_field = L_TBAL
endif.
Can you tell me complete way or script to do this?
Thanks & Regards
Piyush
11-25-2014 10:48 PM
Hi Piyush,
One of the options you have is to add another field to this table, say display_value. Then you can populate this field in the interface, under code initialization. Do something like:
LOOP AT it_totaldue ASSIGNING <ls_totaldue>.
if <ls_totaldue>-waers = 'USD'.
<ls_totaldue>-display_value = <ls_totaldue>-TBAL..
else.
<ls_totaldue>-display_value = <ls_totaldue>-L_TBAL..
endif.
ENDLOOP.
Or you do the same in the program that calls the form, if possible.
Cheers,
Custodio
11-26-2014 9:11 AM
Hi,
I can not do it in driver program or in interface. Can you tell me the way or script that I could use in/on adobe form? In a single cell of form I have to display either Tbal (field of S_kunnr.it_totaldue) or L_Tbal (field of S_kunnr.it_totaldue) based on condition
if S_kunnr.it_totaldue.waers = "USD"
cell on form = S_kunnr.it_totaldue.tbal
else
cell on form = S_kunnr.it_totaldue.L_tbal.
endif.
Can you provide me complete script for this?
Thanks
11-26-2014 11:55 AM
Hi Piyush
try this one out.
In the WAERS node try the below javascript in initialize event.
if(this.rawValue == 'USD')
this.value = tbal value
else
this.value = l_tbal value
endif.
11-26-2014 5:20 PM
Hi,
I am not good in scripting . Can you have a look at above snapshot and write full script that I could copy and paste in my form.
Thanks
Piyush