Excel conversion in sap

EPSI_2010723952.X LS

2011000085.pdf

EXCISE_0000000623 .XLS

*&---------------------------------------------------------------------* *& Report YPRESHP_INV1 * *& * *&---------------------------------------------------------------------* *& * *& * *&---------------------------------------------------------------------* REPORT ypreshp_inv1 .

******* Gate Pass - Ropson TYPE-POOLS : vrm. DATA: param TYPE vrm_id, values TYPE vrm_values, value LIKE LINE OF values.

TYPES: BEGIN OF ty_contno, key TYPE i, contno TYPE yxp_contman_itm-contno, lrno(15), lrdate TYPE datum, transname(40), truckno(15), END OF ty_contno. DATA : it_contno TYPE STANDARD TABLE OF ty_contno WITH HEADER LINE. DATA : wa_contno TYPE ty_contno. DATA : icount TYPE i. DATA DATA ok_code LIKE sy-ucomm. ok_code_sav LIKE sy-ucomm.

CONTROLS tbl_01 TYPE TABLEVIEW USING SCREEN 1010. DATA: dynpfields LIKE dynpread OCCURS 0. TYPES : BEGIN OF ty_cont, mark TYPE c, contno TYPE yxp_contman_itm-contno, lrno(15), lrdate TYPE datum, transname(40), truckno(15), status(1), t_date type datum, t_time type sy-uzeit,

END OF ty_cont. DATA : it_cont1 TYPE TABLE OF ty_cont WITH HEADER LINE. DATA : wa_cont1 TYPE ty_cont. DATA : lines TYPE i. DATA : cur_row TYPE i. DATA : gatepass TYPE yxp_gatepass-gpass, v_lrno TYPE yxp_gatepass-lrno, v_lrdate TYPE yxp_gatepass-lrdate, v_transname TYPE yxp_gatepass-transname, v_truckno TYPE yxp_gatepass-truckno, v_date TYPE yxp_gatepass-t_date, v_time TYPE yxp_gatepass-t_time, v_createdon TYPE yxp_gatepass-createdon, v_createdby TYPE yxp_gatepass-createdby. TABLES : yxp_gatepass. DATA : BEGIN OF it_gpass OCCURS 0, mandt TYPE yxp_gatepass-mandt, auto_id TYPE yxp_gatepass-auto_id, contno TYPE yxp_gatepass-contno, gpass TYPE yxp_gatepass-gpass, createdby TYPE yxp_gatepass-createdby, createdon TYPE yxp_gatepass-createdon, lrno TYPE yxp_gatepass-lrno, lrdate TYPE yxp_gatepass-lrdate, transname TYPE yxp_gatepass-transname, truckno TYPE yxp_gatepass-truckno, t_date TYPE yxp_gatepass-t_date, t_time TYPE yxp_gatepass-t_time, cancelstat TYPE yxp_gatepass-cancelstat, cancelby TYPE yxp_gatepass-cancelby, cancelon TYPE yxp_gatepass-cancelon, changeby TYPE yxp_gatepass-changeby, changeon TYPE yxp_gatepass-changeon, END OF it_gpass. DATA : wa_gpass TYPE yxp_gatepass. DATA : it_gpass1 TYPE STANDARD TABLE OF yxp_gatepass. DATA : BEGIN OF tab_gpass OCCURS 0, mandt TYPE yxp_gatepass-mandt, auto_id TYPE yxp_gatepass-auto_id, contno TYPE yxp_gatepass-contno, gpass TYPE yxp_gatepass-gpass, createdby TYPE yxp_gatepass-createdby, createdon TYPE yxp_gatepass-createdon, lrno TYPE yxp_gatepass-lrno, lrdate TYPE yxp_gatepass-lrdate,

wa_ylceord TYPE ylceord. changeon TYPE yxp_gatepass-changeon. wa_ylcesadr TYPE ylcesadr. wa_yxp_shphd TYPE yxp_shphd. yxp_contman_itm. ylceord. wa_yxp_soaddr TYPE yxp_soaddr. ylcesadr. vbak. changeby TYPE yxp_gatepass-changeby. truckno TYPE yxp_gatepass-truckno. wa_vbkd TYPE vbkd. TABLES: yxp_soaddr. DATA :gid TYPE yxp_gatepass-gpass. cancelby TYPE yxp_gatepass-cancelby. t_time TYPE yxp_gatepass-t_time. adrc. t_date TYPE yxp_gatepass-t_date. yxp_item. DATA : fmname8 TYPE rs38l_fnam. DATA : fmname2 TYPE rs38l_fnam. cancelon TYPE yxp_gatepass-cancelon. wa_vbak TYPE vbak. DATA : p_answer TYPE c.vbpa . DATA : fmname9 TYPE rs38l_fnam. ************** DATA : fmname TYPE rs38l_fnam. wa_t001 TYPE t001. DATA : fmname1 TYPE rs38l_fnam. ylcelcmst. . DATA: it_yxp_invpre TYPE yxp_invpre OCCURS 0 WITH HEADER LINE. DATA : fmname5 TYPE rs38l_fnam. wa_adrc TYPE adrc. DATA: wa_yxp_invpre TYPE yxp_invpre. cancelstat TYPE yxp_gatepass-cancelstat.transname TYPE yxp_gatepass-transname. vbrp. DATA : ar(2) TYPE c. yxp_invpre. DATA : fmname7 TYPE rs38l_fnam. DATA : fmname6 TYPE rs38l_fnam. vbkd. yxp_shphd. DATA : fmname4 TYPE rs38l_fnam. cadrc TYPE adrc. END OF tab_gpass.

st_control_parameters TYPE ssfctrlop. v_e_devtype TYPE rspoptype. wa_yxp_exptd_lic1 TYPE yxp_exptd_lic. doc_nr TYPE yxp_invpre-doc_nr. DATA : tencs TYPE yxp_invpre-tenc. * MANID TYPE YXP_CONTMAN_ITM-MANID. DATA : tenbs TYPE yxp_invpre-tenb. END OF it_docnr. *DATA : elva TYPE STRING. *DATA : BEGIN OF IT_TMPF4 OCCURS 0. DATA : wa_docnr LIKE it_docnr. v_bin_filesize TYPE i. it_lines TYPE STANDARD TABLE OF tline.wa_yxp_exptd_lic TYPE yxp_exptd_lic. DATA : tenas TYPE yxp_invpre-tena. DATA: p_lic_product TYPE yxp_exptd_lic-lic_product. delv TYPE yxp_contman_itm-delv. st_job_output_info TYPE ssfcrescl. v_fullpath TYPE string. END OF it_manidf4. manid TYPE yxp_contman_itm-manid. * END OF IT_TMPF4. DATA : form3 TYPE tdsfname. DATA : wa_manidf4 LIKE it_manidf4. DATA : wa_gatepass TYPE yxp_gatepass. DATA : form1 TYPE tdsfname. st_output_options TYPE ssfcompop. st_job_output_options TYPE ssfcresop. * DATA : BEGIN OF it_manidf4 OCCURS 0. v_language TYPE sflangu VALUE 'E'. v_path TYPE string. v_name TYPE string. DATA : form2 TYPE tdsfname. . DATA : form TYPE tdsfname. DATA : BEGIN OF it_docnr OCCURS 0. DATA: it_otf TYPE STANDARD TABLE OF itcoo. DATA: fcode TYPE TABLE OF sy-ucomm. * DELV TYPE YXP_CONTMAN_ITM-DELV. st_document_output_info TYPE ssfcrespd. it_docs TYPE STANDARD TABLE OF docs. DATA : it_ylcelcmst TYPE ylcelcmst. DATA : it_tmpf4 LIKE it_manidf4 OCCURS 0. wa_fcode TYPE sy-ucomm. v_len_in TYPE so_obj_len. DATA: p_vgbel TYPE lips-vgbel.

