2022 Mar 30 10:25 AM
Hello team,
I am displaying adobe form using below code, I am able to display form, But I need to link Input values to the controller.
example In input filed we enter Delivery and click on push button form needs to be displayed with given input.
Please let me know if any one knows how to link Input put values to the controller in BSP applications
METHOD do_request.
*CALL METHOD SUPER->DO_REQUEST
runtime->server->response->delete_header_field( name = 'Cache-Control' ) .
runtime->server->response->delete_header_field( name = 'Expires' ).
runtime->server->response->delete_header_field( name = 'Pragma' ).
DATA: l_name TYPE funcname.
TRY.
CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
EXPORTING
i_name = 'ZOTC_FORM_ORD_CONF1'
IMPORTING
e_funcname = l_name
EXCEPTIONS
OTHERS = 0.
CATCH cx_fp_api_repository. "#EC NO_HANDLER
CATCH cx_fp_api_usage. "#EC NO_HANDLER
CATCH cx_fp_api_internal. "#EC NO_HANDLER
ENDTRY.
DATA: l_outputparams TYPE sfpoutputparams.
*Start Form Processing.
l_outputparams-nodialog = 'X'.
l_outputparams-getpdf = 'X'.
l_outputparams-connection = 'ADS'.
l_outputparams-dest = 'LP01'.
l_outputparams-pdltype = 'pdf'.
l_outputparams-getpdf = '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.
DATA: fp_docparams TYPE sfpdocparams,
reservedonly TYPE bapisbodat-reserved,
booking_data TYPE bapisbonew,
fp_result TYPE fpformoutput.
fp_docparams-fillable = 'X'.
fp_docparams-langu = sy-langu.
fp_docparams-country = 'US'.
DATA: gs_interface TYPE sdoc_s_prt_interface.
CALL FUNCTION l_name
EXPORTING
/1bcdwb/docparams = fp_docparams
sls_prt_com = gs_interface
IMPORTING
/1bcdwb/formoutput = fp_result
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
DATA: pdf TYPE fpformoutput-pdf.
pdf = fp_result-pdf.
CALL FUNCTION 'FP_JOB_CLOSE'
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3
OTHERS = 4.
CALL METHOD response->set_content_type
EXPORTING
content_type = 'application/pdf'.
CALL METHOD response->set_data
EXPORTING
data = pdf.
* .
ENDMETHOD.
2022 Apr 06 4:38 PM
I have achieved this using below code, I am able to display form using below code.
But I am unable to pass input values to Controller, could you please help me on this.
METHOD do_request.ENDMETHOD.
2022 Apr 08 2:44 PM
This issue got solved, I am able to display form without using Controller in BSP
I have used Layout and ONInputProcessing below is the sample code to display PO form using only Order.
Layout
<%@page language="abap" %>ONInputProcessing
* event handler for checking and processing user input andENDCASE.