Web Dynpro Abap Smart Forms Pdf

Web Dynpro Abap Smart Forms Pdf Average ratng: 4,4/5 2722 reviews

This Web DynPro tutorial is designed to share ABAP codes that get the list of spool requests of a SAP user. Convert Smartform to PDF in Print Preview Mode.

Summary The arcticle will guide to trigger a Smartform using a Web-Dynpro ABAP. The End User will Be able to download The smartform in PDF format and print it whenever required. It is assumed that reader knows about creating SMARTFORMS in SAP. Creation Of WDA component Create a WDA component in SE80 Transaction Code As shown Below.

Kontakt 5 keygen password. Creation Of layout in the component After Creation of the component Go to view and in Layout tab insert a button element as shown below.Name this button “Print”. Code written on the action After creating the action write the below provided code on the action of this button.

It is assumed here that you know creating a smart form; if not so kindly follow the link shared in the related content section.In the code shown below, the smart form I created is named ‘ZTEST_WDA’. Method ONACTIONA_PRINT.

Twilight part 2 trailers. Nonton film The Twilight Saga: Breaking Dawn – Part 2 (2012) streaming dan download movie subtitle indonesia kualitas HD gratis terlengkap dan terbaru. Adventure, Drama, Fantasy, Romance, USA, Bella Swan Character, Jacob Black Character, Rosalie Hale Character, Jessica Stanley Character, Alice Cullen Character, Bill Condon, Kristen Stewart.

DATA FM_NAME TYPE RS38L_FNAM. CALL FUNCTION ‘SSF_FUNCTION_MODULE_NAME’ EXPORTING FORMNAME = ‘ZTEST_WDA’ IMPORTING FM_NAME = FM_NAME. IF SY-SUBRC 0. * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. DATA: JOB_OUPUT TYPE SSFCRESCL, LT_OTFDATA TYPE TABLE OF ITCOO.

DATA: LA_CTRL_FORM TYPE SSFCTRLOP, LA_OUTPUT_OPT TYPE SSFCOMPOP. ** Spool Parameters LA_OUTPUT_OPT-TDIMMED = ‘X’. LA_OUTPUT_OPT-TDDELETE = ‘X’. LA_OUTPUT_OPT-TDLIFETIME = ‘X’. LA_OUTPUT_OPT-TDDEST = ‘LOCL’.

* **************************************************************************** * Parameters passes to get the output in PDF format **************************************************************************** LA_CTRL_FORM-NO_DIALOG = ‘X’. LA_CTRL_FORM-PREVIEW = ‘X’. LA_CTRL_FORM-GETOTF = ‘X’.

LA_CTRL_FORM-LANGU = ‘EN’. LA_CTRL_FORM-DEVICE = ‘PRINTER’. CALL FUNCTION FM_NAME EXPORTING CONTROL_PARAMETERS = LA_CTRL_FORM OUTPUT_OPTIONS = LA_OUTPUT_OPT IMPORTING JOB_OUTPUT_INFO = JOB_OUPUT EXCEPTIONS FORMATTING_ERROR = 1 INTERNAL_ERROR = 2 SEND_ERROR = 3 USER_CANCELED = 4 OTHERS = 5. IF SY-SUBRC 0. MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. REFRESH LT_OTFDATA.

LT_OTFDATA[] = JOB_OUPUT-OTFDATA[]. CALL FUNCTION ‘SSFCOMP_PDF_PREVIEW’ EXPORTING I_OTF = LT_OTFDATA EXCEPTIONS CONVERT_OTF_TO_PDF_ERROR = 1 CNTL_ERROR = 2 OTHERS = 3. IF SY-SUBRC 0. MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. DATA: L_DUMMY TYPE STANDARD TABLE OF TLINE, PDF_DATA TYPE XSTRING, PDF_SIZE TYPE I.

Abap

CLEAR: PDF_DATA, PDF_SIZE. * convert otf to pdf CALL FUNCTION ‘CONVERT_OTF’ EXPORTING FORMAT = ‘PDF’ MAX_LINEWIDTH = 255 IMPORTING BIN_FILESIZE = PDF_SIZE BIN_FILE = PDF_DATA TABLES OTF = LT_OTFDATA[] LINES = L_DUMMY EXCEPTIONS ERR_MAX_LINEWIDTH = 1 ERR_FORMAT = 2 ERR_CONV_NOT_POSSIBLE = 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. WDR_TASK=>CLIENT_WINDOW->CLIENT->ATTACH_FILE_TO_RESPONSE( * *path to the word file I_FILENAME = ‘WDA_SMARTFORMS.pdf’ * String Variable I_CONTENT = PDF_DATA * File Type I_MIME_TYPE = ‘PDF’ ). Testing of Application Save and activate the component and test the application. The Result is shown in screenshots below.