PARAMETERS : extm TYPE sy-uzeit. SELECTION-SCREEN END OF BLOCK b2. SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003. rd_10 RADIOBUTTON GROUP g1. rd_7 RADIOBUTTON GROUP g1. PARAMETERS : p_autoid TYPE yxp_invpreauto_id MATCHCODE OBJECT yxp_invau. v_filename TYPE string. SELECTION-SCREEN END OF BLOCK b1. PARAMETERS : exdat1 TYPE yxp_invpre-exdat. PARAMETERS : des1(20) TYPE c. v_guiobj TYPE REF TO cl_gui_frontend_services. rd_8 RADIOBUTTON GROUP g1. PARAMETERS : com TYPE char5. rd_4 RADIOBUTTON GROUP g1. *{Added By Manoj WVDK931404 31. PARAMETERS : des(20) TYPE c.v_filter TYPE string. rd_6 RADIOBUTTON GROUP g1. r2 RADIOBUTTON GROUP g2. PARAMETERS : supname TYPE yxp_invpre-supname.2012 rd_12 RADIOBUTTON GROUP g1. PARAMETERS : p_manid TYPE yxp_contman_itm-manid. PARAMETERS : nameauth TYPE yxp_invpre-nameauth." OBLIGATORY. PARAMETERS : r1 RADIOBUTTON GROUP g2 DEFAULT 'X'. v_uact TYPE i. SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.08. PARAMETERS : exname TYPE yxp_invpre-exname. rd_5 RADIOBUTTON GROUP g1. rd_2 RADIOBUTTON GROUP g1. PARAMETERS : nameaut1 TYPE yxp_invpre-nameauth. *} rd_3 RADIOBUTTON GROUP g1. SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001. rd_11 RADIOBUTTON GROUP g1. . rd_9 RADIOBUTTON GROUP g1. PARAMETERS: rd_1 RADIOBUTTON GROUP g1 DEFAULT 'X'.

ENDCASE. PARAMETERS : consamno TYPE yxp_invpre-consamno. WHEN 'F8'. INITIALIZATION. SELECTION-SCREEN END OF BLOCK b4. PERFORM get_stuffid. SET PF-STATUS 'YPRESHP_INV1' . PARAMETERS : str1(75) TYPE c. SET PF-STATUS 'YPRESHP_INV1' . PERFORM gethelp. * CONTABB RADIOBUTTON GROUP G3. WHEN 'PDF'. AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_manid.PARAMETERS : tena TYPE checkbox DEFAULT 'X'. AT SELECTION-SCREEN. PERFORM xldata. WHEN 'EXCEL'."EXCLUDING FCODE. *BREAK-POINT. LEAVE PROGRAM. CASE sy-ucomm. SET PF-STATUS 'YPRESHP_INV1' . *PARAMETERS : CONTABA RADIOBUTTON GROUP G3 DEFAULT 'X'. PERFORM data. ENDIF. WHEN 'ENTR'. tenb TYPE checkbox. . IF sy-lsind = 20. PARAMETERS : str2(75) TYPE c. SELECTION-SCREEN BEGIN OF BLOCK b4 WITH FRAME TITLE text-004. SELECTION-SCREEN END OF BLOCK b3. PERFORM dataf. AT LINE-SELECTION. tend TYPE checkbox. tenc TYPE checkbox. START-OF-SELECTION. WHEN 'BACK' OR 'EXIT' OR 'CANC'.

*&---------------------------------------------------------------------* *& Form GET_STUFFID *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * --> p1 text * <-. ENDLOOP. ENDIF. DATA :field_tab LIKE dfies OCCURS 0 WITH HEADER LINE. SELECT * INTO CORRESPONDING FIELDS OF TABLE it_tmpf4 FROM yxp_contman_itm WHERE delv = wa_docnr-doc_nr. p_manid = wa_manidf4-manid. LOOP AT it_manidf4 INTO wa_manidf4 . ENDLOOP. * field_tab-tabname = 'IT_MANIDF4'. LOOP AT it_docnr INTO wa_docnr.p2 text *----------------------------------------------------------------------* FORM get_stuffid . IF it_manidf4[] IS NOT INITIAL. SELECT * INTO CORRESPONDING FIELDS OF TABLE it_docnr FROM yxp_invpre WHERE auto_id = p_autoid. IF p_autoid IS NOT INITIAL. *APPEND field_tab. ENDIF. ENDFORM. *REFRESH field_tab. CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST' EXPORTING * DDIC_STRUCTURE = ' ' retfield = 'MANID' . CLEAR it_manidf4[]. APPEND LINES OF it_tmpf4 TO it_manidf4. " GET_STUFFID *&---------------------------------------------------------------------* *& Form GETHELP *&---------------------------------------------------------------------* FORM gethelp . DELETE ADJACENT DUPLICATES FROM it_manidf4 COMPARING manid. IF it_manidf4[] IS NOT INITIAL. * field_tab-fieldname = 'Manid'.

PERFORM disp_smrtfrm_inv. PERFORM disp_smartfrm_are1. *ELSEIF RD_3 = 'X'. IF sy-subrc <> 0. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. . PERFORM getdata_inv. *BREAK-POINT. MESSAGE 'Help Does not found' TYPE 'S'. ELSE. PERFORM getdata_inv. ENDIF.* * * * * * * * * * * * * PVALKEY = ' ' dynpprog = sy-cprog dynpnr = sy-dynnr dynprofield = 'P_MANID' STEPL = 0 WINDOW_TITLE = '' VALUE = ' ' value_org = 'S' MULTIPLE_CHOICE = '' display = 'F' CALLBACK_PROGRAM = ' ' CALLBACK_FORM = ' ' MARK_TAB = IMPORTING USER_RESET = TABLES value_tab = it_manidf4 FIELD_TAB = RETURN_TAB = DYNPFLD_MAPPING = EXCEPTIONS parameter_error = 1 no_values_found = 2 OTHERS = 3 . * PERFORM GETDATA_INV. " GETHELP ENDFORM. ELSEIF rd_2 = 'X'. ENDIF. * *&---------------------------------------------------------------------* *& Form DATA *&---------------------------------------------------------------------* FORM data . IF rd_1 = 'X'. * PERFORM CALLFORM.

ELSEIF rd_5 = 'X'. PERFORM getdata_inv. PERFORM getdata_inv. ELSEIF rd_7 = 'X'. PERFORM annexure_smartform.2012 ELSEIF rd_12 = 'X'. ELSEIF rd_10 = 'X'. PERFORM loadslip. ENDIF. PERFORM getdata_inv. PERFORM disp_smrtfrm_form402.*{Added By Manoj WVDK931404 31. ENDFORM. PERFORM ssp_annexure1. ELSEIF rd_6 = 'X'. ELSE. PERFORM gate_pass. ELSEIF rd_11 = 'X'. PERFORM disp_smartfrm_are1. IF sy-ucomm = 'OK'. PERFORM disp_smrtfrm_inv. MESSAGE : 'NO STUFFING ID AVAILABLE' TYPE 'E'. PERFORM ssp_are1. PERFORM getdata_inv. PERFORM getdata_inv. PERFORM getdata_inv. dynpfields. ELSEIF rd_4 = 'X'. " DATA *&---------------------------------------------------------------------* *& Form DATAF *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* . ENDIF. ELSEIF rd_8 = 'X'. PERFORM getdata_inv. ENDIF. it_contno[]. REFRESH: dynpfields. PERFORM getdata_inv. *} ELSEIF rd_3 = 'X'. ELSEIF rd_9 = 'X'.08. PERFORM detail_packlist. PERFORM getdata_inv. IF p_manid IS INITIAL. PERFORM getdata_inv. CLEAR: it_cont1[]. CALL SCREEN 1010 STARTING AT 35 8. PERFORM pack_smarforms.

""add by sandip 2. IF rd_1 = 'X'. IF rd_2 = PERFORM PERFORM ENDIF. IF rd_1 = 'X'.2012 ENDIF. getxldata. IF p_autoid IS NOT INITIAL.2012 "XLDATA *&---------------------------------------------------------------------* *& Form GETXLDATA *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* FORM getxldata. print_excel USING p_autoid. ENDIF. ENDIF.08. ""add by sandip 2. ""add by sandip 2. . IF rd_3 = 'X'. print_excel USING p_autoid.2012 'X'. print_excel USING p_autoid.p2 text *----------------------------------------------------------------------* FORM xldata. PERFORM getxldata. ENDIF. PERFORM print_excel USING p_autoid. getxldata. 'X'.2012 'X'. IF rd_3 = PERFORM PERFORM ENDIF. SELECT * INTO CORRESPONDING FIELDS OF TABLE it_yxp_invpre FROM yxp_invpre WHERE yxp_invpre~auto_id = p_autoid. ENDFORM. "GETXLDATA *&---------------------------------------------------------------------* *& Form PRINTXLDATA *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* FORM printxldata.* --> p1 text * <-.08.08. ELSE. IF rd_4 = PERFORM PERFORM ENDIF. getxldata.08. ""add by sandip 2. ENDFORM. MESSAGE 'Enter Invoice No' TYPE 'E'.

PERFORM pdisp_smrtfrm_inv1. . ELSE. *{Added By Manoj WVDK931418 01. ELSEIF rd_6 = 'X'. MESSAGE : 'NO STUFFING ID AVAILABLE' TYPE 'E'. IF sy-ucomm = 'OK'. ELSEIF rd_5 = 'X'. ELSEIF rd_2 = 'X'. ELSEIF rd_4 = 'X'. *ELSEIF RD_3 = 'X'. * PERFORM CALLFORM. REFRESH: dynpfields. PERFORM getdata_inv. IF p_manid IS INITIAL. *} ELSEIF rd_3 = 'X'. CALL SCREEN 1010 STARTING AT 35 8. PERFORM getdata_inv. PERFORM pdisp_smartfrm_are1. PERFORM getdata_inv. PERFORM getdata_inv. CLEAR: it_cont1[]. * PERFORM GETDATA_INV. PERFORM getdata_inv. "PRINTXLDATA *&---------------------------------------------------------------------* *& Form DATAF *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* FORM dataf . PERFORM pack_smarforms1. PERFORM pdisp_smartfrm_are1. PERFORM getdata_inv. PERFORM gate_pass1. ENDIF.ENDFORM. ELSEIF rd_8 = 'X'.2012 ELSEIF rd_12 = 'X'. ENDIF. it_contno[]. PERFORM getdata_inv. PERFORM dtls_packlst. PERFORM getdata_inv.09. PERFORM are_ssp1. dynpfields. PERFORM pannexure_smartform1. IF rd_1 = 'X'. PERFORM loading_slip. ELSEIF rd_7 = 'X'. PERFORM getdata_inv.

LOOP AT it_yxp_invpre INTO wa_yxp_invpre. PERFORM getdata_inv. ar = wa_yxp_shphd-ar. MESSAGE 'Enter Invoice No' TYPE 'E'. Get Consignee Details SELECT SINGLE * FROM ylceord WHERE vbeln = vbrp-aubel . ELSE. ENDIF. PERFORM disp_smrtfrm_form402_1. IF ar IS INITIAL. ENDIF. SELECT SINGLE * INTO CORRESPONDING FIELDS OF wa_yxp_shphd FROM yxp_shphd WHERE yxp_shphd~doc_nr = wa_yxp_invpre-auto_id AND doc_clas = '0009'. ENDIF. Get Expoter Details SELECT SINGLE vgbel INTO p_vgbel FROM lips WHERE vbeln = wa_yxp_invpre-doc_nr. PERFORM getdata_inv. * * . PERFORM annexurec1_ssp1.ELSEIF rd_9 = 'X'. IF p_autoid IS NOT INITIAL. ELSEIF rd_11 = 'X'. ENDFORM. get Buyer's Ord No & Date SELECT SINGLE * INTO CORRESPONDING FIELDS OF wa_vbkd FROM vbkd WHERE vbeln = p_vgbel. * goto LIPS take VGBL and go YXP_SOADDR-vbeln = LIPSVGBL. " DATAF *&---------------------------------------------------------------------* *& Form GETDATA *&---------------------------------------------------------------------* FORM getdata_inv . SELECT * INTO CORRESPONDING FIELDS OF TABLE it_yxp_invpre "WA_YXP_INVPRE FROM yxp_invpre WHERE yxp_invpre~auto_id = p_autoid. SELECT SINGLE * INTO CORRESPONDING FIELDS OF wa_yxp_soaddr FROM yxp_soaddr WHERE vbeln = p_vgbel. SELECT SINGLE * FROM ylcelcmst INTO it_ylcelcmst WHERE lc_refnr = ylceord-lc_refnr.

* * ENDFORM."VBAK-BNAME. tenbs = 'YES'. ENDIF. ELSE. SELECT SINGLE * FROM yxp_exptd_lic INTO wa_yxp_exptd_lic1 WHERE doc_nr = wa_yxp_invpre-auto_id AND licenceno EQ ' '. Get Buyer (if other then Consignee) Details SELECT SINGLE * FROM adrc INTO wa_adrc WHERE addrnumber = wa_t001-adrnr .* GET Consignee Details SELECT SINGLE * FROM ylcesadr INTO CORRESPONDING FIELDS OF wa_ylcesadr WHERE adrnr = ylcelcmst-adrnr. SELECT SINGLE * FROM vbak INTO CORRESPONDING FIELDS OF wa_vbak WHERE vbeln = p_vgbel. SELECT SINGLE * FROM adrc INTO cadrc WHERE addrnumber = vbpa-adrnr. ENDLOOP. " GETDATA *&---------------------------------------------------------------------* *& Form DISP_SMRTFRM_FORM402 . SELECT SINGLE * FROM vbpa WHERE vbeln = wa_vbak-vbeln AND parvw = 'WE'. Get Product List SELECT SINGLE * INTO wa_yxp_exptd_lic FROM yxp_exptd_lic WHERE doc_nr = wa_yxp_invpre-auto_id. SELECT SINGLE * FROM vbak WHERE vbeln = p_vgbel. tenbs = 'NO'. IF tenb = 'X'. SELECT SINGLE * FROM t001 INTO CORRESPONDING FIELDS OF wa_t001 WHERE bukrs = wa_vbak-vkorg.

CALL FUNCTION 'SSF_GET_DEVICE_TYPE' EXPORTING . ELSE.*&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* FORM disp_smrtfrm_form402 . IF sy-subrc <> 0. form = 'YXP_FORM402'. CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME' EXPORTING formname = form IMPORTING fm_name = fmname EXCEPTIONS no_form = 1 no_function_module = 2 OTHERS = 3. CALL FUNCTION fmname EXPORTING p_autoid = p_autoid EXCEPTIONS formatting_error = 1 internal_error = 2 send_error = 3 user_canceled = 4 OTHERS = 5. IF wa_yxp_invpre-werks = '3700'. IF sy-subrc <> 0. form = 'YXP_FORM402'. ENDIF. ENDIF. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ENDFORM. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ENDIF. "DISP_SMRTFRM_FORM402 *&---------------------------------------------------------------------* *& Form DISP_SMRTFRM_FORM402_1 *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* FORM disp_smrtfrm_form402_1 .

st_output_options-tdprinter = v_e_devtype. form = 'YXP_FORM402'. form = 'YXP_FORM402'. st_control_parameters-getotf = 'X'. CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME' EXPORTING formname = form IMPORTING fm_name = fmname EXCEPTIONS no_form = 1 no_function_module = 2 OTHERS = 3. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.i_language = v_language i_application = 'SAPDEFAULT' IMPORTING e_devtype = v_e_devtype. IF sy-subrc <> 0. ENDIF. st_control_parameters-no_dialog = 'X'. " form = 'YXP_FORM402' . IF sy-subrc <> 0. IF wa_yxp_invpre-werks = '3700'. CALL FUNCTION fmname EXPORTING control_parameters output_options p_autoid IMPORTING document_output_info job_output_info job_output_options EXCEPTIONS formatting_error internal_error send_error user_canceled OTHERS = st_control_parameters = st_output_options = p_autoid = st_document_output_info = st_job_output_info = st_job_output_options = = = = = 1 2 3 4 5. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno . ELSE. ENDIF.

CREATE OBJECT v_guiobj.Get filename to store CONCATENATE 'Form402-' p_autoid '. IF v_uact = v_guiobj->action_cancel. *--. ELSE. EXIT. CALL FUNCTION 'CONVERT_OTF_2_PDF' IMPORTING bin_filesize = v_bin_filesize TABLES otf = st_job_output_info-otfdata doctab_archive = it_docs lines = it_lines EXCEPTIONS err_conv_not_possible = 1 err_otf_mc_noendmarker = 2 OTHERS = 3. CALL FUNCTION 'GUI_DOWNLOAD' EXPORTING bin_filesize = filename = filetype = TABLES data_tab = EXCEPTIONS file_write_error = no_batch = gui_refuse_filetransfer = invalid_type = no_authority = unknown_error = header_not_allowed = separator_not_allowed = v_bin_filesize v_filename 'BIN' it_lines 1 2 3 4 5 6 7 8 . *--.Download PDF to local PC MOVE v_fullpath TO v_filename.WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ENDIF.pdf' INTO v_name. CALL METHOD v_guiobj->file_save_dialog EXPORTING default_extension = 'pdf' default_file_name = v_name file_filter = v_filter CHANGING filename = v_name path = v_path fullpath = v_fullpath user_action = v_uact.

IF sy-subrc <> 0. form = 'YPRESHP_INV1_V' . "'YPRESHP_INV1_NEW1'. CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME' EXPORTING formname = form * VARIANT = ' ' * DIRECT_CALL = ' ' IMPORTING fm_name = fmname EXCEPTIONS no_form = 1 . ELSE. "'YPRESHP_INV1'. . ENDIF. ENDFORM. ELSEIF r2 IS NOT INITIAL AND wa_vbak-vtweg = 'WE'. ENDIF.filesize_not_allowed = 9 header_too_long = 10 dp_error_create = 11 dp_error_send = 12 dp_error_write = 13 unknown_dp_error = 14 access_denied = 15 dp_out_of_memory = 16 disk_full = 17 dp_timeout = 18 file_not_found = 19 dataprovider_exception = 20 control_flush_error = 21 OTHERS = 22. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. "DISP_SMRTFRM_FORM402_1 *&---------------------------------------------------------------------* *& Form DISP_SMRTFRM *&---------------------------------------------------------------------* FORM disp_smrtfrm_inv . form = 'YPRESHP_INV1_ANJAR_N'. * FORM = 'YPRESHP_INV1_VAPI' . IF r1 IS NOT INITIAL AND wa_vbak-vtweg = 'WE'. IF rd_10 IS NOT INITIAL. ENDIF. form = 'YPRESHP_INV3'. form = 'YPRESHP_INV1_ANJAR'. ENDIF.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. IF sy-subrc <> 0. ENDIF. *'/1BCDWB/SF00000418' CALL FUNCTION fmname EXPORTING * ARCHIVE_INDEX * ARCHIVE_INDEX_TAB * ARCHIVE_PARAMETERS * CONTROL_PARAMETERS * MAIL_APPL_OBJ * MAIL_RECIPIENT * MAIL_SENDER * OUTPUT_OPTIONS * USER_SETTINGS p_manid wa_yxp_shphd wa_yxp_invpre wa_yxp_soaddr wa_vbkd wa_ylcesadr wa_adrc wa_yxp_exptd_lic wa_yxp_exptd_lic1 p_spart it_ylcelcmst * CADRC com extm exdat str1 str2 IMPORTING DOCUMENT_OUTPUT_INFO JOB_OUTPUT_INFO JOB_OUTPUT_OPTIONS EXCEPTIONS formatting_error internal_error send_error user_canceled OTHERS = = = = = = = = = 'X' = = = = = = = = = = = p_manid wa_yxp_shphd wa_yxp_invpre wa_yxp_soaddr wa_vbkd wa_ylcesadr wa_adrc wa_yxp_exptd_lic wa_yxp_exptd_lic1 wa_vbak-spart it_ylcelcmst = CADRC = com = = = = extm exdat1 str1 str2 * * * * = = = = = = = = 1 2 3 4 5.no_function_module OTHERS = 2 = 3. . IF r1 IS NOT INITIAL.

ENDIF. IF sy-subrc <> 0. '/1BCDWB/SF00000445' CALL FUNCTION fmname EXPORTING * ARCHIVE_INDEX = * ARCHIVE_INDEX_TAB = * ARCHIVE_PARAMETERS = * CONTROL_PARAMETERS = * MAIL_APPL_OBJ = * MAIL_RECIPIENT = * MAIL_SENDER = * OUTPUT_OPTIONS = * USER_SETTINGS = 'X' p_doc_nr = p_autoid exdat = exdat1 " extm = extm * STR1 = STR1 * STR2 = STR2 * IMPORTING * DOCUMENT_OUTPUT_INFO = * JOB_OUTPUT_INFO = * JOB_OUTPUT_OPTIONS = * EXCEPTIONS * FORMATTING_ERROR = 1 * INTERNAL_ERROR = 2 * SEND_ERROR = 3 * USER_CANCELED = 4 * OTHERS = 5 . " DISP_SMRTFRM *&---------------------------------------------------------------------* *& Form DISP_SMARTFRM_ARE1 *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * --> p1 text * <-. * ENDIF. * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.IF sy-subrc <> 0. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ELSE. ENDFORM.p2 text . ENDIF.

ENDIF. IF sy-subrc <> 0. * '/1BCDWB/SF00000421' CALL FUNCTION fmname EXPORTING ARCHIVE_INDEX ARCHIVE_INDEX_TAB ARCHIVE_PARAMETERS CONTROL_PARAMETERS MAIL_APPL_OBJ MAIL_RECIPIENT MAIL_SENDER OUTPUT_OPTIONS USER_SETTINGS p_manid p_auto_id * * * * * * * * * = = = = = = = = = 'X' = p_manid = p_autoid . form1 = 'YARE_N2'. form1 = 'YARE_N2_VAPI_STNY'. IF ar = 'A2'. *{Added By Manoj WVDK931404 31. form1 = 'YARE_N2_VAPI'. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. IF wa_yxp_invpre-werks = '3700'. CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME' EXPORTING formname = 'YXP_ARE2' * VARIANT = ' ' * DIRECT_CALL = ' ' IMPORTING fm_name = fmname EXCEPTIONS no_form = 1 no_function_module = 2 OTHERS = 3 . ELSEIF rd_12 IS INITIAL. *} ENDIF.*----------------------------------------------------------------------* FORM disp_smartfrm_are1 .2012 ELSE.08.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. IF sy-subrc <> 0. ENDIF. ELSE. ENDIF. CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME' EXPORTING formname = form1"'YARE_N2' "'YAREN_1' * VARIANT = ' ' * DIRECT_CALL = ' ' IMPORTING fm_name = fmname EXCEPTIONS no_form = 1 no_function_module = 2 OTHERS = 3 . IF sy-subrc <> 0.* WA_YXP_EXPTD_LIC1 tenb exdat2 = WA_YXP_EXPTD_LIC1 = tenbs = exdat1 * * * * IMPORTING DOCUMENT_OUTPUT_INFO = JOB_OUTPUT_INFO = JOB_OUTPUT_OPTIONS = EXCEPTIONS formatting_error = 1 internal_error = 2 send_error = 3 user_canceled = 4 OTHERS = 5 . MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. * '/1BCDWB/SF00000421' CALL FUNCTION fmname EXPORTING ARCHIVE_INDEX ARCHIVE_INDEX_TAB ARCHIVE_PARAMETERS CONTROL_PARAMETERS MAIL_APPL_OBJ MAIL_RECIPIENT MAIL_SENDER OUTPUT_OPTIONS * * * * * * * * = = = = = = = = .

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ENDIF. ENDIF. " DISP_SMARTFRM_ARE1 *&---------------------------------------------------------------------* *& Form CALLFORM *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * --> p1 text * <-. . ENDFORM. IF sy-subrc <> 0. * IF R1 IS NOT INITIAL. " CALLFORM *&---------------------------------------------------------------------* *& Form PDISP_SMRTFRM_INV1 *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * --> p1 text * <-. ENDFORM.p2 text *----------------------------------------------------------------------* FORM callform .p2 text *----------------------------------------------------------------------* FORM pdisp_smrtfrm_inv1 .* USER_SETTINGS p_manid p_auto_id wa_yxp_exptd_lic1 tenb exdat2 str1 str2 = 'X' = p_manid = p_autoid = wa_yxp_exptd_lic1 = tenbs = exdat1 = str1 = str2 * * * * IMPORTING DOCUMENT_OUTPUT_INFO = JOB_OUTPUT_INFO = JOB_OUTPUT_OPTIONS = EXCEPTIONS formatting_error = 1 internal_error = 2 send_error = 3 user_canceled = 4 OTHERS = 5 .

"'YPRESHP_INV1_NEW1'. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ENDIF. CALL FUNCTION 'SSF_GET_DEVICE_TYPE' EXPORTING i_language = v_language i_application = 'SAPDEFAULT' IMPORTING e_devtype = v_e_devtype. ELSE. * FORM = 'YPRESHP_INV1_VAPI' . = = = = st_control_parameters = .* * * * FORM = 'YPRESHP_INV1_NEW1'. ENDIF. ENDIF. *'/1BCDWB/SF00000418' CALL FUNCTION fmname EXPORTING * ARCHIVE_INDEX * ARCHIVE_INDEX_TAB * ARCHIVE_PARAMETERS control_parameters * MAIL_APPL_OBJ "'YPRESHP_INV1'. st_control_parameters-getotf = 'X'. ELSE. CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME' EXPORTING formname = form * VARIANT = ' ' * DIRECT_CALL = ' ' IMPORTING fm_name = fmname EXCEPTIONS no_form = 1 no_function_module = 2 OTHERS = 3. form = 'YPRESHP_INV3'. ELSEIF r2 IS NOT INITIAL AND wa_vbak-vtweg = 'WE'. form = 'YPRESHP_INV1_ANJAR'. IF r1 IS NOT INITIAL. st_control_parameters-no_dialog = 'X'. "YPRESHP_INV1'. FORM = 'YPRESHP_INV3'. IF r1 IS NOT INITIAL AND wa_vbak-vtweg = 'WE'. IF sy-subrc <> 0. st_output_options-tdprinter = v_e_devtype. form = 'YPRESHP_INV1_V' .

* * * * * * * * * * * * * * * MAIL_RECIPIENT MAIL_SENDER output_options USER_SETTINGS WA_YXP_SHPHD WA_YXP_INVPRE WA_YXP_SOADDR WA_VBKD WA_YLCESADR WA_ADRC WA_YXP_EXPTD_LIC WA_YXP_EXPTD_LIC1 P_SPART IT_YLCELCMST CADRC p_manid wa_yxp_shphd wa_yxp_invpre wa_yxp_soaddr wa_vbkd wa_ylcesadr wa_adrc wa_yxp_exptd_lic wa_yxp_exptd_lic1 p_spart it_ylcelcmst CADRC = = = st_output_options = 'X' = WA_YXP_SHPHD = WA_YXP_INVPRE = WA_YXP_SOADDR = WA_VBKD = WA_YLCESADR = WA_ADRC = WA_YXP_EXPTD_LIC = WA_YXP_EXPTD_LIC1 = WA_VBAK-SPART = IT_YLCELCMST = CADRC = p_manid = wa_yxp_shphd = wa_yxp_invpre = wa_yxp_soaddr = wa_vbkd = wa_ylcesadr = wa_adrc = wa_yxp_exptd_lic = wa_yxp_exptd_lic1 = wa_vbak-spart = it_ylcelcmst = CADRC com = com extm = extm exdat = exdat1 str1 = str1 str2 = str2 IMPORTING document_output_info = st_document_output_info job_output_info = st_job_output_info job_output_options = st_job_output_options EXCEPTIONS formatting_error = 1 internal_error = 2 send_error = 3 user_canceled = 4 OTHERS = 5. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. . ELSE. IF sy-subrc <> 0.

CALL FUNCTION 'CONVERT_OTF_2_PDF' IMPORTING bin_filesize = v_bin_filesize TABLES otf = st_job_output_info-otfdata doctab_archive = it_docs lines = it_lines EXCEPTIONS err_conv_not_possible = 1 err_otf_mc_noendmarker = 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. ENDIF. *--- Get filename to store * CONCATENATE 'Converted_Smartform' '.pdf' INTO V_NAME. CONCATENATE 'PSI' wa_yxp_invpre-auto_id '.pdf' INTO v_name. CREATE OBJECT v_guiobj. CALL METHOD v_guiobj->file_save_dialog EXPORTING default_extension = 'pdf' default_file_name = v_name file_filter = v_filter CHANGING filename = v_name path = v_path fullpath = v_fullpath user_action = v_uact. IF v_uact = v_guiobj->action_cancel. EXIT. ENDIF. *--- Download PDF to local PC MOVE v_fullpath TO v_filename. CALL FUNCTION 'GUI_DOWNLOAD' EXPORTING bin_filesize = v_bin_filesize filename = v_filename filetype = 'BIN' TABLES data_tab = it_lines EXCEPTIONS file_write_error = 1 no_batch = 2 gui_refuse_filetransfer = 3 invalid_type = 4 no_authority = 5

unknown_error = 6 header_not_allowed = 7 separator_not_allowed = 8 filesize_not_allowed = 9 header_too_long = 10 dp_error_create = 11 dp_error_send = 12 dp_error_write = 13 unknown_dp_error = 14 access_denied = 15 dp_out_of_memory = 16 disk_full = 17 dp_timeout = 18 file_not_found = 19 dataprovider_exception = 20 control_flush_error = 21 OTHERS = 22. IF sy-subrc <> 0. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ENDIF. ENDIF.

*

* * * * * * *

* * * *

ELSE. '/1BCDWB/SF00000445' CALL FUNCTION fmname EXPORTING ARCHIVE_INDEX ARCHIVE_INDEX_TAB ARCHIVE_PARAMETERS control_parameters MAIL_APPL_OBJ MAIL_RECIPIENT MAIL_SENDER output_options USER_SETTINGS p_doc_nr exdat IMPORTING document_output_info job_output_info job_output_options EXCEPTIONS FORMATTING_ERROR INTERNAL_ERROR SEND_ERROR

= = = = st_control_parameters = = = = st_output_options = 'X' = p_autoid = exdat1 = st_document_output_info = st_job_output_info = st_job_output_options = 1 = 2 = 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. * ENDIF. ELSE. CALL FUNCTION 'CONVERT_OTF_2_PDF' IMPORTING bin_filesize = v_bin_filesize TABLES otf = st_job_output_info-otfdata doctab_archive = it_docs lines = it_lines EXCEPTIONS err_conv_not_possible = 1 err_otf_mc_noendmarker = 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. ENDIF. *--- Get filename to store CONCATENATE 'Converted_Smartform' '.pdf' INTO v_name. CREATE OBJECT v_guiobj. CALL METHOD v_guiobj->file_save_dialog EXPORTING default_extension = 'pdf' default_file_name = v_name file_filter = v_filter CHANGING filename = v_name path = v_path fullpath = v_fullpath user_action = v_uact. IF v_uact = v_guiobj->action_cancel. EXIT. ENDIF. *--- Download PDF to local PC MOVE v_fullpath TO v_filename. CALL FUNCTION 'GUI_DOWNLOAD' EXPORTING bin_filesize = v_bin_filesize filename = v_filename filetype = 'BIN'

ENDFORM. . ENDIF. IF sy-subrc <> 0. " PDISP_SMRTFRM_INV1 *&---------------------------------------------------------------------* *& Form PDISP_SMARTFRM_ARE1 *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * --> p1 text * <-.p2 text *----------------------------------------------------------------------* FORM pdisp_smartfrm_are1 .TABLES data_tab = it_lines EXCEPTIONS file_write_error = 1 no_batch = 2 gui_refuse_filetransfer = 3 invalid_type = 4 no_authority = 5 unknown_error = 6 header_not_allowed = 7 separator_not_allowed = 8 filesize_not_allowed = 9 header_too_long = 10 dp_error_create = 11 dp_error_send = 12 dp_error_write = 13 unknown_dp_error = 14 access_denied = 15 dp_out_of_memory = 16 disk_full = 17 dp_timeout = 18 file_not_found = 19 dataprovider_exception = 20 control_flush_error = 21 OTHERS = 22. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ENDIF. ENDIF.

* * CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME' EXPORTING formname = 'YXP_ARE2' VARIANT = ' ' DIRECT_CALL = ' ' IMPORTING fm_name = fmname EXCEPTIONS no_form = 1 no_function_module = 2 OTHERS = 3 . st_output_options-tdprinter = v_e_devtype. st_control_parameters-no_dialog = 'X'.IF wa_yxp_invpre-werks = '3700'. IF sy-subrc <> 0. CALL FUNCTION 'SSF_GET_DEVICE_TYPE' EXPORTING i_language = v_language i_application = 'SAPDEFAULT' IMPORTING e_devtype = v_e_devtype. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. IF ar = 'A2'. *{Added By Manoj WVDK931418 01. ENDIF.09. ELSEIF rd_12 IS INITIAL. st_control_parameters-getotf = 'X'. '/1BCDWB/SF00000421' CALL FUNCTION fmname EXPORTING ARCHIVE_INDEX ARCHIVE_INDEX_TAB ARCHIVE_PARAMETERS control_parameters MAIL_APPL_OBJ MAIL_RECIPIENT * * * * * * = = = = st_control_parameters = = . form1 = 'YARE_N2'. form1 = 'YARE_N2_VAPI'. form1 = 'YARE_N2_VAPI_STNY'.2012 ELSE. *} ENDIF.

ENDIF. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.* * * * * * * * MAIL_SENDER = output_options = st_output_options USER_SETTINGS = 'X' p_auto_id = p_autoid p_manid = p_manid WA_YXP_EXPTD_LIC1 = WA_YXP_EXPTD_LIC1 tenb = tenbs exdat2 = exdat1 STR1 = STR1 STR2 = STR2 IMPORTING document_output_info = st_document_output_info job_output_info = st_job_output_info job_output_options = st_job_output_options EXCEPTIONS formatting_error = 1 internal_error = 2 send_error = 3 user_canceled = 4 OTHERS = 5 . CREATE OBJECT v_guiobj. IF sy-subrc <> 0.pdf' INTO v_name. ELSE. *--. *--. MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.Get filename to store CONCATENATE 'ARE2' p_autoid '.Convert OTF to PDF CALL FUNCTION 'CONVERT_OTF_2_PDF' IMPORTING bin_filesize = v_bin_filesize TABLES otf = st_job_output_info-otfdata doctab_archive = it_docs lines = it_lines EXCEPTIONS err_conv_not_possible = 1 err_otf_mc_noendmarker = 2 OTHERS = 3. IF sy-subrc <> 0. CALL METHOD v_guiobj->file_save_dialog EXPORTING default_extension = 'pdf' default_file_name = v_name .

EXIT. ELSE. ENDIF. *--. IF sy-subrc <> 0. IF v_uact = v_guiobj->action_cancel. ENDIF.file_filter = v_filter CHANGING filename = v_name path = v_path fullpath = v_fullpath user_action = v_uact. .Download PDF to local PC MOVE v_fullpath TO v_filename. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ENDIF. CALL FUNCTION 'GUI_DOWNLOAD' EXPORTING bin_filesize = v_bin_filesize filename = v_filename filetype = 'BIN' TABLES data_tab = it_lines EXCEPTIONS file_write_error = 1 no_batch = 2 gui_refuse_filetransfer = 3 invalid_type = 4 no_authority = 5 unknown_error = 6 header_not_allowed = 7 separator_not_allowed = 8 filesize_not_allowed = 9 header_too_long = 10 dp_error_create = 11 dp_error_send = 12 dp_error_write = 13 unknown_dp_error = 14 access_denied = 15 dp_out_of_memory = 16 disk_full = 17 dp_timeout = 18 file_not_found = 19 dataprovider_exception = 20 control_flush_error = 21 OTHERS = 22.

CALL FUNCTION 'SSF_GET_DEVICE_TYPE' EXPORTING i_language = v_language i_application = 'SAPDEFAULT' IMPORTING e_devtype = v_e_devtype. st_control_parameters-no_dialog = 'X'. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. IF sy-subrc <> 0. '/1BCDWB/SF00000421' CALL FUNCTION fmname EXPORTING ARCHIVE_INDEX ARCHIVE_INDEX_TAB ARCHIVE_PARAMETERS control_parameters MAIL_APPL_OBJ MAIL_RECIPIENT MAIL_SENDER output_options USER_SETTINGS p_auto_id p_manid wa_yxp_exptd_lic1 tenb exdat2 str1 str2 * * * * * * * * = = = = st_control_parameters = = = = st_output_options = 'X' = p_autoid = p_manid = wa_yxp_exptd_lic1 = tenbs = exdat1 = str1 = str2 . st_control_parameters-getotf = 'X'. * * CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME' EXPORTING formname = form1 "'YARE_N2'"'YAREN_1' VARIANT = ' ' DIRECT_CALL = ' ' IMPORTING fm_name = fmname EXCEPTIONS no_form = 1 no_function_module = 2 OTHERS = 3 . st_output_options-tdprinter = v_e_devtype. ENDIF.

EXIT. IF sy-subrc <> 0. CREATE OBJECT v_guiobj. IF v_uact = v_guiobj->action_cancel. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. ENDIF.pdf' INTO v_name. CALL METHOD v_guiobj->file_save_dialog EXPORTING default_extension = 'pdf' default_file_name = v_name file_filter = v_filter CHANGING filename = v_name path = v_path fullpath = v_fullpath user_action = v_uact. * *--. IF sy-subrc <> 0. ENDIF.Get filename to store CONCATENATE 'ARE1' p_autoid '.Convert OTF to PDF CALL FUNCTION 'CONVERT_OTF_2_PDF' IMPORTING bin_filesize = v_bin_filesize TABLES otf = st_job_output_info-otfdata doctab_archive = it_docs lines = it_lines EXCEPTIONS err_conv_not_possible = 1 err_otf_mc_noendmarker = 2 OTHERS = 3. ELSE.IMPORTING document_output_info = st_document_output_info job_output_info = st_job_output_info job_output_options = st_job_output_options EXCEPTIONS formatting_error = 1 internal_error = 2 send_error = 3 user_canceled = 4 OTHERS = 5 . . *--.

" PDISP_SMARTFRM_ARE1 *&---------------------------------------------------------------------* *& Form PACK_SMARFORMS *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * --> p1 text * <-. IF sy-subrc <> 0.p2 text *----------------------------------------------------------------------* . ENDFORM. CALL FUNCTION 'GUI_DOWNLOAD' EXPORTING bin_filesize = v_bin_filesize filename = v_filename filetype = 'BIN' TABLES data_tab = it_lines EXCEPTIONS file_write_error = 1 no_batch = 2 gui_refuse_filetransfer = 3 invalid_type = 4 no_authority = 5 unknown_error = 6 header_not_allowed = 7 separator_not_allowed = 8 filesize_not_allowed = 9 header_too_long = 10 dp_error_create = 11 dp_error_send = 12 dp_error_write = 13 unknown_dp_error = 14 access_denied = 15 dp_out_of_memory = 16 disk_full = 17 dp_timeout = 18 file_not_found = 19 dataprovider_exception = 20 control_flush_error = 21 OTHERS = 22.*--. ENDIF. ENDIF. ENDIF. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.Download PDF to local PC MOVE v_fullpath TO v_filename.

ELSE. CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME' EXPORTING formname = form3 "'YPACK_PRESHIP'" ankur 'YXP_PACKING1' " OLD PACKING LIST 'YPREPACK_INV1' * VARIANT = ' ' * DIRECT_CALL = ' ' IMPORTING fm_name = fmname1 EXCEPTIONS no_form = 1 no_function_module = 2 OTHERS = 3 . form3 = 'YPACK_PRESHIP_VAPI' . IF * wa_vbak-vtweg = 'WE'. ENDIF. form3 = 'YPACK_NEW'. IF sy-subrc <> 0. ENDIF. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.FORM pack_smarforms . FORM3 = 'YPACK_PRESHIP'. CALL FUNCTION fmname1 EXPORTING ARCHIVE_INDEX ARCHIVE_INDEX_TAB ARCHIVE_PARAMETERS CONTROL_PARAMETERS MAIL_APPL_OBJ MAIL_RECIPIENT MAIL_SENDER OUTPUT_OPTIONS USER_SETTINGS p_autoid p_manid wa_yxp_shphd wa_yxp_invpre wa_yxp_soaddr wa_vbkd wa_ylcesadr wa_adrc wa_yxp_exptd_lic wa_yxp_exptd_lic1 * * * * * * * * * = = = = = = = = = = = = = = = = = = = 'X' p_autoid p_manid wa_yxp_shphd wa_yxp_invpre wa_yxp_soaddr wa_vbkd wa_ylcesadr wa_adrc wa_yxp_exptd_lic wa_yxp_exptd_lic1 .

form3 = 'YPACK_NEW'. IF sy-subrc <> 0. CALL FUNCTION 'SSF_GET_DEVICE_TYPE' EXPORTING i_language = v_language i_application = 'SAPDEFAULT' IMPORTING . " PACK_SMARFORMS *&---------------------------------------------------------------------* *& Form PACK_SMARFORMS1 *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * --> p1 text * <-. form3 = 'YPACK_PRESHIP_VAPI' . ENDFORM. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. FORM3 = 'YPACK_PRESHIP'. ENDIF. ELSE. IF * wa_vbak-vtweg = 'WE'.p_spart it_ylcelcmst cadrc = wa_vbak-spart = it_ylcelcmst = cadrc * * * * * * * * * * * com = com exdat = exdat1 str1 = str1 str2 = str2 DESC = DESC IMPORTING DOCUMENT_OUTPUT_INFO = JOB_OUTPUT_INFO = JOB_OUTPUT_OPTIONS = EXCEPTIONS FORMATTING_ERROR = 1 INTERNAL_ERROR = 2 SEND_ERROR = 3 USER_CANCELED = 4 OTHERS = 5 .p2 text *----------------------------------------------------------------------* FORM pack_smarforms1 . ENDIF.

st_control_parameters-no_dialog = 'X'. ENDIF.e_devtype = v_e_devtype. CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME' EXPORTING formname = form3 "'YPACK_PRESHIP'" ANKUR 'YXP_PACKING1 ' " OLD PACKING LIST 'YPREPACK_INV1' * VARIANT = ' ' * DIRECT_CALL = ' ' IMPORTING fm_name = fmname1 EXCEPTIONS no_form = 1 no_function_module = 2 OTHERS = 3 . IF sy-subrc <> 0. st_output_options-tdprinter = v_e_devtype. st_control_parameters-getotf = 'X'. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. * * * * * * * CALL FUNCTION fmname1 EXPORTING ARCHIVE_INDEX ARCHIVE_INDEX_TAB ARCHIVE_PARAMETERS control_parameters MAIL_APPL_OBJ MAIL_RECIPIENT MAIL_SENDER output_options USER_SETTINGS p_autoid p_manid wa_yxp_shphd wa_yxp_invpre wa_yxp_soaddr wa_vbkd wa_ylcesadr wa_adrc wa_yxp_exptd_lic wa_yxp_exptd_lic1 p_spart it_ylcelcmst cadrc = = = = st_control_parameters = = = = st_output_options = 'X' = p_autoid = p_manid = wa_yxp_shphd = wa_yxp_invpre = wa_yxp_soaddr = wa_vbkd = wa_ylcesadr = wa_adrc = wa_yxp_exptd_lic = wa_yxp_exptd_lic1 = wa_vbak-spart = it_ylcelcmst = cadrc .

com = com exdat = exdat1 str1 = str1 str2 = str2 IMPORTING document_output_info = st_document_output_info job_output_info = st_job_output_info job_output_options = st_job_output_options * EXCEPTIONS * FORMATTING_ERROR = 1 * INTERNAL_ERROR = 2 * SEND_ERROR = 3 * USER_CANCELED = 4 * OTHERS = 5 .Get filename to store CONCATENATE 'PL' p_autoid '. CALL METHOD v_guiobj->file_save_dialog EXPORTING default_extension = 'pdf' default_file_name = v_name file_filter = v_filter CHANGING filename = v_name path = v_path fullpath = v_fullpath . IF sy-subrc <> 0. IF sy-subrc <> 0. *--. CREATE OBJECT v_guiobj. ENDIF. CALL FUNCTION 'CONVERT_OTF_2_PDF' IMPORTING bin_filesize = v_bin_filesize TABLES otf = st_job_output_info-otfdata doctab_archive = it_docs lines = it_lines EXCEPTIONS err_conv_not_possible = 1 err_otf_mc_noendmarker = 2 OTHERS = 3. ELSE.pdf' INTO v_name. * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

IF v_uact = v_guiobj->action_cancel. ENDIF. IF sy-subrc <> 0.Download PDF to local PC MOVE v_fullpath TO v_filename. *--. ENDIF. EXIT. ENDIF. CALL FUNCTION 'GUI_DOWNLOAD' EXPORTING bin_filesize = v_bin_filesize filename = v_filename filetype = 'BIN' TABLES data_tab = it_lines EXCEPTIONS file_write_error = 1 no_batch = 2 gui_refuse_filetransfer = 3 invalid_type = 4 no_authority = 5 unknown_error = 6 header_not_allowed = 7 separator_not_allowed = 8 filesize_not_allowed = 9 header_too_long = 10 dp_error_create = 11 dp_error_send = 12 dp_error_write = 13 unknown_dp_error = 14 access_denied = 15 dp_out_of_memory = 16 disk_full = 17 dp_timeout = 18 file_not_found = 19 dataprovider_exception = 20 control_flush_error = 21 OTHERS = 22.user_action = v_uact. " PACK_SMARFORMS1 *&---------------------------------------------------------------------* *& Form ANNEXURE_SMARTFORM . MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ENDFORM.

IF tena = 'X'.p2 text *----------------------------------------------------------------------* FORM annexure_smartform . tencs = tenc. *IF CONTABA = 'X'. IF tenb = 'X'. *BREAK-POINT. ENDIF. ELSE.*&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * --> p1 text * <-. *ENDIF. IF tenc = 'X'. tenas = tena. IF sy-subrc <> 0. form2 = 'YANNEXUREC1'. tenbs = tenb. IF tend = 'X'. * *IF CONTABB = 'X'. *ENDIF. . MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno . ENDIF. CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME' EXPORTING formname = form2"'YANNEXUREC1' * VARIANT = ' ' * DIRECT_CALL = ' ' IMPORTING fm_name = fmname4 EXCEPTIONS no_form = 1 no_function_module = 2 OTHERS = 3. ENDIF. ENDIF. ENDIF. * elva = CONTABA. * elva = CONTABB. IF wa_vbak-vtweg = 'WE'. tend = 'ACC6'. form2 = 'YANNEXUREC1_VAPI' .

*'/1BCDWB/SF00000444' CALL FUNCTION fmname4 EXPORTING ARCHIVE_INDEX ARCHIVE_INDEX_TAB ARCHIVE_PARAMETERS CONTROL_PARAMETERS MAIL_APPL_OBJ MAIL_RECIPIENT MAIL_SENDER OUTPUT_OPTIONS USER_SETTINGS p_manid p_autoid exdat exname supname nameauth des tena tenb tenc tend consamno * * * * * * * * * = = = = = = = = = 'X' = p_manid = p_autoid = exdat1 = exname = supname = nameauth = des = tenas = tenbs = tencs = tend = consamno * IMPORTING * DOCUMENT_OUTPUT_INFO = * JOB_OUTPUT_INFO = * JOB_OUTPUT_OPTIONS = EXCEPTIONS formatting_error = 1 internal_error = 2 send_error = 3 user_canceled = 4 OTHERS = 5. IF sy-subrc <> 0. " ANNEXURE_SMARTFORM *&---------------------------------------------------------------------* *& Form PANNEXURE_SMARTFORM1 *&---------------------------------------------------------------------* . ENDIF.WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. ENDIF. ENDFORM.

form2 = 'YANNEXUREC1_VAPI' . form2 = 'YANNEXUREC1'. IF wa_vbak-vtweg = 'WE'. ENDIF. st_control_parameters-no_dialog = 'X'.p2 text *----------------------------------------------------------------------* FORM pannexure_smartform1 . IF tena = 'X'. tend = 'ACC6'. IF tend = 'X'. CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME' EXPORTING formname = form2"'YANNEXUREC1' * VARIANT = ' ' * DIRECT_CALL = ' ' IMPORTING fm_name = fmname4 EXCEPTIONS no_form = 1 no_function_module = 2 OTHERS = 3 . tenbs = tenb. IF tenb = 'X'. st_output_options-tdprinter = v_e_devtype. CALL FUNCTION 'SSF_GET_DEVICE_TYPE' EXPORTING i_language = v_language i_application = 'SAPDEFAULT' IMPORTING e_devtype = v_e_devtype. IF tenc = 'X'. tencs = tenc. ENDIF. tenas = tena.* text *----------------------------------------------------------------------* * --> p1 text * <-. st_control_parameters-getotf = 'X'. ENDIF. ENDIF. ELSE. . ENDIF. IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ELSE. ENDIF.MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. * * * * * * * * CALL FUNCTION fmname4 EXPORTING ARCHIVE_INDEX ARCHIVE_INDEX_TAB ARCHIVE_PARAMETERS control_parameters MAIL_APPL_OBJ MAIL_RECIPIENT MAIL_SENDER output_options USER_SETTINGS P_DOC_NR p_manid p_autoid exdat exname supname nameauth des tena tenb tenc tend consamno = = = = st_control_parameters = = = = st_output_options = 'X' = P_AUTOID = p_manid = p_autoid = exdat1 = exname = supname = nameauth = des = tenas = tenbs = tencs = tend = consamno IMPORTING document_output_info = st_document_output_info job_output_info = st_job_output_info job_output_options = st_job_output_options * EXCEPTIONS * FORMATTING_ERROR = 1 * INTERNAL_ERROR = 2 * SEND_ERROR = 3 * USER_CANCELED = 4 * OTHERS = 5 . IF sy-subrc <> 0. CALL FUNCTION 'CONVERT_OTF_2_PDF' .

IF v_uact = v_guiobj->action_cancel. *--.Get filename to store CONCATENATE 'ANNX' p_autoid '.IMPORTING bin_filesize = v_bin_filesize TABLES otf = st_job_output_info-otfdata doctab_archive = it_docs lines = it_lines EXCEPTIONS err_conv_not_possible = 1 err_otf_mc_noendmarker = 2 OTHERS = 3. *--. IF sy-subrc <> 0.pdf' INTO v_name.Download PDF to local PC MOVE v_fullpath TO v_filename. CALL METHOD v_guiobj->file_save_dialog EXPORTING default_extension = 'pdf' default_file_name = v_name file_filter = v_filter CHANGING filename = v_name path = v_path fullpath = v_fullpath user_action = v_uact. CREATE OBJECT v_guiobj. CALL FUNCTION 'GUI_DOWNLOAD' EXPORTING bin_filesize = v_bin_filesize filename = v_filename filetype = 'BIN' TABLES data_tab = it_lines EXCEPTIONS file_write_error = 1 no_batch = 2 gui_refuse_filetransfer = 3 invalid_type = 4 no_authority = 5 unknown_error = 6 header_not_allowed = 7 . ENDIF. ENDIF. EXIT. * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

separator_not_allowed = 8 filesize_not_allowed = 9 header_too_long = 10 dp_error_create = 11 dp_error_send = 12 dp_error_write = 13 unknown_dp_error = 14 access_denied = 15 dp_out_of_memory = 16 disk_full = 17 dp_timeout = 18 file_not_found = 19 dataprovider_exception = 20 control_flush_error = 21 OTHERS = 22. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ENDFORM. IF sy-subrc <> 0. " PANNEXURE_SMARTFORM1 *&---------------------------------------------------------------------* *& Form DETAIL_PACKLIST *&---------------------------------------------------------------------* FORM detail_packlist . ENDIF. CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME' EXPORTING formname = 'YXP_PACKDTLS' * VARIANT = ' ' * DIRECT_CALL = ' ' IMPORTING fm_name = fmname5 EXCEPTIONS no_form = 1 no_function_module = 2 OTHERS = 3 . MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ENDIF. ENDIF. IF sy-subrc <> 0. *'/1BCDWB/SF00000700' CALL FUNCTION fmname5 EXPORTING * ARCHIVE_INDEX = .

.* * * * * * * * * * * * ARCHIVE_INDEX_TAB = ARCHIVE_PARAMETERS = CONTROL_PARAMETERS = MAIL_APPL_OBJ = MAIL_RECIPIENT = MAIL_SENDER = OUTPUT_OPTIONS = USER_SETTINGS = 'X' p_autoid = p_autoid p_manid = p_manid IMPORTING DOCUMENT_OUTPUT_INFO = JOB_OUTPUT_INFO = JOB_OUTPUT_OPTIONS = EXCEPTIONS formatting_error = 1 internal_error = 2 send_error = 3 user_canceled = 4 OTHERS = 5 . MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. " DETAIL_PACKLIST *&---------------------------------------------------------------------* *& Form LOADSLIP *&---------------------------------------------------------------------* FORM loadslip . ENDIF. IF sy-subrc <> 0. IF sy-subrc <> 0. ENDFORM. ENDIF. CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME' EXPORTING formname = 'YXP_LOADSLIP' * VARIANT = ' ' * DIRECT_CALL = ' ' IMPORTING fm_name = fmname6 EXCEPTIONS no_form = 1 no_function_module = 2 OTHERS = 3 . MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME' EXPORTING . ENDFORM. st_control_parameters-getotf = 'X'. " LOADSLIP *&---------------------------------------------------------------------* *& Form DTLS_PACKLST *&---------------------------------------------------------------------* FORM dtls_packlst . IF sy-subrc <> 0.*'/1BCDWB/SF00000699' CALL FUNCTION fmname6 EXPORTING * ARCHIVE_INDEX = * ARCHIVE_INDEX_TAB = * ARCHIVE_PARAMETERS = * CONTROL_PARAMETERS = * MAIL_APPL_OBJ = * MAIL_RECIPIENT = * MAIL_SENDER = * OUTPUT_OPTIONS = * USER_SETTINGS = 'X' p_autoid = p_autoid p_manid = p_manid * IMPORTING * DOCUMENT_OUTPUT_INFO = * JOB_OUTPUT_INFO = * JOB_OUTPUT_OPTIONS = EXCEPTIONS formatting_error = 1 internal_error = 2 send_error = 3 user_canceled = 4 OTHERS = 5 . st_control_parameters-no_dialog = 'X'. st_output_options-tdprinter = v_e_devtype. CALL FUNCTION 'SSF_GET_DEVICE_TYPE' EXPORTING i_language = v_language i_application = 'SAPDEFAULT' IMPORTING e_devtype = v_e_devtype.

IF sy-subrc <> 0. ENDIF.* * formname = 'YXP_PACKDTLS' VARIANT = ' ' DIRECT_CALL = ' ' IMPORTING fm_name = fmname5 EXCEPTIONS no_form = 1 no_function_module = 2 OTHERS = 3 . MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. * * * * * * * * CALL FUNCTION fmname5 EXPORTING ARCHIVE_INDEX ARCHIVE_INDEX_TAB ARCHIVE_PARAMETERS control_parameters MAIL_APPL_OBJ MAIL_RECIPIENT MAIL_SENDER output_options USER_SETTINGS P_DOC_NR p_manid p_autoid exdat exname supname nameauth tena tenb tenc tend consamno = = = = st_control_parameters = = = = st_output_options = 'X' = P_AUTOID = p_manid = p_autoid = exdat1 = exname = supname = nameauth = tenas = tenbs = tencs = tend = consamno IMPORTING document_output_info job_output_info job_output_options * EXCEPTIONS * FORMATTING_ERROR * INTERNAL_ERROR * SEND_ERROR = st_document_output_info = st_job_output_info = st_job_output_options = 1 = 2 = 3 .

Get filename to store CONCATENATE p_autoid '. ENDIF. ELSE. CALL FUNCTION 'GUI_DOWNLOAD' EXPORTING bin_filesize = v_bin_filesize filename = v_filename filetype = 'BIN' TABLES . IF sy-subrc <> 0. CALL FUNCTION 'CONVERT_OTF_2_PDF' IMPORTING bin_filesize = v_bin_filesize TABLES otf = st_job_output_info-otfdata doctab_archive = it_docs lines = it_lines EXCEPTIONS err_conv_not_possible = 1 err_otf_mc_noendmarker = 2 OTHERS = 3.* * USER_CANCELED = 4 OTHERS = 5 . IF v_uact = v_guiobj->action_cancel. *--.Download PDF to local PC MOVE v_fullpath TO v_filename. ENDIF. CALL METHOD v_guiobj->file_save_dialog EXPORTING default_extension = 'pdf' default_file_name = v_name file_filter = v_filter CHANGING filename = v_name path = v_path fullpath = v_fullpath user_action = v_uact. EXIT. *--. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.pdf' INTO v_name. IF sy-subrc <> 0. CREATE OBJECT v_guiobj.

ENDIF. CALL FUNCTION 'SSF_GET_DEVICE_TYPE' EXPORTING i_language = v_language i_application = 'SAPDEFAULT' IMPORTING e_devtype = v_e_devtype. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ENDIF. " DTLS_PACKLST *&---------------------------------------------------------------------* *& Form LOADING_SLIP *&---------------------------------------------------------------------* FORM loading_slip .data_tab = it_lines EXCEPTIONS file_write_error = 1 no_batch = 2 gui_refuse_filetransfer = 3 invalid_type = 4 no_authority = 5 unknown_error = 6 header_not_allowed = 7 separator_not_allowed = 8 filesize_not_allowed = 9 header_too_long = 10 dp_error_create = 11 dp_error_send = 12 dp_error_write = 13 unknown_dp_error = 14 access_denied = 15 dp_out_of_memory = 16 disk_full = 17 dp_timeout = 18 file_not_found = 19 dataprovider_exception = 20 control_flush_error = 21 OTHERS = 22. ENDFORM. CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME' EXPORTING . st_control_parameters-no_dialog = 'X'. IF sy-subrc <> 0. st_output_options-tdprinter = v_e_devtype. st_control_parameters-getotf = 'X'.

* *

formname = 'YXP_LOADSLIP' VARIANT = ' ' DIRECT_CALL = ' ' IMPORTING fm_name = fmname6 EXCEPTIONS no_form = 1 no_function_module = 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. ENDIF.

* * * * * * * *

CALL FUNCTION fmname6 EXPORTING ARCHIVE_INDEX ARCHIVE_INDEX_TAB ARCHIVE_PARAMETERS control_parameters MAIL_APPL_OBJ MAIL_RECIPIENT MAIL_SENDER output_options USER_SETTINGS P_DOC_NR p_manid p_autoid exdat exname supname nameauth tena tenb tenc tend consamno

= = = = st_control_parameters = = = = st_output_options = 'X' = P_AUTOID = p_manid = p_autoid = exdat1 = exname = supname = nameauth = tenas = tenbs = tencs = tend = consamno

IMPORTING document_output_info job_output_info job_output_options * EXCEPTIONS * FORMATTING_ERROR * INTERNAL_ERROR * SEND_ERROR

= st_document_output_info = st_job_output_info = st_job_output_options = 1 = 2 = 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. ELSE.

CALL FUNCTION 'CONVERT_OTF_2_PDF' IMPORTING bin_filesize = v_bin_filesize TABLES otf = st_job_output_info-otfdata doctab_archive = it_docs lines = it_lines EXCEPTIONS err_conv_not_possible = 1 err_otf_mc_noendmarker = 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. ENDIF. *--- Get filename to store CONCATENATE p_autoid '.pdf' INTO v_name. CREATE OBJECT v_guiobj. CALL METHOD v_guiobj->file_save_dialog EXPORTING default_extension = 'pdf' default_file_name = v_name file_filter = v_filter CHANGING filename = v_name path = v_path fullpath = v_fullpath user_action = v_uact. IF v_uact = v_guiobj->action_cancel. EXIT. ENDIF. *--- Download PDF to local PC MOVE v_fullpath TO v_filename. CALL FUNCTION 'GUI_DOWNLOAD' EXPORTING bin_filesize = v_bin_filesize filename = v_filename filetype = 'BIN' TABLES

data_tab = it_lines EXCEPTIONS file_write_error = 1 no_batch = 2 gui_refuse_filetransfer = 3 invalid_type = 4 no_authority = 5 unknown_error = 6 header_not_allowed = 7 separator_not_allowed = 8 filesize_not_allowed = 9 header_too_long = 10 dp_error_create = 11 dp_error_send = 12 dp_error_write = 13 unknown_dp_error = 14 access_denied = 15 dp_out_of_memory = 16 disk_full = 17 dp_timeout = 18 file_not_found = 19 dataprovider_exception = 20 control_flush_error = 21 OTHERS = 22. IF sy-subrc <> 0. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ENDIF. ENDIF.

ENDFORM. " LOADING_SLIP *&---------------------------------------------------------------------* *& Form GATE_PASS *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * --> p1 text * <-- p2 text *----------------------------------------------------------------------* FORM gate_pass. CLEAR: tab_gpass[], it_gpass[], it_gpass1[]. LOOP AT it_cont1. IF it_cont1-mark = 'X'. SELECT SINGLE gpass createdby createdon lrno lrdate transname truckno T _DATE T_TIME INTO (gatepass, v_createdby, v_createdon, v_lrno, v_lrdate, v_transna me, v_truckno, V_date, v_time) FROM yxp_gatepass

APPEND wa_gpass TO it_gpass1. ELSE. wa_gpass-truckno = it_cont1-truckno. wa_gpass-truckno = it_cont1-truckno. wa_gpass-lrdate = it_cont1-lrdate. wa_gpass-createdby = v_createdby. ENDIF. wa_gpass-t_date = it_cont1-t_date. wa_gpass-transname = it_cont1-transname. wa_gpass-auto_id = p_autoid. wa_gpass-gpass = gatepass. wa_gpass-lrdate = it_cont1-lrdate. . wa_gpass-lrno = it_cont1-lrno. wa_gpass-createdon = sy-datum. wa_gpass-mandt = '310'.WHERE contno EQ it_cont1-contno. wa_gpass-lrno = it_cont1-lrno. CALL FUNCTION 'NUMBER_GET_NEXT' EXPORTING nr_range_nr = '01' object = 'YGATE' ignore_buffer = 'X' IMPORTING number = gid EXCEPTIONS interval_not_found = 1 number_range_not_intern = 2 object_not_found = 3 quantity_is_0 = 4 quantity_is_not_1 = 5 interval_overflow = 6 buffer_overflow = 7 OTHERS = 8. wa_gpass-auto_id = p_autoid. wa_gpass-transname = it_cont1-transname. wa_gpass-mandt = '310'. IF v_lrno IS INITIAL. wa_gpass-createdby = sy-uname. wa_gpass-t_time = it_cont1-t_time. wa_gpass-t_time = it_cont1-t_time. wa_gpass-contno = it_cont1-contno. wa_gpass-mandt = '310'. IF gatepass IS INITIAL. ELSE. wa_gpass-contno = it_cont1-contno. wa_gpass-gpass = gid. wa_gpass-createdon = v_createdon. wa_gpass-t_date = it_cont1-t_date.

MODIFY yxp_gatepass FROM TABLE it_gpass1. IF it_gpass1[] IS NOT INITIAL. tab_gpass-createdby = it_gpass-createdby. v_createdon. v_truckno. tab_gpass-auto_id = it_gpass-auto_id. tab_gpass-createdon = it_gpass-createdon. LOOP AT it_gpass. v_date . ENDLOOP. v_createdby. tab_gpass-gpass = it_gpass-gpass. tab_gpass-lrno = it_gpass-lrno. CLEAR: gatepass. tab_gpass-transname = it_gpass-transname. wa_gpass-t_date = v_date. tab_gpass-truckno = it_gpass-truckno. wa_gpass-createdon = v_createdon. v_transname. wa_gpass-truckno = v_truckno. wa_gpass-gpass = gatepass. ENDIF. ENDIF. tab_gpass-t_date = it_gpass-t_date. CALL FUNCTION fmname7 EXPORTING p_autoid = p_autoid ." into wa_gpass. CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME' EXPORTING formname = 'YPRE_GATE' IMPORTING fm_name = fmname7 EXCEPTIONS no_form = 1 no_function_module = 2 OTHERS = 3. wa_gpass-lrdate = v_lrdate. tab_gpass-mandt = '310'. tab_gpass-contno = it_gpass-contno. tab_gpass-t_time = it_gpass-t_time. COMMIT WORK. APPEND tab_gpass. wa_gpass-transname = v_transname. tab_gpass-lrdate = it_gpass-lrdate. wa_gpass-contno = it_cont1-contno. v_lrno.wa_gpass-auto_id = p_autoid. v_lrdate. ENDIF. wa_gpass-lrno = v_lrno. APPEND wa_gpass TO it_gpass. wa_gpass-t_time = v_time.v_time. ENDLOOP.

CLEAR: tab_gpass[]. CALL FUNCTION 'NUMBER_GET_NEXT' EXPORTING nr_range_nr = '01' object = 'YGATE' ignore_buffer = 'X' IMPORTING number = gid EXCEPTIONS interval_not_found = 1 number_range_not_intern = 2 object_not_found = 3 quantity_is_0 = 4 quantity_is_not_1 = 5 interval_overflow = 6 buffer_overflow = 7 OTHERS = 8. LOOP AT it_cont1. IF it_cont1-mark = 'X'. st_output_options-tdprinter = v_e_devtype. ENDFORM. it_gpass[]. v_createdby. st_control_parameters-no_dialog = 'X'.p_manid = p_manid TABLES tab_gpass = tab_gpass. st_control_parameters-getotf = 'X'. V_date. v_time ) FROM yxp_gatepass WHERE contno EQ it_cont1-contno. SELECT SINGLE gpass createdby createdon lrno lrdate transname truckno t _date t_time INTO (gatepass. v_lrdate. " GATE_PASS *&---------------------------------------------------------------------* *& Form GATE_PASS1 *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* FORM gate_pass1 . it_gpass1[]. v_truckno. IF gatepass IS INITIAL. . CALL FUNCTION 'SSF_GET_DEVICE_TYPE' EXPORTING i_language = v_language i_application = 'SAPDEFAULT' IMPORTING e_devtype = v_e_devtype. IF v_lrno IS INITIAL. v_createdon. v_lrno. v_transna me.

wa_gpass-createdon = v_createdon. wa_gpass-createdby = sy-uname. wa_gpass-t_time = v_time. wa_gpass-truckno = it_cont1-truckno. v_lrdate. wa_gpass-lrno = v_lrno. wa_gpass-t_date = v_date.wa_gpass-mandt = '310'. wa_gpass-lrno = it_cont1-lrno. wa_gpass-auto_id = p_autoid. ENDIF. wa_gpass-createdby = v_createdby. wa_gpass-contno = it_cont1-contno. wa_gpass-auto_id = p_autoid. v_transname. wa_gpass-createdon = sy-datum. tab_gpass-auto_id = it_gpass-auto_id. APPEND wa_gpass TO it_gpass. v_lrno. wa_gpass-gpass = gid. wa_gpass-mandt = '310'. wa_gpass-mandt = '310'.v_time. wa_gpass-t_time = it_cont1-t_time. v_truckno. wa_gpass-truckno = v_truckno. tab_gpass-contno = it_gpass-contno. v_createdby. wa_gpass-lrdate = v_lrdate. APPEND wa_gpass TO it_gpass1. CLEAR: gatepass. tab_gpass-mandt = '310'. ELSE. wa_gpass-auto_id = p_autoid. wa_gpass-createdon = v_createdon. wa_gpass-lrdate = it_cont1-lrdate." into wa_gpass. wa_gpass-transname = v_transname. wa_gpass-t_time = it_cont1-t_time. ELSE. wa_gpass-contno = it_cont1-contno. wa_gpass-gpass = gatepass. wa_gpass-transname = it_cont1-transname. wa_gpass-transname = it_cont1-transname. wa_gpass-lrdate = it_cont1-lrdate. wa_gpass-t_date = it_cont1-t_date. wa_gpass-lrno = it_cont1-lrno. ENDLOOP. wa_gpass-t_date = it_cont1-t_date.v_date . wa_gpass-truckno = it_cont1-truckno. LOOP AT it_gpass. ENDIF. wa_gpass-contno = it_cont1-contno. ENDIF. . wa_gpass-gpass = gatepass. v_createdon .

ELSE. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. IF it_gpass1[] IS NOT INITIAL. CALL FUNCTION 'CONVERT_OTF_2_PDF' IMPORTING bin_filesize = v_bin_filesize TABLES otf = st_job_output_info-otfdata doctab_archive = it_docs . tab_gpass-t_time = it_gpass-t_time. ENDLOOP. IF sy-subrc <> 0. tab_gpass-lrdate = it_gpass-lrdate. CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME' EXPORTING formname = 'YPRE_GATE' IMPORTING fm_name = fmname7 EXCEPTIONS no_form = 1 no_function_module = 2 OTHERS = 3. tab_gpass-createdon = it_gpass-createdon. APPEND tab_gpass.tab_gpass-gpass = it_gpass-gpass. COMMIT WORK. tab_gpass-transname = it_gpass-transname. MODIFY yxp_gatepass FROM TABLE it_gpass1. tab_gpass-t_date = it_gpass-t_date. tab_gpass-createdby = it_gpass-createdby. . tab_gpass-truckno = it_gpass-truckno. CALL FUNCTION fmname7 EXPORTING control_parameters = st_control_parameters output_options = st_output_options p_autoid = p_autoid p_manid = p_manid IMPORTING document_output_info = st_document_output_info job_output_info = st_job_output_info job_output_options = st_job_output_options TABLES tab_gpass = tab_gpass. tab_gpass-lrno = it_gpass-lrno. ENDIF.

EXIT. CALL METHOD v_guiobj->file_save_dialog EXPORTING default_extension = 'pdf' default_file_name = v_name file_filter = v_filter CHANGING filename = v_name path = v_path fullpath = v_fullpath user_action = v_uact.pdf' INTO v_name. ENDIF. *--. CALL FUNCTION 'GUI_DOWNLOAD' EXPORTING bin_filesize = filename = filetype = TABLES data_tab = EXCEPTIONS file_write_error = no_batch = gui_refuse_filetransfer = invalid_type = no_authority = unknown_error = header_not_allowed = separator_not_allowed = filesize_not_allowed = header_too_long = dp_error_create = dp_error_send = dp_error_write = unknown_dp_error = access_denied = dp_out_of_memory = v_bin_filesize v_filename 'BIN' it_lines 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 . CREATE OBJECT v_guiobj. IF v_uact = v_guiobj->action_cancel.Get filename to store CONCATENATE 'GP' p_autoid '. *--.Download PDF to local PC MOVE v_fullpath TO v_filename.lines EXCEPTIONS err_conv_not_possible err_otf_mc_noendmarker OTHERS = it_lines = 1 = 2 = 3.

IF sy-subrc EQ 0. SELECT SINGLE * FROM yxp_gatepass INTO wa_gatepass WHERE auto_id = p_autoid . ENDIF. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME' EXPORTING formname = 'YPRE_GATE' * VARIANT = ' ' * DIRECT_CALL = ' ' IMPORTING fm_name = fmname7 EXCEPTIONS no_form = 1 no_function_module = 2 OTHERS = 3 . ENDIF. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. CALL FUNCTION 'POPUP_TO_CONFIRM_STEP' EXPORTING defaultoption = 'Y' textline1 = 'GatePass Already Generated' textline2 = 'Do you Want to generate New Gatepass Number?' titel = 'Confirm To create New Number' start_column = 25 start_row = 6 cancel_display = 'X' IMPORTING . ENDFORM.disk_full = 17 dp_timeout = 18 file_not_found = 19 dataprovider_exception = 20 control_flush_error = 21 OTHERS = 22. IF sy-subrc <> 0. IF sy-subrc <> 0. ENDIF. "GATE_PASS1 *&---------------------------------------------------------------------* *& Form GATE_PASS_OLD *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* FORM gate_pass_old .

ENDIF. CALL FUNCTION 'NUMBER_GET_NEXT' EXPORTING nr_range_nr object QUANTITY = SUBOBJECT = TOYEAR = ignore_buffer IMPORTING number QUANTITY = * * * * * * * * * * = '01' = 'YGATE' '1' ' ' '0000' = 'X' = gid * . IF p_answer EQ 'A'. LEAVE SCREEN. ELSE. MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. CALL FUNCTION 'NUMBER_GET_NEXT' EXPORTING nr_range_nr = '01' object = 'YGATE' QUANTITY = '1' SUBOBJECT = ' ' TOYEAR = '0000' ignore_buffer = 'X' IMPORTING number = gid QUANTITY = RETURNCODE = EXCEPTIONS interval_not_found = 1 number_range_not_intern = 2 object_not_found = 3 quantity_is_0 = 4 quantity_is_not_1 = 5 interval_overflow = 6 buffer_overflow = 7 OTHERS = 8 . ELSE.answer = p_answer. ENDIF. gid = wa_gatepass-gpass. IF sy-subrc <> 0. ELSEIF p_answer EQ 'J'.

MODIFY yxp_gatepass FROM wa_gatepass. wa_gatepass-gpass = gid. *delete yxp_gatepass FROM wa_gatepass. wa_gatepass-auto_id = p_autoid.* RETURNCODE = EXCEPTIONS interval_not_found = 1 number_range_not_intern = 2 object_not_found = 3 quantity_is_0 = 4 quantity_is_not_1 = 5 interval_overflow = 6 buffer_overflow = 7 OTHERS = 8 . ENDIF. * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. *'/1BCDWB/SF00000705' CALL FUNCTION fmname7 EXPORTING * ARCHIVE_INDEX = * ARCHIVE_INDEX_TAB = * ARCHIVE_PARAMETERS = * CONTROL_PARAMETERS = * MAIL_APPL_OBJ = * MAIL_RECIPIENT = * MAIL_SENDER = * OUTPUT_OPTIONS = * USER_SETTINGS = 'X' p_autoid = p_autoid p_manid = p_manid gid = gid * IMPORTING * DOCUMENT_OUTPUT_INFO = * JOB_OUTPUT_INFO = * JOB_OUTPUT_OPTIONS = * EXCEPTIONS * FORMATTING_ERROR = 1 * INTERNAL_ERROR = 2 * SEND_ERROR = 3 . ENDIF. IF sy-subrc <> 0. DELETE yxp_gatepass FROM wa_gatepass.

IF sy-subrc <> 0. st_control_parameters-getotf = 'X'. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ENDIF. ENDFORM. CALL FUNCTION 'SSF_GET_DEVICE_TYPE' EXPORTING i_language = v_language i_application = 'SAPDEFAULT' IMPORTING e_devtype = v_e_devtype. st_output_options-tdprinter = v_e_devtype. CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME' EXPORTING formname = 'YPRE_GATE' * VARIANT = ' ' * DIRECT_CALL = ' ' IMPORTING fm_name = fmname7 EXCEPTIONS no_form = 1 no_function_module = 2 OTHERS = 3 . MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. st_control_parameters-no_dialog = 'X'.* * USER_CANCELED = 4 OTHERS = 5 . . ENDIF. " GATE_PASS *&---------------------------------------------------------------------* *& Form GATE_PASS1 *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * --> p1 text * <-.p2 text *----------------------------------------------------------------------* FORM gate_pass1_old . SELECT SINGLE * FROM yxp_gatepass INTO wa_gatepass WHERE auto_id = p_autoid . IF sy-subrc <> 0.

IF p_answer EQ 'J'. ELSE. ENDIF.IF sy-subrc EQ 0. CALL FUNCTION 'POPUP_TO_CONFIRM_STEP' EXPORTING defaultoption = 'Y' textline1 = 'GatePass Already Generated' textline2 = 'Do you Want to generate New Gatepass Number?' titel = 'Confirm To create New Number' start_column = 25 start_row = 6 IMPORTING answer = p_answer. CALL FUNCTION 'NUMBER_GET_NEXT' EXPORTING nr_range_nr object * * * * * * * = '01' = 'YGATE' . ENDIF. IF sy-subrc <> 0. CALL FUNCTION 'NUMBER_GET_NEXT' EXPORTING nr_range_nr = '01' object = 'YGATE' QUANTITY = '1' SUBOBJECT = ' ' TOYEAR = '0000' ignore_buffer = 'X' IMPORTING number = gid QUANTITY = RETURNCODE = EXCEPTIONS interval_not_found = 1 number_range_not_intern = 2 object_not_found = 3 quantity_is_0 = 4 quantity_is_not_1 = 5 interval_overflow = 6 buffer_overflow = 7 OTHERS = 8 . ELSE. gid = wa_gatepass-gpass. MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

MODIFY yxp_gatepass FROM wa_gatepass. ENDIF. IF sy-subrc <> 0. wa_gatepass-gpass = gid. * '/1BCDWB/SF00000705' CALL FUNCTION fmname7 EXPORTING * ARCHIVE_INDEX * ARCHIVE_INDEX_TAB * ARCHIVE_PARAMETERS control_parameters * MAIL_APPL_OBJ * MAIL_RECIPIENT * MAIL_SENDER output_options * USER_SETTINGS p_autoid p_manid = = = = st_control_parameters = = = = st_output_options = 'X' = p_autoid = p_manid . DELETE yxp_gatepass FROM wa_gatepass. wa_gatepass-auto_id = p_autoid. MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.* * * * * * * QUANTITY = '1' SUBOBJECT = ' ' TOYEAR = '0000' ignore_buffer = 'X' IMPORTING number = gid QUANTITY = RETURNCODE = EXCEPTIONS interval_not_found = 1 number_range_not_intern = 2 object_not_found = 3 quantity_is_0 = 4 quantity_is_not_1 = 5 interval_overflow = 6 buffer_overflow = 7 OTHERS = 8 . *delete yxp_gatepass FROM wa_gatepass. ENDIF.

* * * * * * * * * * * gid = gid IMPORTING document_output_info = st_document_output_info job_output_info = st_job_output_info job_output_options = st_job_output_options EXCEPTIONS FORMATTING_ERROR = 1 INTERNAL_ERROR = 2 SEND_ERROR = 3 USER_CANCELED = 4 OTHERS = 5 .pdf' INTO v_name.Get filename to store CONCATENATE 'Converted_Smartform' '. ELSE. IF sy-subrc <> 0. ENDIF. CREATE OBJECT v_guiobj. IF sy-subrc <> 0. CALL METHOD v_guiobj->file_save_dialog EXPORTING default_extension = 'pdf' default_file_name = v_name file_filter = v_filter CHANGING filename = v_name path = v_path fullpath = v_fullpath user_action = v_uact. *--. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. . MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. CALL FUNCTION 'CONVERT_OTF_2_PDF' EXPORTING USE_OTF_MC_CMD = 'X' ARCHIVE_INDEX = IMPORTING bin_filesize = v_bin_filesize TABLES otf = st_job_output_info-otfdata doctab_archive = it_docs lines = it_lines EXCEPTIONS err_conv_not_possible = 1 err_otf_mc_noendmarker = 2 OTHERS = 3 .

ENDIF.IF v_uact = v_guiobj->action_cancel. EXIT. CALL FUNCTION 'GUI_DOWNLOAD' EXPORTING bin_filesize filename filetype APPEND WRITE_FIELD_SEPARATOR HEADER TRUNC_TRAILING_BLANKS WRITE_LF COL_SELECT COL_SELECT_MASK DAT_MODE CONFIRM_OVERWRITE NO_AUTH_CHECK CODEPAGE IGNORE_CERR REPLACEMENT WRITE_BOM TRUNC_TRAILING_BLANKS_EOL WK1_N_FORMAT WK1_N_SIZE WK1_T_FORMAT WK1_T_SIZE WRITE_LF_AFTER_LAST_LINE SHOW_TRANSFER_STATUS IMPORTING FILELENGTH TABLES data_tab FIELDNAMES EXCEPTIONS file_write_error no_batch gui_refuse_filetransfer invalid_type no_authority unknown_error header_not_allowed separator_not_allowed filesize_not_allowed header_too_long dp_error_create * * * * * * * * * * * * * * * * * * * * * * * = v_bin_filesize = v_filename = 'BIN' = ' ' = ' ' = '00' = ' ' = 'X' = ' ' = ' ' = ' ' = ' ' = ' ' = ' ' = ABAP_TRUE = '#' = ' ' = 'X' = ' ' = ' ' = ' ' = ' ' = ABAP_TRUE = ABAP_TRUE = = it_lines = = = = = = = = = = = = 1 2 3 4 5 6 7 8 9 10 11 * . *--.Download PDF to local PC MOVE v_fullpath TO v_filename.

* '/1BCDWB/SF00000421' CALL FUNCTION fmname8 EXPORTING * ARCHIVE_INDEX = . CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME' EXPORTING formname = 'YARE_N2_SSP' "'YAREN_1' * VARIANT = ' ' * DIRECT_CALL = ' ' IMPORTING fm_name = fmname8 EXCEPTIONS no_form = 1 no_function_module = 2 OTHERS = 3 .p2 text *----------------------------------------------------------------------* FORM ssp_are1 . ENDFORM. ENDIF.dp_error_send = 12 dp_error_write = 13 unknown_dp_error = 14 access_denied = 15 dp_out_of_memory = 16 disk_full = 17 dp_timeout = 18 file_not_found = 19 dataprovider_exception = 20 control_flush_error = 21 OTHERS = 22 . MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. IF sy-subrc <> 0. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ENDIF. ENDIF. " GATE_PASS1 *&---------------------------------------------------------------------* *& Form SSP_ARE1 *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * --> p1 text * <-. IF sy-subrc <> 0.

" SSP_ARE1 *&---------------------------------------------------------------------* *& Form ARE_SSP1 *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * --> p1 text * <-. IF sy-subrc <> 0. CALL FUNCTION 'SSF_GET_DEVICE_TYPE' EXPORTING i_language = v_language i_application = 'SAPDEFAULT' IMPORTING . MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ENDIF.p2 text *----------------------------------------------------------------------* FORM are_ssp1 . ENDFORM.* * * * * * * * ARCHIVE_INDEX_TAB ARCHIVE_PARAMETERS CONTROL_PARAMETERS MAIL_APPL_OBJ MAIL_RECIPIENT MAIL_SENDER OUTPUT_OPTIONS USER_SETTINGS p_manid p_auto_id wa_yxp_exptd_lic1 tenb exdat2 = = = = = = = = 'X' = p_manid = p_autoid = wa_yxp_exptd_lic1 = tenbs = exdat1 * * * * IMPORTING DOCUMENT_OUTPUT_INFO = JOB_OUTPUT_INFO = JOB_OUTPUT_OPTIONS = EXCEPTIONS formatting_error = 1 internal_error = 2 send_error = 3 user_canceled = 4 OTHERS = 5 .

* '/1BCDWB/SF00000421' CALL FUNCTION fmname8 EXPORTING ARCHIVE_INDEX ARCHIVE_INDEX_TAB ARCHIVE_PARAMETERS control_parameters MAIL_APPL_OBJ MAIL_RECIPIENT MAIL_SENDER output_options USER_SETTINGS p_auto_id p_manid wa_yxp_exptd_lic1 tenb exdat2 IMPORTING document_output_info job_output_info job_output_options EXCEPTIONS formatting_error internal_error send_error "'YAREN_1' * * * * * * * = = = = = = = = = = = = st_control_parameters st_output_options 'X' p_autoid p_manid wa_yxp_exptd_lic1 = tenbs = exdat1 = st_document_output_info = st_job_output_info = st_job_output_options = 1 = 2 = 3 . IF sy-subrc <> 0. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. st_output_options-tdprinter = v_e_devtype. CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME' EXPORTING formname = 'YARE_N2_SSP' * VARIANT = ' ' * DIRECT_CALL = ' ' IMPORTING fm_name = fmname8 EXCEPTIONS no_form = 1 no_function_module = 2 OTHERS = 3 . ENDIF. st_control_parameters-getotf = 'X'.e_devtype = v_e_devtype. st_control_parameters-no_dialog = 'X'.

EXIT. ENDIF. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. IF sy-subrc <> 0. *--. * *--.Download PDF to local PC MOVE v_fullpath TO v_filename. IF sy-subrc <> 0. ENDIF. ELSE.Get filename to store CONCATENATE 'ARE1' p_autoid '. *--. * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. IF v_uact = v_guiobj->action_cancel. CREATE OBJECT v_guiobj. CALL FUNCTION 'GUI_DOWNLOAD' EXPORTING bin_filesize = v_bin_filesize filename = v_filename filetype = 'BIN' TABLES .Convert OTF to PDF CALL FUNCTION 'CONVERT_OTF_2_PDF' IMPORTING bin_filesize = v_bin_filesize TABLES otf = st_job_output_info-otfdata doctab_archive = it_docs lines = it_lines EXCEPTIONS err_conv_not_possible = 1 err_otf_mc_noendmarker = 2 OTHERS = 3.pdf' INTO v_name.user_canceled = 4 OTHERS = 5 . CALL METHOD v_guiobj->file_save_dialog EXPORTING default_extension = 'pdf' default_file_name = v_name file_filter = v_filter CHANGING filename = v_name path = v_path fullpath = v_fullpath user_action = v_uact.

tencs = tenc. IF tenc = 'X'. ENDFORM. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ENDIF. ENDIF. ENDIF. . ENDIF. IF tena = 'X'.p2 text *----------------------------------------------------------------------* FORM ssp_annexure1 .data_tab = it_lines EXCEPTIONS file_write_error = 1 no_batch = 2 gui_refuse_filetransfer = 3 invalid_type = 4 no_authority = 5 unknown_error = 6 header_not_allowed = 7 separator_not_allowed = 8 filesize_not_allowed = 9 header_too_long = 10 dp_error_create = 11 dp_error_send = 12 dp_error_write = 13 unknown_dp_error = 14 access_denied = 15 dp_out_of_memory = 16 disk_full = 17 dp_timeout = 18 file_not_found = 19 dataprovider_exception = 20 control_flush_error = 21 OTHERS = 22. IF sy-subrc <> 0. " ARE_SSP1 *&---------------------------------------------------------------------* *& Form SSP_ANNEXURE1 *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * --> p1 text * <-. tenbs = tenb. tenas = tena. ENDIF. IF tenb = 'X'.

ENDIF. ENDIF. CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME' EXPORTING formname = 'YANNEXUREC1_SSP' * VARIANT = ' ' * DIRECT_CALL = ' ' IMPORTING fm_name = fmname9 EXCEPTIONS no_form = 1 no_function_module = 2 OTHERS = 3. * elva = CONTABB. * elva = CONTABA. *ENDIF. * *IF CONTABB = 'X'. *'/1BCDWB/SF00000444' CALL FUNCTION fmname9 EXPORTING ARCHIVE_INDEX ARCHIVE_INDEX_TAB ARCHIVE_PARAMETERS CONTROL_PARAMETERS MAIL_APPL_OBJ MAIL_RECIPIENT MAIL_SENDER OUTPUT_OPTIONS USER_SETTINGS p_manid p_autoid exdat exname supname nameauth * * * * * * * * * = = = = = = = = = 'X' = p_manid = p_autoid = exdat1 = exname = supname = nameauth .IF tend = 'X'. . *ENDIF. IF sy-subrc <> 0. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. tend = 'ACC6'. *IF CONTABA = 'X'.

.des tena tenb tenc tend consamno nameaut1 des1 des tenas tenbs tencs tend consamno = nameaut1 = des1 = = = = = = * IMPORTING * DOCUMENT_OUTPUT_INFO = * JOB_OUTPUT_INFO = * JOB_OUTPUT_OPTIONS = EXCEPTIONS formatting_error = 1 internal_error = 2 send_error = 3 user_canceled = 4 OTHERS = 5. * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. ENDIF. ENDIF. ENDIF. tend = 'ACC6'. ENDIF. ENDFORM. IF tenb = 'X'. ENDIF. IF tend = 'X'. tenas = tena. tenbs = tenb. IF sy-subrc <> 0. tencs = tenc.p2 text *----------------------------------------------------------------------* FORM annexurec1_ssp1 . IF tena = 'X'. " SSP_ANNEXURE1 *&---------------------------------------------------------------------* *& Form ANNEXUREC1_SSP1 *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * --> p1 text * <-. IF tenc = 'X'.

ENDIF. st_output_options-tdprinter = v_e_devtype. st_control_parameters-getotf = 'X'.CALL FUNCTION 'SSF_GET_DEVICE_TYPE' EXPORTING i_language = v_language i_application = 'SAPDEFAULT' IMPORTING e_devtype = v_e_devtype. IF sy-subrc <> 0. st_control_parameters-no_dialog = 'X'. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME' EXPORTING formname = 'YANNEXUREC1_SSP' "'YANNEXUREC1' * VARIANT = ' ' * DIRECT_CALL = ' ' IMPORTING fm_name = fmname9 EXCEPTIONS no_form = 1 no_function_module = 2 OTHERS = 3 . * * * * * * * * CALL FUNCTION fmname9 EXPORTING ARCHIVE_INDEX ARCHIVE_INDEX_TAB ARCHIVE_PARAMETERS control_parameters MAIL_APPL_OBJ MAIL_RECIPIENT MAIL_SENDER output_options USER_SETTINGS P_DOC_NR p_manid p_autoid exdat exname supname nameauth des tena = = = = st_control_parameters = = = = st_output_options = 'X' = P_AUTOID = p_manid = p_autoid = exdat1 = exname = supname = nameauth = des = tenas .

ELSE. CALL METHOD v_guiobj->file_save_dialog EXPORTING default_extension = 'pdf' default_file_name = v_name . IF sy-subrc <> 0. *--.pdf' INTO v_name. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. IF sy-subrc <> 0. * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. CALL FUNCTION 'CONVERT_OTF_2_PDF' IMPORTING bin_filesize = v_bin_filesize TABLES otf = st_job_output_info-otfdata doctab_archive = it_docs lines = it_lines EXCEPTIONS err_conv_not_possible = 1 err_otf_mc_noendmarker = 2 OTHERS = 3. CREATE OBJECT v_guiobj.tenb tenc tend consamno nameaut1 des1 tenbs tencs tend consamno = nameaut1 = des1 = = = = IMPORTING document_output_info = st_document_output_info job_output_info = st_job_output_info job_output_options = st_job_output_options * EXCEPTIONS * FORMATTING_ERROR = 1 * INTERNAL_ERROR = 2 * SEND_ERROR = 3 * USER_CANCELED = 4 * OTHERS = 5 .Get filename to store CONCATENATE 'ANNX' p_autoid '. ENDIF.

ENDIF.Download PDF to local PC MOVE v_fullpath TO v_filename. EXIT. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. . IF sy-subrc <> 0. *--. IF v_uact = v_guiobj->action_cancel. ENDIF. ENDIF.file_filter = v_filter CHANGING filename = v_name path = v_path fullpath = v_fullpath user_action = v_uact. CALL FUNCTION 'GUI_DOWNLOAD' EXPORTING bin_filesize = v_bin_filesize filename = v_filename filetype = 'BIN' TABLES data_tab = it_lines EXCEPTIONS file_write_error = 1 no_batch = 2 gui_refuse_filetransfer = 3 invalid_type = 4 no_authority = 5 unknown_error = 6 header_not_allowed = 7 separator_not_allowed = 8 filesize_not_allowed = 9 header_too_long = 10 dp_error_create = 11 dp_error_send = 12 dp_error_write = 13 unknown_dp_error = 14 access_denied = 15 dp_out_of_memory = 16 disk_full = 17 dp_timeout = 18 file_not_found = 19 dataprovider_exception = 20 control_flush_error = 21 OTHERS = 22.

constants : xltop type i value '1'. INCLUDE myexcel_preshp_annexure. INCLUDE INCLUDE INCLUDE INCLUDE INCLUDE myinclude_top. h_wrkbook type ole2_object. xlcenter type i value '-4108'. h_activesheet type ole2_object. h_cell1 type ole2_object. h_cell2 type ole2_object.ENDFORM. myexcel01. h_column type ole2_object. h_rw_hgt type ole2_object. h_range type ole2_object. " ANNEXUREC1_SSP1 INCLUDE myexcel_preshp_pack. h_wrkbookl type ole2_object. l_image_path type string. . myexcel_preshp. data : h_excel type ole2_object. >>>>>>>>>>>>>myinclude_to>>>>>>start>>>>>>> type-pools ole2. h_border type ole2_object. h_font type ole2_object. h_color type ole2_object. INCLUDE myexcel_preshp_are_1. myinclude_inp. xlbottom type i value '-4107'. myinclude_out. h_rightheader type ole2_object. h_pagesetup type ole2_object. excel_new type rlgrap-filename. h_cell type ole2_object. "add by sandip shapes type ole2_object. excel_filename type draw-filep.

end of graphic_table. XLNORMAL type i value '2'. xllandscape type i value '2'. data : filename type string. data: m type i. xlautomatic type i value '-4105'. . l_tdbtype like stxbitmaps-tdbtype. xlnone type i value '-4142'. "============================================FOR LINE COLUMN AND TEXT======== ======= data : text3 type string. text4 type string. xlthin type i value '2'. line(255) type x. data: begin of graphic_table occurs 0.xlleft type i value '-4131'. col(10). xlcontinuous type i value '1'. "column data: sel_1 type i value 0. xlright type i value '-4152'. "row n type i value 0. doc_nr type yxp_invpre-doc_nr. * HS_CODE TYPE STRING. xllegal type i value '5'. l_range(30). xlletter type i value '1'. path type string. l_content type standard table of bapiconten initial size 0. "select last row "===================================================================== " add by sandip for image download from application server data : l_bytecount type i. xlportrait type i value '1'. "======================================================================= types: begin of ty_final. excelname type string. xlinsidevertical type i value '11'. data: graphic_size type i. XLWIDE type i value '4'. XLPAGEFIELD type i value '3'. row(10)." select row first sel_2 type i value 0. fullpath type string. xlthick type i value '4'. hs_code(8) type c.

vrkme type yxp_item-vrkme. hdr5 type string. * TYPES : NETPR1 TYPE KONV-KWERT. hdr2 type string. . hdr8 type string. hdr4 type string. const type string. * RATE TYPE BAPICURR-BAPICURR. types: begin of ty_item. end of ty_docnr. freight type yxp_invpre-freight. size type yxp_item-arktx. * RATE TYPE YXP_ITEM-NETPR. rate type zexproduct-rate. typ type string. include structure yxp_item. amt type yxp_item-netpr. types: begin of ty_docnr. kursf type yxp_invpre-kursf. arktx type yxp_item-arktx. tc type string. hdr9 type string. types : end of ty_item1. * RATE TYPE KONV-KBETR. types: begin of ty_hdrinv.desc_good type yxp_item-arktx. types : netpr1 type zexproduct-rate. hdr3 type string. qty type yxp_item-kwmeng. hdr6 type string. hdr7 type string. types : begin of ty_item1. ntwt type yxp_item-ntgew. end of ty_final. gsm type string. doc_nr type yxp_invpre-doc_nr. hdr1 type string. waerk type yxp_item-waerk. * TYPES : NETPR1 TYPE BAPICURR-BAPICURR. end of ty_hdrinv. hdr10 type string.

p_kursf type yxp_invpre-kursf.include structure yxp_contman_itm. p_comamt type yxp_item-netwr. p_totfob1 type yxp_item-netwr. wa_final type ty_final. wa_yxp_item type ty_item1. wa_final1 type ty_final. types : i1 type i. types: buyerseal type yxp_contdtl-buyerseal. p_ntgew type yxp_item-ntgew. sumq type ty_final-qty. . it_mvke type table of mvke. p_grosswt type yxp_item-brgew. types: end of ty. p_totalamt type yxp_item-netwr. p_sumamt type yxp_item-netwr. p_sumpckt type yxp_item-no_pack. p_sumamt1 type yxp_item-netwr. p_sumqty type yxp_item-netpr. p_ntwt type yxp_item-ntgew. it_final1 type table of ty_final. types: esealno type yxp_contdtl-esealno. types: end of ty_item. types: end of ty1. wa_docnr1 type ty_docnr. p_totalamtchat type spell. it_tvm1 type table of tvm1t. p_commission type yxp_invpre-commison. p_lessamt type yxp_item-netwr. it_yxp_item type table of ty_item1. wa_kna1 type kna1. p_freight type yxp_invpre-freight. data :it_final type table of ty_final. it_docnr1 type table of ty_docnr. wa_hdrinv type ty_hdrinv. p_discount type yxp_invpre-discount. types : int1 type i. wa_tvm1 type tvm1t. ntwt type ty_final-ntwt. sumr type ty_final-rate. it_hdrinv type table of ty_hdrinv. wa_mvke type mvke. waerk type vbak-waerk. p_kursfamt type yxp_item-netwr. suma type ty_final-amt. types: begin of ty1. types: begin of ty. types: sealno1 type yxp_contdtl-sealno.

flg type c. . string2 type string. carton type yxp_contman_itm-carton. likp type likp. "LINES type I. i_yxp_contdtl type table of yxp_contdtl. w_yxp_invpre type yxp_invpre. it_yxp_exptd_lic type table of yxp_exptd_lic. sdat type string. it_yxp_contman_itm type table of yxp_contman_itm. wa_yxp_contman_itm2 type yxp_contman_itm. mara1 type mara. sealno type string. srno1 type i. madrc type adrc. it_adrc type adrc. wa_yxp_contman_itm type yxp_contman_itm. bdat type yxp_bonddtl-bdat. lcontno type string. mara type mara. sadrc type adrc.nadrc1 type adrc. " VBAK type VBKD. precarrier type string. bno type yxp_bonddtl-bno. cotno type c. string3 type string. mvke type mvke. srno type i. tdline type table of tline with header line. wa_yxp_exptd_lic2 type yxp_exptd_lic. "yxp_shphd type yxp_shphd. t001 type t001. string_n1 type string. it_yxp_contman_itm2 type table of yxp_contman_itm. string1 type string. w_yxp_contdtl type yxp_contdtl. line2 type i. string_n2 type string. it_ylcelcmst1 type ylcelcmst. "it_yxp_invpre type table of yxp_invpre. nadrc2 type adrc. sales type string. p_cenvat type yxp_bonddtl-exbed_dr. vbrk type vbrk. iylcesadr type ylcesadr. bstkd type string. cont1 type t005t-landx.

p_commisontxt type string. flandx type string. const type c. wa1 type ty1. it2 type ty1 occurs 0. "TEXT2 type STRING. p_txt type yxp_invpre-othertxt. totamt type yxp_item-netpr. int2 type i. exseal type c. p_dis type yxp_invpre-discount. "SPACE1 type C. vessel type string. text1 type string. space1 type c. i1 type i value 0. wa_item type ty_item. it_item2 type table of ty_item. wa2 type ty1.srno2 type i. int1 type i value 0. . weark type yxp_item-waerk. p_discounttxt type string. tc type c. p_othr type yxp_invpre-other. wa_yxp_contman_itm1 type yxp_contman_itm. text2 type string. it_item type table of ty_item. wa_item2 type ty_item. p_totfob type yxp_item-netwr. it_yxp_contman_itm1 type table of yxp_contman_itm. it type table of ty. p_insu type yxp_invpre-commison. eadrc type adrc. line1 type i. carton1 type yxp_contman_itm-carton. wa type ty. wa_item1 type ty_item. lines1 type i. lexseal type string. i2 type i. port_desc type string. i3 type i. int3 type i. p_freighttxt type string. port_load type string. int type i value 0. it1 type table of ty1. i type i value 0.

inco1 type vbkd-inco1. clear : wa_contno. TEXT_2 TYPE STRING. wa_cont1-lrdate. >>>>>>start>>>>>>> module LIST_FILL_1010 output. p_licprod type string. "wa_yxp_invpre type yxp_invpre. select single lrno lrdate transname truckno t_date t_time from yxp_gate pass into (wa_cont1-lrno. . amt_word1 type string. wa_cont1-t_time) where contno eq wa_contno-contno and cancelstat ne 'X'. "=====================================END OF DATA =========================== >>>>>>>>>>>>>myinclude_to>>>>>>end>>>>>>> >>>>>>>>>>>>>INCLUDE myinclude_out. bstatus type yxp_bonddtl-br. delete adjacent duplicates from it_contno comparing contno. SELECT contno INTO wa_contno-contno FROM yxp_contman_itm JOIN yxp_invpre ON yxp_contman_itm~delv EQ yxp_invpre~doc_nr WHERE yxp_contman_itm~manid EQ p_manid AND yxp_invpre~auto_id EQ p_autoid. * clear it_cont1[]. loop at it_contno into wa_contno. "p_manid type yxp_contman_itm-manid. TEXT_B TYPE STRING. append wa_contno to it_contno. sort it_contno by contno. gdesc type c. TEXT_1 TYPE STRING. amt_word type string. wa_cont1truckno. exrate type j_1ivtxrat-rate. wa_cont1-transname. j_1imocomp TYPE j_1imocomp. if it_cont1[] is initial. "cadrc type adrc.shseal type c. a_vbak type vbak. if wa_contno-contno ne ''. DATE1 TYPE STRING. "data: wa_yxp_shphd like yxp_shphd. lcontsiz type string. ENDSELECT. wa_yxp_exptd_lic3 type yxp_exptd_lic. contsiz type c. wa_cont1-t_date. contno type c. lshseal type string.

endif. * endloop. modify screen. wa_cont1-status = 'X'. wa_cont1. endif. * icount = 0. endmodule. endif. endmodule. * clear: values[]. clear: wa_contno. * append value to values. endif. * icount = icount + 1. screen-input = '0'. * value-text = wa_contno-contno. if wa_cont1-lrno is not initial. SET TITLEBAR '1010'. loop at screen. SET PF-STATUS '1010'. screen-input = '0'. if screen-name eq 'IT_CONT1-LRNO' and it_cont1-lrno ne ''. describe table it_cont1 lines v_lines. data: v_lines type i. if it_cont1-mark = 'X'. module STATUS_1010 output. append wa_cont1 to it_cont1. * param = 'LSB_01'. endloop. * describe table it_contno lines lines. * * CALL FUNCTION 'VRM_SET_VALUES' * EXPORTING * id = param * values = values. tbl_01-lines = v_lines. * tbl_01-lines = lines. * value-key = icount.wa_cont1-contno = wa_contno-contno. *&---------------------------------------------------------------------* *& Module INPUT_DATA OUTPUT *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* module INPUT_DATA output. * loop at it_contno into wa_contno. . if screen-name eq 'IT_CONT1-CONTNO'.

if screen-name eq 'IT_CONT1-T_TIME' and it_cont1-truckno ne ''. screen-input = '0'. screen-input = '0'. screen-input = '0'. endif. endif. if screen-name eq 'IT_CONT1-TRANSNAME' and it_cont1-transname ne ''. endif. modify screen. if screen-name eq 'IT_CONT1-T_TIME' and it_cont1-truckno ne ''. screen-input = '0'. screen-input = '0'. endif. modify screen. modify screen. "added by sandip shankariya if screen-name eq 'IT_CONT1-T_DATE' and it_cont1-truckno ne ''. screen-input = '0'. screen-input = '0'. endif. modify screen. if screen-name eq 'IT_CONT1-TRUCKNO'. modify screen. screen-input = '0'. "ended by sandip shankariya else. if screen-name eq 'IT_CONT1-LRNO'. screen-input = '0'. if screen-name eq 'IT_CONT1-LRDATE' and it_cont1-lrdate ne '00000000'. . modify screen. endif. modify screen.modify screen. modify screen. modify screen. endif. screen-input = '0'. screen-input = '0'. if screen-name eq 'IT_CONT1-TRANSNAME'. if screen-name eq 'IT_CONT1-LRDATE'. endif. endif. modify screen. if screen-name eq 'IT_CONT1-TRUCKNO' and it_cont1-truckno ne ''. endif. endif. "added by sandip shankariya if screen-name eq 'IT_CONT1-T_DATE' and it_cont1-truckno ne ''. modify screen.

>>>>>>start>>>>>>> >>>>>>>>>>>>>INCLUDE MYEXCEL_PRESHP>>>>>>start>>>>>>> *&---------------------------------------------------------------------* *& Include MYEXCEL_PRESHP add by sandip *&---------------------------------------------------------------------* FORM EXCEL_PRESHP. set property of h_pagesetup 'RIGHTFOOTER' = 'Page &P of &N'. "ended by sandip shankariya endif. . data : h type sy-tabix. set property of h_pagesetup 'HEADERMARGIN' = 4. set property of h_pagesetup 'BOTTOMMARGIN' = 2. perform err_hdl.APPLICATION'. endmodule. " INPUT_DATA OUTPUT >>>>>>>>>>>>>INCLUDE myinclude_out. set property of h_pagesetup 'ORIENTATION' = 1.' exceptions others = 1. call method of h_excel 'COLUMNS' = h_column exporting #1 = 'a'. set property of h_excel 'VISIBLE' = 0. call function 'SAPGUI_PROGRESS_INDICATOR' exporting text = 'Processing. endloop. call method of h_excel 'ACTIVESHEET' = h_activesheet.endif. set property of h_pagesetup 'LEFTMARGIN' = 4. call method of h_excel 'WORKBOOKS' = h_wrkbookl. set property of h_pagesetup 'PrintTitleRows' = '$1:$32'. perform err_hdl. create object h_excel 'EXCEL. set property of h_pagesetup 'FOOTERMARGIN' = 4. call method of h_wrkbookl 'ADD' = h_wrkbook. set property of h_excel 'DISPLAYALERTS' = 0.. get property of h_activesheet 'PAGESETUP' = h_pagesetup. set property of h_pagesetup 'TopMargin' = 4. set property of h_activesheet 'NAME' = 'Pre-shipment Invoice'.. set property of h_pagesetup 'RIGHTMARGIN' = 4. perform err_hdl. perform GETDATA_INV.

free object h_border. #1 = 'f'. free object h_column. "top set property of h_border 'LINESTYLE' = '1'. #1 = 'b'. free object h_border. loop at it_yxp_invpre into wa_yxp_invpre. #1 = 'h'. free object h_column. . set property of h_border 'weight' = 2. #1 = 'j'. #1 = 'd'. call method of h_excel 'COLUMNS' = h_column exporting set property of h_column 'COLUMNWIDTH' = 6. m = 1. perform fill_cell using m 1 0 'Retail Invoice' xlleft xlcenter 0. call method of h_excel 'COLUMNS' = h_column exporting set property of h_column 'COLUMNWIDTH' = 8. #1 = 'e'. set property of h_border 'weight' = 2. call method of h_excel 'COLUMNS' = h_column exporting set property of h_column 'COLUMNWIDTH' = 10. perform border_range using m 1 m 10. #1 = 'g'. free object h_column. free object h_column. call method of h_excel 'COLUMNS' = h_column exporting set property of h_column 'COLUMNWIDTH' = 9. call method of h_cell 'SELECT'. #1 = 'i'. free object h_column. call method of h_excel 'COLUMNS' = h_column exporting set property of h_column 'COLUMNWIDTH' = 8. free object h_column. call method of h_cell 'borders' = h_border exporting #1 = '4'. free object h_column. "top set property of h_border 'LINESTYLE' = '1'. perform border_range using m 1 m 2. free object h_column. call method of h_excel 'COLUMNS' = h_column exporting set property of h_column 'COLUMNWIDTH' = 13. call method of h_cell 'MERGE'. call method of h_cell 'borders' = h_border exporting #1 = '3'. call method of h_excel 'COLUMNS' = h_column exporting set property of h_column 'COLUMNWIDTH' = 9. call method of h_excel 'COLUMNS' = h_column exporting set property of h_column 'COLUMNWIDTH' = 7.set property of h_column 'COLUMNWIDTH' = 10. #1 = 'c'. free object h_column. call method of h_excel 'COLUMNS' = h_column exporting set property of h_column 'COLUMNwIDTH' = 11. free object h_column.

. perform border_range using m 6 m 10. perform border_range using m 7 m 10. call method of h_cell 'MERGE'. call method of h_cell 'SELECT'.perform border_range using m 5 m 6. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. perform fill_cell using m 1 1 'Range:' xlleft xlcenter 0. perform border_range using m 4 m 5. perform border_cell using m 1 '1' '1' 2. call method of h_cell 'MERGE'. m = m + 1. call method of h_cell 'MERGE'. perform border_cell using m 10 '2' '1' 2. clear text3. perform border_range using m 1 m 3. call method of h_cell 'SELECT'. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. perform border_cell using m 1 '1' '1' 2. perform fill_cell using m 7 0 'ORIGINAL/DUPLICATE/TRIPLICATE/EXTRA' xlr ight xlcenter 0. perform border_range using m 4 m 5. call method of h_cell 'MERGE'. call method of h_excel 'Worksheets' = h_activesheet exporting #1 = 1. call method of h_cell 'SELECT'. get property of h_activesheet 'Shapes' = shapes. call method of h_cell 'SELECT'. perform fill_cell using m 5 1 'I N V O I C E' xlcenter xlcenter 0. perform fill_cell using m 1 1 'Division:' xlleft xlcenter 0. call method of shapes 'AddPicture' exporting #1 = 'C:\Windows\Temp\logo. perform border_cell using m 5 '2' '1' 2. call method of h_cell 'SELECT'. call method of h_activesheet 'Activate'. perform border_cell using m 10 '2' '1' 2. perform border_range using m 1 m 3.bmp' "image file name on presentation server #2 = m #3 = '1' #4 = 170 "left #5 = 12 "top #6 = 80 "right #7 = 45. call method of h_cell 'MERGE'. "bottom m = m + 1.

perform fill_cell using m 1 0 text3 xlleft xlcenter 0. call method of h_cell 'MERGE'. perform border_range using m 4 m 5. call method of h_cell 'MERGE'. call method of h_cell 'SELECT'. perform border_range using m 4 m 5.Off. perform border_cell using m 10 '2' '1' 2. concatenate 'Date & Time of Removal:' text3 into text3. call method of h_cell 'MERGE'. call method of h_cell 'SELECT'. m = m + 1. call method of h_cell 'SELECT'. perform border_cell using m 10 '2' '1' 2. call method of h_cell 'SELECT'. m = m + 1.' xlleft xlcenter 0. perform border_range using m 1 m 3. perform border_cell using m 1 '1' '1' 2. perform border_cell using m 5 '2' '1' 2. clear text3. perform border_cell using m 5 '2' '1' 2. clear text3. call method of h_cell 'SELECT'.perform border_range using m 6 m 10. perform border_cell using m 10 '2' '1' 2. perform border_cell using m 5 '2' '1' 2. call method of h_cell 'SELECT'. perform border_range using m 4 m 5. call method of h_cell 'MERGE'. call method of h_cell 'MERGE'. perform border_cell using m 1 '1' '1' 2. call method of h_cell 'MERGE'. perform border_range using m 6 m 10. call method of h_cell 'SELECT'. perform border_range using m 6 m 10.'. call method of h_cell 'SELECT'. perform border_range using m 1 m 3. call method of h_cell 'MERGE'. perform fill_cell using m 6 0 text3 xlleft xlcenter 0. perform border_range using m 1 m 3. call method of h_cell 'MERGE'. perform fill_cell using m 1 0 eadrc-name1 xlleft xlcenter 0. . perform fill_cell using m 1 1 'Corp. concatenate exdat1+6(2) exdat1+4(2) exdat1(4) into text3 separated by '. m = m + 1. perform border_cell using m 1 '1' '1' 2. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. concatenate eadrc-name2 eadrc-name3 into text3.

perform border_cell using m 5 '2' '1' 2.C.E. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. call method of h_cell 'borders' = h_border exporting #1 = '4'. perform border_range using m 4 m 5. clear text3. perform border_cell using m 1 '1' '1' 2. call method of h_cell 'MERGE'. call method of h_cell 'MERGE'. perform border_cell using m 5 '2' '1' 2.perform border_range using m 6 m 10. m = m + 1. perform border_range using m 1 m 5. call method of h_cell 'MERGE'. perform border_cell using m 10 '2' '1' 2. call method of h_cell 'MERGE'. free object h_border.No:' ' ' text2 into text3. concatenate 'I. call method of h_cell 'SELECT'. call method of h_cell 'SELECT'. call method of h_cell 'SELECT'. perform border_range using m 4 m 5. perform border_range using m 1 m 10. perform border_range using m 1 m 3. perform fill_cell using m 1 0 eadrc-name4 xlleft xlcenter 0. set property of h_border 'weight' = 2. call method of h_cell 'SELECT'. perform border_range using m 6 m 10. perform border_cell using m 10 '2' '1' 2. m = m + 1. perform fill_cell using m 6 0 text3 xlleft xlcenter 0. call method of h_cell 'SELECT'. . perform border_cell using m 10 '2' '1' 2. perform border_range using m 6 m 10. perform border_range using m 1 m 3. perform border_cell using m 5 '2' '1' 2. concatenate eadrc-city1 eadrc-post_code1 into text3. m = m + 1. "top set property of h_border 'LINESTYLE' = '1'. call method of h_cell 'SELECT'. perform border_cell using m 1 '1' '1' 2. call method of h_cell 'MERGE'. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. perform border_cell using m 1 '1' '1' 2. perform fill_cell using m 1 0 text3 xlleft xlcenter 0. call method of h_cell 'MERGE'.

'. perform border_range using m 1 m 5. perform border_cell using m 10 '2' '1' 2. perform border_range using m 1 m 5. call method of h_cell 'SELECT'. clear text3. clear text3. call method of h_cell 'SELECT'. perform border_cell using m 1 '1' '1' 2. call method of h_cell 'MERGE'. call method of h_cell 'MERGE'. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. perform fill_cell using m 1 0 it_adrc-street xlleft xlcenter 0. call method of h_cell 'MERGE'. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. m = m + 1. call method of h_cell 'SELECT'. perform fill_cell using m 1 0 it_adrc-name1 xlleft xlcenter 0. perform border_cell using m 10 '2' '1' 2. perform fill_cell using m 6 0 text3 xlleft xlcenter 0.'. perform border_cell using m 1 '1' '1' 2. perform fill_cell using m 6 0 text3 xlleft xlcenter 0. perform border_cell using m 5 '2' '1' 2. concatenate wa_yxp_shphd-aredt+6(2) wa_yxp_shphdaredt+4(2) wa_yxp_shphd-aredt(4) into text3 separated by '. call method of h_cell 'MERGE'. & Date :' wa_yxp_shphdar4_number 'Date :' text3 into text3 separated by ' '. perform border_range using m 6 m 10. perform border_range using m 6 m 10. concatenate 'ARE No. clear text3. concatenate wa_yxp_invpre-audat+6(2) wa_yxp_invpreaudat+4(2) wa_yxp_invpre-audat(4) into text3 separated by '. perform border_cell using m 5 '2' '1' 2. m = m + 1. perform border_cell using m 10 '2' '1' 2. perform border_cell using m 1 '1' '1' 2.perform fill_cell using m 1 1 'Exporter:' xlleft xlcenter 0. m = m + 1. call method of h_cell 'SELECT'. concatenate it_adrc-str_suppl3 it_adrc- . perform border_cell using m 5 '2' '1' 2. perform border_range using m 1 m 5. perform border_range using m 6 m 10. concatenate 'Invoice No & Date :' wa_yxp_invpreauto_id ' Date :' text3 into text3 separated by ' '.

call method of h_cell 'MERGE'. . call method of h_cell 'MERGE'. perform border_cell using m 1 '1' '1' 2. perform border_range using m 6 m 10. perform border_cell using m 10 '2' '1' 2. call method of h_cell 'MERGE'. perform border_range using m 1 m 5. concatenate it_adrc-city2 it_adrcpost_code1 into text3 separated by '. perform border_cell using m 5 '2' '1' 2. m = m + 1. m = m + 1. perform border_cell using m 10 '2' '1' 2. call method of h_cell 'MERGE'. clear text3. perform border_range using m 6 m 10. call method of h_cell 'SELECT'. perform fill_cell using m 6 0 text3 xlleft xlcenter 0. call method of h_cell 'SELECT'. perform border_cell using m 10 '2' '1' 2. call method of h_cell 'SELECT'. perform border_cell using m 1 '1' '1' 2. call method of h_cell 'SELECT'. perform fill_cell using m 1 0 text3 xlleft xlcenter 0. perform border_cell using m 1 '1' '1' 2. perform border_range using m 6 m 10. perform fill_cell using m 1 0 madrc-name1 xlleft xlcenter 0. m = m + 1.'. perform border_range using m 6 m 10. perform border_range using m 1 m 5. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. perform border_cell using m 1 '1' '1' 2. call method of h_cell 'MERGE'. concatenate 'Sales Order No :' sales into text3 separated by ' '. perform fill_cell using m 1 0 text3 xlleft xlcenter 0. perform border_range using m 1 m 5.'. call method of h_cell 'MERGE'. perform fill_cell using m 1 1 'Supporting Manufacturer:' xlleft xlcente r 0. perform border_cell using m 5 '2' '1' 2. perform border_cell using m 5 '2' '1' 2.city1 into text3 separated by '. perform border_cell using m 5 '2' '1' 2. perform border_cell using m 10 '2' '1' 2. call method of h_cell 'SELECT'. call method of h_cell 'SELECT'.

perform border_cell using m 10 '2' '1' 2. perform border_range using m 6 m 10. call method of h_cell 'SELECT'. perform fill_cell using m 1 0 madrc-street xlleft xlcenter 0. perform border_cell using m 1 '1' '1' 2. "top set property of h_border 'LINESTYLE' = '1'. .'. perform border_cell using m 1 '1' '1' 2. concatenate 'Buyer Oreder No.'. perform border_range using m 6 m 10. perform border_range using m 1 m 10. perform border_cell using m 5 '2' '1' 2.m = m + 1. call method of h_cell 'SELECT'. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. call method of h_cell 'SELECT'. free object h_border. m = m + 1. perform border_cell using m 5 '2' '1' 2. perform fill_cell using m 1 0 text3 xlleft xlcenter 0. perform border_cell using m 10 '2' '1' 2. call method of h_cell 'MERGE'. perform border_range using m 1 m 5. perform fill_cell using m 6 0 text3 xlleft xlcenter 0. perform border_range using m 1 m 5. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. perform border_range using m 1 m 5. perform border_cell using m 10 '2' '1' 2. call method of h_cell 'borders' = h_border exporting #1 = '4'. m = m + 1. call method of h_cell 'MERGE'. set property of h_border 'weight' = 2.:' bstkd into text3 separated by ' '. perform border_cell using m 5 '2' '1' 2. perform border_range using m 6 m 10. concatenate madrc-str_suppl3 madrc-city2 into text3 separated by '. perform border_range using m 6 m 10. perform border_cell using m 1 '1' '1' 2. call method of h_cell 'MERGE'. "top set property of h_border 'LINESTYLE' = '1'. call method of h_cell 'borders' = h_border exporting #1 = '3'. perform fill_cell using m 1 0 text3 xlleft xlcenter 0. call method of h_cell 'MERGE'. call method of h_cell 'SELECT'. concatenate madrc-city1 madrc-post_code1 into text3 separated by '.

perform border_range using m 6 m 10. perform border_cell using m 1 '1' '1' 2. call method of h_cell 'MERGE'. call method of h_cell 'SELECT'. perform border_cell using m 10 '2' '1' 2. perform fill_cell using m 6 0 sadrc-name1 xlleft xlcenter 0. free object h_border. perform border_cell using m 1 '1' '1' 2. . perform border_cell using m 5 '2' '1' 2. set property of h_cell 'wraptext' = 1. perform border_cell using m 1 '1' '1' 2. m = m + 1. call method of h_cell 'MERGE'. n = m + 1.set property of h_border 'weight' = 2. call method of h_cell 'SELECT'. call method of h_cell 'SELECT'. perform border_cell using m 5 '2' '1' 2. perform border_cell using m 10 '2' '1' 2. perform border_range using m 1 m 5. perform fill_cell using m 1 1 'Consignee:' xlleft xlcenter 0. perform border_cell using m 10 '2' '1' 2. perform border_range using m 6 m 10. perform fill_cell using m 1 0 cadrc-name1 xlleft xlcenter 0. perform border_range using m 1 n 5. perform border_range using m 6 n 10. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. concatenate cadrc-name2 cadrc-name3 cadrc-name4 into text3. perform border_cell using n 10 '2' '1' 2. call method of h_cell 'MERGE'. m = m + 1. concatenate sadrc-name2 sadrc-name3 sadrc-name4 into text3. perform border_cell using n 5 '2' '1' 2. call method of h_cell 'MERGE'. m = m + 1. m = m + 1. perform border_range using m 1 m 5. call method of h_cell 'SELECT'. set property of h_cell 'wraptext' = 1. perform border_cell using n 1 '1' '1' 2. perform fill_cell using m 6 1 'Buyer(If other than Consignee)' xlleft x lcenter 0. perform border_cell using m 5 '2' '1' 2. call method of h_cell 'MERGE'. perform border_range using m 1 m 5. call method of h_cell 'SELECT'. perform fill_cell using m 6 0 text3 xlleft xlcenter 0. perform fill_cell using m 1 0 text3 xlleft xlcenter 0.

call method of h_cell 'MERGE'. perform border_range using m 6 m 10. call method of h_cell 'MERGE'. call method of h_cell 'MERGE'. call method of h_cell 'SELECT'. perform border_range using m 1 m 5. perform border_cell using m 10 '2' '1' 2. perform border_range using m 6 m 10. perform fill_cell using m 6 0 text3 xlleft xlcenter 0. call method of h_cell 'SELECT'. perform border_range using m 1 m 5. call method of h_cell 'MERGE'. call method of h_cell 'MERGE'. "top set property of h_border 'LINESTYLE' = '1'. m = m + 1. call method of h_cell 'borders' = h_border exporting #1 = '3'. . set property of h_border 'weight' = 2. call method of h_cell 'SELECT'.call method of h_cell 'SELECT'. call method of h_cell 'SELECT'. perform border_cell using m 5 '2' '1' 2. perform border_cell using m 1 '1' '1' 2. perform border_range using m 6 m 10. perform border_range using m 1 m 10. perform border_cell using m 1 '1' '1' 2. concatenate 'Notify1: ' nadrc2-name1 nadrc2-name2 nadrc2-name3 nadrc2name4 nadrc2-city1 nadrc2-city2 into text3. call method of h_cell 'MERGE'. "top set property of h_border 'LINESTYLE' = '1'. call method of h_cell 'SELECT'. free object h_border. call method of h_cell 'borders' = h_border exporting #1 = '4'. perform border_range using m 6 m 10. set property of h_border 'weight' = 2. perform border_cell using m 5 '2' '1' 2. perform border_cell using m 10 '2' '1' 2. concatenate 'Notify1: ' nadrc1-name1 nadrc1-name2 nadrc1-name3 nadrc1name4 nadrc1-city1 nadrc1-city2 into text3. perform fill_cell using m 6 0 text3 xlleft xlcenter 0. m = m + 1. free object h_border.

perform border_range using m 1 m 2. perform fill_cell using m 1 0 'Pre-carriage By :' xlleft xlcenter 0. call method of h_cell 'MERGE'. perform border_range using m 6 m 10. perform fill_cell using m 3 0 'Place of Reciept By Precarrier :' xlleft xlcenter 0. call method of h_cell 'SELECT'. call method of h_cell 'SELECT'. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. perform border_cell using m 7 '2' '1' 2. call method of h_cell 'MERGE'. perform border_range using m 1 m 2. concatenate wa_yxp_shphd-vehcl_from wa_yxp_shphd-vehcl_to into text3. perform fill_cell using m 1 0 text3 xlleft xlcenter 0. perform border_range using m 8 m 10. perform border_range using m 3 m 5. perform border_cell using m 5 '2' '1' 2. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. perform fill_cell using m 8 0 'Country of Final Destination: ' xlleft x lcenter 0. m = m + 1. . call method of h_cell 'SELECT'. perform border_cell using m 10 '2' '1' 2. call method of h_cell 'MERGE'. perform fill_cell using m 3 0 precarrier xlleft xlcenter 0. perform border_range using m 6 m 7. call method of h_cell 'SELECT'. call method of h_cell 'SELECT'. perform fill_cell using m 6 0 'India' xlleft xlcenter 0. perform border_range using m 3 m 5. perform fill_cell using m 6 0 'Country of Origin of Goods: ' xlleft xlc enter 0.m = m + 1. perform border_cell using m 1 '1' '1' 2. perform border_cell using m 2 '2' '1' 2. call method of h_cell 'MERGE'. perform border_range using m 6 m 7. call method of h_cell 'MERGE'. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. perform border_range using m 8 m 10.

call method of h_cell 'SELECT'. perform fill_cell using m 3 0 'Port of Loading:' xlleft xlcenter 0. perform border_range using m 3 m 5. set property of h_border 'weight' = 2. call method of h_cell 'MERGE'. m = m + 1. perform border_cell using m 2 '2' '1' 2. 7 '2' '1' 2. perform border_range using m 1 m 10. perform fill_cell using m 6 0 text3 xlleft xlcenter 0. perform border_cell using m 10 '2' '1' 2. call method of h_cell 'borders' = h_border exporting #1 = '4'. call method of h_cell 'SELECT'. 1 '1' '1' 2. free object h_border. perform border_range using m 3 m 5. call method of h_cell 'SELECT'. 5 '2' '1' 2. call method of h_cell 'MERGE'. call method of h_cell 'SELECT'. perform border_range using m 1 m 2. call method of h_cell 'SELECT'. perform border_range using m 6 m 10. perform fill_cell using m 1 0 text3 xlleft xlcenter 0. m = m + 1. call method of h_cell 'MERGE'. perform fill_cell using m 1 0 'Vessel/Flight #:' xlleft xlcenter 0. call method of h_cell 'MERGE'. "top set property of h_border 'LINESTYLE' = '1'. 2 '2' '1' 2. into text3 sep . concatenate 'Terms of Delivery and Payment : ' string1 arated by ' '. perform border_range using m 1 m 2. perform border_cell using m 7 '2' '1' 2. concatenate vessel wa_yxp_shphd-voy_fly_no into text3. 10 '2' '1' 2. perform border_cell using m 1 '1' '1' 2. call method of h_cell 'MERGE'.perform perform perform perform perform perform fill_cell using m border_cell using border_cell using border_cell using border_cell using border_cell using 8 m m m m m 0 flandx xlleft xlcenter 0. perform border_cell using m 5 '2' '1' 2.

m = m + 1. perform fill_cell using m 1 0 wa_yxp_shphd- . call method of h_cell 'SELECT'. perform fill_cell using m 3 0 'Final Destination:' xlleft xlcenter 0. call method of h_cell 'borders' = h_border exporting #1 = '4'. perform fill_cell using m 1 0 'Port Of Discharge:' xlleft xlcenter 0. call method of h_cell 'MERGE'. concatenate 'LC No : ' it_ylcelcmst1lc_number into text3 separated by ' '. perform border_cell using m 1 '1' '1' 2. call method of h_cell 'MERGE'. perform border_cell using m 7 '2' '1' 2. concatenate 'Banker: ' wa_yxp_invpre-advbank into text3. perform border_range using m 6 m 10. call method of h_cell 'MERGE'. perform border_cell using m 10 '2' '1' 2.perform fill_cell using m 3 0 wa_yxp_shphd-port_load xlleft xlcenter 0. perform border_cell using m 7 '2' '1' 2. m = m + 1. call method of h_cell 'MERGE'. call method of h_cell 'SELECT'. perform fill_cell using m 6 0 text3 xlleft xlcenter 0. call method of h_cell 'MERGE'. "top set property of h_border 'LINESTYLE' = '1'. perform border_cell using m 5 '2' '1' 2. call method of h_cell 'SELECT'. perform border_cell using m 2 '2' '1' 2. perform border_range using m 1 m 2. call method of h_cell 'SELECT'. perform fill_cell using m 6 0 text3 xlleft xlcenter 0. free object h_border. perform border_range using m 6 m 10. perform border_range using m 3 m 5. set property of h_border 'weight' = 2. perform border_range using m 1 m 2. call method of h_cell 'SELECT'. perform border_range using m 1 m 10. perform border_cell using m 5 '2' '1' 2. perform border_cell using m 10 '2' '1' 2. perform border_cell using m 2 '2' '1' 2. perform border_cell using m 1 '1' '1' 2.

perform border_cell using m 5 '2' '1' 2. call method of h_cell 'SELECT'. call method of h_cell 'borders' = h_border exporting #1 = '4'. call method of h_cell 'MERGE'. perform fill_cell using m 3 0 wa_yxp_shphdfin_destin xlleft xlcenter 0.port_dschr xlleft xlcenter 0. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. clear text3. perform fill_cell using m 6 0 text3 xlleft xlcenter 0. perform border_cell using m 7 '2' '1' 2. perform border_cell using m 10 '2' '1' 2. "top set property of h_border 'LINESTYLE' = '1'. perform border_cell using m 1 '1' '1' 2. concatenate 'Name of commodity:' P_licprod into text3. perform fill_cell using m 1 0 text3 xlleft xlcenter 0. set property of h_border 'weight' = 2. . call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. free object h_border. perform border_range using m 6 m 10. m = m + 1. perform border_cell using m 10 '2' '1' 2. perform border_cell using m 5 '2' '1' 2. "top set property of h_border 'LINESTYLE' = '1'. perform fill_cell using m 6 0 'Insurance Cover No & Date :' enter 0. m = m + 1. perform border_cell using m 2 '2' '1' 2. perform border_range using m 1 m 10. perform border_range using m 6 m 10. xlleft xlc perform border_cell using m 1 '1' '1' 2. call method of h_cell 'borders' = h_border exporting #1 = '4'. perform border_range using m 1 m 10. perform border_range using m 3 m 5. call method of h_cell 'MERGE'. concatenate 'Freight Terms : ' inco1 wa_yxp_shphd-shp_type into text3. free object h_border. call method of h_cell 'SELECT'. perform border_range using m 1 m 5. set property of h_border 'weight' = 2.

set property of h_cell2 'rowheight' = 30 no flush. perform border_cell using m 7 '2' '1' 2. call method of h_cell 'borders' = h_border exporting #1 = '4'. set property of h_cell1 'rowheight' = 30 no flush. perform fill_cell using m 7 0 wa_final1-tc xlcenter xlcenter 0. perform border_cell using m 1 '1' '1' 2. tab = tab + 1. sel_1 = m + 1. perform border_cell using m 2 '2' '1' 2. loop at IT_FINAL1 into wa_final1.Wt' xlcenter xltop 0. perform border_cell using m 10 '2' '1' 2. perform fill_cell using m 5 0 wa_final1-typ xlcenter xlcenter 0. perform border_cell using m 9 '2' '1' 2. perform fill_cell using m 10 0 wa_hdrinv-hdr10 xlcenter xltop 0. set property of h_border 'weight' = 2. perform fill_cell using m 7 0 wa_hdrinv-hdr7 xlcenter xltop 0. perform fill_cell using m 8 0 wa_hdrinv-hdr8 xlcenter xltop 0. perform border_cell using m 5 '2' '1' 2. free object h_border. perform fill_cell using m 6 0 wa_final1-ntwt xlcenter xlcenter 0.perform border_range using m 1 m 10. perform fill_cell using m 2 0 wa_hdrinv-hdr2 xlcenter xltop 0. perform border_cell using m 4 '2' '1' 2. perform border_range using m 1 m 10. perform fill_cell using m 3 0 wa_final1-SIZE xlcenter xlcenter 0. perform fill_cell using m 1 0 wa_final1-hs_code xlleft xlcenter 0. perform border_cell using m 6 '2' '1' 2. call method of h_cell 'SELECT'. perform border_cell using m 1 '2' '1' 2. perform fill_cell using m 4 0 wa_final1-gsm xlcenter xlcenter 0. perform fill_cell using m 6 0 'Nt. perform fill_cell using m 2 0 wa_final1-desc_good xlcenter xlcenter 0. "bottom set property of h_border 'LINESTYLE' = '1'. . perform fill_cell using m 3 0 wa_hdrinv-hdr3 xlcenter xltop 0. perform border_cell using m 8 '2' '1' 2.000'.000. data tab type i value 0. set property of h_cell 'wraptext' = 1. perform fill_cell using m 5 0 wa_hdrinv-hdr5 xlcenter xltop 0. perform fill_cell using m 9 0 wa_hdrinv-hdr9 xlcenter xltop 0. perform fill_cell using m 1 0 wa_hdrinv-hdr1 xlcenter xltop 0. perform fill_cell using m 4 0 wa_hdrinv-hdr4 xlcenter xltop 0. set property of h_cell 'numberformat' = '#0. m = m + 1. perform border_cell using m 3 '2' '1' 2.

perform border_cell using m 5 '2' '1' 2. text3 = m. concatenate '(' text3 into text3. do tab times.tab. concatenate 'i' text4 into text4. text4 = m. perform border_cell using m 8 '2' '1' 2. perform border_range using m 1 m 10.perform fill_cell using m 8 0 wa_final1-qty xlright xlcenter 0. perform border_cell using m 10 '2' '1' 2. perform border_cell using m 4 '2' '1' 2. perform border_cell using m 8 '2' '1' 2. perform border_cell using m 1 '1' '1' 2. tab = 17 . sel_2 = sel_1 + tab . perform border_cell using m 1 '2' '1' 2. enddo. perform border_cell using m 6 '2' '1' 2. perform fill_cell using m 9 0 exrate xlright xlcenter 0. perform border_cell using m 1 '1' '1' 2.1. perform border_cell using m 9 '2' '1' 2.000'. .000. perform border_cell using m 10 '2' '1' 2. perform border_cell using m 3 '2' '1' 2. perform border_cell using m 2 '2' '1' 2. ""wa_final1amt from sap set property of h_cell 'numberformat' = '#0. set property of h_cell 'numberformat' = '#0. perform border_cell using m 5 '2' '1' 2. perform border_cell using m 2 '2' '1' 2. concatenate '=' text3 into text3 separated by 'product'. clear exrate. perform border_cell using m 9 '2' '1' 2. perform border_cell using m 6 '2' '1' 2. endloop. perform border_cell using m 4 '2' '1' 2. m = m + 1. exrate = wa_final1-rate. concatenate 'h' text3 into text3. perform border_cell using m 1 '2' '1' 2. concatenate text3 text4 into text3 separated by ':'. "============================for blank lines=================== if tab le 17.00'. perform border_cell using m 7 '2' '1' 2. perform fill_cell using m 10 0 text3 xlright xlcenter 0. perform border_cell using m 7 '2' '1' 2. concatenate text4 ')' into text4. perform border_cell using m 3 '2' '1' 2.

data tot_qty type string. concatenate '(' text3 into text3. concatenate 'Gross Weight:' text4 into text3 separated by ' '. concatenate 'h' text4 into text4. call method of h_cell 'MERGE'. call method of h_cell 'MERGE'. concatenate text3 text4 into text3 separated by ':'. perform fill_cell using m 3 0 'No&Kind of Pkgs. " for quantity text3 = sel_1. concatenate 'h' text3 into text3. concatenate text4 ')' into text4. call method of h_cell 'SELECT'. text4 = sel_2. perform fill_cell using m 8 0 text3 xlleft xlcenter 0. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. perform fill_cell using m 5 0 '' xlleft xlcenter 0. set property of h_border 'weight' = 2. free object h_border.:' xlleft xlcenter 0. .000.000'. perform border_range using m 1 m 2. call method of h_cell 'SELECT'. text4 = sel_2. call method of h_cell 'borders' = h_border exporting #1 = '3'. concatenate text3 text4 into text3 separated by ':'. set property of h_cell 'numberformat' = '#0. perform border_range using m 3 m 4. text3 = sel_1. concatenate text4 ')' into text4. set property of h_cell 'numberformat' = '#00. concatenate 'j' text3 into text3. perform border_range using m 1 m 10. "top set property of h_border 'LINESTYLE' = '1'. "==========================end ================================ m = m + 1. tot_qty = text3. perform fill_cell using m 1 0 text3 xlleft xlcenter 0. concatenate '=' text3 into text3 separated by 'sum'. concatenate '(' text3 into text3. concatenate '=' text3 into text3 separated by 'sum'. text4 = p_grosswt. perform border_range using m 5 m 7.000'. concatenate 'j' text4 into text4.endif.

if wa_yxp_invpre-pack_type eq ''. call method of h_cell 'MERGE'. data tot_amt type string. call method of h_cell 'MERGE'. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. m = m + 1. perform border_cell using m 8 '2' '1' 2. perform border_range using m 1 m 10. perform fill_cell using m 10 0 text3 xlleft xlcenter 0. perform fill_cell using m 3 0 text3 xlleft xlcenter 0. set property of h_cell 'numberformat' = '#00. call method of h_cell 'MERGE'.000'.00'. call method of h_cell 'MERGE'. concatenate 'Net Weight:' text4 into text3 separated by ' '. perform border_range using m 1 m 2.000. perform fill_cell using m 1 0 text3 xlleft xlcenter 0. set property of h_cell 'numberformat' = '#00. perform border_cell using m 10 '2' '1' 2. perform border_cell using m 5 '2' '1' 2. call method of h_cell 'borders' = h_border exporting #1 = '4'. perform border_range using m 3 m 4. perform border_cell using m 2 '2' '1' 2. call method of h_cell 'SELECT'. concatenate carton ' ' wa_yxp_invprepack_type into text3 separated by ' '. perform border_cell using m 4 '2' '1' 2. perform border_cell using m 1 '1' '1' 2. perform fill_cell using m 5 0 'Sum Total' xlleft xlcenter 0. call method of h_cell 'SELECT'. call method of h_cell 'SELECT'. call method of h_cell 'SELECT'. tot_amt = text3. endif. "top . perform fill_cell using m 9 0 '' xlleft xlcenter 0.perform border_range using m 10 m 10. perform border_range using m 9 m 10. else. perform border_range using m 5 m 7. perform fill_cell using m 8 0 '' xlleft xlcenter 0. perform fill_cell using m 3 0 text3 xlleft xlcenter 0. text4 = p_ntgew. concatenate WA_YXP_INVPRE-NO_PACK ' ' wa_yxp_invpre-pack_type into text3. perform border_cell using m 7 '2' '1' 2.000.

"US DOLLAR". perform border_cell using m 4 '2' '1' 2. perform border_cell using m 7 '2' '1' 2. set property of h_cell 'numberformat' = '#0."S". perform border_cell using m 1 '1' '1' 2. call method of h_cell 'SELECT'. perform border_range using m 3 m 10. . perform border_cell using m 7 '2' '1' 2. set property of h_border 'weight' = 2. perform border_cell using m 8 '2' '1' 2. call method of h_cell 'MERGE'. m = m + 1. set property of h_border 'weight' = 2. perform fill_cell using m 1 0 'Amount Chargeable (In words)' xlleft xlcenter 0. "top set property of h_border 'LINESTYLE' = '1'. call method of h_cell 'MERGE'."CENTS". free object h_border. perform border_cell using m 10 '2' '1' 2. perform border_range using m 8 m 10. perform border_cell using m 5 '2' '1' 2. perform border_range using m 1 m 2.000'. perform border_cell using m 10 '2' '1' 2. perform fill_cell using m 3 0 text3 xlleft xlcenter 0. perform fill_cell using m 1 0 'Total' xlleft xlcenter 0. call method of h_cell 'SELECT'.3. concatenate '=spellcurr(J' text4 '. m = m + 1.set property of h_border 'LINESTYLE' = '1'. perform border_range using m 1 m 7. call method of h_cell 'MERGE'. perform border_cell using m 2 '2' '1' 2. perform border_range using m 1 m 10. call method of h_cell 'MERGE'. text4 = m . perform fill_cell using m 8 0 tot_qty xlleft xlcenter 0. call method of h_cell 'borders' = h_border exporting #1 = '4'. call method of h_cell 'SELECT'. call method of h_cell 'SELECT'. perform border_cell using m 1 '1' '1' 2."S")' into te xt3. free object h_border.

perform border_cell using m 1 '1' '1' 2. perform border_range using m 3 m 4. set property of h_border 'weight' = 2. perform border_cell using m 10 '2' '1' 2. perform fill_cell using m 3 0 p_cenvat xlleft xlcenter 0. call method of h_cell 'MERGE'. m = m + 1. else. if vbrk-vkorg <> 2800 or vbrk-vkorg <> 2000 or vbrk-vkorg <> 2500. perform fill_cell using m 5 0 'Exchange Rate' xlleft xlcenter 0. perform border_range using m 1 m 2. m = m + 1. call method of h_cell 'SELECT'. "top set property of h_border 'LINESTYLE' = '1'. perform fill_cell using m 7 0 text3 xlleft xlcenter 0. perform fill_cell using m 1 0 'Cenvat Payablen :' xlleft xlcenter 0. free object h_border. endif. call method of h_cell 'borders' = h_border exporting #1 = '4'. call method of h_cell 'SELECT'. text3 = wa_yxp_invpre-kursf . call method of h_cell 'MERGE'. perform border_range using m 3 m 4. call method of h_cell 'MERGE'. . call method of h_cell 'MERGE'. call method of h_cell 'MERGE'. concatenate text3 'INR' into text3 separated by ' '. perform fill_cell using m 1 0 'Commission :' xlleft xlcenter 0. perform border_range using m 1 m 2. perform border_range using m 3 m 4. perform fill_cell using m 3 0 com xlleft xlcenter 0. perform border_range using m 1 m 2. perform border_cell using m 10 '2' '1' 2. call method of h_cell 'SELECT'. perform border_range using m 5 m 6. call method of h_cell 'SELECT'. perform border_range using m 5 m 6. call method of h_cell 'MERGE'. call method of h_cell 'SELECT'. perform border_range using m 7 m 8. perform border_range using m 1 m 10. call method of h_cell 'SELECT'. perform border_cell using m 1 '1' '1' 2. call method of h_cell 'MERGE'. call method of h_cell 'MERGE'. call method of h_cell 'SELECT'. call method of h_cell 'SELECT'.

perform border_range using m 3 m 4. call method of h_cell 'SELECT'. call method of h_cell 'SELECT'. perform border_range using m 1 m 2. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. call method of h_cell 'MERGE'. call method of h_cell 'MERGE'. perform border_cell using m 10 '2' '1' 2. perform border_range using m 9 m 10. perform border_range using m 5 m 6. call method of h_cell 'MERGE'. call method of h_cell 'SELECT'. call method of h_cell 'SELECT'. m = m + 1. call method of h_cell 'MERGE'. perform border_cell using m 1 '1' '1' 2.00'. perform fill_cell using m 5 0 '(-)Discount' xlleft xlcenter 0. call method of h_cell 'MERGE'. call method of h_cell 'MERGE'. perform border_range using m 9 m 10. perform border_range using m 7 m 8. call method of h_cell 'MERGE'. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'.call method of h_cell 'SELECT'. perform border_cell using m 1 '1' '1' 2. call method of h_cell 'SELECT'.000. set property of h_cell 'numberformat' = '#0. perform fill_cell using m 5 0 '(-)Freight' xlleft xlcenter 0. perform fill_cell using m 9 0 p_insu xlright xlcenter 0. call method of h_cell 'MERGE'. call method of h_cell 'SELECT'. perform border_cell using m 10 '2' '1' 2. call method of h_cell 'SELECT'. call method of h_cell 'SELECT'. . perform fill_cell using m 5 0 '(+)Commission' xlleft xlcenter 0. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. perform fill_cell using m 9 0 p_freight xlright xlcenter 0. m = m + 1. perform border_range using m 5 m 6. call method of h_cell 'MERGE'. perform border_range using m 1 m 2. perform border_range using m 7 m 8. perform border_range using m 3 m 4. call method of h_cell 'SELECT'. perform border_range using m 9 m 10. perform border_range using m 7 m 8.

call method of h_cell 'MERGE'. perform border_cell using m 10 '2' '1' 2. perform border_range using m 5 m 6. call method of h_cell 'MERGE'. perform border_cell using m 1 '1' '1' 2. call method of h_cell 'SELECT'.9. m = m + 1. perform border_cell using m 10 '2' '1' 2. call method of h_cell 'MERGE'. perform border_range using m 3 m 4. 3. m = m + 1. '(' text4 into text4. perform border_range using m 7 m 8. perform border_range using m 7 m 8. perform border_range using m 1 m 2. perform fill_cell using m 9 0 p_othr xlright xlcenter 0. call method of h_cell 'MERGE'. perform border_range using m 3 m 4. 4. call method of h_cell 'SELECT'. perform fill_cell using m 5 0 'Total Fob Value :' xlleft xlcenter 0. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. concatenate concatenate text3 = m concatenate concatenate text3 = m 'j' text3 into text4. perform fill_cell using m 5 0 '(-)Other' xlleft xlcenter 0. text4 text3 into text4. call method of h_cell 'SELECT'. call method of h_cell 'SELECT'. . call method of h_cell 'SELECT'. call method of h_cell 'SELECT'. perform fill_cell using m 9 0 p_dis xlright xlcenter 0. call method of h_cell 'MERGE'. call method of h_cell 'MERGE'. perform border_range using m 9 m 10. call method of h_cell 'MERGE'. perform border_range using m 1 m 2. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. call method of h_cell 'SELECT'. perform border_range using m 9 m 10.call method of h_cell 'MERGE'. perform border_range using m 5 m 6. perform border_cell using m 1 '1' '1' 2. call method of h_cell 'MERGE'. '-i' text3 into text3. text3 = m . call method of h_cell 'SELECT'.

concatenate text4 text3 into text4. call method of h_cell 'MERGE'. concatenate text4 ')' into text4. call method of h_cell 'MERGE'. concatenate '-i' text3 into text3. concatenate text4 text3 into text4. m = m + 1. perform fill_cell using m 5 0 'Total FOB Value(INR):' xlleft xlcenter 0. perform border_range using m 9 m 10. call method of h_cell 'SELECT'.1. text3 = m . perform border_cell using m 1 '1' '1' 2. perform border_range using m 7 m 8. perform border_range using m 1 m 2. " concatenate text3 text4 into text3 separated by ':'. call method of h_cell 'borders' = h_border exporting #1 = '4'.. call method of h_cell 'MERGE'. . call method of h_cell 'SELECT'. perform fill_cell using m 9 0 text4 xlright xlcenter 0. concatenate '=product(' text3 '*' text4 ')' into text3. concatenate '-i' text3 into text3. perform border_cell using m 10 '2' '1' 2. perform border_range using m 1 m 10. perform border_range using m 1 m 1.2. free object h_border. concatenate '=' text4 into text4 separated by 'sum'. text3 = m . text4 = wa_yxp_invpre-kursf. perform border_cell using m 10 '2' '1' 2. concatenate text4 text3 into text4. concatenate 'i' text3 into text3.000. call method of h_cell 'SELECT'.00. text3 = m . m = m + 1. "top set property of h_border 'LINESTYLE' = '1'. perform fill_cell using m 9 0 text3 xlright xlcenter 0. ""p_totfob perform border_cell using m 1 '1' '1' 2. call method of h_cell 'MERGE'. set property of h_border 'weight' = 2. call method of h_cell 'MERGE'.""p_totfob1 set property of h_cell 'numberformat' = '#0.1. call method of h_cell 'SELECT'.concatenate '+i' text3 into text3. perform border_range using m 3 m 4. call method of h_cell 'SELECT'.00'. perform border_range using m 5 m 6.

call method of h_cell 'SELECT'. call method of h_cell 'SELECT'.call method of h_cell 'SELECT'. loop at IT_ITEM into wa_item. perform border_range using m 1 m 1. perform border_cell using m 10 '2' '1' 2. perform border_range using m 3 m 4. perform border_range using m 9 m 10. perform fill_cell using m 2 0 srno2 xlleft xlcenter 0. endloop. perform fill_cell using m 2 0 'Sr. call method of h_cell 'MERGE'. perform fill_cell using m 5 0 lcontsiz xlleft xlcenter 0. perform fill_cell using m 6 0 text3 xlleft xlcenter 0. :' xlleft xlcenter 0. call method of h_cell 'MERGE'. perform fill_cell using m 5 0 wa_item-cont_size xlleft xlcenter 0. loop at tdline. perform fill_cell using n 1 0 tdline-tdline xlleft xlcenter 0. perform fill_cell using m 3 0 lcontno xlleft xlcenter 0. perform fill_cell using m 1 0 'Marks & No. call method of h_cell 'MERGE'.No' xlleft xlcenter 0. perform border_cell using n 1 '1' '1' 2. perform fill_cell using m 7 0 lshseal xlleft xlcenter 0. perform fill_cell using m 9 0 lexseal xlleft xlcenter 0. srno2 = srno2 + 1. perform fill_cell using m 3 0 wa_item-contno xlleft xlcenter 0. perform border_range using m 3 m 4. srno2 = 0. perform border_cell using m 1 '1' '1' 2. perform border_range using m 7 m 8. concatenate 'No of' wa_yxp_invpre-pack_type into text3 separated by ' '. call method of h_cell 'MERGE'. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. perform border_range using m 9 m 10. perform fill_cell using m 7 0 wa_item-sealno1 xlleft xlcenter 0. call method of h_cell 'SELECT'. perform border_cell using n 10 '2' '1' 2. perform fill_cell using m 6 0 wa_item-carton xlleft xlcenter 0. . call method of h_cell 'SELECT'. perform border_range using n 1 n 1. perform border_range using m 7 m 8. n = m. n = n + 1. " perform fill_cell using m 1 0 '' xlleft xlcenter 0. call method of h_cell 'SELECT'. m = m + 1. call method of h_cell 'SELECT'.

call method of h_cell 'MERGE'. free object h_border. call method of h_cell 'MERGE'. clear srno2. perform border_cell using m 10 '2' '1' 2. endloop. clear text3. m = m + 1. perform border_range using m 1 m 10. perform border_cell using m 1 '1' '1' 2. if srno2 le 9. "top set property of h_border 'LINESTYLE' = '1'. perform border_range using m 1 m 5. endif. call method of h_cell 'SELECT'. perform border_cell using m 10 '2' '1' 2. m = m + 1. perform border_cell using m 1 '1' '1' 2. perform border_cell using m 1 '1' '1' 2. perform border_range using m 1 m 10. m = m + 1. perform fill_cell using m 1 0 text3 xlleft xlcenter 0. enddo. call method of h_cell 'SELECT'. perform border_range using m 1 m 10. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. call method of h_cell 'borders' = h_border exporting #1 = '4'.srno2. text3 = 'credit Rule 2004 on the manufacturing of the said goods'. perform border_cell using m 10 '2' '1' 2. perform border_range using m 1 m 10. m = m + 1. perform border_cell using m 1 '1' '1' 2. do srno2 times. set property of h_border 'weight' = 2.call method of h_cell 'SELECT'. . Anjar are hereby declared that we are exporting goods under duty Drawback Scheme and further declared that we have not availed Cenvat '. perform fill_cell using m 1 1 string_n2 xlleft xlcenter 0. text3 = 'We Welspun India Limited. srno2 = 9 . perform fill_cell using m 9 0 wa_item-esealno xlleft xlcenter 0. call method of h_cell 'MERGE'. perform border_cell using m 10 '2' '1' 2. perform fill_cell using m 1 0 text3 xlleft xlcenter 0.

clear text3. perform border_cell using m 5 '2' '1' 2. call method of h_cell 'SELECT'. clear text3.' xlright xlcenter 0. call method of h_cell 'MERGE'. perform border_range using m 1 m 5. perform border_cell using m 1 '1' '1' 2. perform border_cell using m 5 '2' '1' 2. concatenate bno text3 into text3 separated by ' '. call method of h_cell 'MERGE'. call method of h_cell 'MERGE'. call method of h_cell 'MERGE'. perform border_range using m 1 m 5. perform border_cell using m 1 '1' '1' 2. concatenate bdat+6(2) bdat+4(2) bdat(4) into . perform border_cell using m 5 '2' '1' 2. perform fill_cell using m 1 1 string_n1 xlleft xlcenter 0. call method of h_cell 'SELECT'.' . call method of h_cell 'SELECT'. call method of h_cell 'SELECT'. perform border_cell using m 1 '1' '1' 2. perform border_range using m 1 m 5. perform fill_cell using m 1 1 text3 xlleft xlcenter 0. call method of h_cell 'SELECT'. clear text3. perform border_range using m 6 m 10. call method of h_cell 'SELECT'. perform border_cell using m 10 '2' '1' 2. m = m + 1. perform border_cell using m 10 '2' '1' 2. perform fill_cell using m 1 1 string3 xlleft xlcenter 0. call method of h_cell 'SELECT'. perform border_cell using m 10 '2' '1' 2. text3 separated by '. call method of h_cell 'MERGE'.perform border_range using m 6 m 10. perform border_range using m 6 m 10. call method of h_cell 'MERGE'. m = m + 1. perform fill_cell using m 6 0 'For WELSPUN GLOBAL BRANDS LTD. m = m + 1. perform border_range using m 6 m 10.

call method of h_cell 'MERGE'. perform border_cell using m 1 '1' '1' 2. perform border_cell using m 10 '2' '1' 2. perform border_cell using m 5 '2' '1' 2. m = m + 1. clear text3. perform border_range using m 1 m 5. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. text3 = 'I/We,hereby,declare that I/We shall claim the benefits,as admi ssible,'. perform fill_cell using m 1 0 text3 xlleft xlcenter 0. perform border_range using m 6 m 10. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. perform border_cell using m 1 '1' '1' 2. perform border_cell using m 10 '2' '1' 2. perform border_cell using m 5 '2' '1' 2. m = m + 1. clear text3. perform border_range using m 1 m 5. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. text3 = 'under chapter 3 of FTP'. perform fill_cell using m 1 0 text3 xlleft xlcenter 0. perform border_range using m 6 m 10. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. perform border_cell using m 1 '1' '1' 2. perform border_cell using m 10 '2' '1' 2. perform border_cell using m 5 '2' '1' 2. m = m + 1. clear text3. perform border_range using m 1 m 5. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. text3 = 'We hereby certify that merchandise is of Indian origin .'. perform fill_cell using m 1 0 text3 xlleft xlcenter 0. perform border_range using m 6 m 10. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. perform border_cell using m 1 '1' '1' 2. perform border_cell using m 10 '2' '1' 2. perform border_cell using m 5 '2' '1' 2. m = m + 1.

clear text3. perform border_range using m 1 m 5. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. text3 = 'Declaration: We Declare that this invoice show the actual pric e of the'. perform fill_cell using m 1 0 text3 xlleft xlcenter 0. perform border_range using m 6 m 10. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. perform border_cell using m 1 '1' '1' 2. perform border_cell using m 10 '2' '1' 2. perform border_cell using m 5 '2' '1' 2. m = m + 1. clear text3. perform border_range using m 1 m 5. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. text3 = 'goods described and all particulars are True and correct.'. perform fill_cell using m 1 0 text3 xlleft xlcenter 0. perform border_range using m 6 m 10. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. perform fill_cell using m 6 0 'Authorised Signatory' xlright xlcenter 0. perform border_cell using m 1 '1' '1' 2. perform border_cell using m 10 '2' '1' 2. perform border_cell using m 5 '2' '1' 2. perform border_range using m 1 m 10. call method of h_cell 'borders' = h_border exporting #1 = '4'. "top set property of h_border 'LINESTYLE' = '1'. set property of h_border 'weight' = 2. free object h_border. "===========================================SAVE EXCEL FILE================== ===== endloop. call method of h_wrkbook 'SAVEAS' exporting #1 = fullpath. call method of h_wrkbook 'CLOSE'. call method of h_excel 'QUIT'. free object h_wrkbook.

free object h_excel. message : 'Downloading completed.' type 'S'. endform. >>>>>>>>>>>>>INCLUDE MYEXCEL_PRESHP >>>>>>start>>>>>>> >>>>>>>>>>>>>INCLUDE MYEXCEL01 >>>>>>start>>>>>>> *&---------------------------------------------------------------------* *& Include MYEXCEL01 add by sandip *&---------------------------------------------------------------------*

form print_excel using p_autoid . if rd_2 <> 'X'. perform get_exeldata using p_autoid . endif. perform img_dwnld. if rd_1 = 'X'. concatenate 'EPSI_' p_autoid into filename. elseif rd_2 = 'X'. concatenate 'ARE-1_' p_autoid into filename. elseif rd_3 = 'X'. concatenate 'EPL_' p_autoid into filename. elseif rd_4 = 'X'. concatenate 'ANNEXURE_' p_autoid into filename. endif. call method cl_gui_frontend_services=>file_save_dialog exporting window_title = 'SAVE FILE AS' default_extension = 'XLS' file_filter = '*.XLS' default_file_name = filename * prompt_on_overwrite = 'x' changing filename = filename path = path fullpath = fullpath. if fullpath is not initial. if rd_1 = 'X'. perform EXCEL_PRESHP in program YPRESHP_INV1 if found . elseif rd_2 = 'X'. perform EXCEL_PRESHP_ARE_1 in program YPRESHP_INV1 if found using p_autoid P_MANID TENB EXDAT1. elseif rd_3 = 'X'.

select single * from vbap where vbeln = lips-vgbel. clear : cadrc. else. select single * from vbak into a_vbak where vbeln = vbak-bname. endif. select single * from j_1imocomp into J_1IMOCOMP where bukrs = a_vbak-vkorg .yxp_bonddtl. if rd_4 = 'X'. select * into corresponding fields of table it_yxp_invpre from yxp_invpre where yxp_invpre~auto_id = p_autoid. data : lines type i. endform. elseif rd_4 = 'X'. select single * from likp where vbeln = wa_yxp_invpre-doc_nr. endif. select single * from vbak where vbeln = lips-vgbel.vbap. perform EXCEL_PRESHP_anex in program YPRESHP_INV1 if found .zparameter. data : faltu type string. select single * from adrc into nadrc1 . elseif rd_4 <> 'X'. select single * from j_1imocomp into J_1IMOCOMP where bukrs = vbak-vkorg . message : 'File name is not entered!' type 'E'. select single * from vbpa where vbeln = lips-vgbel and parvw = 'Z2'. tables : lips. loop at it_yxp_invpre into wa_yxp_invpre. select single * from t001 where bukrs = vbak-vkorg.perform EXCEL_PRESHP_pack in program YPRESHP_INV1 if found .tvm1t. select single * from lips where vbeln = wa_yxp_invpre-doc_nr.t001w. data : netwr like bapicurr-bapicurr. "DATA : WA_YXP_EXPTD_LIC3 LIKE YXP_EXPTD_LIC.t005t. endif. data : werks type t001w-werks. "PRINT_EXCEL FORM get_exeldata USING p_autoid . yxp_contdtl.tvko. data: it_item1 type ty_item occurs 0.

******************** * AS PER MAIL CONFIRMATION FROM ALPESH AND AVINASH SIR * CHANGE INCOTERM FORM DELIVERY TO SO select single * from vbkd where vbeln = lips-vgbel. . else. text_1 = zparameter-parakey8.2012 '. select single * from adrc into eadrc where addrnumber = tvko-adrnr. ********For Cor. text_2 = zparameter-parakey9.05. inco1 = vbkd-inco1. ************* For WGBL IEC No select single * from zparameter where parakey2 = vbak-vkorg and parakey1 = 'IECNO'. * added by chintan 22. text_1 = zparameter-parakey8.2012 if wa_YXP_invpre-audat >= date1.where addrnumber = vbpa-adrnr. endif. endif. text2 = zparameter-parakey7. else.05.Address select single * from tvko where vkorg = vbak-vkorg. text_B = zparameter-parakey7. if zparameter-parakey5 = 'INMUN1'. select single * from zparameter where parakey2 = vbak-vkorg and parakey1 = 'BIN'. "================ADD BY SANDIP========================== select single * from zparameter where parakey2 = vbak-vkorg and parakey5 = 'INMUN1' "wa_yxp_shphd-port_CODE and parakey1 = 'SUFFNO'. text_2 = zparameter-parakey9. text_1 = 'VIII/48-141/FS/MP&SEZ/2012-13 DT:11. ""PORT IN PARAKET5 date1 = '20120522'.

select single * from t001w where werks = wa_yxp_invpre-werks and ekorg = wa_yxp_invpre-vkorg. * CHANGE BY AJAY *SELECT SINGLE * FROM T001 WHERE BUKRS EQ VBAK-VKORG. *BREAK-POINT. ************************* select single * from vbak where vbeln eq vbrp-aubel. * * BREAK-POINT. precarrier = 'ANJAR'. ************ * PRE-CARRIER BY *BREAK-POINT. precarrier = 'ANJAR'. *BREAK-POINT. select single * from adrc into madrc where addrnumber eq t001w-adrnr. elseif werks = '2000' or . select single * from vbrk where vbeln = wa_yxp_invpre-doc_nr.*Manu clear : vbpa. text1 = zparameter-parakey7. ********** ICE No OF Plant select single * from zparameter where parakey2 = werks and parakey1 = 'IECNO'. select single * from t001w where werks = werks and vkorg = vbak-vkorg. if werks = '2800'. select single werks into werks from vbap where vbeln = vbak-vbeln. select single * from vbak where vbeln eq vbak-bname. select single * from adrc into it_adrc where addrnumber = t001w-adrnr.

'WE'). endif. select single * from t005t where land1 = it_ylcelcmst1-cntry_org and spras = 'E'. select single * from adrc into cadrc where addrnumber = vbpa-adrnr. select single * from kna1 into wa_kna1 where kunnr = vbak-kunnr."IN('SH'. select single * from vbpa where vbeln = lips-vgbel and parvw = 'WE'.werks = '1200'. select single * from ylceord where vbeln = lips-vgbel . precarrier = 'MORAI. select single * from adrc into sadrc where addrnumber eq vbpa-adrnr. concatenate it_ylcelcmst1-inco1 'AT SIGHT' into string1 separated by space. select single landx from t005t into cont1 where land1 eq sadrc-country and spras eq 'E'. select single * from vbpa where vbeln = lips-vgbel and parvw = 'AG'. else."IN('SH'. if vbpa-kunnr ne vbak-kunnr.VAPI'. endif.'WE'). if it_ylcelcmst1-usance = 'X'. select single * from ylcelcmst into it_ylcelcmst1 where lc_refnr = ylceord-lc_refnr. concatenate 'L/C' it_ylcelcmst1-usance_day 'AT SIGHT' into string1 separated by space . select single landx into flandx . endif.

shift bstkd left deleting leading '.bstkd. *LOOP AT IT_YXP_INVPRE INTO W_YXP_INVPRE.from t005t where land1 = it_ylcelcmst1-cntry_fin and spras = 'E'. shift sales right deleting trailing '. clear :sales.p_grosswt.'.'. sort it_yxp_contman_itm2 by so_vbeln . vessel = wa_yxp_contman_itm-vesselname. loop at it_yxp_contman_itm into wa_yxp_contman_itm. it_yxp_contman_itm1[] = it_yxp_contman_itm[]. shift sales left deleting leading '. *CARTON select * from yxp_contman_itm into table it_yxp_contman_itm for all entries in it_yxp_item where delv = it_yxp_item-doc_nr and manid = p_manid and id eq 'M'. shift bstkd right deleting trailing '. port_desc = wa_yxp_contman_itm-dschr_desc. "SACHIN * CONCATENATE SALES WA_YXP_CONTMAN_ITM2-VBELN * INTO SALES SEPARATED BY '. t005t-landx = 'INDIA'. select * from yxp_item into table it_yxp_item for all entries in it_yxp_invpre where doc_nr = it_yxp_invpre-doc_nr. select * from yxp_invpre into table it_yxp_invpre where auto_id = wa_yxp_invpre-auto_id. if t005t-landx is initial. delete adjacent duplicates from it_yxp_contman_itm2 comparing so_vbeln. loop at it_yxp_contman_itm2 into wa_yxp_contman_itm2.'.'. . concatenate bstkd wa_yxp_contman_itm2-ebeln space "SACHIN into bstkd separated by '. port_load = wa_yxp_contman_itm-load_desc. clear :p_ntgew. concatenate sales wa_yxp_contman_itm2-vbeln into sales separated by '.'. endloop.'. it_yxp_contman_itm2[] = it_yxp_contman_itm[]. * ON CHANGE OF WA_YXP_CONTMAN_ITM2-VBELN.'. endif. * ENDON.

endif. p_freighttxt = 'Freight'. endloop. p_commisontxt = w_yxp_invpre-commisontxt. on change of wa_yxp_contman_itm-contno. p_txt = 'Other'. p_txt = w_yxp_invpre-othertxt. p_othr = w_yxp_invpre-other. endif. else. *aJAY CHANGE p_ntgew = p_ntgew + wa_yxp_contman_itm-ntgew_kg. p_dis = w_yxp_invpre-discount. endif."added by sachin endif. endif. if p_freight is initial. *f-POINT. p_grosswt = p_grosswt + wa_yxp_contman_itm-brgew_kg. select single vgbel from lips into lips-vgbel . * TOT_PC = TOT_PC + WA_YXP_CONTMAN_ITM-TOT_PCS. if p_insu is initial. if p_freighttxt is initial. endon. sort it_yxp_invpre by doc_nr. loop at it_yxp_invpre into w_yxp_invpre. endif. p_commisontxt = 'Commission'. * TOT_PC = TOT_PC + WA_YXP_CONTMAN_ITM-TOT_PCS. if wa_yxp_contman_itm-contno is initial. p_discounttxt = w_yxp_invpre-discounttxt. endif. p_freight = w_yxp_invpre-freight. p_discounttxt = 'Discount'. carton = carton + wa_yxp_contman_itm-carton. if p_commisontxt is initial.* * WA_YXP_INVPRE-NO_PACK = WA_YXP_INVPRE-NO_PACK + WA_YXP_CONTMAN_ITM-CARTON. p_freighttxt = w_yxp_invpre-freighttxt. if p_othr is initial. if p_discounttxt is initial. endif. carton = carton + wa_yxp_contman_itm-carton. if p_dis is initial. endif. if p_txt is initial. p_insu = w_yxp_invpre-commison.

where vbeln eq w_yxp_invpre-doc_nr. endloop.'.sumq.p_sumqty. on change of w_yxp_invpre-audat. * P_GROSSWT = WA_YXP_INVPRE-BRGEW. data : w_vbak type vbak.'. concatenate w_yxp_invpre-audat ' ' into sdat. *ENDLOOP. wa_final1. *DESCRIBE TABLE IT_YXP_ITEM LINES LINES. * CONCATENATE BSTKD VBKD-BSTKD SPACE "SACHIN * INTO BSTKD SEPARATED BY '. data: w_konv type konv. *LOOP AT IT_YXP_ITEM INTO WA_YXP_ITEM. *SELECT SINGLE j_1ichid INTO WA_YXP_ITEM-HS_CODE * FROM J_1IMTCHID * WHERE MATNR = WA_YXP_ITEM-MATNR. endon.ntwt.p_ntwt. . ON CHANGE OF LIPS-VGBEL. * *MODIFY IT_YXP_ITEM FROM WA_YXP_ITEM. select single * from yxp_shphd where doc_nr = w_yxp_invpre-auto_id and doc_clas = '0009' . " aJAY CHANGE * P_NTGEW = WA_YXP_INVPRE-NTGEW.p_sumamt. SHIFT SALES RIGHT DELETING TRAILING '. clear: it_final1[].sumr. * SHIFT BSTKD LEFT DELETING LEADING '. * BREAK-POINT.05. SHIFT SALES LEFT DELETING LEADING '.'. ****************Start Hide By Chirag On 09.2011 * ON CHANGE OF LIPS-VGBEL.'. ********************* End Of. * * * * * select single * from vbkd where vbeln = lips-vgbel.suma. "SACHIN CONCATENATE SALES LIPS-VGBEL INTO SALES SEPARATED BY '.'.'. sort it_yxp_item by matnr . data: w_lips type lips. ENDON. * SHIFT BSTKD RIGHT DELETING TRAILING '. * ENDON.

select single * from mara where matnr = wa_yxp_item-matnr. * W_KONV-KBETR = W_KONV-KBETR / 100. * WA_YXP_ITEM-ARKTX = clear wa_final1-hs_code. call function 'BAPI_CURRENCY_CONV_TO_EXTERNAL' exporting currency = wa_yxp_item-waerk amount_internal = w_konv-kbetr importing amount_external = netwr. select single knumv into corresponding fields of w_vbak from vbak where vbeln = w_lips-vgbel. wa_yxp_item-netpr1 = netwr . wa_yxp_item-netwr = netwr. call function 'BAPI_CURRENCY_CONV_TO_EXTERNAL' exporting currency = wa_yxp_item-waerk amount_internal = wa_yxp_item-netwr importing amount_external = netwr. select single * from mara into mara1 where matnr = mara-bismt. * WA_YXP_ITEM-NETPR1 = W_KONV-KBETR. select single vgbel vgpos from lips into corresponding fields of w_lips where vbeln = wa_yxp_item-doc_nr and posnr = wa_yxp_item-posnr. * WA_YXP_ITEM-NETPR1 = W_KONV-KBETR. select single * from konv into w_konv where knumv = w_vbak-knumv and kposn = w_lips-vgpos and kschl = 'PR00'. * WA_YXP_ITEM-NETPR1 = WA_YXP_ITEM-NETPR1 / 100. p_sumamt1 = wa_yxp_item-netwr + p_sumamt1 . weark = wa_yxp_item-waerk. select single maktx into wa_yxp_item-arktx from makt where matnr = wa_yxp_item-matnr and spras = 'E'.loop at it_yxp_item into wa_yxp_item. .

data hdr9tmp type string. select single j_1ichid into wa_final1-hs_code from j_1imtchid where matnr = mvke-pmatn. select single * from tvm1t where mvgr1 = mvke-mvgr1 and spras = 'EN'. * ON CHANGE OF MARA-MATKL. if mara-spart = '20'. wa_final1-desc_good = tvm1t-bezei. BREAK-POINT. wa_hdrinv-hdr4 = 'GSM'. wa_hdrinv-hdr10 = hdr10tmp. concatenate 'Rate in ' wa_yxp_item-waerk into hdr9tmp separated by ' '. wa_hdrinv-hdr3 = 'Size'. data hdr8tmp type string. "TT wa_hdrinv-hdr1 = 'HS Code Customer#s Ref'. select single * from mvke where matnr = mara-matnr. wa_hdrinv-hdr7 = 'TC'. wa_hdrinv-hdr2 = 'Description of Goods'. wa_hdrinv-hdr9 = hdr9tmp. if lines gt 1. concatenate 'Amount 'wa_yxp_item-waerk into hdr10tmp separated by ' '. wa_hdrinv-hdr6 = 'Const'. WA_FINAL1-GSM. data hdr10tmp type string. * * ** . split faltu at 'GSM' into faltu wa_final1-gsm .select single * from mvke where matnr = mara-bismt and vkorg = vbak-vkorg and vtweg = vbak-vtweg. split wa_yxp_item-arktx at '/' into wa_final1-size faltu. wa_hdrinv-hdr8 = hdr8tmp. WA_FINAL1-TYP. concatenate 'Quantity ' wa_yxp_item-vrkme into hdr8tmp separated by ' '. wa_hdrinv-hdr5 = 'Type'. *BREAK-POINT.

wa_hdrinv-hdr8 = hdr8tmp. elseif mara-spart = 'BS' or mara-spart = 'DB'. wa_hdrinv-hdr5 = 'Pillow'. wa_hdrinv-hdr2 = 'Description of Goods'. endif. split faltu at '/' into wa_final1-typ faltu. wa_final1-qty = sumq. wa_hdrinv-hdr6 = 'Const'. split faltu at '+FITTED' into wa_final1-gsm faltu. p_sumqty = sumq + p_sumqty . wa_hdrinv-hdr4 = 'Fitted'. * . wa_hdrinv-hdr1 = 'HS Code Customer#s Ref'. concatenate 'Amount'wa_yxp_item-waerk into hdr10tmp separated by ' '. split tvm1t-bezei at '(' into wa_final1-desc_good faltu. split faltu at '/' into wa_final1-typ faltu. wa_hdrinv-hdr10 = hdr10tmp. wa_hdrinv-hdr9 = hdr9tmp. *** WA_FINAL1-DESC_GOOD = TVM1T-BEZEI. wa_final1-rate = sumr. wa_final1-vrkme = wa_yxp_item-vrkme. if sy-tabix <> 1. wa_final1-vrkme = wa_yxp_item-vrkme. concatenate 'Rate in' wa_yxp_item-waerk into hdr9tmp separated by ' '. endif . wa_final1-tc = mara1-groes. wa_hdrinv-hdr3 = 'Flat'. p_sumamt = suma + p_sumamt . "BS concatenate 'Quantity ' wa_yxp_item-vrkme into hdr8tmp separated by ' '. split wa_yxp_item-arktx at '/' into wa_final1-typ faltu. * SPLIT WA_YXP_ITEM-ARKTX AT 'TC' INTO WA_FINAL1-TC FALTU. wa_final1-amt = suma. split faltu at '+PILLOWS' into wa_final1-typ faltu. ENDON. wa_final1-ntwt = ntwt. wa_hdrinv-hdr7 = 'TC'. * append wa_final1 to it_final1. split faltu at 'FLAT' into wa_final1-size faltu.split wa_final1-gsm at '/' into wa_final1-gsm faltu.

split faltu at 'GSM' into faltu wa_final1-gsm . wa_hdrinv-hdr8 = hdr8tmp. sumq = wa_yxp_item-kwmeng + sumq. wa_hdrinv-hdr5 = 'Type'. wa_hdrinv-hdr9 = hdr9tmp. else."+ SUMR . wa_hdrinv-hdr4 = 'GSM'. " . p_ntwt = wa_yxp_item-ntgew + p_ntwt. ntwt = wa_yxp_item-ntgew + ntwt. sumr = wa_yxp_item-netpr1. suma = ( sumr * sumq ). wa_final1-rate = sumr. wa_hdrinv-hdr2 = 'Description of Goods'. wa_final1-amt = suma. suma = ( sumr * wa_yxp_item-kwmeng ) + suma . "TT wa_hdrinv-hdr1 = 'HS Code Customer#s Ref'. select single * from tvm1t where mvgr1 = mvke-mvgr1 and spras = 'EN'."+ SUMA . wa_final1-qty = sumq. wa_final1-desc_good = tvm1t-bezei. select single * from mvke where matnr = mara-matnr. p_sumqty = wa_yxp_item-kwmeng + p_sumqty .sumq = wa_yxp_item-kwmeng. WA_FINAL1-GSM. split wa_yxp_item-arktx at '/' into wa_final1-size faltu. P_SUMAMT = SUMA + P_SUMAMT . wa_final1-ntwt = ntwt. wa_hdrinv-hdr7 = 'TC'. concatenate 'Amount'wa_yxp_item-waerk into hdr10tmp separated by ' '. if mara-spart = '20'. sumr = wa_yxp_item-netpr1. * * ** . WA_FINAL1-TYP. concatenate 'Rate in' wa_yxp_item-waerk into hdr9tmp separated by ' '. wa_hdrinv-hdr10 = hdr10tmp. * APPEND WA_FINAL1 TO IT_FINAL1. concatenate 'Quantity ' wa_yxp_item-vrkme into hdr8tmp separated by ' '. ntwt = wa_yxp_item-ntgew."+ SUMQ. wa_hdrinv-hdr6 = 'Const'. wa_hdrinv-hdr3 = 'Size'.

wa_hdrinv-hdr5 = 'Pillow'. split tvm1t-bezei at '(' into wa_final1-desc_good faltu. split faltu at '/' into wa_final1-typ faltu. wa_hdrinv-hdr8 = hdr8tmp. SHIFT WA_FINAL1-TC LEFT DELETING LEADING '/'. wa_hdrinv-hdr9 = hdr9tmp. SPLIT WA_YXP_ITEM-ARKTX AT 'TC' INTO WA_FINAL1-TC FALTU. APPEND WA_FINAL1 TO IT_FINAL1. "BS concatenate 'Quantity ' wa_yxp_item-vrkme into hdr8tmp separated by ' '. ON CHANGE OF WA_FINAL1-SIZE OR WA_FINAL1-GSM OR WA_FINAL1-TYP OR WA_FINAL1-RATE . wa_hdrinv-hdr10 = hdr10tmp. wa_hdrinv-hdr6 = 'Const'. WA_FINAL1-DESC_GOOD = TVM1T-BEZEI. concatenate 'Amount'wa_yxp_item-waerk into hdr10tmp separated by ' '. wa_hdrinv-hdr2 = 'Description of Goods'. * * * *** * ** ** ** ** ** . concatenate 'Rate in' wa_yxp_item-waerk into hdr9tmp separated by ' '. wa_final1-tc = mara1-groes. wa_hdrinv-hdr4 = 'Fitted'. split faltu at '+' into wa_final1-gsm faltu. split faltu at '+' into wa_final1-size faltu. wa_hdrinv-hdr1 = 'HS Code Customer#s Ref'. shift wa_final1-typ right deleting trailing ')'. elseif mara-spart = 'BS' or mara-spart = 'DB'. endif . wa_hdrinv-hdr3 = 'Flat'. split faltu at '/' into wa_final1-typ faltu. SPLIT WA_FINAL1-TC AT '/' INTO WA_FINAL1-TC FALTU. split wa_yxp_item-arktx at '/' into wa_final1-typ faltu. wa_hdrinv-hdr7 = 'TC'. IF SY-TABIX NE 1. split faltu at '+' into wa_final1-typ faltu.split wa_final1-gsm at '/' into wa_final1-gsm faltu. append wa_final1 to it_final1.

p_commission = wa_yxp_invpre-commison. string3 = 'EXPORT UNDER REBATE'. * Calculate Exchange Rate Amount. else. endif. string3 = 'EXPORT UNDER BOND'. CLEAR : SUMA. else. * WA_YXP_ITEM-WAERK. else. ENDIF. bstatus = yxp_bonddtl-br. if wa_yxp_invpre-bond is initial. select single bno bdat br from yxp_bonddtl into (bno. string3 = 'EXPORT UNDER BOND'. ***** P_LESSAMT = P_SUMAMT * DIS / 100.yxp_bonddtl-br) where auto_id = wa_yxp_invpre-auto_id. * Calculate Commission and Less Amount ***** P_COMAMT = P_SUMAMT * COM / 100. if yxp_bonddtl-br eq 'R'. * get cenvat payable select single tot_dr into p_cenvat from yxp_bonddtl where auto_id = wa_yxp_invpre-auto_id. call function 'Y_XP_SPELL_AMOUNT' exporting currency = wa_yxp_item-waerk amount = p_sumamt importing in_words = amt_word .** ** ** ** ** WA_FINAL1-DOC_NR = WA_YXP_ITEM-DOC_NR. APPEND WA_FINAL1 TO IT_FINAL1. *CALCULATE TOTAL FOB VALUE p_totfob = p_kursfamt.SUMQ. ENDON. endif. string3 = 'EXPORT UNDER REBATE'. p_discount = wa_yxp_invpre-discount.bdat. if yxp_bonddtl-br is initial. p_kursfamt = wa_yxp_invpre-kursf * p_sumamt. endif. "+ WA_YXP_INVPRE-FREIGHT. endif.

* SHIFT CONTNO RIGHT DELETING TRAILING '. wa_item-cont_size = wa_yxp_contman_itm1-cont_size.'. endloop. * * ON CHANGE OF YXP_CONTDTL-CONTNO. * SHIFT CONTNO LEFT DELETING LEADING '. select * from yxp_contdtl into w_yxp_contdtl where doc_nr = wa_yxp_item-doc_nr. if carton is initial. loop at it_yxp_contman_itm1 into wa_yxp_contman_itm1.'. append w_yxp_contdtl to i_yxp_contdtl . *** clear it_item[].'.'. * ENDON. * CONCATENATE SEALNO YXP_CONTDTL-SEALNO INTO SEALNO * SEPARATED BY '. on change of wa_yxp_item-doc_nr. * SHIFT SEALNO LEFT DELETING LEADING '. endon. * BREAK-POINT. if sy-subrc <> 0. clear : sumq. message id sy-msgid type sy-msgty number sy-msgno with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. sort it_yxp_contman_itm1 by cont. endselect.'. if sy-subrc = 0. carton = carton + wa_item-carton.ntwt. endif. wa_item-contno = wa_yxp_contman_itm1-contno. * SELECT SINGLE * FROM YXP_CONTDTL * WHERE DOC_NR = WA_YXP_ITEM-DOC_NR.exceptions error = 1 others = 2.'. * APPEND WA_FINAL1 TO IT_FINAL1. read table i_yxp_contdtl into w_yxp_contdtl with key doc_nr = wa_yxp_contman_itm1-delv. .suma. * CONCATENATE CONTNO YXP_CONTDTL-CONTNO INTO CONTNO * SEPARATED BY '. endif. * SHIFT SEALNO RIGHT DELETING TRAILING '.sumr. wa_item-carton = wa_yxp_contman_itm1-carton.

endloop. wa_item-sealno1 = wa_item1-sealno1. *******READ TABLE IT_FINAL1 INTO WA_FINAL1 WITH KEY ******* DOC_NR = WA_YXP_ITEM-DOC_NR. endif. wa_item-sealno1 = w_yxp_contdtl-sealno. it_item1[] = it_item[].wa_item. clear : it_item2[]. *******IF SY-SUBRC NE 0. clear it_item[]. append wa_item to it_item. delete adjacent duplicates from it_item1 comparing contno sealno1. wa_item-cont_size = wa_item1-cont_size. wa_item-carton = carton1. wa_item-contno = wa_item1-contno. loop at it_item1 into wa_item1 . wa_item-buyerseal = w_yxp_contdtl-buyerseal. endif. . endloop. wa_item-esealno = w_yxp_contdtl-esealno.carton1. ******* WA_FINAL1-DOC_NR = WA_YXP_ITEM-DOC_NR.wa_item.wa_item-cont_size = w_yxp_contdtl-cont_size. if wa_item-contno is not initial.it_item1[]. wa_item-carton = carton1. clear carton1. endloop. carton1 = carton1 + wa_item2-carton. loop at it_item2 into wa_item2 where sealno1 = wa_item-sealno1. endif. clear wa_item2. sort it_item1 by contno sealno1. carton = carton + wa_item-carton .wa_item2. append wa_item to it_item. wa_item-buyerseal = wa_item1-buyerseal. endloop. wa_item-esealno = wa_item1-esealno. if wa_item-contno is initial and wa_item-sealno1 is not initial. loop at it_item2 into wa_item2 where contno = wa_item-contno. clear: carton . it_item2[] = it_item[]. carton1 = carton1 + wa_item2-carton. wa_item-contno = w_yxp_contdtl-contno.

endon.SUMQ. suma = wa_final1-amt + suma. wa_repair-qty = sumq. *******ELSE. * CLEAR WA_FINAL1-TYP. wa_repair-qty = sumq.******* APPEND WA_FINAL1 TO IT_FINAL1. * read table it_repair into wa_repair with key doc_nr = wa_final1-doc_nr. if sy-subrc ne 0. append wa_repair to it_repair. wa_repair-amt = suma. ntwt = wa_final1-ntwt + ntwt. * MODIFY IT_FINAL1 FROM WA_FINAL1. loop at it_final1 into wa_final1.. clear : sumq. *******ENDIF.ntwt. at last. ******* MODIFY IT_FINAL1 FROM WA_FINAL1 INDEX SY-TABIX TRANSPORTING *DOC_NR . *****CHANGED BY SACHIN *LOOP AT IT_FINAL1 INTO WA_FINAL1. append wa_repair to it_repair. clear : sumq. wa_repair-ntwt = ntwt. data : wa_repair like it_repair. "SACHIN on change of wa_final1-size or wa_final1-gsm or wa_final1-typ or wa_final1-rate. wa_repair-amt = suma. .suma. * ENDLOOP. ******* CLEAR : SUMA. move-corresponding wa_final1 to wa_repair.ntwt. ******* WA_FINAL1-DOC_NR = WA_YXP_ITEM-DOC_NR. wa_repair-ntwt = ntwt. endif. data : it_repair like it_final1 with header line . if sy-tabix ne 1. endloop.suma. endat. sumq = wa_final1-qty + sumq. APPEND WA_REPAIR TO IT_REPAIR. move-corresponding wa_final1 to wa_repair. sort it_final1 by size gsm typ rate.

call function 'Y_XP_SPELL_AMOUNT' exporting currency = wa_yxp_item-waerk amount = p_sumamt1 importing in_words = amt_word exceptions error = 1 others = 2. p_sumamt = netwr. endif. call function 'BAPI_CURRENCY_CONV_TO_EXTERNAL' exporting currency = wa_yxp_item-waerk . append wa_repair to it_repair. *BREAK-POINT. *APPEND WA_FINAL1 TO IT_FINAL1.suma.ntwt.wa_repair-qty = sumq. *WA_FINAL1-RATE = SUMR. wa_repair-amt = suma. ****END OF CHANGES *IF LINES GT 1. message id sy-msgid type sy-msgty number sy-msgno with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. wa_repair-ntwt = ntwt. endif. *P_SUMAMT = SUMA + P_SUMAMT . if sy-subrc <> 0. *ENDIF. p_kursfamt = wa_yxp_invpre-kursf * p_sumamt. *WA_FINAL1-AMT = SUMA. call function 'BAPI_CURRENCY_CONV_TO_EXTERNAL' exporting currency = wa_yxp_item-waerk amount_internal = p_sumamt importing amount_external = netwr. clear it_final1[]. * *P_SUMQTY = SUMQ + P_SUMQTY . clear : sumq. **BREAK-POINT. it_final1[] = it_repair[]. *WA_FINAL1-QTY = SUMQ.

if wa_yxp_exptd_lic2-licensetype = 'DEPB' or wa_yxp_exptd_lic2-licensetype = 'ADVP'. p_kursfamt = netwr. elseif wa_yxp_exptd_lic2-licensetype = 'DBK1'. .m(2). *BREAK-POINT. string_n1 = 'UNDER DRAWBACK SCHEME AGAINST SR NO 630201. p_totfob = netwr. m = wa_yxp_exptd_lic2-licencedt+4(2). y = wa_yxp_exptd_lic2-licencedt+0(4). describe table it_final1 lines lines. call function 'BAPI_CURRENCY_CONV_TO_EXTERNAL' exporting currency = wa_yxp_item-waerk amount_internal = p_totfob importing amount_external = netwr. concatenate 'UNDER'' ' wa_yxp_exptd_lic2-licensetype ' ''SCHEME SR. data : d(2).m. p_totfob = p_kursfamt + wa_yxp_invpre-freight. *P_TOTFOB = P_KURSFAMT + WA_YXP_INVPRE-FREIGHT.'. concatenate d m y into date_inv separated by '. *BREAK-POINT. d = wa_yxp_exptd_lic2-licencedt+6(2). select single * from ylcesadr into iylcesadr where adrnr = it_ylcelcmst1-adrnr. * CONVERT DATE WA_YXP_EXPTD_LIC2-LICENCEDT * INTO INVERTED-DATE DATE_INV.d.' wa_yxp_exptd_lic2-lic_sion ' ''OF TEXTILE PRODUCT' into string_n1. * becuz freight will be entered in INR.amount_internal = p_kursfamt importing amount_external = netwr.y(4). clear : y.'. NO. data : date_inv(10). select * from yxp_exptd_lic into table it_yxp_exptd_lic where doc_nr = wa_yxp_invpre-auto_id and doc_clas = '0009'. loop at it_yxp_exptd_lic into wa_yxp_exptd_lic2.

'. endif. endloop. string_n1 = 'UNDER DRAWBACK SCHEME AGAINST SR NO 630402. elseif wa_yxp_exptd_lic2-licensetype = 'DBK5'. if wa_final1-const is not initial. endif. elseif wa_yxp_exptd_lic2-licensetype = 'EPCG' or wa_yxp_exptd_lic2licensetype = 'EPC1' or wa_yxp_exptd_lic2-licensetype = 'epc2' or wa_yxp_exptd_lic2licensetype = 'EPC3' or wa_yxp_exptd_lic2-licensetype = 'EPC4' or wa_yxp_exptd_lic2licensetype = 'EPC5'. elseif wa_yxp_exptd_lic2-licensetype = 'DBK4'.wa_yxp_exptd_lic2-licensetype = 'DBK2'.'. concatenate 'epcg licence no : 'wa_yxp_exptd_lic2licenceno ' date ' date_inv into string_n2. totamt = totamt + wa_final1-amt. endif.'. elseif wa_yxp_exptd_lic2-licensetype = 'DBK6' or wa_yxp_exptd_lic2-licensetype = 'DBK7' or wa_yxp_exptd_lic2-licensetype = 'DBK8' or wa_yxp_exptd_lic2-licensetype = 'DBK9' or wa_yxp_exptd_lic2-licensetype = 'DB10' or wa_yxp_exptd_lic2-licensetype = 'DB11' or wa_yxp_exptd_lic2-licensetype = 'DB12' or wa_yxp_exptd_lic2-licensetype = 'DB13'. string_n1 = 'UNDER DRAWBACK SCHEME AGAINST SR NO 630202. endif. tc = 'x'. const = 'x'. string_n1 = 'UNDER DRAWBACK SCHEME AGAINST SR NO 9404. if wa_final1-tc is not initial.'. elseif . gdesc = 'x'. string_n1 = 'UNDER DRAWBACK SCHEME AGAINST SR NO 560302. elseif wa_yxp_exptd_lic2-licensetype = 'DBK3'. if gdesc is initial. if tc is initial. if const is initial. elseif wa_yxp_exptd_lic2-licensetype = 'DB14'. if wa_final1-desc_good is not initial. endif. endif. string_n1 = 'UNDER DRAWBACK SCHEME AGAINST SR NO 630401. endloop.'. endif. loop at it_final1 into wa_final1. string_n1 = 'UNDER DRAWBACK SCHEME AGAINST SR NO 5811.'.

cotno = 'x'.exseal. loop at it_item into wa_item. if cotno is not initial. shseal = 'x'. clear wa_hdrinv-hdr2 . lcontsiz = 'con size'. lshseal = 'shiping seal no'. contsiz = 'x'. if cotno is initial. clear wa_hdrinv-hdr7. endif. if wa_item-contno is not initial. endif.cotno.shseal. endif. endif. if wa_item-cont_size is not initial. endif.wa_final1. endif. endif. if shseal is not initial. if tc is initial. if exseal is initial. if gdesc is initial. lcontno = 'container no'. endif. endif. if exseal is not initial or shseal is not initial or cotno is not initial or contsiz is not initial. . if wa_item-esealno is not initial. endif. endif. endif. endif. endif. clear: const. if contsiz is initial.tc. if shseal is initial. if contsiz is not initial. endif. int = int + 1. exseal = 'x'. endif. clear wa_hdrinv-hdr6. if wa_item-sealno1 is not initial. endloop.contsiz. lexseal = 'excise seal no'.if const is initial. if exseal is not initial.

enddo. int = int + 1. wa-int1 = int. append wa to it. clear i. i3 = i. do i1 times. *BREAK-POINT. endloop. loop at it_final1 into wa_final1.int. wa1-i1 = i. i2 = 20. endloop. line2 = i. int1 = int2 . loop at it_yxp_exptd_lic into wa_yxp_exptd_lic3. int3 = int. if wa_yxp_exptd_lic3-licensetype = 'depb' or wa_yxp_exptd_lic3-licensetype = 'dbk1' or wa_yxp_exptd_lic3-licensetype = 'dbk2' or wa_yxp_exptd_lic3-licensetype = 'dbk3' or wa_yxp_exptd_lic3-licensetype = 'dbk4' or wa_yxp_exptd_lic3-licensetype = 'dbk5' or wa_yxp_exptd_lic3-licensetype = 'dbk6' or wa_yxp_exptd_lic3-licensetype = 'dbk7' or wa_yxp_exptd_lic3-licensetype = 'dbk8' or wa_yxp_exptd_lic3-licensetype = 'dbk9' or wa_yxp_exptd_lic3-licensetype = 'db10' or wa_yxp_exptd_lic3-licensetype = 'db11' or wa_yxp_exptd_lic3-licensetype = 'db12' or wa_yxp_exptd_lic3-licensetype = 'db13' or wa_yxp_exptd_lic3-licensetype = 'db14'. i = i + 1. . int2 = 20. p_licprod = wa_yxp_exptd_lic3-lic_product. i1 = i2 . clear int. endif. enddo.line1 = int. i = i + 1. do int1 times.i. append wa1 to it1. select single landx into flandx from t005t where land1 = wa_yxp_shphd-cntry_dest and spras = 'e'.

tname = IT_YLCELCMST1-LC_REFNR. i = i . endif. i = i + 1. i1 = i2 . endloop. i2 = 20.20. i = i + 1. call function 'READ_TEXT' exporting CLIENT = SY-MANDT id = '0007' language = sy-langu name = tname object = 'YLCE' * ARCHIVE_HANDLE = 0 * LOCAL_CAT = ' ' * IMPORTING * HEADER = tables lines = tdline EXCEPTIONS ID = 1 LANGUAGE = 2 NAME = 3 NOT_FOUND = 4 OBJECT = 5 REFERENCE_CHECK = 6 WRONG_ACCESS_TO_ARCHIVE = 7 OTHERS = 8 . clear i. i3 = i. if sy-subrc <> 0.clear it2[]. append wa2 to it2. loop at it_final1 into wa_final1. . do i1 times. data tname type THEAD-TDNAME. enddo. wa2-i1 = i. endloop. * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.i.

message id sy-msgid type sy-msgty number sy-msgno . call function 'WS_DOWNLOAD' exporting bin_filesize filename filetype mode tables data_tab exceptions invalid_filesize invalid_table_width invalid_type no_batch unknown_error gui_refuse_filetransfer = = = = graphic_size 'C:\Windows\Temp\logo. form img_dwnld. call function 'SAPSCRIPT_CONVERT_BITMAP' exporting old_format = 'BDS' new_format = 'BMP' bitmap_file_bytecount_in = l_bytecount importing bitmap_file_bytecount = graphic_size tables bds_bitmap_file = l_content bitmap_file = graphic_table exceptions others = 1. call function 'SAPSCRIPT_GET_GRAPHIC_BDS' exporting i_object = 'GRAPHICS' i_name = 'ZWEL' "'ZPRUEBA' i_id = 'BMAP' i_btype = 'BCOL' importing e_bytecount = l_bytecount tables content = l_content exceptions not_found = 1 bds_get_failed = 2 bds_no_content = 3 others = 4.endform. if sy-subrc = 0.bmp' 'BIN' 'S' = graphic_table = = = = = = 1 2 3 4 5 6.

set property of h_cell 'HORIZONTALaLIGNMENT' = cel_halign. set property of h_cell 'VERTICALaLIGNMENT' = cel_valign. call method of h_excel 'CELLS' = h_cell no flush exporting #1 = i #2 = j. set property of h_cell 'VALUE' = val no flush. get property of h_cell 'INTERIOR' = h_color. "fill_cell *&---------------------------------------------------------------------* *& Form border_cell *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * -->R text * -->C text * -->MARGIN text * -->LSTYLE text * -->WIDTH text *----------------------------------------------------------------------* . get property of h_cell 'FONT' = h_font no flush. endif. endform. set property of h_font 'BOLD' = bold no flush. set property of h_font 'SIZE' = 8 no flush. endform. *&---------------------------------------------------------------------* *& Form export2xls *&---------------------------------------------------------------------* * text *&---------------------------------------------------------------------* *& Form fill_cell *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * -->I text * -->J text * -->BOLD text * -->VAL text * -->CEL_HALIGN text * -->CEL_VALIGN text * -->RCELL text *----------------------------------------------------------------------* "data line type i value 1. set property of h_color 'COLORiNDEX' = rcell.with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. form fill_cell using i j bold val cel_halign cel_valign rcell.

if sy-subrc <> 0. endform. call method of h_excel 'CELLS' = h_cell2 exporting #1 = r2 #2 = c2. "set property of h_cell 'ROWHEIGHT' = 11 no flush. free object h_border.form border_cell using r c margin lstyle width. set property of h_cell1 'rowheight' = 10. call method of h_cell 'borders' = h_border exporting #1 = margin. "left set property of h_border 'LINESTYLE' = lstyle. " set property of h_cell1 'rowheight' = 11. "border_range *&---------------------------------------------------------------------* *& Form err_hdl *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* form err_hdl. call method of h_excel 'CELLS' = h_cell1 exporting #1 = r1 #2 = c1. endform. call method of h_excel 'CELLS' = h_cell exporting #1 = r #2 = c. set property of h_border 'weight' = width. set property of h_cell1 'rowheight' = 10. "border_cell *&---------------------------------------------------------------------* *& Form border_range *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * -->R1 text * -->C1 text * -->R2 text * -->C2 text *----------------------------------------------------------------------* form border_range using r1 c1 r2 c2. . call method of h_excel 'RANGE' = h_cell exporting #1 = h_cell1 #2 = h_cell2.

perform err_hdl.' type 'E'. call method of h_wrkbookl 'ADD' = h_wrkbook. stop. set property of h_excel 'DISPLAYALERTS' = 0. free object h_excel. call method of h_excel 'ACTIVESHEET' = h_activesheet.APPLICATION'. set property of h_pagesetup 'TopMargin' = 4. call function 'SAPGUI_PROGRESS_INDICATOR' exporting text = 'Processing. h_excel-handle = -1.' exceptions others = 1. data : h type sy-tabix. create object h_excel 'EXCEL. perform err_hdl. set property of h_excel 'VISIBLE' = 0. endif.. perform getdata_inv. "err_hdl >>>>>>>>>>>>>INCLUDE MYEXCEL01 >>>>>>start>>>>>>> >>>>>>>>>>>>>INCLUDE MYEXCEL_PRESHP_PACK >>>>>>start>>>>>>> *&---------------------------------------------------------------------* *& Include MYEXCEL_PRESHP_PACK *&---------------------------------------------------------------------* form excel_preshp_pack.. perform err_hdl. . endform.call method of h_excel 'quit'. call method of h_excel 'WORKBOOKS' = h_wrkbookl. set property of h_activesheet 'NAME' = 'Pre-shipment Invoice'. message : 'FAILED TO EXPORT TO EXCEL. get property of h_activesheet 'PAGESETUP' = h_pagesetup.

free object h_column. set property of h_column 'COLUMNWIDTH' = 7. set property of h_pagesetup 'RIGHTMARGIN' = 4. set property of h_column 'COLUMNWIDTH' = 9. "top set property of h_border 'LINESTYLE' = '1'. m = 1. set property of h_column 'COLUMNWIDTH' = 6. call method of h_excel 'COLUMNS' = h_column exporting #1 = 'a'. set property of h_pagesetup 'ORIENTATION' = 1. call method of h_excel 'COLUMNS' = h_column exporting #1 = 'c'. call method of h_excel 'COLUMNS' = h_column exporting #1 = 'e'. set property of h_column 'COLUMNWIDTH' = 8. call method of h_excel 'COLUMNS' = h_column exporting #1 = 'g'. loop at it_yxp_invpre into wa_yxp_invpre. set property of h_column 'COLUMNWIDTH' = 13. call method of h_excel 'COLUMNS' = h_column exporting #1 = 'b'. set property of h_column 'COLUMNWIDTH' = 10.set property of h_pagesetup 'BOTTOMMARGIN' = 2. free object h_column. call method of h_cell 'borders' = h_border . free object h_column. set property of h_pagesetup 'RIGHTFOOTER' = 'Page &P of &N'. call method of h_excel 'COLUMNS' = h_column exporting #1 = 'j'. perform border_range using m 1 m 10. free object h_column. free object h_column. set property of h_border 'weight' = 2. set property of h_pagesetup 'PrintTitleRows' = '$1:$32'. free object h_border. call method of h_cell 'borders' = h_border exporting #1 = '3'. free object h_column. free object h_column. free object h_column. free object h_column. set property of h_column 'COLUMNWIDTH' = 8. set property of h_pagesetup 'FOOTERMARGIN' = 4. set property of h_column 'COLUMNWIDTH' = 10. call method of h_excel 'COLUMNS' = h_column exporting #1 = 'h'. free object h_column. call method of h_excel 'COLUMNS' = h_column exporting #1 = 'd'. call method of h_excel 'COLUMNS' = h_column exporting #1 = 'i'. set property of h_pagesetup 'LEFTMARGIN' = 4. set property of h_column 'COLUMNWIDTH' = 9. set property of h_pagesetup 'HEADERMARGIN' = 4. set property of h_column 'COLUMNwIDTH' = 11. call method of h_excel 'COLUMNS' = h_column exporting #1 = 'f'.

call method of h_cell 'MERGE'. call method of h_excel 'Worksheets' = h_activesheet exporting #1 = 1.bmp' "image file name on presentation server #2 = m #3 = '1' #4 = 170 "left #5 = 12 "top #6 = 80 "right #7 = 45. perform fill_cell using m 1 0 '' xlleft xlcenter 0. perform border_range using m 5 m 6. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. perform border_cell using m 1 '1' '1' 2. perform border_range using m 1 m 3. call method of h_activesheet 'Activate'. call method of h_cell 'MERGE'. free object h_border. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. perform border_cell using m 5 '2' '1' 2. set property of h_border 'weight' = 2. perform border_range using m 4 m 5. perform border_range using m 7 m 10. . perform fill_cell using m 7 0 '' xlright xlcenter 0. perform border_cell using m 10 '2' '1' 2. "top set property of h_border 'LINESTYLE' = '1'. perform border_range using m 1 m 2. perform fill_cell using m 5 1 'PACKING LIST' xlcenter xlcenter 0. m = m + 1. perform fill_cell using m 1 1 'Range:' xlleft xlcenter 0. perform border_range using m 6 m 10. call method of h_cell 'SELECT'. perform border_cell using m 10 '2' '1' 2. perform border_cell using m 1 '1' '1' 2. call method of h_cell 'MERGE'.exporting #1 = '4'. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. call method of h_cell 'SELECT'. call method of shapes 'AddPicture' exporting #1 = 'C:\Windows\Temp\logo. call method of h_cell 'SELECT'. "bottom m = m + 1. get property of h_activesheet 'Shapes' = shapes.

perform border_cell using m 1 '1' '1' 2. perform border_range using m 6 m 10. perform border_cell using m 1 '1' '1' 2. concatenate exdat1+6(2) exdat1+4(2) exdat1(4) into text3 separated by '. m = m + 1. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. perform border_range using m 4 m 5. perform fill_cell using m 1 1 'Division:' xlleft xlcenter 0. perform border_range using m 1 m 3. call method of h_cell 'MERGE'. call method of h_cell 'MERGE'. perform border_range using m 6 m 10. perform border_cell using m 5 '2' '1' 2. perform border_cell using m 5 '2' '1' 2. .Off. call method of h_cell 'SELECT'.' xlleft xlcenter 0. clear text3. concatenate 'Date & Time of Removal:' text3 into text3. call method of h_cell 'MERGE'. call method of h_cell 'SELECT'.'. perform fill_cell using m 6 0 text3 xlleft xlcenter 0. perform border_range using m 4 m 5. perform border_range using m 6 m 10. call method of h_cell 'SELECT'.clear text3. perform border_cell using m 10 '2' '1' 2. perform border_cell using m 1 '1' '1' 2. call method of h_cell 'MERGE'. call method of h_cell 'MERGE'. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. perform fill_cell using m 1 1 'Corp. perform border_range using m 1 m 3. call method of h_cell 'SELECT'. perform border_range using m 1 m 3. m = m + 1. call method of h_cell 'MERGE'. call method of h_cell 'SELECT'. m = m + 1. perform border_cell using m 5 '2' '1' 2. perform border_range using m 4 m 5. call method of h_cell 'MERGE'. clear text3. call method of h_cell 'SELECT'. perform border_cell using m 10 '2' '1' 2. perform border_cell using m 10 '2' '1' 2. call method of h_cell 'SELECT'. perform fill_cell using m 1 0 eadrc-name1 xlleft xlcenter 0.

call method of h_cell 'MERGE'. perform border_range using m 1 m 3. call method of h_cell 'MERGE'. m = m + 1. call method of h_cell 'MERGE'. call method of h_cell 'MERGE'. concatenate eadrc-city1 eadrc-post_code1 into text3. perform border_range using m 4 m 5. perform border_cell using m 1 '1' '1' 2. perform border_range using m 4 m 5. perform border_cell using m 10 '2' '1' 2. perform border_range using m 6 m 10. call method of h_cell 'MERGE'. call method of h_cell 'SELECT'. perform fill_cell using m 1 0 eadrc-name4 xlleft xlcenter 0. call method of h_cell 'SELECT'. perform border_cell using m 5 '2' '1' 2. concatenate 'I. perform border_range using m 6 m 10. call method of h_cell 'borders' = h_border exporting . call method of h_cell 'MERGE'. perform border_cell using m 10 '2' '1' 2. concatenate eadrc-name2 eadrc-name3 into text3. m = m + 1. call method of h_cell 'MERGE'. call method of h_cell 'SELECT'. perform fill_cell using m 1 0 text3 xlleft xlcenter 0. call method of h_cell 'SELECT'.perform border_range using m 1 m 3.No:' ' ' text2 into text3. perform border_cell using m 5 '2' '1' 2. call method of h_cell 'MERGE'. perform border_range using m 1 m 10. perform fill_cell using m 6 0 text3 xlleft xlcenter 0. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. perform border_range using m 1 m 3.C. call method of h_cell 'SELECT'. call method of h_cell 'SELECT'. perform fill_cell using m 1 0 text3 xlleft xlcenter 0. perform border_cell using m 1 '1' '1' 2. call method of h_cell 'SELECT'. perform border_range using m 4 m 5. perform border_cell using m 5 '2' '1' 2. perform border_cell using m 1 '1' '1' 2. call method of h_cell 'SELECT'. perform border_range using m 6 m 10. clear text3. perform border_cell using m 10 '2' '1' 2.E.

perform fill_cell using m 1 0 it_adrc-name1 xlleft xlcenter 0. perform border_cell using m 1 '1' '1' 2. perform border_range using m 6 m 10.#1 = '4'. perform border_cell using m 5 '2' '1' 2. concatenate wa_yxp_invpre-audat+6(2) wa_yxp_invpreaudat+4(2) wa_yxp_invpre-audat(4) into text3 separated by '. perform border_cell using m 1 '1' '1' 2. perform fill_cell using m 6 0 text3 xlleft xlcenter 0. call method of h_cell 'SELECT'. perform border_range using m 6 m 10. call method of h_cell 'MERGE'.'. call method of h_cell 'SELECT'. m = m + 1. call method of h_cell 'SELECT'. . call method of h_cell 'SELECT'. m = m + 1. perform border_cell using m 10 '2' '1' 2. concatenate wa_yxp_shphd-aredt+6(2) wa_yxp_shphdaredt+4(2) wa_yxp_shphd-aredt(4) into text3 separated by '. concatenate 'Invoice No & Date :' wa_yxp_invpreauto_id ' Date :' text3 into text3 separated by ' '. call method of h_cell 'MERGE'. call method of h_cell 'MERGE'. perform border_range using m 1 m 5. m = m + 1. & Date :' wa_yxp_shphdar4_number 'Date :' text3 into text3 separated by ' '. free object h_border. perform fill_cell using m 1 1 'Exporter:' xlleft xlcenter 0. clear text3. call method of h_cell 'MERGE'. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. perform border_cell using m 10 '2' '1' 2. perform fill_cell using m 6 0 text3 xlleft xlcenter 0. call method of h_cell 'SELECT'. "top set property of h_border 'LINESTYLE' = '1'.'. clear text3. perform border_cell using m 1 '1' '1' 2. perform border_range using m 6 m 10. perform fill_cell using m 1 0 it_adrc-street xlleft xlcenter 0. concatenate 'ARE No. set property of h_border 'weight' = 2. perform border_cell using m 5 '2' '1' 2. perform border_range using m 1 m 5. call method of h_cell 'MERGE'. perform border_range using m 1 m 5.

clear text3.perform border_cell using m 10 '2' '1' 2. . perform border_cell using m 10 '2' '1' 2. perform border_cell using m 10 '2' '1' 2. perform border_cell using m 1 '1' '1' 2. perform fill_cell using m 1 0 text3 xlleft xlcenter 0. call method of h_cell 'SELECT'. concatenate it_adrc-str_suppl3 it_adrccity1 into text3 separated by '. call method of h_cell 'SELECT'.'. call method of h_cell 'MERGE'. perform border_cell using m 5 '2' '1' 2. perform border_cell using m 10 '2' '1' 2. perform border_range using m 1 m 5. call method of h_cell 'SELECT'. perform border_range using m 6 m 10. perform border_range using m 1 m 5. call method of h_cell 'SELECT'. call method of h_cell 'SELECT'. m = m + 1.'. concatenate it_adrc-city2 it_adrcpost_code1 into text3 separated by '. perform border_range using m 1 m 5. perform border_range using m 6 m 10. call method of h_cell 'MERGE'. perform border_cell using m 5 '2' '1' 2. perform fill_cell using m 6 0 text3 xlleft xlcenter 0. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. perform border_range using m 1 m 5. perform fill_cell using m 1 1 'Supporting Manufacturer:' xlleft xlcente r 0. perform border_cell using m 1 '1' '1' 2. perform fill_cell using m 1 0 text3 xlleft xlcenter 0. perform border_range using m 6 m 10. perform border_cell using m 5 '2' '1' 2. perform border_cell using m 5 '2' '1' 2. clear text3. m = m + 1. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. call method of h_cell 'MERGE'. concatenate 'Sales Order No :' sales into text3 separated by ' '. call method of h_cell 'MERGE'. m = m + 1. m = m + 1. perform border_cell using m 1 '1' '1' 2.

call method of h_cell 'SELECT'. perform border_cell using m 10 '2' '1' 2. concatenate madrc-city1 madrc-post_code1 into text3 separated by '. call method of h_cell 'SELECT'. perform border_cell using m 5 '2' '1' 2. call method of h_cell 'SELECT'. perform border_cell using m 10 '2' '1' 2. perform fill_cell using m 1 0 madrc-street xlleft xlcenter 0. perform border_cell using m 5 '2' '1' 2. perform border_range using m 6 m 10. call method of h_cell 'MERGE'. perform border_cell using m 10 '2' '1' 2. perform border_cell using m 1 '1' '1' 2. perform border_cell using m 1 '1' '1' 2. perform fill_cell using m 1 0 text3 xlleft xlcenter 0. "top . perform border_cell using m 5 '2' '1' 2. call method of h_cell 'MERGE'. perform fill_cell using m 1 0 text3 xlleft xlcenter 0.'. perform border_range using m 6 m 10. perform border_range using m 6 m 10. call method of h_cell 'MERGE'. perform border_cell using m 1 '1' '1' 2. m = m + 1. perform border_range using m 1 m 5. perform border_range using m 1 m 5. call method of h_cell 'MERGE'. call method of h_cell 'borders' = h_border exporting #1 = '3'. perform border_range using m 6 m 10. perform border_range using m 1 m 5.call method of h_cell 'MERGE'. m = m + 1. call method of h_cell 'SELECT'. concatenate madrc-str_suppl3 madrc-city2 into text3 separated by '.'. perform border_cell using m 10 '2' '1' 2. call method of h_cell 'SELECT'. perform border_cell using m 1 '1' '1' 2. call method of h_cell 'SELECT'. perform fill_cell using m 1 0 madrc-name1 xlleft xlcenter 0. concatenate 'Buyer Oreder No. call method of h_cell 'SELECT'. perform border_range using m 6 m 10. call method of h_cell 'MERGE'. call method of h_cell 'MERGE'. call method of h_cell 'MERGE'. perform fill_cell using m 6 0 text3 xlleft xlcenter 0. perform border_cell using m 5 '2' '1' 2.:' bstkd into text3 separated by ' '. m = m + 1.

perform border_cell using m 10 '2' '1' 2. perform border_cell using m 5 '2' '1' 2. m = m + 1. call method of h_cell 'MERGE'. perform border_cell using m 1 '1' '1' 2. set property of h_border 'weight' = 2. perform border_range using m 1 m 10. perform border_range using m 6 m 10. perform border_range using m 1 m 5. free object h_border. call method of h_cell 'SELECT'.set property of h_border 'LINESTYLE' = '1'. perform fill_cell using m 6 0 sadrc-name1 xlleft xlcenter 0. perform border_range using m 6 m 10. call method of h_cell 'SELECT'. set property of h_cell 'wraptext' = 1. concatenate sadrc-name2 sadrc-name3 sadrc-name4 into text3. perform border_cell using m 10 '2' '1' 2. set property of h_cell 'wraptext' = 1. call method of h_cell 'SELECT'. perform border_range using m 6 n 10. call method of h_cell 'SELECT'. m = m + 1. call method of h_cell 'MERGE'. concatenate cadrc-name2 cadrc-name3 cadrc-name4 into text3. perform fill_cell using m 1 0 text3 xlleft xlcenter 0. call method of h_cell 'MERGE'. perform border_range using m 1 m 5. call method of h_cell 'SELECT'. n = m + 1. perform fill_cell using m 1 0 cadrc-name1 xlleft xlcenter 0. perform border_cell using m 5 '2' '1' 2. set property of h_border 'weight' = 2. perform fill_cell using m 6 0 text3 xlleft xlcenter 0. call method of h_cell 'MERGE'. perform border_range using m 1 n 5. call method of h_cell 'SELECT'. perform fill_cell using m 6 1 'Buyer(If other than Consignee)' xlleft x lcenter 0. call method of h_cell 'borders' = h_border exporting #1 = '4'. perform border_cell using m 1 '1' '1' 2. . call method of h_cell 'MERGE'. perform fill_cell using m 1 1 'Consignee:' xlleft xlcenter 0. "top set property of h_border 'LINESTYLE' = '1'. m = m + 1. free object h_border. call method of h_cell 'MERGE'.

perform border_cell using m 1 '1' '1' 2. perform border_range using m 6 m 10. call method of h_cell 'borders' = h_border exporting #1 = '3'. call method of h_cell 'SELECT'. perform border_range using m 1 m 5. . call method of h_cell 'SELECT'. call method of h_cell 'SELECT'. concatenate 'Notify1: ' nadrc1-name1 nadrc1-name2 nadrc1-name3 nadrc1name4 nadrc1-city1 nadrc1-city2 into text3. call method of h_cell 'MERGE'. set property of h_border 'weight' = 2. perform border_cell using n 10 '2' '1' 2. call method of h_cell 'SELECT'. perform border_range using m 1 m 5. perform border_range using m 6 m 10. perform border_range using m 1 m 5. perform fill_cell using m 6 0 text3 xlleft xlcenter 0. perform border_cell using n 1 '1' '1' 2. perform border_cell using m 1 '1' '1' 2. perform border_cell using m 5 '2' '1' 2. perform border_cell using m 1 '1' '1' 2. perform border_cell using m 10 '2' '1' 2. call method of h_cell 'MERGE'. call method of h_cell 'MERGE'. free object h_border. perform border_cell using m 10 '2' '1' 2. concatenate 'Notify1: ' nadrc2-name1 nadrc2-name2 nadrc2-name3 nadrc2name4 nadrc2-city1 nadrc2-city2 into text3. perform border_range using m 6 m 10. call method of h_cell 'SELECT'. m = m + 1. call method of h_cell 'MERGE'. perform fill_cell using m 6 0 text3 xlleft xlcenter 0. perform border_cell using m 5 '2' '1' 2. perform border_range using m 6 m 10. "top set property of h_border 'LINESTYLE' = '1'. m = m + 1. call method of h_cell 'SELECT'. perform border_cell using n 5 '2' '1' 2. call method of h_cell 'MERGE'. call method of h_cell 'MERGE'. m = m + 1.

call method of h_cell 'SELECT'. perform border_cell using m 10 '2' '1' 2. perform border_range using m 8 m 10. perform border_range using m 1 m 2. perform border_range using m 1 m 2. call method of h_cell 'MERGE'. call method of h_cell 'SELECT'. perform border_range using m 1 m 10. "top set property of h_border 'LINESTYLE' = '1'. perform fill_cell using m 1 0 'Pre-carriage By :' xlleft xlcenter 0. perform border_range using m 3 m 5. call method of h_cell 'SELECT'. call method of h_cell 'SELECT'. perform border_cell using m 2 '2' '1' 2. call method of h_cell 'MERGE'. perform fill_cell using m 8 0 'Country of Final Destination: ' xlleft x lcenter 0. call method of h_cell 'borders' = h_border exporting #1 = '4'. call method of h_cell 'MERGE'. perform border_range using m 6 m 10. free object h_border. call method of h_cell 'MERGE'. perform border_cell using m 5 '2' '1' 2. perform fill_cell using m 1 0 text3 xlleft xlcenter 0. perform border_range using m 6 m 7. set property of h_border 'weight' = 2. perform fill_cell using m 6 0 'Country of Origin of Goods: ' xlleft xlc enter 0. call method of h_cell 'SELECT'. m = m + 1. call method of h_cell 'MERGE'. perform border_cell using m 5 '2' '1' 2. perform fill_cell using m 3 0 'Place of Reciept By Precarrier :' xlleft xlcenter 0. perform border_range using m 3 m 5. m = m + 1. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. perform border_cell using m 1 '1' '1' 2. perform border_cell using m 7 '2' '1' 2.perform border_cell using m 10 '2' '1' 2. concatenate wa_yxp_shphd-vehcl_from wa_yxp_shphd-vehcl_to into text3. .

perform perform perform perform perform m border_cell border_cell border_cell border_cell border_cell = m + 1. into text3 sep . perform fill_cell using m 1 0 'Vessel/Flight #:' xlleft xlcenter 0. call method of h_cell 'MERGE'. free object h_border. perform fill_cell using m 3 0 'Port of Loading:' xlleft xlcenter 0. perform border_range using m 1 m 10. call method of h_cell 'SELECT'. call method of h_cell 'SELECT'. call method of h_cell 'SELECT'. 10 '2' '1' 2. using using using using using m m m m m 1 '1' '1' 2. concatenate 'Terms of Delivery and Payment : ' string1 arated by ' '. perform fill_cell using m 8 0 flandx xlleft xlcenter 0. perform border_cell using m 2 '2' '1' 2. perform border_range using m 6 m 7. perform border_cell using m 10 '2' '1' 2. call method of h_cell 'borders' = h_border exporting #1 = '4'. perform border_range using m 6 m 10. 7 '2' '1' 2. perform border_cell using m 1 '1' '1' 2. perform border_range using m 1 m 2. perform border_cell using m 7 '2' '1' 2. call method of h_cell 'MERGE'. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. "top set property of h_border 'LINESTYLE' = '1'. perform fill_cell using m 6 0 text3 xlleft xlcenter 0. perform border_range using m 8 m 10.perform fill_cell using m 3 0 precarrier xlleft xlcenter 0. perform border_range using m 3 m 5. 2 '2' '1' 2. 5 '2' '1' 2. perform fill_cell using m 6 0 'India' xlleft xlcenter 0. call method of h_cell 'MERGE'. set property of h_border 'weight' = 2. call method of h_cell 'MERGE'. perform border_cell using m 5 '2' '1' 2. call method of h_cell 'SELECT'. m = m + 1.

perform border_cell using m 1 '1' '1' 2. call method of h_cell 'MERGE'. call method of h_cell 'MERGE'. perform border_range using m 1 m 10. call method of h_cell 'MERGE'. call method of h_cell 'SELECT'. concatenate vessel wa_yxp_shphd-voy_fly_no into text3. concatenate 'LC No : ' it_ylcelcmst1lc_number into text3 separated by ' '. perform border_range using m 3 m 5. m = m + 1. perform fill_cell using m 6 0 text3 xlleft xlcenter 0. perform border_cell using m 10 '2' '1' 2. call method of h_cell 'SELECT'. free object h_border. call method of h_cell 'SELECT'. perform fill_cell using m 1 0 text3 xlleft xlcenter 0. perform fill_cell using m 3 0 wa_yxp_shphd-port_load xlleft xlcenter 0.perform border_range using m 1 m 2. concatenate 'Banker: ' wa_yxp_invpre-advbank into text3. set property of h_border 'weight' = 2. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. perform border_range using m 6 m 10. call method of h_cell 'SELECT'. perform border_range using m 3 m 5. perform fill_cell using m 1 0 'Port Of Discharge:' xlleft xlcenter 0. call method of h_cell 'SELECT'. . perform border_range using m 6 m 10. perform border_cell using m 2 '2' '1' 2. call method of h_cell 'MERGE'. call method of h_cell 'borders' = h_border exporting #1 = '4'. perform border_cell using m 1 '1' '1' 2. perform border_cell using m 7 '2' '1' 2. perform fill_cell using m 3 0 'Final Destination:' xlleft xlcenter 0. perform border_cell using m 5 '2' '1' 2. perform border_range using m 1 m 2. perform fill_cell using m 6 0 text3 xlleft xlcenter 0. call method of h_cell 'MERGE'. "top set property of h_border 'LINESTYLE' = '1'.

call method of h_cell 'borders' = h_border exporting #1 = '4'. perform fill_cell using m 3 0 wa_yxp_shphdfin_destin xlleft xlcenter 0. call method of h_cell 'MERGE'. perform border_cell using m 1 '1' '1' 2. perform border_range using m 1 m 10. . call method of h_cell 'MERGE'. perform fill_cell using m 1 0 text3 xlleft xlcenter 0. perform border_cell using m 2 '2' '1' 2. m = m + 1. free object h_border. perform border_cell using m 7 '2' '1' 2. perform border_cell using m 7 '2' '1' 2. m = m + 1. perform border_cell using m 5 '2' '1' 2. call method of h_cell 'SELECT'. clear text3. perform fill_cell using m 6 0 'Insurance Cover No & Date :' enter 0. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. perform border_range using m 3 m 5. perform border_range using m 6 m 10. call method of h_cell 'SELECT'. xlleft xlc perform border_cell using m 1 '1' '1' 2. perform border_range using m 6 m 10. perform fill_cell using m 1 0 wa_yxp_shphdport_dschr xlleft xlcenter 0. "top set property of h_border 'LINESTYLE' = '1'. perform border_cell using m 10 '2' '1' 2. call method of h_cell 'MERGE'. perform border_cell using m 5 '2' '1' 2. perform fill_cell using m 6 0 text3 xlleft xlcenter 0. perform border_cell using m 10 '2' '1' 2. set property of h_border 'weight' = 2. call method of h_cell 'SELECT'. concatenate 'Name of commodity:' p_licprod into text3.perform border_cell using m 2 '2' '1' 2. perform border_cell using m 10 '2' '1' 2. perform border_range using m 1 m 2. perform border_range using m 1 m 5. call method of h_cell 'MERGE'. call method of h_cell 'SELECT'. concatenate 'Freight Terms : ' inco1 wa_yxp_shphd-shp_type into text3.

set property of h_cell2 'rowheight' = 30 no flush.Weight' xlcenter xltop 0. set property of h_cell 'wraptext' = 1. perform fill_cell using m 4 0 wa_hdrinv-hdr4 xlcenter xltop 0. set property of h_cell 'wraptext' = 1. *perform fill_cell using m 9 0 wa_hdrinv-hdr9 xlcenter xltop 0. *perform fill_cell using m 8 0 wa_hdrinv-hdr8 xlcenter xltop 0. free object h_border. set property of h_cell1 'rowheight' = 30 no flush. set property of h_cell2 'rowheight' = 30 no flush. set property of h_cell1 'rowheight' = 30 no flush. set property of h_cell 'wraptext' = 1. set property of h_border 'weight' = 2. perform fill_cell using m 7 0 'Nt. perform fill_cell using m 5 0 wa_hdrinv-hdr5 xlcenter xltop 0. call method of h_cell 'MERGE'. perform border_range using m 1 m 10. perform fill_cell using m 9 0 wa_hdrinv-hdr8 xlcenter xltop 0. "bottom set property of h_border 'LINESTYLE' = '1'. call method of h_cell 'MERGE'. perform border_range using m 5 m 6. call method of h_cell 'SELECT'. perform fill_cell using m 2 0 wa_hdrinv-hdr2 xlcenter xltop 0. set property of h_cell2 'rowheight' = 30 no flush. call method of h_cell 'borders' = h_border exporting #1 = '4'. call method of h_cell 'MERGE'. call method of h_cell 'SELECT'. call method of h_cell 'borders' = h_border exporting #1 = '4'. perform fill_cell using m 1 0 wa_hdrinv-hdr1 xlcenter xltop 0. call method of h_cell 'SELECT'. m = m + 1. set property of h_border 'weight' = 2. set property of h_cell2 'rowheight' = 30 no flush. perform fill_cell using m 3 0 wa_hdrinv-hdr3 xlcenter xltop 0.perform border_cell using m 5 '2' '1' 2. set property of h_cell1 'rowheight' = 30 no flush. "top set property of h_border 'LINESTYLE' = '1'. set property of h_cell1 'rowheight' = 30 no flush. perform border_range using m 9 m 10. call method of h_cell 'SELECT'. perform border_range using m 1 m 10. . set property of h_cell 'wraptext' = 1. free object h_border. perform border_range using m 7 m 8.

*perform fill_cell using m 10 0 wa_hdrinv-hdr10 xlcenter xltop 0. sel_1 = m + 1. perform fill_cell using m 5 0 wa_final1-typ xlcenter xlcenter 0. call method of h_cell 'SELECT'. * concatenate text3 text4 into text3 separated by ':'. perform border_range using m 9 m 10. perform border_cell using m 1 '2' '1' 2. perform border_cell using m 3 '2' '1' 2. call method of h_cell 'SELECT'. * text4 = m.000'. data tab type i value 0. m = m + 1. call method of h_cell 'MERGE'. perform border_cell using m 1 '1' '1' 2.000'. perform fill_cell using m 2 0 wa_final1-desc_good xlcenter xlcenter 0. ""wa_final1- . perform fill_cell using m 1 0 wa_final1-hs_code xlleft xlcenter 0. set property of h_cell 'numberformat' = '#0. perform border_range using m 5 m 6. * concatenate text4 ')' into text4. perform border_range using m 1 m 10. call method of h_cell 'MERGE'. perform border_range using m 7 m 8. * *perform fill_cell using m 10 0 text3 xlright xlcenter 0. loop at it_final1 into wa_final1. *perform fill_cell using m 9 0 exrate xlright xlcenter 0. perform fill_cell using m 4 0 wa_final1-gsm xlcenter xlcenter 0. perform fill_cell using m 9 0 wa_final1-qty xlright xlcenter 0. tab = tab + 1. *clear exrate. call method of h_cell 'MERGE'. perform border_cell using m 9 '2' '1' 2. perform border_cell using m 6 '2' '1' 2. perform border_cell using m 10 '2' '1' 2. perform border_cell using m 7 '2' '1' 2. * text3 = m.000. * concatenate 'i' text4 into text4. call method of h_cell 'SELECT'. * concatenate 'h' text3 into text3. set property of h_cell 'numberformat' = '#0. perform border_cell using m 5 '2' '1' 2. perform border_cell using m 2 '2' '1' 2. * concatenate '(' text3 into text3. *exrate = wa_final1-rate. perform border_cell using m 4 '2' '1' 2. perform fill_cell using m 3 0 wa_final1-size xlcenter xlcenter 0. perform border_cell using m 8 '2' '1' 2. perform fill_cell using m 7 0 wa_final1-ntwt xlcenter xlcenter 0. * concatenate '=' text3 into text3 separated by 'product'.

perform border_range using m 7 m 8. m = m + 1. perform border_cell using m 9 '2' '1' 2. perform border_cell using m 8 '2' '1' 2. sel_2 = sel_1 + tab . perform border_cell using m 9 '2' '1' 2. perform border_cell using m 4 '2' '1' 2. perform border_range using m 5 m 6. perform border_cell using m 1 '2' '1' 2.amt from sap *set property of h_cell 'numberformat' = '#0. call method of h_cell 'borders' = h_border exporting #1 = '3'. enddo. perform border_cell using m 6 '2' '1' 2. "============================for blank lines=================== if tab le 25. perform border_cell using m 5 '2' '1' 2. perform border_cell using m 10 '2' '1' 2.1. perform border_cell using m 1 '1' '1' 2. "==========================end ================================ m = m + 1. perform border_cell using m 10 '2' '1' 2. call method of h_cell 'MERGE'. perform border_cell using m 1 '1' '1' 2. "top . perform border_cell using m 8 '2' '1' 2. perform border_cell using m 1 '2' '1' 2. perform border_cell using m 7 '2' '1' 2. call method of h_cell 'MERGE'.00'. perform border_cell using m 5 '2' '1' 2.000.tab. call method of h_cell 'SELECT'. perform border_cell using m 7 '2' '1' 2. endloop. endif. perform border_cell using m 4 '2' '1' 2. call method of h_cell 'MERGE'. perform border_range using m 9 m 10. tab = 25 . perform border_cell using m 3 '2' '1' 2. call method of h_cell 'SELECT'. perform border_cell using m 2 '2' '1' 2. perform border_cell using m 6 '2' '1' 2. perform border_range using m 1 m 10. perform border_range using m 1 m 10. perform border_cell using m 3 '2' '1' 2. perform border_cell using m 2 '2' '1' 2. call method of h_cell 'SELECT'. do tab times.

text4 = sel_2.000'. concatenate '=' text3 into text3 separated by 'sum'. perform fill_cell using m 5 0 '' xlleft xlcenter 0. call method of h_cell 'SELECT'. concatenate '(' text3 into text3. perform border_range using m 5 m 6. call method of h_cell 'MERGE'. call method of h_cell 'MERGE'. set property of h_cell 'numberformat' = '#00. call method of h_cell 'MERGE'. concatenate '=' text3 into text3 separated by 'sum'. concatenate 'i' text3 into text3. call method of h_cell 'SELECT'. text4 = sel_2. tot_qty = text3. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. data tot_qty type string. concatenate text3 text4 into text3 separated by ':'. concatenate text3 text4 into text3 separated by ':'. free object h_border.000'. perform border_range using m 9 m 10. perform border_range using m 7 m 8. call method of h_cell 'SELECT'. perform fill_cell using m 7 0 text3 xlleft xlcenter 0.000. concatenate 'g' text4 into text4. call method of h_cell 'MERGE'. perform border_range using m 3 m 4. " for quantity text3 = sel_1. concatenate 'g' text3 into text3. text4 = p_grosswt. perform fill_cell using m 3 0 'No&Kind of Pkgs. . text3 = sel_1.:' xlleft xlcenter 0. perform border_range using m 1 m 2. set property of h_border 'weight' = 2. concatenate text4 ')' into text4. concatenate 'Gross Weight:' text4 into text3 separated by ' '. set property of h_cell 'numberformat' = '#0. concatenate 'i' text4 into text4. perform fill_cell using m 1 0 text3 xlleft xlcenter 0. call method of h_cell 'SELECT'. concatenate text4 ')' into text4.set property of h_border 'LINESTYLE' = '1'. concatenate '(' text3 into text3. perform fill_cell using m 9 0 text3 xlleft xlcenter 0.

perform fill_cell using m 3 0 text3 xlleft xlcenter 0. perform border_range using m 5 m 6. perform border_cell using m 4 '2' '1' 2. concatenate carton wa_yxp_invpre-pack_type into text3 separated by ' '. perform border_cell using m 4 '2' '1' 2. set property of h_cell 'numberformat' = '#00. perform fill_cell using m 7 0 '' xlleft xlcenter 0. perform border_cell using m 5 '2' '1' 2. data tot_amt type string. call method of h_cell 'SELECT'. . perform fill_cell using m 5 0 'Total' xlleft xlcenter 0. concatenate wa_yxp_invpre-no_pack ' ' wa_yxp_invpre-pack_type into text3. perform fill_cell using m 1 0 text3 xlleft xlcenter 0. call method of h_cell 'MERGE'.000. perform border_cell using m 5 '2' '1' 2. else. call method of h_cell 'SELECT'. perform border_range using m 7 m 8. text4 = p_ntgew. perform border_cell using m 2 '2' '1' 2. call method of h_cell 'MERGE'. perform border_cell using m 2 '2' '1' 2.00'. call method of h_cell 'SELECT'. call method of h_cell 'borders' = h_border exporting #1 = '4'. perform border_cell using m 1 '1' '1' 2. call method of h_cell 'SELECT'. perform fill_cell using m 3 0 text3 xlleft xlcenter 0. call method of h_cell 'MERGE'. perform border_cell using m 7 '2' '1' 2. if wa_yxp_invpre-pack_type eq ''. perform border_range using m 1 m 10. tot_amt = text3. perform border_cell using m 1 '1' '1' 2. perform border_cell using m 10 '2' '1' 2. endif.set property of h_cell 'numberformat' = '#00.000. call method of h_cell 'MERGE'.000'. free object h_border. perform border_range using m 3 m 4. set property of h_border 'weight' = 2. perform border_range using m 1 m 2. m = m + 1. perform border_cell using m 8 '2' '1' 2. "top set property of h_border 'LINESTYLE' = '1'. concatenate 'Net Weight:' text4 into text3 separated by ' '.

perform border_cell using m 7 '2' '1' 2. perform border_cell using m 8 '2' '1' 2. perform border_cell using m 10 '2' '1' 2. * m = m + 1. * perform border_range using m 1 m 7. * call method of h_cell 'SELECT'. * call method of h_cell 'MERGE'. *perform fill_cell using m 1 0 'Total' xlleft xlcenter 0. * perform border_range using m 8 m 10. * call method of h_cell 'SELECT'. * call method of h_cell 'MERGE'. * *perform fill_cell using m 8 0 tot_qty xlleft xlcenter 0. * set property of h_cell 'numberformat' = '#0,000'. *perform border_range using m 1 m 10. * call method of h_cell 'borders' = h_border * exporting * #1 = '4'. "top * set property of h_border 'LINESTYLE' = '1'. * set property of h_border 'weight' = 2. * free object h_border. * perform border_cell using m 1 '1' '1' 2. * perform border_cell using m 7 '2' '1' 2. * perform border_cell using m 10 '2' '1' 2. * m = m + 1. * perform border_range using m 1 m 2. * call method of h_cell 'SELECT'. * call method of h_cell 'MERGE'. * * * *perform fill_cell using m 1 0 'Amount Chargeable (In words)' xlleft xlcenter 0. * perform border_range using m 3 m 10. * call method of h_cell 'SELECT'. * call method of h_cell 'MERGE'. * text4 = m - 3. * * concatenate '=spellcurr(J' text4 ',"US DOLLAR","S","CENTS","S")' into t ext3. *perform fill_cell using m 3 0 text3 xlleft xlcenter 0. * perform border_cell using m 1 '1' '1' 2. * perform border_cell using m 10 '2' '1' 2. *perform border_range using m 1 m 10. * call method of h_cell 'borders' = h_border * exporting * #1 = '4'. "top * set property of h_border 'LINESTYLE' = '1'.

* set property of h_border 'weight' = 2. * free object h_border. *m = m + 1. *if vbrk-vkorg = 2800 or vbrk-vkorg = 2000 or vbrk-vkorg = 2500. * perform border_range using m 1 m 2. * call method of h_cell 'SELECT'. * call method of h_cell 'MERGE'. *perform fill_cell using m 1 0 'Commission :' xlleft xlcenter 0. * perform border_range using m 3 m 4. * call method of h_cell 'SELECT'. * call method of h_cell 'MERGE'. *perform fill_cell using m 3 0 com xlleft xlcenter 0. * else. * perform border_range using m 1 m 2. * call method of h_cell 'SELECT'. * call method of h_cell 'MERGE'. *perform fill_cell using m 1 0 'Cenvat Payablen :' xlleft xlcenter 0. * perform border_range using m 3 m 4. * call method of h_cell 'SELECT'. * call method of h_cell 'MERGE'. *perform fill_cell using m 3 0 p_cenvat xlleft xlcenter 0. *endif. *perform border_range using m 5 m 6. * call method of h_cell 'SELECT'. * call method of h_cell 'MERGE'. *perform fill_cell using m 5 0 'Exchange Rate' xlleft xlcenter 0. *perform border_range using m 7 m 8. * call method of h_cell 'SELECT'. * call method of h_cell 'MERGE'. * text3 = wa_yxp_invpre-kursf . * concatenate text3 'INR' into text3 separated by ' '. *perform fill_cell using m 7 0 text3 xlleft xlcenter 0. * perform border_cell using m 1 '1' '1' 2. * perform border_cell using m 10 '2' '1' 2. *m = m + 1. * perform border_range using m 1 m 2. * call method of h_cell 'SELECT'. * call method of h_cell 'MERGE'. * perform border_range using m 3 m 4. * call method of h_cell 'SELECT'. * call method of h_cell 'MERGE'. *perform border_range using m 5 m 6. * call method of h_cell 'SELECT'. * call method of h_cell 'MERGE'. *perform fill_cell using m 5 0 '(-)Freight' xlleft xlcenter 0. *perform border_range using m 7 m 8. * call method of h_cell 'SELECT'. * call method of h_cell 'MERGE'. *perform border_range using m 9 m 10.

* call method of h_cell 'SELECT'. * call method of h_cell 'MERGE'. * perform fill_cell using m 9 0 p_freight xlright xlcenter 0. * set property of h_cell 'numberformat' = '#0,000.00'. * perform border_cell using m 1 '1' '1' 2. * perform border_cell using m 10 '2' '1' 2. * m = m + 1. * perform border_range using m 1 m 2. * call method of h_cell 'SELECT'. * call method of h_cell 'MERGE'. * perform border_range using m 3 m 4. * call method of h_cell 'SELECT'. * call method of h_cell 'MERGE'. *perform border_range using m 5 m 6. * call method of h_cell 'SELECT'. * call method of h_cell 'MERGE'. *perform fill_cell using m 5 0 '(+)Commission' xlleft xlcenter 0. *perform border_range using m 7 m 8. * call method of h_cell 'SELECT'. * call method of h_cell 'MERGE'. *perform border_range using m 9 m 10. * call method of h_cell 'SELECT'. * call method of h_cell 'MERGE'. * perform fill_cell using m 9 0 p_insu xlright xlcenter 0. * perform border_cell using m 1 '1' '1' 2. * perform border_cell using m 10 '2' '1' 2. * m = m + 1. * perform border_range using m 1 m 2. * call method of h_cell 'SELECT'. * call method of h_cell 'MERGE'. * perform border_range using m 3 m 4. * call method of h_cell 'SELECT'. * call method of h_cell 'MERGE'. *perform border_range using m 5 m 6. * call method of h_cell 'SELECT'. * call method of h_cell 'MERGE'. *perform fill_cell using m 5 0 '(-)Discount' xlleft xlcenter 0. *perform border_range using m 7 m 8. * call method of h_cell 'SELECT'. * call method of h_cell 'MERGE'. *perform border_range using m 9 m 10. * call method of h_cell 'SELECT'. * call method of h_cell 'MERGE'. * perform fill_cell using m 9 0 p_dis xlright xlcenter 0. * perform border_cell using m 1 '1' '1' 2. * perform border_cell using m 10 '2' '1' 2. * m = m + 1. * perform border_range using m 1 m 2. * call method of h_cell 'SELECT'.

. *perform border_range using m 5 m 6. * text3 = m .1. * concatenate '-i' text3 into text3. * call method of h_cell 'MERGE'.9. * call method of h_cell 'SELECT'. * call method of h_cell 'MERGE'. *perform border_range using m 9 m 10.4. * text3 = m . * * concatenate 'j' text3 into text4. * call method of h_cell 'SELECT'. * call method of h_cell 'SELECT'. * call method of h_cell 'MERGE'. * text3 = m . *perform border_range using m 9 m 10. * m = m + 1.3. *perform border_range using m 5 m 6. * concatenate text4 text3 into text4. *perform border_range using m 7 m 8. * perform fill_cell using m 9 0 p_othr xlright xlcenter 0. * concatenate '-i' text3 into text3. * text3 = m . * call method of h_cell 'MERGE'. *perform border_range using m 7 m 8. * call method of h_cell 'MERGE'. * call method of h_cell 'SELECT'. * concatenate text4 text3 into text4. * call method of h_cell 'SELECT'. * call method of h_cell 'MERGE'.* call method of h_cell 'MERGE'. * concatenate '-i' text3 into text3.2. * concatenate '(' text4 into text4. * call method of h_cell 'SELECT'. * call method of h_cell 'SELECT'. * concatenate '+i' text3 into text3. * text3 = m . *perform fill_cell using m 5 0 'Total Fob Value :' xlleft xlcenter 0. * perform border_cell using m 1 '1' '1' 2. * call method of h_cell 'MERGE'. * perform border_range using m 3 m 4. * perform border_range using m 3 m 4. * perform border_cell using m 10 '2' '1' 2. * call method of h_cell 'MERGE'. * perform border_range using m 1 m 2. *perform fill_cell using m 5 0 '(-)Other' xlleft xlcenter 0. * call method of h_cell 'MERGE'. * concatenate text4 text3 into text4. * call method of h_cell 'SELECT'. * call method of h_cell 'SELECT'.

* call method of h_cell 'borders' = h_border * exporting * #1 = '4'. * call method of h_cell 'MERGE'. * call method of h_cell 'SELECT'. ""p_totfob * perform border_cell using m 1 '1' '1' 2. call method of h_cell 'SELECT'. . *perform border_range using m 7 m 8. perform fill_cell using m 1 0 'Marks & No. *perform fill_cell using m 5 0 'Total FOB Value(INR):' xlleft xlcenter 0. * free object h_border.1. * * perform fill_cell using m 9 0 text4 xlright xlcenter 0. perform border_range using m 1 m 1. * call method of h_cell 'SELECT'. *perform border_range using m 5 m 6. * call method of h_cell 'SELECT'. * set property of h_border 'weight' = 2. * concatenate '=product(' text3 '*' text4 ')' into text3. * call method of h_cell 'MERGE'. perform fill_cell using m 2 0 'Sr. call method of h_cell 'MERGE'.000. * perform border_cell using m 10 '2' '1' 2.* concatenate text4 text3 into text4.00'. * call method of h_cell 'MERGE'. perform border_range using m 3 m 4. m = m + 1. * concatenate '=' text4 into text4 separated by 'sum'. * call method of h_cell 'SELECT'. perform fill_cell using m 3 0 lcontno xlleft xlcenter 0. * call method of h_cell 'MERGE'. * call method of h_cell 'MERGE'. * call method of h_cell 'SELECT'. * perform border_range using m 3 m 4.00.. * perform border_cell using m 1 '1' '1' 2. *perform border_range using m 9 m 10. * concatenate 'i' text3 into text3.""p_totfob1 * set property of h_cell 'numberformat' = '#0. * concatenate text4 ')' into text4. call method of h_cell 'SELECT'. * text3 = m . * perform fill_cell using m 9 0 text3 xlright xlcenter 0. * perform border_range using m 1 m 2. * " concatenate text3 text4 into text3 separated by ':'. * text4 = wa_yxp_invpre-kursf. :' xlleft xlcenter 0. *perform border_range using m 1 m 10. * m = m + 1. * perform border_cell using m 10 '2' '1' 2. "top * set property of h_border 'LINESTYLE' = '1'.No' xlleft xlcenter 0.

call method of h_cell 'MERGE'. perform border_range using n 1 n 1.perform fill_cell using m 5 0 lcontsiz xlleft xlcenter 0. perform border_cell using m 1 '1' '1' 2. perform border_range using m 9 m 10. perform fill_cell using m 3 0 wa_item-contno xlleft xlcenter 0. endloop. call method of h_cell 'MERGE'. loop at it_item into wa_item. perform border_cell using m 10 '2' '1' 2. perform border_cell using n 1 '1' '1' 2. call method of h_cell 'SELECT'. concatenate 'No of' wa_yxp_invpre-pack_type into text3 separated by ' '. call method of h_cell 'MERGE'. perform fill_cell using m 5 0 wa_item-cont_size xlleft xlcenter 0. srno2 = srno2 + 1. call method of h_cell 'SELECT'. perform border_cell using m 1 '1' '1' 2. perform fill_cell using m 6 0 text3 xlleft xlcenter 0. endloop. perform fill_cell using n 1 0 tdline-tdline xlleft xlcenter 0. call method of h_cell 'MERGE'. call method of h_cell 'SELECT'. perform fill_cell using m 7 0 wa_item-sealno1 xlleft xlcenter 0. m = m + 1. perform border_range using m 9 m 10. n = m. if srno2 le 10. perform fill_cell using m 2 0 srno2 xlleft xlcenter 0. call method of h_cell 'SELECT'. " perform fill_cell using m 1 0 '' xlleft xlcenter 0. loop at tdline. perform border_cell using m 10 '2' '1' 2. n = n + 1. . perform fill_cell using m 6 0 wa_item-carton xlleft xlcenter 0. perform border_range using m 7 m 8. call method of h_cell 'MERGE'. perform fill_cell using m 9 0 wa_item-esealno xlleft xlcenter 0. call method of h_cell 'SELECT'. perform fill_cell using m 9 0 lexseal xlleft xlcenter 0. perform border_range using m 1 m 1. srno2 = 0. perform fill_cell using m 7 0 lshseal xlleft xlcenter 0. perform border_range using m 3 m 4. perform border_cell using n 10 '2' '1' 2. call method of h_cell 'SELECT'. call method of h_cell 'SELECT'. perform border_range using m 7 m 8.

m = m + 1. perform fill_cell using m 6 0 'For WELSPUN GLOBAL BRANDS LTD. perform fill_cell using m 1 1 string_n2 xlleft xlcenter 0.srno2 = 10 . perform fill_cell using m 1 0 text3 xlleft xlcenter 0. call method of h_cell 'MERGE'. Anjar are hereby declared that we are exporting goods under duty Drawback Scheme and further declared that we have not availed Cenvat '. call method of h_cell 'SELECT'. perform fill_cell using m 1 0 text3 xlleft xlcenter 0.srno2. set property of h_border 'weight' = 2. free object h_border. m = m + 1. perform border_range using m 1 m 10. perform border_cell using m 1 '1' '1' 2. perform border_range using m 1 m 5. clear text3. m = m + 1. do srno2 times. call method of h_cell 'MERGE'. endif. call method of h_cell 'SELECT'. "top set property of h_border 'LINESTYLE' = '1'. perform border_cell using m 1 '1' '1' 2.' xlright xlcenter 0. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. call method of h_cell 'MERGE'. perform border_cell using m 10 '2' '1' 2. perform border_range using m 1 m 10. perform border_cell using m 10 '2' '1' 2. perform border_cell using m 1 '1' '1' 2. m = m + 1. call method of h_cell 'borders' = h_border exporting #1 = '4'. call method of h_cell 'SELECT'. text3 = 'credit Rule 2004 on the manufacturing of the said goods'. perform border_range using m 1 m 10. enddo. . perform border_cell using m 10 '2' '1' 2. perform border_range using m 6 m 10. clear srno2. perform border_cell using m 1 '1' '1' 2. perform border_range using m 1 m 10. text3 = 'We Welspun India Limited.

text3 separated by perform border_range using m 6 m 10. perform fill_cell using m 1 1 string3 xlleft xlcenter 0. perform fill_cell using m 1 1 text3 xlleft xlcenter 0. call method of h_cell 'MERGE'. perform border_cell using m 10 '2' '1' 2. perform border_cell using m 10 '2' '1' 2.perform border_cell using m 10 '2' '1' 2. call method of h_cell 'SELECT'. perform border_range using m 1 m 5. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. clear text3. perform border_cell using m 5 '2' '1' 2. m = m + 1. call method of h_cell 'MERGE'. perform border_range using m 1 m 5. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. clear text3. perform border_cell using m 5 '2' '1' 2. perform border_range using m 6 m 10. m = m + 1. call method of h_cell 'SELECT'. clear text3. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. m = m + 1. call method of h_cell 'SELECT'. m = m + 1. perform border_cell using m 1 '1' '1' 2. perform border_range using m 1 m 5. call method of h_cell 'MERGE'. perform border_cell using m 10 '2' '1' 2. perform border_cell using m 1 '1' '1' 2. perform border_cell using m 1 '1' '1' 2. . clear text3. perform border_range using m 6 m 10. concatenate bdat+6(2) bdat+4(2) bdat(4) into '.'. perform fill_cell using m 1 1 string_n1 xlleft xlcenter 0. perform border_cell using m 5 '2' '1' 2. perform border_cell using m 5 '2' '1' 2. concatenate bno text3 into text3 separated by ' '.

perform border_range using m 6 m 10. perform border_range using m 1 m 5. perform border_range using m 1 m 5. perform fill_cell using m 1 0 text3 xlleft xlcenter 0. perform border_cell using m 1 '1' '1' 2. m = m + 1.perform border_range using m 1 m 5. perform border_cell using m 10 '2' '1' 2. call method of h_cell 'SELECT'. call method of h_cell 'SELECT'. clear text3. call method of h_cell 'MERGE'. call method of h_cell 'SELECT'. perform border_cell using m 1 '1' '1' 2. perform fill_cell using m 1 0 text3 xlleft xlcenter 0. perform fill_cell using m 1 0 text3 xlleft xlcenter 0. perform border_range using m 1 m 5. call method of h_cell 'SELECT'. call method of h_cell 'MERGE'. perform border_range using m 6 m 10. perform border_range using m 6 m 10. call method of h_cell 'MERGE'. perform border_cell using m 5 '2' '1' 2. . perform border_cell using m 5 '2' '1' 2. perform border_cell using m 10 '2' '1' 2. call method of h_cell 'MERGE'. call method of h_cell 'SELECT'. perform border_cell using m 5 '2' '1' 2. call method of h_cell 'MERGE'. m = m + 1. perform border_cell using m 10 '2' '1' 2. text3 = 'under chapter 3 of FTP'. clear text3.as admi ssible. call method of h_cell 'SELECT'. text3 = 'I/We. text3 = 'Declaration: We Declare that this invoice show the actual pric e of the'. text3 = 'We hereby certify that merchandise is of Indian origin . perform border_cell using m 1 '1' '1' 2. clear text3. call method of h_cell 'MERGE'. call method of h_cell 'SELECT'.'. m = m + 1.'.declare that I/We shall claim the benefits. call method of h_cell 'MERGE'.hereby.

perform border_cell using m 10 '2' '1' 2. perform border_cell using m 5 '2' '1' 2. call method of h_cell 'MERGE'. >>>>>>>>>>>>>INCLUDE MYEXCEL_PRESHP_PACK>>>>>>start>>>>>>> . perform border_cell using m 1 '1' '1' 2. perform border_cell using m 10 '2' '1' 2. call method of h_wrkbook 'CLOSE'. free object h_excel. set property of h_border 'weight' = 2. call method of h_cell 'SELECT'. perform border_range using m 6 m 10. perform fill_cell using m 6 0 'Authorised Signatory' xlright xlcenter 0. m = m + 1. endform. perform border_cell using m 1 '1' '1' 2. perform fill_cell using m 1 0 text3 xlleft xlcenter 0. message : 'Downloading completed. call method of h_cell 'MERGE'. perform border_cell using m 5 '2' '1' 2. perform border_range using m 6 m 10. "top set property of h_border 'LINESTYLE' = '1'. clear text3. text3 = 'goods described and all particulars are True and correct.perform fill_cell using m 1 0 text3 xlleft xlcenter 0. perform border_range using m 1 m 10.' type 'S'. call method of h_cell 'borders' = h_border exporting #1 = '4'. free object h_wrkbook. call method of h_wrkbook 'SAVEAS' exporting #1 = fullpath. call method of h_cell 'MERGE'.'. call method of h_excel 'QUIT'. perform border_range using m 1 m 5. "===========================================SAVE EXCEL FILE================== ===== endloop. call method of h_cell 'SELECT'. free object h_border. call method of h_cell 'SELECT'.

Sign up to vote on this title
UsefulNot useful