on 03-30-2016 7:54 AM
I use Adobe LiveCycle Designer in SAP. On the tab Master Page placed 2 objects: Button and Image. I want to when I clicked on the Image, it became hidden. For the Button I wrote the code for Click event (language FormCalc, client):
data.#pageSet[0].Page1[0].Image1.presence = "invisible".
On the Preview PDF tab the code works (the Image disappears). But if I run my program inside SAP (Adobe Interactive Forms) the code does not work, the Image does not become invisible. Why?
Sounds pretty like a problem which does not have the root inside the Form itself. Please share some more details about the application, how you call it and maybe you have a samplereport to share:-)
~Florian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is a sample report:
And I also attached XML-Form.
*&---------------------------------------------------------------------*
*& Report Z_TEST_2
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT Z_TEST_2.
START-OF-SELECTION.
PERFORM output_pdf USING 'Z_TEST_DYN_SIZE_FIELDS'.
FORM output_pdf USING i_name TYPE fpname
.
DATA: fp_formoutput TYPE fpformoutput.
DATA: l_func_module_name TYPE funcname,
l_fp_docparams TYPE sfpdocparams,
l_errstr TYPE string,
l_outputparams TYPE sfpoutputparams,
l_fp_joboutput TYPE sfpjoboutput.
* definition name FM
TRY.
CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
EXPORTING
i_name = i_name
IMPORTING
e_funcname = l_func_module_name.
CATCH cx_fp_api. "#EC NO_HANDLER
ENDTRY.
IF l_func_module_name IS INITIAL.
MESSAGE 'Error' TYPE 'E'.
ENDIF.
l_outputparams-dest = 'PDF'.
l_outputparams-nodialog = 'X'.
l_outputparams-preview = 'X'.
CALL FUNCTION 'FP_JOB_OPEN'
CHANGING
ie_outputparams = l_outputparams
EXCEPTIONS
cancel = 1
usage_error = 2
system_error = 3
internal_error = 4
OTHERS = 5.
l_fp_docparams-fillable = 'X'. " Interactive Form with additional rights
* Call the generated functional module
CALL FUNCTION l_func_module_name
EXPORTING
/1bcdwb/docparams = l_fp_docparams
IMPORTING
/1bcdwb/formoutput = fp_formoutput
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
CALL FUNCTION 'FP_GET_LAST_ADS_ERRSTR'
IMPORTING
e_adserrstr = l_errstr.
ENDIF.
CALL FUNCTION 'FP_JOB_CLOSE'
IMPORTING
e_result = l_fp_joboutput
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3
OTHERS = 4.
ENDFORM.
Change the Click event Run At to Server from Client
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jane,
try to replace your invisible with hidden
data.#pageSet[0].Page1[0].Image1.presence = "hidden".
Also a better way to access the field is to wrap both elements with a subform.
Additional to that try to use the messageboxes to see if your event is triggered.
~Florian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Florian! I changed the invisible to hidden. And wrapped objects to the one subform. There also I added one more object: textField1 for debugging purposes. In the Click event for Button, I added code for assign text to textField1 (together with the code to hide pictures). When you click Button the text displayed for TextField1 in "Preview Form" and through a program in SAP. The picture hiding only when tested in "Preview", but through the program in the SAP picture is not hiding.
Sorry for my English.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.