excel conversion in sap like smartform

Upload: ricky-das

Post on 30-Oct-2015

265 views

Category:

Documents


3 download

TRANSCRIPT

Excel conversion in sap

*&---------------------------------------------------------------------**&ReportYPRESHP_INV1**&**&---------------------------------------------------------------------**&**&**&---------------------------------------------------------------------*

REPORTypreshp_inv1.

*******GatePass-RopsonTYPE-POOLS:vrm.DATA:paramTYPEvrm_id,valuesTYPEvrm_values,valueLIKELINEOFvalues.

TYPES:BEGINOFty_contno,keyTYPEi,contnoTYPEyxp_contman_itm-contno,lrno(15),lrdateTYPEdatum,transname(40),truckno(15),ENDOFty_contno.DATA:it_contnoTYPESTANDARDTABLEOFty_contnoWITHHEADERLINE.DATA:wa_contnoTYPEty_contno.DATA:icountTYPEi.

DATAok_codeLIKEsy-ucomm.DATAok_code_savLIKEsy-ucomm.

CONTROLStbl_01TYPETABLEVIEWUSINGSCREEN1010.DATA:dynpfieldsLIKEdynpreadOCCURS0.

TYPES:BEGINOFty_cont,markTYPEc,contnoTYPEyxp_contman_itm-contno,lrno(15),lrdateTYPEdatum,transname(40),truckno(15),status(1),t_datetypedatum,t_timetypesy-uzeit,ENDOFty_cont.DATA:it_cont1TYPETABLEOFty_contWITHHEADERLINE.DATA:wa_cont1TYPEty_cont.

DATA:linesTYPEi.DATA:cur_rowTYPEi.DATA:gatepassTYPEyxp_gatepass-gpass,v_lrnoTYPEyxp_gatepass-lrno,v_lrdateTYPEyxp_gatepass-lrdate,v_transnameTYPEyxp_gatepass-transname,v_trucknoTYPEyxp_gatepass-truckno,v_dateTYPEyxp_gatepass-t_date,v_timeTYPEyxp_gatepass-t_time,v_createdonTYPEyxp_gatepass-createdon,v_createdbyTYPEyxp_gatepass-createdby.

TABLES:yxp_gatepass.DATA:BEGINOFit_gpassOCCURS0,mandtTYPEyxp_gatepass-mandt,auto_idTYPEyxp_gatepass-auto_id,contnoTYPEyxp_gatepass-contno,gpassTYPEyxp_gatepass-gpass,createdbyTYPEyxp_gatepass-createdby,createdonTYPEyxp_gatepass-createdon,lrnoTYPEyxp_gatepass-lrno,lrdateTYPEyxp_gatepass-lrdate,transnameTYPEyxp_gatepass-transname,trucknoTYPEyxp_gatepass-truckno,t_dateTYPEyxp_gatepass-t_date,t_timeTYPEyxp_gatepass-t_time,cancelstatTYPEyxp_gatepass-cancelstat,cancelbyTYPEyxp_gatepass-cancelby,cancelonTYPEyxp_gatepass-cancelon,changebyTYPEyxp_gatepass-changeby,changeonTYPEyxp_gatepass-changeon,ENDOFit_gpass.DATA:wa_gpassTYPEyxp_gatepass.

DATA:it_gpass1TYPESTANDARDTABLEOFyxp_gatepass.

DATA:BEGINOFtab_gpassOCCURS0,mandtTYPEyxp_gatepass-mandt,auto_idTYPEyxp_gatepass-auto_id,contnoTYPEyxp_gatepass-contno,gpassTYPEyxp_gatepass-gpass,createdbyTYPEyxp_gatepass-createdby,createdonTYPEyxp_gatepass-createdon,lrnoTYPEyxp_gatepass-lrno,lrdateTYPEyxp_gatepass-lrdate,transnameTYPEyxp_gatepass-transname,trucknoTYPEyxp_gatepass-truckno,t_dateTYPEyxp_gatepass-t_date,t_timeTYPEyxp_gatepass-t_time,cancelstatTYPEyxp_gatepass-cancelstat,cancelbyTYPEyxp_gatepass-cancelby,cancelonTYPEyxp_gatepass-cancelon,changebyTYPEyxp_gatepass-changeby,changeonTYPEyxp_gatepass-changeon,

ENDOFtab_gpass.

**************DATA:fmnameTYPErs38l_fnam.DATA:fmname1TYPErs38l_fnam.DATA:fmname2TYPErs38l_fnam.DATA:fmname4TYPErs38l_fnam.DATA:p_answerTYPEc.DATA:fmname5TYPErs38l_fnam.DATA:fmname6TYPErs38l_fnam.DATA:fmname7TYPErs38l_fnam.DATA:fmname8TYPErs38l_fnam.DATA:fmname9TYPErs38l_fnam.

DATA:gidTYPEyxp_gatepass-gpass.TABLES:yxp_soaddr,yxp_invpre,yxp_contman_itm,vbkd,adrc,ylcesadr,yxp_shphd,ylcelcmst,yxp_item,vbrp,ylceord,vbak,vbpa.DATA:ar(2)TYPEc.DATA:it_yxp_invpreTYPEyxp_invpreOCCURS0WITHHEADERLINE.DATA:wa_yxp_invpreTYPEyxp_invpre,wa_yxp_shphdTYPEyxp_shphd,wa_yxp_soaddrTYPEyxp_soaddr,wa_vbkdTYPEvbkd,wa_ylceordTYPEylceord,wa_ylcesadrTYPEylcesadr,wa_vbakTYPEvbak,wa_t001TYPEt001,wa_adrcTYPEadrc,cadrcTYPEadrc,wa_yxp_exptd_licTYPEyxp_exptd_lic,wa_yxp_exptd_lic1TYPEyxp_exptd_lic.DATA:fcodeTYPETABLEOFsy-ucomm,wa_fcodeTYPEsy-ucomm.DATA:p_vgbelTYPElips-vgbel.DATA:p_lic_productTYPEyxp_exptd_lic-lic_product.DATA:it_ylcelcmstTYPEylcelcmst.DATA:formTYPEtdsfname.DATA:form1TYPEtdsfname.DATA:form2TYPEtdsfname.DATA:form3TYPEtdsfname.DATA:tenasTYPEyxp_invpre-tena.DATA:tenbsTYPEyxp_invpre-tenb.DATA:tencsTYPEyxp_invpre-tenc.*DATA:elvaTYPESTRING.*DATA:BEGINOFit_manidf4OCCURS0,manidTYPEyxp_contman_itm-manid,delvTYPEyxp_contman_itm-delv,ENDOFit_manidf4.DATA:wa_manidf4LIKEit_manidf4.DATA:it_tmpf4LIKEit_manidf4OCCURS0.*DATA:BEGINOFIT_TMPF4OCCURS0,*MANIDTYPEYXP_CONTMAN_ITM-MANID,*DELVTYPEYXP_CONTMAN_ITM-DELV,*ENDOFIT_TMPF4.DATA:BEGINOFit_docnrOCCURS0,doc_nrTYPEyxp_invpre-doc_nr,ENDOFit_docnr.DATA:wa_docnrLIKEit_docnr.DATA:wa_gatepassTYPEyxp_gatepass.

DATA:it_otfTYPESTANDARDTABLEOFitcoo,it_docsTYPESTANDARDTABLEOFdocs,it_linesTYPESTANDARDTABLEOFtline,st_job_output_infoTYPEssfcrescl,st_document_output_infoTYPEssfcrespd,st_job_output_optionsTYPEssfcresop,st_output_optionsTYPEssfcompop,st_control_parametersTYPEssfctrlop,v_len_inTYPEso_obj_len,v_languageTYPEsflanguVALUE'E',v_e_devtypeTYPErspoptype,v_bin_filesizeTYPEi,v_nameTYPEstring,v_pathTYPEstring,v_fullpathTYPEstring,v_filterTYPEstring,v_uactTYPEi,v_guiobjTYPEREFTOcl_gui_frontend_services,v_filenameTYPEstring.

SELECTION-SCREENBEGINOFBLOCKb1WITHFRAMETITLEtext-001.PARAMETERS:p_autoidTYPEyxp_invpre-auto_idMATCHCODEOBJECTyxp_invau."OBLIGATORY.PARAMETERS:p_manidTYPEyxp_contman_itm-manid.PARAMETERS:comTYPEchar5.PARAMETERS:r1RADIOBUTTONGROUPg2DEFAULT'X',r2RADIOBUTTONGROUPg2.

SELECTION-SCREENENDOFBLOCKb1.

SELECTION-SCREENBEGINOFBLOCKb2WITHFRAMETITLEtext-002.PARAMETERS:rd_1RADIOBUTTONGROUPg1DEFAULT'X',rd_2RADIOBUTTONGROUPg1,*{AddedByManojWVDK93140431.08.2012rd_12RADIOBUTTONGROUPg1,*}rd_3RADIOBUTTONGROUPg1,rd_5RADIOBUTTONGROUPg1,rd_6RADIOBUTTONGROUPg1,rd_4RADIOBUTTONGROUPg1,rd_7RADIOBUTTONGROUPg1,rd_8RADIOBUTTONGROUPg1,rd_9RADIOBUTTONGROUPg1,rd_10RADIOBUTTONGROUPg1,rd_11RADIOBUTTONGROUPg1.

SELECTION-SCREENENDOFBLOCKb2.

SELECTION-SCREENBEGINOFBLOCKb3WITHFRAMETITLEtext-003.PARAMETERS:exdat1TYPEyxp_invpre-exdat.PARAMETERS:extmTYPEsy-uzeit.PARAMETERS:exnameTYPEyxp_invpre-exname.PARAMETERS:supnameTYPEyxp_invpre-supname.PARAMETERS:nameauthTYPEyxp_invpre-nameauth.PARAMETERS:des(20)TYPEc.

PARAMETERS:nameaut1TYPEyxp_invpre-nameauth.PARAMETERS:des1(20)TYPEc.

PARAMETERS:tenaTYPEcheckboxDEFAULT'X',tenbTYPEcheckbox,tencTYPEcheckbox,tendTYPEcheckbox.PARAMETERS:consamnoTYPEyxp_invpre-consamno.

*PARAMETERS:CONTABARADIOBUTTONGROUPG3DEFAULT'X',*CONTABBRADIOBUTTONGROUPG3.SELECTION-SCREENENDOFBLOCKb3.

SELECTION-SCREENBEGINOFBLOCKb4WITHFRAMETITLEtext-004.

PARAMETERS:str1(75)TYPEc.PARAMETERS:str2(75)TYPEc.

SELECTION-SCREENENDOFBLOCKb4.

ATSELECTION-SCREENONVALUE-REQUESTFORp_manid.PERFORMgethelp.

INITIALIZATION.SETPF-STATUS'YPRESHP_INV1'.

START-OF-SELECTION.SETPF-STATUS'YPRESHP_INV1'.

ATLINE-SELECTION.IFsy-lsind=20.SETPF-STATUS'YPRESHP_INV1'."EXCLUDINGFCODE.ENDIF.

ATSELECTION-SCREEN.*BREAK-POINT.CASEsy-ucomm.WHEN'F8'.PERFORMdata.WHEN'PDF'.PERFORMdataf.WHEN'EXCEL'.PERFORMxldata.WHEN'BACK'OR'EXIT'OR'CANC'.LEAVEPROGRAM.WHEN'ENTR'.PERFORMget_stuffid.ENDCASE.*&---------------------------------------------------------------------**&FormGET_STUFFID*&---------------------------------------------------------------------**text*----------------------------------------------------------------------**-->p1text*file_save_dialogEXPORTINGdefault_extension='pdf'default_file_name=v_namefile_filter=v_filterCHANGINGfilename=v_namepath=v_pathfullpath=v_fullpathuser_action=v_uact.IFv_uact=v_guiobj->action_cancel.EXIT.ENDIF.

*---DownloadPDFtolocalPCMOVEv_fullpathTOv_filename.CALLFUNCTION'GUI_DOWNLOAD'EXPORTINGbin_filesize=v_bin_filesizefilename=v_filenamefiletype='BIN'TABLESdata_tab=it_linesEXCEPTIONSfile_write_error=1no_batch=2gui_refuse_filetransfer=3invalid_type=4no_authority=5unknown_error=6header_not_allowed=7separator_not_allowed=8filesize_not_allowed=9header_too_long=10dp_error_create=11dp_error_send=12dp_error_write=13unknown_dp_error=14access_denied=15dp_out_of_memory=16disk_full=17dp_timeout=18file_not_found=19dataprovider_exception=20control_flush_error=21OTHERS=22.IFsy-subrc0.MESSAGEIDsy-msgidTYPEsy-msgtyNUMBERsy-msgnoWITHsy-msgv1sy-msgv2sy-msgv3sy-msgv4.ENDIF.ENDIF.

ELSE.*'/1BCDWB/SF00000445'CALLFUNCTIONfmnameEXPORTING*ARCHIVE_INDEX=*ARCHIVE_INDEX_TAB=*ARCHIVE_PARAMETERS=control_parameters=st_control_parameters*MAIL_APPL_OBJ=*MAIL_RECIPIENT=*MAIL_SENDER=output_options=st_output_options*USER_SETTINGS='X'p_doc_nr=p_autoidexdat=exdat1IMPORTINGdocument_output_info=st_document_output_infojob_output_info=st_job_output_infojob_output_options=st_job_output_options*EXCEPTIONS*FORMATTING_ERROR=1*INTERNAL_ERROR=2*SEND_ERROR=3*USER_CANCELED=4*OTHERS=5.IFsy-subrc0.*MESSAGEIDSY-MSGIDTYPESY-MSGTYNUMBERSY-MSGNO*WITHSY-MSGV1SY-MSGV2SY-MSGV3SY-MSGV4.*ENDIF.ELSE.

CALLFUNCTION'CONVERT_OTF_2_PDF'IMPORTINGbin_filesize=v_bin_filesizeTABLESotf=st_job_output_info-otfdatadoctab_archive=it_docslines=it_linesEXCEPTIONSerr_conv_not_possible=1err_otf_mc_noendmarker=2OTHERS=3.IFsy-subrc0.*MESSAGEIDSY-MSGIDTYPESY-MSGTYNUMBERSY-MSGNO*WITHSY-MSGV1SY-MSGV2SY-MSGV3SY-MSGV4.ENDIF.

*---GetfilenametostoreCONCATENATE'Converted_Smartform''.pdf'INTOv_name.CREATEOBJECTv_guiobj.CALLMETHODv_guiobj->file_save_dialogEXPORTINGdefault_extension='pdf'default_file_name=v_namefile_filter=v_filterCHANGINGfilename=v_namepath=v_pathfullpath=v_fullpathuser_action=v_uact.IFv_uact=v_guiobj->action_cancel.EXIT.ENDIF.

*---DownloadPDFtolocalPCMOVEv_fullpathTOv_filename.CALLFUNCTION'GUI_DOWNLOAD'EXPORTINGbin_filesize=v_bin_filesizefilename=v_filenamefiletype='BIN'TABLESdata_tab=it_linesEXCEPTIONSfile_write_error=1no_batch=2gui_refuse_filetransfer=3invalid_type=4no_authority=5unknown_error=6header_not_allowed=7separator_not_allowed=8filesize_not_allowed=9header_too_long=10dp_error_create=11dp_error_send=12dp_error_write=13unknown_dp_error=14access_denied=15dp_out_of_memory=16disk_full=17dp_timeout=18file_not_found=19dataprovider_exception=20control_flush_error=21OTHERS=22.IFsy-subrc0.MESSAGEIDsy-msgidTYPEsy-msgtyNUMBERsy-msgnoWITHsy-msgv1sy-msgv2sy-msgv3sy-msgv4.ENDIF.

ENDIF.

ENDIF.

ENDFORM."PDISP_SMRTFRM_INV1*&---------------------------------------------------------------------**&FormPDISP_SMARTFRM_ARE1*&---------------------------------------------------------------------**text*----------------------------------------------------------------------**-->p1text*file_save_dialogEXPORTINGdefault_extension='pdf'default_file_name=v_namefile_filter=v_filterCHANGINGfilename=v_namepath=v_pathfullpath=v_fullpathuser_action=v_uact.IFv_uact=v_guiobj->action_cancel.EXIT.ENDIF.

*---DownloadPDFtolocalPCMOVEv_fullpathTOv_filename.CALLFUNCTION'GUI_DOWNLOAD'EXPORTINGbin_filesize=v_bin_filesizefilename=v_filenamefiletype='BIN'TABLESdata_tab=it_linesEXCEPTIONSfile_write_error=1no_batch=2gui_refuse_filetransfer=3invalid_type=4no_authority=5unknown_error=6header_not_allowed=7separator_not_allowed=8filesize_not_allowed=9header_too_long=10dp_error_create=11dp_error_send=12dp_error_write=13unknown_dp_error=14access_denied=15dp_out_of_memory=16disk_full=17dp_timeout=18file_not_found=19dataprovider_exception=20control_flush_error=21OTHERS=22.IFsy-subrc0.MESSAGEIDsy-msgidTYPEsy-msgtyNUMBERsy-msgnoWITHsy-msgv1sy-msgv2sy-msgv3sy-msgv4.ENDIF.ENDIF.

ELSE.

CALLFUNCTION'SSF_GET_DEVICE_TYPE'EXPORTINGi_language=v_languagei_application='SAPDEFAULT'IMPORTINGe_devtype=v_e_devtype.st_output_options-tdprinter=v_e_devtype.st_control_parameters-no_dialog='X'.st_control_parameters-getotf='X'.

CALLFUNCTION'SSF_FUNCTION_MODULE_NAME'EXPORTINGformname=form1"'YARE_N2'"'YAREN_1'*VARIANT=''*DIRECT_CALL=''IMPORTINGfm_name=fmnameEXCEPTIONSno_form=1no_function_module=2OTHERS=3.IFsy-subrc0.MESSAGEIDsy-msgidTYPEsy-msgtyNUMBERsy-msgnoWITHsy-msgv1sy-msgv2sy-msgv3sy-msgv4.ENDIF.

*'/1BCDWB/SF00000421'CALLFUNCTIONfmnameEXPORTING*ARCHIVE_INDEX=*ARCHIVE_INDEX_TAB=*ARCHIVE_PARAMETERS=control_parameters=st_control_parameters*MAIL_APPL_OBJ=*MAIL_RECIPIENT=*MAIL_SENDER=output_options=st_output_options*USER_SETTINGS='X'p_auto_id=p_autoidp_manid=p_manidwa_yxp_exptd_lic1=wa_yxp_exptd_lic1tenb=tenbsexdat2=exdat1str1=str1str2=str2

IMPORTINGdocument_output_info=st_document_output_infojob_output_info=st_job_output_infojob_output_options=st_job_output_optionsEXCEPTIONSformatting_error=1internal_error=2send_error=3user_canceled=4OTHERS=5.IFsy-subrc0.MESSAGEIDsy-msgidTYPEsy-msgtyNUMBERsy-msgnoWITHsy-msgv1sy-msgv2sy-msgv3sy-msgv4.ELSE.**---ConvertOTFtoPDFCALLFUNCTION'CONVERT_OTF_2_PDF'IMPORTINGbin_filesize=v_bin_filesizeTABLESotf=st_job_output_info-otfdatadoctab_archive=it_docslines=it_linesEXCEPTIONSerr_conv_not_possible=1err_otf_mc_noendmarker=2OTHERS=3.IFsy-subrc0.*MESSAGEIDSY-MSGIDTYPESY-MSGTYNUMBERSY-MSGNO*WITHSY-MSGV1SY-MSGV2SY-MSGV3SY-MSGV4.ENDIF.

*---GetfilenametostoreCONCATENATE'ARE1'p_autoid'.pdf'INTOv_name.CREATEOBJECTv_guiobj.CALLMETHODv_guiobj->file_save_dialogEXPORTINGdefault_extension='pdf'default_file_name=v_namefile_filter=v_filterCHANGINGfilename=v_namepath=v_pathfullpath=v_fullpathuser_action=v_uact.IFv_uact=v_guiobj->action_cancel.EXIT.ENDIF.

*---DownloadPDFtolocalPCMOVEv_fullpathTOv_filename.CALLFUNCTION'GUI_DOWNLOAD'EXPORTINGbin_filesize=v_bin_filesizefilename=v_filenamefiletype='BIN'TABLESdata_tab=it_linesEXCEPTIONSfile_write_error=1no_batch=2gui_refuse_filetransfer=3invalid_type=4no_authority=5unknown_error=6header_not_allowed=7separator_not_allowed=8filesize_not_allowed=9header_too_long=10dp_error_create=11dp_error_send=12dp_error_write=13unknown_dp_error=14access_denied=15dp_out_of_memory=16disk_full=17dp_timeout=18file_not_found=19dataprovider_exception=20control_flush_error=21OTHERS=22.IFsy-subrc0.MESSAGEIDsy-msgidTYPEsy-msgtyNUMBERsy-msgnoWITHsy-msgv1sy-msgv2sy-msgv3sy-msgv4.ENDIF.ENDIF.ENDIF.

ENDFORM."PDISP_SMARTFRM_ARE1*&---------------------------------------------------------------------**&FormPACK_SMARFORMS*&---------------------------------------------------------------------**text*----------------------------------------------------------------------**-->p1text*p1text*p1text*p1text*file_save_dialogEXPORTINGdefault_extension='pdf'default_file_name=v_namefile_filter=v_filterCHANGINGfilename=v_namepath=v_pathfullpath=v_fullpathuser_action=v_uact.IFv_uact=v_guiobj->action_cancel.EXIT.ENDIF.

*---DownloadPDFtolocalPCMOVEv_fullpathTOv_filename.CALLFUNCTION'GUI_DOWNLOAD'EXPORTINGbin_filesize=v_bin_filesizefilename=v_filenamefiletype='BIN'TABLESdata_tab=it_linesEXCEPTIONSfile_write_error=1no_batch=2gui_refuse_filetransfer=3invalid_type=4no_authority=5unknown_error=6header_not_allowed=7separator_not_allowed=8filesize_not_allowed=9header_too_long=10dp_error_create=11dp_error_send=12dp_error_write=13unknown_dp_error=14access_denied=15dp_out_of_memory=16disk_full=17dp_timeout=18file_not_found=19dataprovider_exception=20control_flush_error=21OTHERS=22.IFsy-subrc0.MESSAGEIDsy-msgidTYPEsy-msgtyNUMBERsy-msgnoWITHsy-msgv1sy-msgv2sy-msgv3sy-msgv4.ENDIF.ENDIF.

ENDFORM."DTLS_PACKLST*&---------------------------------------------------------------------**&FormLOADING_SLIP*&---------------------------------------------------------------------*FORMloading_slip.

CALLFUNCTION'SSF_GET_DEVICE_TYPE'EXPORTINGi_language=v_languagei_application='SAPDEFAULT'IMPORTINGe_devtype=v_e_devtype.

st_output_options-tdprinter=v_e_devtype.st_control_parameters-no_dialog='X'.st_control_parameters-getotf='X'.

CALLFUNCTION'SSF_FUNCTION_MODULE_NAME'EXPORTINGformname='YXP_LOADSLIP'*VARIANT=''*DIRECT_CALL=''IMPORTINGfm_name=fmname6EXCEPTIONSno_form=1no_function_module=2OTHERS=3.IFsy-subrc0.MESSAGEIDsy-msgidTYPEsy-msgtyNUMBERsy-msgnoWITHsy-msgv1sy-msgv2sy-msgv3sy-msgv4.ENDIF.

CALLFUNCTIONfmname6EXPORTING*ARCHIVE_INDEX=*ARCHIVE_INDEX_TAB=*ARCHIVE_PARAMETERS=control_parameters=st_control_parameters*MAIL_APPL_OBJ=*MAIL_RECIPIENT=*MAIL_SENDER=output_options=st_output_options*USER_SETTINGS='X'*P_DOC_NR=P_AUTOIDp_manid=p_manidp_autoid=p_autoidexdat=exdat1exname=exnamesupname=supnamenameauth=nameauthtena=tenastenb=tenbstenc=tencstend=tendconsamno=consamno

IMPORTINGdocument_output_info=st_document_output_infojob_output_info=st_job_output_infojob_output_options=st_job_output_options*EXCEPTIONS*FORMATTING_ERROR=1*INTERNAL_ERROR=2*SEND_ERROR=3*USER_CANCELED=4*OTHERS=5.IFsy-subrc0.MESSAGEIDsy-msgidTYPEsy-msgtyNUMBERsy-msgnoWITHsy-msgv1sy-msgv2sy-msgv3sy-msgv4.ELSE.

CALLFUNCTION'CONVERT_OTF_2_PDF'IMPORTINGbin_filesize=v_bin_filesizeTABLESotf=st_job_output_info-otfdatadoctab_archive=it_docslines=it_linesEXCEPTIONSerr_conv_not_possible=1err_otf_mc_noendmarker=2OTHERS=3.IFsy-subrc0.*MESSAGEIDSY-MSGIDTYPESY-MSGTYNUMBERSY-MSGNO*WITHSY-MSGV1SY-MSGV2SY-MSGV3SY-MSGV4.ENDIF.

*---GetfilenametostoreCONCATENATEp_autoid'.pdf'INTOv_name.CREATEOBJECTv_guiobj.CALLMETHODv_guiobj->file_save_dialogEXPORTINGdefault_extension='pdf'default_file_name=v_namefile_filter=v_filterCHANGINGfilename=v_namepath=v_pathfullpath=v_fullpathuser_action=v_uact.IFv_uact=v_guiobj->action_cancel.EXIT.ENDIF.

*---DownloadPDFtolocalPCMOVEv_fullpathTOv_filename.CALLFUNCTION'GUI_DOWNLOAD'EXPORTINGbin_filesize=v_bin_filesizefilename=v_filenamefiletype='BIN'TABLESdata_tab=it_linesEXCEPTIONSfile_write_error=1no_batch=2gui_refuse_filetransfer=3invalid_type=4no_authority=5unknown_error=6header_not_allowed=7separator_not_allowed=8filesize_not_allowed=9header_too_long=10dp_error_create=11dp_error_send=12dp_error_write=13unknown_dp_error=14access_denied=15dp_out_of_memory=16disk_full=17dp_timeout=18file_not_found=19dataprovider_exception=20control_flush_error=21OTHERS=22.IFsy-subrc0.MESSAGEIDsy-msgidTYPEsy-msgtyNUMBERsy-msgnoWITHsy-msgv1sy-msgv2sy-msgv3sy-msgv4.ENDIF.ENDIF.

ENDFORM."LOADING_SLIP*&---------------------------------------------------------------------**&FormGATE_PASS*&---------------------------------------------------------------------**text*----------------------------------------------------------------------**-->p1text*p1text*p1text*p1text*file_save_dialogEXPORTINGdefault_extension='pdf'default_file_name=v_namefile_filter=v_filterCHANGINGfilename=v_namepath=v_pathfullpath=v_fullpathuser_action=v_uact.IFv_uact=v_guiobj->action_cancel.EXIT.ENDIF.

*---DownloadPDFtolocalPCMOVEv_fullpathTOv_filename.CALLFUNCTION'GUI_DOWNLOAD'EXPORTINGbin_filesize=v_bin_filesizefilename=v_filenamefiletype='BIN'TABLESdata_tab=it_linesEXCEPTIONSfile_write_error=1no_batch=2gui_refuse_filetransfer=3invalid_type=4no_authority=5unknown_error=6header_not_allowed=7separator_not_allowed=8filesize_not_allowed=9header_too_long=10dp_error_create=11dp_error_send=12dp_error_write=13unknown_dp_error=14access_denied=15dp_out_of_memory=16disk_full=17dp_timeout=18file_not_found=19dataprovider_exception=20control_flush_error=21OTHERS=22.IFsy-subrc0.MESSAGEIDsy-msgidTYPEsy-msgtyNUMBERsy-msgnoWITHsy-msgv1sy-msgv2sy-msgv3sy-msgv4.ENDIF.ENDIF.

ENDFORM."ANNEXUREC1_SSP1

INCLUDEmyinclude_top.INCLUDEmyinclude_inp.INCLUDEmyinclude_out.INCLUDEmyexcel_preshp.INCLUDEmyexcel01.

INCLUDEmyexcel_preshp_pack.

INCLUDEmyexcel_preshp_annexure.

INCLUDEmyexcel_preshp_are_1.

>>>>>>>>>>>>>myinclude_to>>>>>>start>>>>>>>type-poolsole2.data:h_exceltypeole2_object,h_wrkbookltypeole2_object,h_wrkbooktypeole2_object,h_activesheettypeole2_object,h_pagesetuptypeole2_object,h_rangetypeole2_object,h_columntypeole2_object,h_celltypeole2_object,h_cell1typeole2_object,h_cell2typeole2_object,h_fonttypeole2_object,h_colortypeole2_object,h_bordertypeole2_object,h_rw_hgttypeole2_object,"addbysandipshapestypeole2_object,h_rightheadertypeole2_object,excel_filenametypedraw-filep,excel_newtyperlgrap-filename,l_image_pathtypestring.

constants:xltoptypeivalue'1',xlcentertypeivalue'-4108',xlbottomtypeivalue'-4107',xllefttypeivalue'-4131',xlrighttypeivalue'-4152',xlnonetypeivalue'-4142',xlautomatictypeivalue'-4105',

xlcontinuoustypeivalue'1',xlinsideverticaltypeivalue'11',xlthintypeivalue'2',xllandscapetypeivalue'2',xlportraittypeivalue'1',xllettertypeivalue'1',xllegaltypeivalue'5',xlthicktypeivalue'4',XLPAGEFIELDtypeivalue'3',XLNORMALtypeivalue'2',XLWIDEtypeivalue'4'.

data:filenametypestring,pathtypestring,fullpathtypestring,excelnametypestring,row(10),col(10),l_range(30)."============================================FORLINECOLUMNANDTEXT===============data:text3typestring,text4typestring.data:mtypei,"rowntypeivalue0."columndata:sel_1typeivalue0,"selectrowfirstsel_2typeivalue0."selectlastrow"====================================================================="addbysandipforimagedownloadfromapplicationserverdata:l_bytecounttypei,l_tdbtypelikestxbitmaps-tdbtype,l_contenttypestandardtableofbapiconteninitialsize0.data:graphic_sizetypei.

data:beginofgraphic_tableoccurs0,line(255)typex,endofgraphic_table."=======================================================================types:beginofty_final,

doc_nrtypeyxp_invpre-doc_nr,*HS_CODETYPESTRING,hs_code(8)typec,desc_goodtypeyxp_item-arktx,arktxtypeyxp_item-arktx,sizetypeyxp_item-arktx,gsmtypestring,typtypestring,consttypestring,tctypestring,qtytypeyxp_item-kwmeng,ntwttypeyxp_item-ntgew,vrkmetypeyxp_item-vrkme,*RATETYPEYXP_ITEM-NETPR,*RATETYPEKONV-KBETR,ratetypezexproduct-rate,*RATETYPEBAPICURR-BAPICURR,amttypeyxp_item-netpr,waerktypeyxp_item-waerk,

endofty_final.

types:beginofty_item1.includestructureyxp_item.types:netpr1typezexproduct-rate.*TYPES:NETPR1TYPEBAPICURR-BAPICURR.*TYPES:NETPR1TYPEKONV-KWERT.types:endofty_item1.types:beginofty_docnr,

doc_nrtypeyxp_invpre-doc_nr,kursftypeyxp_invpre-kursf,freighttypeyxp_invpre-freight,

endofty_docnr.

types:beginofty_hdrinv,

hdr1typestring,hdr2typestring,hdr3typestring,hdr4typestring,hdr5typestring,hdr6typestring,hdr7typestring,hdr8typestring,hdr9typestring,hdr10typestring,

endofty_hdrinv.

types:beginofty_item.includestructureyxp_contman_itm.types:sealno1typeyxp_contdtl-sealno.types:esealnotypeyxp_contdtl-esealno.types:buyersealtypeyxp_contdtl-buyerseal.types:endofty_item.types:beginofty.types:int1typei.types:endofty.types:beginofty1.types:i1typei.types:endofty1.

data:it_finaltypetableofty_final,wa_finaltypety_final,it_docnr1typetableofty_docnr,wa_docnr1typety_docnr,it_hdrinvtypetableofty_hdrinv,wa_hdrinvtypety_hdrinv,it_yxp_itemtypetableofty_item1,wa_yxp_itemtypety_item1,p_sumamt1typeyxp_item-netwr,p_ntwttypeyxp_item-ntgew,p_sumamttypeyxp_item-netwr,p_sumqtytypeyxp_item-netpr,p_comamttypeyxp_item-netwr,p_lessamttypeyxp_item-netwr,p_totalamttypeyxp_item-netwr,p_totalamtchattypespell,p_grosswttypeyxp_item-brgew,p_ntgewtypeyxp_item-ntgew,p_sumpckttypeyxp_item-no_pack,p_kursftypeyxp_invpre-kursf,p_freighttypeyxp_invpre-freight,p_kursfamttypeyxp_item-netwr,p_totfob1typeyxp_item-netwr,it_mvketypetableofmvke,wa_mvketypemvke,it_tvm1typetableoftvm1t,wa_tvm1typetvm1t,it_final1typetableofty_final,wa_final1typety_final,sumqtypety_final-qty,ntwttypety_final-ntwt,sumrtypety_final-rate,sumatypety_final-amt,p_commissiontypeyxp_invpre-commison,p_discounttypeyxp_invpre-discount,wa_kna1typekna1,waerktypevbak-waerk,nadrc1typeadrc,nadrc2typeadrc,it_ylcelcmst1typeylcelcmst,string1typestring,string2typestring,"it_yxp_invpretypetableofyxp_invpre,w_yxp_invpretypeyxp_invpre,p_cenvattypeyxp_bonddtl-exbed_dr,maratypemara,mvketypemvke,iylcesadrtypeylcesadr,t001typet001,"VBAKtypeVBKD,salestypestring,sdattypestring,tdlinetypetableoftlinewithheaderline,

it_yxp_contman_itmtypetableofyxp_contman_itm,wa_yxp_contman_itmtypeyxp_contman_itm,it_yxp_contman_itm2typetableofyxp_contman_itm,wa_yxp_contman_itm2typeyxp_contman_itm,cartontypeyxp_contman_itm-carton,it_adrctypeadrc,vbrktypevbrk,"LINEStypeI,flgtypec,line2typei,it_yxp_exptd_lictypetableofyxp_exptd_lic,wa_yxp_exptd_lic2typeyxp_exptd_lic,string_n1typestring,string_n2typestring,likptypelikp,"yxp_shphdtypeyxp_shphd,madrctypeadrc,cotnotypec,lcontnotypestring,sealnotypestring,sadrctypeadrc,cont1typet005t-landx,bnotypeyxp_bonddtl-bno,bdattypeyxp_bonddtl-bdat,string3typestring,mara1typemara,bstkdtypestring,precarriertypestring,i_yxp_contdtltypetableofyxp_contdtl,w_yxp_contdtltypeyxp_contdtl,srnotypei,srno1typei,srno2typei,lines1typei,totamttypeyxp_item-netpr,it_yxp_contman_itm1typetableofyxp_contman_itm,wa_yxp_contman_itm1typeyxp_contman_itm,it_itemtypetableofty_item,wa_itemtypety_item,it_item2typetableofty_item,wa_item2typety_item,wa_item1typety_item,carton1typeyxp_contman_itm-carton,inttypeivalue0,int1typeivalue0,ittypetableofty,watypety,int2typei,int3typei,it1typetableofty1,wa1typety1,it2typety1occurs0,wa2typety1,itypeivalue0,i1typeivalue0,i2typei,i3typei,flandxtypestring,line1typei,p_totfobtypeyxp_item-netwr,wearktypeyxp_item-waerk,vesseltypestring,port_loadtypestring,port_desctypestring,p_insutypeyxp_invpre-commison,p_distypeyxp_invpre-discount,p_othrtypeyxp_invpre-other,p_txttypeyxp_invpre-othertxt,p_freighttxttypestring,p_commisontxttypestring,p_discounttxttypestring,eadrctypeadrc,text1typestring,space1typec,text2typestring,"SPACE1typeC,"TEXT2typeSTRING,consttypec,tctypec,exsealtypec,lexsealtypestring,shsealtypec,lshsealtypestring,contsiztypec,lcontsiztypestring,contnotypec,gdesctypec,p_licprodtypestring,wa_yxp_exptd_lic3typeyxp_exptd_lic,exratetypej_1ivtxrat-rate,"cadrctypeadrc,bstatustypeyxp_bonddtl-br,"wa_yxp_invpretypeyxp_invpre,j_1imocompTYPEj_1imocomp,inco1typevbkd-inco1,TEXT_BTYPESTRING,TEXT_1TYPESTRING,TEXT_2TYPESTRING,DATE1TYPESTRING,a_vbaktypevbak,"p_manidtypeyxp_contman_itm-manid,amt_wordtypestring,amt_word1typestring.

"data:wa_yxp_shphdlikeyxp_shphd."=====================================ENDOFDATA===========================>>>>>>>>>>>>>myinclude_to>>>>>>end>>>>>>>>>>>>>>>>>>>>INCLUDEmyinclude_out. >>>>>>start>>>>>>>moduleLIST_FILL_1010output.ifit_cont1[]isinitial.SELECTcontnoINTOwa_contno-contnoFROMyxp_contman_itmJOINyxp_invpreONyxp_contman_itm~delvEQyxp_invpre~doc_nrWHEREyxp_contman_itm~manidEQp_manidANDyxp_invpre~auto_idEQp_autoid.appendwa_contnotoit_contno.clear:wa_contno.ENDSELECT.sortit_contnobycontno.deleteadjacentduplicatesfromit_contnocomparingcontno.*clearit_cont1[].loopatit_contnointowa_contno.ifwa_contno-contnone''.selectsinglelrnolrdatetransnametrucknot_datet_timefromyxp_gatepassinto(wa_cont1-lrno,wa_cont1-lrdate,wa_cont1-transname,wa_cont1-truckno,wa_cont1-t_date,wa_cont1-t_time)wherecontnoeqwa_contno-contnoandcancelstatne'X'.wa_cont1-contno=wa_contno-contno.ifwa_cont1-lrnoisnotinitial.wa_cont1-status='X'.endif.appendwa_cont1toit_cont1.endif.clear:wa_contno,wa_cont1.endloop.data:v_linestypei.describetableit_cont1linesv_lines.tbl_01-lines=v_lines.endif.*clear:values[].*param='LSB_01'.*icount=0.*loopatit_contnointowa_contno.*icount=icount+1.*value-key=icount.*value-text=wa_contno-contno.*appendvaluetovalues.*endloop.**CALLFUNCTION'VRM_SET_VALUES'*EXPORTING*id=param*values=values.

endmodule.

moduleSTATUS_1010output.SETPF-STATUS'1010'.SETTITLEBAR'1010'.endmodule.*&---------------------------------------------------------------------**&ModuleINPUT_DATAOUTPUT*&---------------------------------------------------------------------**text*----------------------------------------------------------------------*moduleINPUT_DATAoutput.*describetableit_contnolineslines.*tbl_01-lines=lines.loopatscreen.ifscreen-nameeq'IT_CONT1-CONTNO'.screen-input='0'.modifyscreen.endif.ifit_cont1-mark='X'.ifscreen-nameeq'IT_CONT1-LRNO'andit_cont1-lrnone''.screen-input='0'.modifyscreen.endif.ifscreen-nameeq'IT_CONT1-LRDATE'andit_cont1-lrdatene'00000000'.screen-input='0'.modifyscreen.endif.ifscreen-nameeq'IT_CONT1-TRANSNAME'andit_cont1-transnamene''.screen-input='0'.modifyscreen.endif.ifscreen-nameeq'IT_CONT1-TRUCKNO'andit_cont1-trucknone''.screen-input='0'.modifyscreen.endif."addedbysandipshankariyaifscreen-nameeq'IT_CONT1-T_DATE'andit_cont1-trucknone''.screen-input='0'.modifyscreen.endif.ifscreen-nameeq'IT_CONT1-T_TIME'andit_cont1-trucknone''.screen-input='0'.modifyscreen.endif."endedbysandipshankariyaelse.ifscreen-nameeq'IT_CONT1-LRNO'.screen-input='0'.modifyscreen.endif.ifscreen-nameeq'IT_CONT1-LRDATE'.screen-input='0'.modifyscreen.endif.ifscreen-nameeq'IT_CONT1-TRANSNAME'.screen-input='0'.modifyscreen.endif.ifscreen-nameeq'IT_CONT1-TRUCKNO'.screen-input='0'.modifyscreen.endif."addedbysandipshankariyaifscreen-nameeq'IT_CONT1-T_DATE'andit_cont1-trucknone''.screen-input='0'.modifyscreen.endif.ifscreen-nameeq'IT_CONT1-T_TIME'andit_cont1-trucknone''.screen-input='0'.modifyscreen.endif."endedbysandipshankariyaendif.endloop.endmodule."INPUT_DATAOUTPUT>>>>>>>>>>>>>INCLUDEmyinclude_out. >>>>>>start>>>>>>>

>>>>>>>>>>>>>INCLUDEMYEXCEL_PRESHP>>>>>>start>>>>>>>*&---------------------------------------------------------------------**&IncludeMYEXCEL_PRESHPaddbysandip*&---------------------------------------------------------------------*

FORMEXCEL_PRESHP.performGETDATA_INV.

data:htypesy-tabix.callfunction'SAPGUI_PROGRESS_INDICATOR'exportingtext='Processing...'exceptionsothers=1.

createobjecth_excel'EXCEL.APPLICATION'.performerr_hdl.setpropertyofh_excel'DISPLAYALERTS'=0.setpropertyofh_excel'VISIBLE'=0.callmethodofh_excel'WORKBOOKS'=h_wrkbookl.performerr_hdl.callmethodofh_wrkbookl'ADD'=h_wrkbook.performerr_hdl.callmethodofh_excel'ACTIVESHEET'=h_activesheet.

setpropertyofh_activesheet'NAME'='Pre-shipmentInvoice'.getpropertyofh_activesheet'PAGESETUP'=h_pagesetup.

setpropertyofh_pagesetup'TopMargin'=4.setpropertyofh_pagesetup'BOTTOMMARGIN'=2.setpropertyofh_pagesetup'RIGHTMARGIN'=4.setpropertyofh_pagesetup'LEFTMARGIN'=4.setpropertyofh_pagesetup'FOOTERMARGIN'=4.setpropertyofh_pagesetup'HEADERMARGIN'=4.setpropertyofh_pagesetup'ORIENTATION'=1.setpropertyofh_pagesetup'RIGHTFOOTER'='Page&Pof&N'.setpropertyofh_pagesetup'PrintTitleRows'='$1:$32'.callmethodofh_excel'COLUMNS'=h_columnexporting#1='a'.setpropertyofh_column'COLUMNWIDTH'=10.freeobjecth_column.callmethodofh_excel'COLUMNS'=h_columnexporting#1='b'.setpropertyofh_column'COLUMNwIDTH'=11.freeobjecth_column.callmethodofh_excel'COLUMNS'=h_columnexporting#1='c'.setpropertyofh_column'COLUMNWIDTH'=7.freeobjecth_column.callmethodofh_excel'COLUMNS'=h_columnexporting#1='d'.setpropertyofh_column'COLUMNWIDTH'=6.freeobjecth_column.callmethodofh_excel'COLUMNS'=h_columnexporting#1='e'.setpropertyofh_column'COLUMNWIDTH'=13.freeobjecth_column.callmethodofh_excel'COLUMNS'=h_columnexporting#1='f'.setpropertyofh_column'COLUMNWIDTH'=10.freeobjecth_column.callmethodofh_excel'COLUMNS'=h_columnexporting#1='g'.setpropertyofh_column'COLUMNWIDTH'=9.freeobjecth_column.callmethodofh_excel'COLUMNS'=h_columnexporting#1='h'.setpropertyofh_column'COLUMNWIDTH'=9.freeobjecth_column.callmethodofh_excel'COLUMNS'=h_columnexporting#1='i'.setpropertyofh_column'COLUMNWIDTH'=8.freeobjecth_column.callmethodofh_excel'COLUMNS'=h_columnexporting#1='j'.setpropertyofh_column'COLUMNWIDTH'=8.freeobjecth_column.

m=1.loopatit_yxp_invpreintowa_yxp_invpre.performborder_rangeusingm1m10.callmethodofh_cell'borders'=h_borderexporting#1='3'."topsetpropertyofh_border'LINESTYLE'='1'.setpropertyofh_border'weight'=2.freeobjecth_border.callmethodofh_cell'borders'=h_borderexporting#1='4'."topsetpropertyofh_border'LINESTYLE'='1'.setpropertyofh_border'weight'=2.freeobjecth_border.performborder_rangeusingm1m2.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm10'RetailInvoice'xlleftxlcenter0.performborder_rangeusingm5m6.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm51'INVOICE'xlcenterxlcenter0.performborder_rangeusingm7m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm70'ORIGINAL/DUPLICATE/TRIPLICATE/EXTRA'xlrightxlcenter0.performborder_cellusingm1'1''1'2.performborder_cellusingm10'2''1'2.m=m+1.performborder_rangeusingm1m3.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm11'Range:'xlleftxlcenter0.performborder_rangeusingm4m5.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performborder_rangeusingm6m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performborder_cellusingm1'1''1'2.performborder_cellusingm10'2''1'2.performborder_cellusingm5'2''1'2.

callmethodofh_excel'Worksheets'=h_activesheetexporting#1=1.callmethodofh_activesheet'Activate'.getpropertyofh_activesheet'Shapes'=shapes.

callmethodofshapes'AddPicture'exporting#1='C:\Windows\Temp\logo.bmp'"imagefilenameonpresentationserver#2=m#3='1'#4=170"left#5=12"top#6=80"right#7=45."bottomm=m+1.cleartext3.performborder_rangeusingm1m3.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm11'Division:'xlleftxlcenter0.performborder_rangeusingm4m5.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performborder_rangeusingm6m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.concatenateexdat1+6(2)exdat1+4(2)exdat1(4)intotext3separatedby'.'.

concatenate'Date&TimeofRemoval:'text3intotext3.performfill_cellusingm60text3xlleftxlcenter0.performborder_cellusingm1'1''1'2.performborder_cellusingm10'2''1'2.performborder_cellusingm5'2''1'2.m=m+1.cleartext3.performborder_rangeusingm1m3.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm11'Corp.Off.'xlleftxlcenter0.performborder_rangeusingm4m5.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performborder_rangeusingm6m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performborder_cellusingm1'1''1'2.performborder_cellusingm10'2''1'2.performborder_cellusingm5'2''1'2.m=m+1.performborder_rangeusingm1m3.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm10eadrc-name1xlleftxlcenter0.performborder_rangeusingm4m5.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performborder_rangeusingm6m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performborder_cellusingm1'1''1'2.performborder_cellusingm10'2''1'2.performborder_cellusingm5'2''1'2.m=m+1.cleartext3.performborder_rangeusingm1m3.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.concatenateeadrc-name2eadrc-name3intotext3.performfill_cellusingm10text3xlleftxlcenter0.performborder_rangeusingm4m5.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performborder_rangeusingm6m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performborder_cellusingm1'1''1'2.performborder_cellusingm10'2''1'2.performborder_cellusingm5'2''1'2.m=m+1.performborder_rangeusingm1m3.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm10eadrc-name4xlleftxlcenter0.performborder_rangeusingm4m5.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performborder_rangeusingm6m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.concatenate'I.E.C.No:'''text2intotext3.performfill_cellusingm60text3xlleftxlcenter0.performborder_cellusingm1'1''1'2.performborder_cellusingm10'2''1'2.performborder_cellusingm5'2''1'2.m=m+1.cleartext3.performborder_rangeusingm1m3.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.concatenateeadrc-city1eadrc-post_code1intotext3.performfill_cellusingm10text3xlleftxlcenter0.performborder_rangeusingm4m5.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performborder_rangeusingm6m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performborder_cellusingm1'1''1'2.performborder_cellusingm10'2''1'2.performborder_cellusingm5'2''1'2.performborder_rangeusingm1m10.callmethodofh_cell'borders'=h_borderexporting#1='4'."topsetpropertyofh_border'LINESTYLE'='1'.setpropertyofh_border'weight'=2.freeobjecth_border.m=m+1.performborder_rangeusingm1m5.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm11'Exporter:'xlleftxlcenter0.

performborder_rangeusingm6m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performborder_cellusingm1'1''1'2.performborder_cellusingm10'2''1'2.performborder_cellusingm5'2''1'2.m=m+1.cleartext3.performborder_rangeusingm1m5.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm10it_adrc-name1xlleftxlcenter0.

performborder_rangeusingm6m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.concatenatewa_yxp_invpre-audat+6(2)wa_yxp_invpre-audat+4(2)wa_yxp_invpre-audat(4)intotext3separatedby'.'.concatenate'InvoiceNo&Date:'wa_yxp_invpre-auto_id'Date:'text3intotext3separatedby''.performfill_cellusingm60text3xlleftxlcenter0.performborder_cellusingm1'1''1'2.performborder_cellusingm10'2''1'2.performborder_cellusingm5'2''1'2.m=m+1.cleartext3.performborder_rangeusingm1m5.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm10it_adrc-streetxlleftxlcenter0.performborder_rangeusingm6m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.concatenatewa_yxp_shphd-aredt+6(2)wa_yxp_shphd-aredt+4(2)wa_yxp_shphd-aredt(4)intotext3separatedby'.'.concatenate'ARENo.&Date:'wa_yxp_shphd-ar4_number'Date:'text3intotext3separatedby''.performfill_cellusingm60text3xlleftxlcenter0.performborder_cellusingm1'1''1'2.performborder_cellusingm10'2''1'2.performborder_cellusingm5'2''1'2.m=m+1.cleartext3.performborder_rangeusingm1m5.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.concatenateit_adrc-str_suppl3it_adrc-city1intotext3separatedby','.performfill_cellusingm10text3xlleftxlcenter0.performborder_rangeusingm6m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.

concatenate'SalesOrderNo:'salesintotext3separatedby''.performfill_cellusingm60text3xlleftxlcenter0.performborder_cellusingm1'1''1'2.performborder_cellusingm10'2''1'2.performborder_cellusingm5'2''1'2.m=m+1.cleartext3.performborder_rangeusingm1m5.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.concatenateit_adrc-city2it_adrc-post_code1intotext3separatedby','.performfill_cellusingm10text3xlleftxlcenter0.performborder_rangeusingm6m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.

performborder_cellusingm1'1''1'2.performborder_cellusingm10'2''1'2.performborder_cellusingm5'2''1'2.m=m+1.performborder_rangeusingm1m5.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm11'SupportingManufacturer:'xlleftxlcenter0.performborder_rangeusingm6m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performborder_cellusingm1'1''1'2.performborder_cellusingm10'2''1'2.performborder_cellusingm5'2''1'2.m=m+1.performborder_rangeusingm1m5.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm10madrc-name1xlleftxlcenter0.performborder_rangeusingm6m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performborder_cellusingm1'1''1'2.performborder_cellusingm10'2''1'2.performborder_cellusingm5'2''1'2.m=m+1.performborder_rangeusingm1m5.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm10madrc-streetxlleftxlcenter0.performborder_rangeusingm6m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performborder_cellusingm1'1''1'2.performborder_cellusingm10'2''1'2.performborder_cellusingm5'2''1'2.m=m+1.performborder_rangeusingm1m5.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.concatenatemadrc-str_suppl3madrc-city2intotext3separatedby','.performfill_cellusingm10text3xlleftxlcenter0.performborder_rangeusingm6m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performborder_cellusingm1'1''1'2.performborder_cellusingm10'2''1'2.performborder_cellusingm5'2''1'2.m=m+1.performborder_rangeusingm1m5.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.concatenatemadrc-city1madrc-post_code1intotext3separatedby','.performfill_cellusingm10text3xlleftxlcenter0.performborder_rangeusingm6m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.concatenate'BuyerOrederNo.:'bstkdintotext3separatedby''.performfill_cellusingm60text3xlleftxlcenter0.performborder_cellusingm1'1''1'2.performborder_cellusingm10'2''1'2.performborder_cellusingm5'2''1'2.performborder_rangeusingm6m10.callmethodofh_cell'borders'=h_borderexporting#1='3'."topsetpropertyofh_border'LINESTYLE'='1'.setpropertyofh_border'weight'=2.freeobjecth_border.performborder_rangeusingm1m10.callmethodofh_cell'borders'=h_borderexporting#1='4'."topsetpropertyofh_border'LINESTYLE'='1'.setpropertyofh_border'weight'=2.freeobjecth_border.m=m+1.performborder_rangeusingm1m5.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm11'Consignee:'xlleftxlcenter0.performborder_rangeusingm6m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm61'Buyer(IfotherthanConsignee)'xlleftxlcenter0.performborder_cellusingm1'1''1'2.performborder_cellusingm10'2''1'2.performborder_cellusingm5'2''1'2.m=m+1.performborder_rangeusingm1m5.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm10cadrc-name1xlleftxlcenter0.performborder_rangeusingm6m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm60sadrc-name1xlleftxlcenter0.performborder_cellusingm1'1''1'2.performborder_cellusingm10'2''1'2.performborder_cellusingm5'2''1'2.m=m+1.n=m+1.performborder_rangeusingm1n5.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.concatenatecadrc-name2cadrc-name3cadrc-name4intotext3.performfill_cellusingm10text3xlleftxlcenter0.setpropertyofh_cell'wraptext'=1.performborder_rangeusingm6n10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.concatenatesadrc-name2sadrc-name3sadrc-name4intotext3.performfill_cellusingm60text3xlleftxlcenter0.setpropertyofh_cell'wraptext'=1.performborder_cellusingm1'1''1'2.performborder_cellusingm10'2''1'2.performborder_cellusingm5'2''1'2.performborder_cellusingn1'1''1'2.performborder_cellusingn10'2''1'2.performborder_cellusingn5'2''1'2.m=m+1.performborder_rangeusingm1m5.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.

performborder_rangeusingm6m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.m=m+1.performborder_rangeusingm1m5.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.

performborder_rangeusingm6m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.concatenate'Notify1:'nadrc1-name1nadrc1-name2nadrc1-name3nadrc1-name4nadrc1-city1nadrc1-city2intotext3.

performfill_cellusingm60text3xlleftxlcenter0.performborder_cellusingm1'1''1'2.performborder_cellusingm10'2''1'2.performborder_cellusingm5'2''1'2.performborder_rangeusingm6m10.callmethodofh_cell'borders'=h_borderexporting#1='3'."topsetpropertyofh_border'LINESTYLE'='1'.setpropertyofh_border'weight'=2.freeobjecth_border.m=m+1.performborder_rangeusingm1m5.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.

performborder_rangeusingm6m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.concatenate'Notify1:'nadrc2-name1nadrc2-name2nadrc2-name3nadrc2-name4nadrc2-city1nadrc2-city2intotext3.performfill_cellusingm60text3xlleftxlcenter0.performborder_cellusingm1'1''1'2.performborder_cellusingm10'2''1'2.performborder_cellusingm5'2''1'2.performborder_rangeusingm1m10.callmethodofh_cell'borders'=h_borderexporting#1='4'."topsetpropertyofh_border'LINESTYLE'='1'.setpropertyofh_border'weight'=2.freeobjecth_border.m=m+1.performborder_rangeusingm1m2.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.

performfill_cellusingm10'Pre-carriageBy:'xlleftxlcenter0.performborder_rangeusingm3m5.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.

performfill_cellusingm30'PlaceofRecieptByPre-carrier:'xlleftxlcenter0.

performborder_rangeusingm6m7.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.

performfill_cellusingm60'CountryofOriginofGoods:'xlleftxlcenter0.performborder_rangeusingm8m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm80'CountryofFinalDestination:'xlleftxlcenter0.performborder_cellusingm1'1''1'2.performborder_cellusingm2'2''1'2.performborder_cellusingm7'2''1'2.performborder_cellusingm10'2''1'2.performborder_cellusingm5'2''1'2.performborder_rangeusingm6m10.m=m+1.performborder_rangeusingm1m2.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.concatenatewa_yxp_shphd-vehcl_fromwa_yxp_shphd-vehcl_tointotext3.performfill_cellusingm10text3xlleftxlcenter0.performborder_rangeusingm3m5.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.

performfill_cellusingm30precarrierxlleftxlcenter0.

performborder_rangeusingm6m7.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm60'India'xlleftxlcenter0.performborder_rangeusingm8m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm80flandxxlleftxlcenter0.performborder_cellusingm1'1''1'2.performborder_cellusingm2'2''1'2.performborder_cellusingm7'2''1'2.performborder_cellusingm10'2''1'2.performborder_cellusingm5'2''1'2.

performborder_rangeusingm1m10.callmethodofh_cell'borders'=h_borderexporting#1='4'."topsetpropertyofh_border'LINESTYLE'='1'.setpropertyofh_border'weight'=2.freeobjecth_border.

m=m+1.performborder_rangeusingm1m2.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.

performfill_cellusingm10'Vessel/Flight#:'xlleftxlcenter0.performborder_rangeusingm3m5.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.

performfill_cellusingm30'PortofLoading:'xlleftxlcenter0.

performborder_rangeusingm6m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.concatenate'TermsofDeliveryandPayment:'string1intotext3separatedby''.performfill_cellusingm60text3xlleftxlcenter0.

performborder_cellusingm1'1''1'2.performborder_cellusingm2'2''1'2.performborder_cellusingm7'2''1'2.performborder_cellusingm10'2''1'2.performborder_cellusingm5'2''1'2.m=m+1.performborder_rangeusingm1m2.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.concatenatevesselwa_yxp_shphd-voy_fly_nointotext3.performfill_cellusingm10text3xlleftxlcenter0.performborder_rangeusingm3m5.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.

performfill_cellusingm30wa_yxp_shphd-port_loadxlleftxlcenter0.

performborder_rangeusingm6m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.concatenate'LCNo:'it_ylcelcmst1-lc_numberintotext3separatedby''.performfill_cellusingm60text3xlleftxlcenter0.

performborder_cellusingm1'1''1'2.performborder_cellusingm2'2''1'2.performborder_cellusingm7'2''1'2.performborder_cellusingm10'2''1'2.performborder_cellusingm5'2''1'2.performborder_rangeusingm1m10.callmethodofh_cell'borders'=h_borderexporting#1='4'."topsetpropertyofh_border'LINESTYLE'='1'.setpropertyofh_border'weight'=2.freeobjecth_border.m=m+1.performborder_rangeusingm1m2.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.

performfill_cellusingm10'PortOfDischarge:'xlleftxlcenter0.performborder_rangeusingm3m5.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.

performfill_cellusingm30'FinalDestination:'xlleftxlcenter0.

performborder_rangeusingm6m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.concatenate'Banker:'wa_yxp_invpre-advbankintotext3.performfill_cellusingm60text3xlleftxlcenter0.

performborder_cellusingm1'1''1'2.performborder_cellusingm2'2''1'2.performborder_cellusingm7'2''1'2.performborder_cellusingm10'2''1'2.performborder_cellusingm5'2''1'2.m=m+1.performborder_rangeusingm1m2.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm10wa_yxp_shphd-port_dschrxlleftxlcenter0.performborder_rangeusingm3m5.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.

performfill_cellusingm30wa_yxp_shphd-fin_destinxlleftxlcenter0.

performborder_rangeusingm6m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm60'InsuranceCoverNo&Date:'xlleftxlcenter0.

performborder_cellusingm1'1''1'2.performborder_cellusingm2'2''1'2.performborder_cellusingm7'2''1'2.performborder_cellusingm10'2''1'2.performborder_cellusingm5'2''1'2.performborder_rangeusingm1m10.callmethodofh_cell'borders'=h_borderexporting#1='4'."topsetpropertyofh_border'LINESTYLE'='1'.setpropertyofh_border'weight'=2.freeobjecth_border.m=m+1.cleartext3.performborder_rangeusingm1m5.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.concatenate'Nameofcommodity:'P_licprodintotext3.performfill_cellusingm10text3xlleftxlcenter0.performborder_rangeusingm6m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.concatenate'FreightTerms:'inco1wa_yxp_shphd-shp_typeintotext3.performfill_cellusingm60text3xlleftxlcenter0.performborder_cellusingm1'1''1'2.performborder_cellusingm10'2''1'2.performborder_cellusingm5'2''1'2.performborder_rangeusingm1m10.callmethodofh_cell'borders'=h_borderexporting#1='4'."topsetpropertyofh_border'LINESTYLE'='1'.setpropertyofh_border'weight'=2.freeobjecth_border.m=m+1.performborder_rangeusingm1m10.callmethodofh_cell'SELECT'.setpropertyofh_cell'wraptext'=1.setpropertyofh_cell1'rowheight'=30noflush.setpropertyofh_cell2'rowheight'=30noflush.

callmethodofh_cell'borders'=h_borderexporting#1='4'."bottomsetpropertyofh_border'LINESTYLE'='1'.setpropertyofh_border'weight'=2.freeobjecth_border.

performfill_cellusingm10wa_hdrinv-hdr1xlcenterxltop0.performfill_cellusingm20wa_hdrinv-hdr2xlcenterxltop0.performfill_cellusingm30wa_hdrinv-hdr3xlcenterxltop0.performfill_cellusingm40wa_hdrinv-hdr4xlcenterxltop0.performfill_cellusingm50wa_hdrinv-hdr5xlcenterxltop0.performfill_cellusingm60'Nt.Wt'xlcenterxltop0.performfill_cellusingm70wa_hdrinv-hdr7xlcenterxltop0.performfill_cellusingm80wa_hdrinv-hdr8xlcenterxltop0.performfill_cellusingm90wa_hdrinv-hdr9xlcenterxltop0.performfill_cellusingm100wa_hdrinv-hdr10xlcenterxltop0.performborder_cellusingm1'1''1'2.performborder_cellusingm1'2''1'2.performborder_cellusingm2'2''1'2.performborder_cellusingm3'2''1'2.performborder_cellusingm4'2''1'2.performborder_cellusingm5'2''1'2.performborder_cellusingm6'2''1'2.performborder_cellusingm7'2''1'2.performborder_cellusingm8'2''1'2.performborder_cellusingm9'2''1'2.performborder_cellusingm10'2''1'2.datatabtypeivalue0.sel_1=m+1.loopatIT_FINAL1intowa_final1.m=m+1.tab=tab+1.performborder_rangeusingm1m10.performfill_cellusingm10wa_final1-hs_codexlleftxlcenter0.performfill_cellusingm20wa_final1-desc_goodxlcenterxlcenter0.performfill_cellusingm30wa_final1-SIZExlcenterxlcenter0.performfill_cellusingm40wa_final1-gsmxlcenterxlcenter0.performfill_cellusingm50wa_final1-typxlcenterxlcenter0.

performfill_cellusingm60wa_final1-ntwtxlcenterxlcenter0.setpropertyofh_cell'numberformat'='#0,000.000'.performfill_cellusingm70wa_final1-tcxlcenterxlcenter0.

performfill_cellusingm80wa_final1-qtyxlrightxlcenter0.setpropertyofh_cell'numberformat'='#0,000'.clearexrate.exrate=wa_final1-rate.performfill_cellusingm90exratexlrightxlcenter0.text3=m.text4=m.concatenate'h'text3intotext3.concatenate'('text3intotext3.concatenate'i'text4intotext4.concatenatetext4')'intotext4.concatenatetext3text4intotext3separatedby':'.concatenate'='text3intotext3separatedby'product'.

performfill_cellusingm100text3xlrightxlcenter0.""wa_final1-amtfromsapsetpropertyofh_cell'numberformat'='#0,000.00'.performborder_cellusingm1'1''1'2.performborder_cellusingm1'2''1'2.performborder_cellusingm2'2''1'2.performborder_cellusingm3'2''1'2.performborder_cellusingm4'2''1'2.performborder_cellusingm5'2''1'2.performborder_cellusingm6'2''1'2.performborder_cellusingm7'2''1'2.performborder_cellusingm8'2''1'2.performborder_cellusingm9'2''1'2.performborder_cellusingm10'2''1'2.endloop.sel_2=sel_1+tab-1."============================forblanklines===================iftable17.tab=17-tab.dotabtimes.m=m+1.performborder_rangeusingm1m10.performborder_cellusingm1'1''1'2.performborder_cellusingm1'2''1'2.performborder_cellusingm2'2''1'2.performborder_cellusingm3'2''1'2.performborder_cellusingm4'2''1'2.performborder_cellusingm5'2''1'2.performborder_cellusingm6'2''1'2.performborder_cellusingm7'2''1'2.performborder_cellusingm8'2''1'2.performborder_cellusingm9'2''1'2.performborder_cellusingm10'2''1'2.enddo.endif."==========================end================================m=m+1.performborder_rangeusingm1m10.callmethodofh_cell'borders'=h_borderexporting#1='3'."topsetpropertyofh_border'LINESTYLE'='1'.setpropertyofh_border'weight'=2.freeobjecth_border.performborder_rangeusingm1m2.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.text4=p_grosswt.concatenate'GrossWeight:'text4intotext3separatedby''.setpropertyofh_cell'numberformat'='#00,000.000'.performfill_cellusingm10text3xlleftxlcenter0.performborder_rangeusingm3m4.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm30'No&KindofPkgs.:'xlleftxlcenter0.performborder_rangeusingm5m7.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm50''xlleftxlcenter0.text3=sel_1.text4=sel_2.concatenate'h'text3intotext3.concatenate'('text3intotext3.concatenate'h'text4intotext4.concatenatetext4')'intotext4.concatenatetext3text4intotext3separatedby':'.concatenate'='text3intotext3separatedby'sum'.

performfill_cellusingm80text3xlleftxlcenter0.setpropertyofh_cell'numberformat'='#0,000'.datatot_qtytypestring.tot_qty=text3."forquantitytext3=sel_1.text4=sel_2.concatenate'j'text3intotext3.concatenate'('text3intotext3.concatenate'j'text4intotext4.concatenatetext4')'intotext4.concatenatetext3text4intotext3separatedby':'.concatenate'='text3intotext3separatedby'sum'.

performborder_rangeusingm10m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm100text3xlleftxlcenter0.setpropertyofh_cell'numberformat'='#00,000.00'.datatot_amttypestring.tot_amt=text3.performborder_cellusingm1'1''1'2.performborder_cellusingm2'2''1'2.performborder_cellusingm4'2''1'2.performborder_cellusingm5'2''1'2.performborder_cellusingm7'2''1'2.performborder_cellusingm8'2''1'2.performborder_cellusingm10'2''1'2.

m=m+1.performborder_rangeusingm1m2.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.text4=p_ntgew.concatenate'NetWeight:'text4intotext3separatedby''.

performfill_cellusingm10text3xlleftxlcenter0.setpropertyofh_cell'numberformat'='#00,000.000'.performborder_rangeusingm3m4.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.ifwa_yxp_invpre-pack_typeeq''.concatenatecarton''wa_yxp_invpre-pack_typeintotext3separatedby''.performfill_cellusingm30text3xlleftxlcenter0.else.concatenateWA_YXP_INVPRE-NO_PACK''wa_yxp_invpre-pack_typeintotext3.performfill_cellusingm30text3xlleftxlcenter0.endif.performborder_rangeusingm5m7.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm50'SumTotal'xlleftxlcenter0.performfill_cellusingm80''xlleftxlcenter0.performborder_rangeusingm9m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm90''xlleftxlcenter0.performborder_rangeusingm1m10.callmethodofh_cell'borders'=h_borderexporting#1='4'."topsetpropertyofh_border'LINESTYLE'='1'.setpropertyofh_border'weight'=2.freeobjecth_border.performborder_cellusingm1'1''1'2.performborder_cellusingm2'2''1'2.performborder_cellusingm4'2''1'2.performborder_cellusingm5'2''1'2.performborder_cellusingm7'2''1'2.performborder_cellusingm8'2''1'2.performborder_cellusingm10'2''1'2.

m=m+1.performborder_rangeusingm1m7.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm10'Total'xlleftxlcenter0.performborder_rangeusingm8m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.

performfill_cellusingm80tot_qtyxlleftxlcenter0.setpropertyofh_cell'numberformat'='#0,000'.performborder_rangeusingm1m10.callmethodofh_cell'borders'=h_borderexporting#1='4'."topsetpropertyofh_border'LINESTYLE'='1'.setpropertyofh_border'weight'=2.freeobjecth_border.performborder_cellusingm1'1''1'2.performborder_cellusingm7'2''1'2.performborder_cellusingm10'2''1'2.m=m+1.performborder_rangeusingm1m2.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.

performfill_cellusingm10'AmountChargeable(Inwords)'xlleftxlcenter0.performborder_rangeusingm3m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.text4=m-3.

concatenate'=spellcurr(J'text4',"USDOLLAR","S","CENTS","S")'intotext3.performfill_cellusingm30text3xlleftxlcenter0.performborder_cellusingm1'1''1'2.performborder_cellusingm10'2''1'2.performborder_rangeusingm1m10.callmethodofh_cell'borders'=h_borderexporting#1='4'."topsetpropertyofh_border'LINESTYLE'='1'.setpropertyofh_border'weight'=2.freeobjecth_border.m=m+1.ifvbrk-vkorg2800orvbrk-vkorg2000orvbrk-vkorg2500.performborder_rangeusingm1m2.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm10'Commission:'xlleftxlcenter0.performborder_rangeusingm3m4.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm30comxlleftxlcenter0.else.performborder_rangeusingm1m2.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm10'CenvatPayablen:'xlleftxlcenter0.performborder_rangeusingm3m4.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm30p_cenvatxlleftxlcenter0.endif.performborder_rangeusingm5m6.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm50'ExchangeRate'xlleftxlcenter0.performborder_rangeusingm7m8.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.text3=wa_yxp_invpre-kursf.concatenatetext3'INR'intotext3separatedby''.performfill_cellusingm70text3xlleftxlcenter0.performborder_cellusingm1'1''1'2.performborder_cellusingm10'2''1'2.m=m+1.performborder_rangeusingm1m2.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performborder_rangeusingm3m4.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performborder_rangeusingm5m6.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm50'(-)Freight'xlleftxlcenter0.performborder_rangeusingm7m8.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performborder_rangeusingm9m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm90p_freightxlrightxlcenter0.setpropertyofh_cell'numberformat'='#0,000.00'.performborder_cellusingm1'1''1'2.performborder_cellusingm10'2''1'2.m=m+1.performborder_rangeusingm1m2.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performborder_rangeusingm3m4.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performborder_rangeusingm5m6.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm50'(+)Commission'xlleftxlcenter0.performborder_rangeusingm7m8.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performborder_rangeusingm9m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm90p_insuxlrightxlcenter0.performborder_cellusingm1'1''1'2.performborder_cellusingm10'2''1'2.m=m+1.performborder_rangeusingm1m2.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performborder_rangeusingm3m4.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performborder_rangeusingm5m6.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm50'(-)Discount'xlleftxlcenter0.performborder_rangeusingm7m8.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performborder_rangeusingm9m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm90p_disxlrightxlcenter0.performborder_cellusingm1'1''1'2.performborder_cellusingm10'2''1'2.m=m+1.performborder_rangeusingm1m2.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performborder_rangeusingm3m4.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performborder_rangeusingm5m6.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm50'(-)Other'xlleftxlcenter0.performborder_rangeusingm7m8.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performborder_rangeusingm9m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm90p_othrxlrightxlcenter0.performborder_cellusingm1'1''1'2.performborder_cellusingm10'2''1'2.m=m+1.performborder_rangeusingm1m2.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performborder_rangeusingm3m4.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performborder_rangeusingm5m6.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm50'TotalFobValue:'xlleftxlcenter0.performborder_rangeusingm7m8.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performborder_rangeusingm9m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.text3=m-9.

concatenate'j'text3intotext4.concatenate'('text4intotext4.text3=m-4.concatenate'-i'text3intotext3.concatenatetext4text3intotext4.text3=m-3.concatenate'+i'text3intotext3.concatenatetext4text3intotext4.text3=m-2.concatenate'-i'text3intotext3.concatenatetext4text3intotext4.text3=m-1.concatenate'-i'text3intotext3.concatenatetext4text3intotext4.concatenatetext4')'intotext4."concatenatetext3text4intotext3separatedby':'.concatenate'='text4intotext4separatedby'sum'.

performfill_cellusingm90text4xlrightxlcenter0.""p_totfobperformborder_cellusingm1'1''1'2.performborder_cellusingm10'2''1'2.m=m+1.performborder_rangeusingm1m2.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performborder_rangeusingm3m4.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performborder_rangeusingm5m6.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm50'TotalFOBValue(INR):'xlleftxlcenter0.performborder_rangeusingm7m8.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performborder_rangeusingm9m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.text3=m-1.concatenate'i'text3intotext3.text4=wa_yxp_invpre-kursf..concatenate'=product('text3'*'text4')'intotext3.performfill_cellusingm90text3xlrightxlcenter0.""p_totfob1setpropertyofh_cell'numberformat'='#0,00,000.00'.performborder_cellusingm1'1''1'2.performborder_cellusingm10'2''1'2.performborder_rangeusingm1m10.callmethodofh_cell'borders'=h_borderexporting#1='4'."topsetpropertyofh_border'LINESTYLE'='1'.setpropertyofh_border'weight'=2.freeobjecth_border.m=m+1.performborder_rangeusingm1m1.callmethodofh_cell'SELECT'.performfill_cellusingm10'Marks&No.:'xlleftxlcenter0.performfill_cellusingm20'Sr.No'xlleftxlcenter0.performborder_rangeusingm3m4.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm30lcontnoxlleftxlcenter0.performfill_cellusingm50lcontsizxlleftxlcenter0.concatenate'Noof'wa_yxp_invpre-pack_typeintotext3separatedby''.performfill_cellusingm60text3xlleftxlcenter0.performborder_rangeusingm7m8.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm70lshsealxlleftxlcenter0.performborder_rangeusingm9m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm90lexsealxlleftxlcenter0.performborder_cellusingm1'1''1'2.performborder_cellusingm10'2''1'2.n=m.loopattdline.n=n+1.performborder_rangeusingn1n1.callmethodofh_cell'SELECT'.performfill_cellusingn10tdline-tdlinexlleftxlcenter0.

performborder_cellusingn1'1''1'2.performborder_cellusingn10'2''1'2.endloop.srno2=0.loopatIT_ITEMintowa_item.m=m+1.srno2=srno2+1.performborder_rangeusingm1m1.callmethodofh_cell'SELECT'."performfill_cellusingm10''xlleftxlcenter0.performfill_cellusingm20srno2xlleftxlcenter0.performborder_rangeusingm3m4.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm30wa_item-contnoxlleftxlcenter0.performfill_cellusingm50wa_item-cont_sizexlleftxlcenter0.performfill_cellusingm60wa_item-cartonxlleftxlcenter0.performborder_rangeusingm7m8.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm70wa_item-sealno1xlleftxlcenter0.performborder_rangeusingm9m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm90wa_item-esealnoxlleftxlcenter0.performborder_cellusingm1'1''1'2.performborder_cellusingm10'2''1'2.endloop.ifsrno2le9.srno2=9-srno2.

dosrno2times.m=m+1.performborder_rangeusingm1m10.performborder_cellusingm1'1''1'2.performborder_cellusingm10'2''1'2.enddo.clearsrno2.endif.m=m+1.performborder_rangeusingm1m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performborder_cellusingm1'1''1'2.performborder_cellusingm10'2''1'2.text3='WeWelspunIndiaLimited,AnjarareherebydeclaredthatweareexportinggoodsunderdutyDrawbackSchemeandfurtherdeclaredthatwehavenotavailedCenvat'.performfill_cellusingm10text3xlleftxlcenter0.m=m+1.performborder_rangeusingm1m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performborder_cellusingm1'1''1'2.performborder_cellusingm10'2''1'2.text3='creditRule2004onthemanufacturingofthesaidgoods'.performfill_cellusingm10text3xlleftxlcenter0.performborder_rangeusingm1m10.callmethodofh_cell'borders'=h_borderexporting#1='4'."topsetpropertyofh_border'LINESTYLE'='1'.setpropertyofh_border'weight'=2.freeobjecth_border.m=m+1.cleartext3.performborder_rangeusingm1m5.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.

performfill_cellusingm11string_n2xlleftxlcenter0.

performborder_rangeusingm6m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm60'ForWELSPUNGLOBALBRANDSLTD.'xlrightxlcenter0.performborder_cellusingm1'1''1'2.performborder_cellusingm10'2''1'2.performborder_cellusingm5'2''1'2.m=m+1.cleartext3.performborder_rangeusingm1m5.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.

performfill_cellusingm11string3xlleftxlcenter0.

performborder_rangeusingm6m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performborder_cellusingm1'1''1'2.performborder_cellusingm10'2''1'2.performborder_cellusingm5'2''1'2.m=m+1.cleartext3.performborder_rangeusingm1m5.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.concatenatebdat+6(2)bdat+4(2)bdat(4)intotext3separatedby'.'.concatenatebnotext3intotext3separatedby''.performfill_cellusingm11text3xlleftxlcenter0.

performborder_rangeusingm6m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performborder_cellusingm1'1''1'2.performborder_cellusingm10'2''1'2.performborder_cellusingm5'2''1'2.m=m+1.cleartext3.performborder_rangeusingm1m5.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.

performfill_cellusingm11string_n1xlleftxlcenter0.

performborder_rangeusingm6m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performborder_cellusingm1'1''1'2.performborder_cellusingm10'2''1'2.performborder_cellusingm5'2''1'2.m=m+1.cleartext3.performborder_rangeusingm1m5.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.text3='I/We,hereby,declarethatI/Weshallclaimthebenefits,asadmissible,'.performfill_cellusingm10text3xlleftxlcenter0.

performborder_rangeusingm6m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performborder_cellusingm1'1''1'2.performborder_cellusingm10'2''1'2.performborder_cellusingm5'2''1'2.

m=m+1.cleartext3.performborder_rangeusingm1m5.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.text3='underchapter3ofFTP'.performfill_cellusingm10text3xlleftxlcenter0.

performborder_rangeusingm6m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performborder_cellusingm1'1''1'2.performborder_cellusingm10'2''1'2.performborder_cellusingm5'2''1'2.m=m+1.cleartext3.performborder_rangeusingm1m5.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.text3='WeherebycertifythatmerchandiseisofIndianorigin.'.performfill_cellusingm10text3xlleftxlcenter0.

performborder_rangeusingm6m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performborder_cellusingm1'1''1'2.performborder_cellusingm10'2''1'2.performborder_cellusingm5'2''1'2.m=m+1.cleartext3.performborder_rangeusingm1m5.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.text3='Declaration:WeDeclarethatthisinvoiceshowtheactualpriceofthe'.performfill_cellusingm10text3xlleftxlcenter0.

performborder_rangeusingm6m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.

performborder_cellusingm1'1''1'2.performborder_cellusingm10'2''1'2.performborder_cellusingm5'2''1'2.

m=m+1.cleartext3.performborder_rangeusingm1m5.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.text3='goodsdescribedandallparticularsareTrueandcorrect.'.performfill_cellusingm10text3xlleftxlcenter0.

performborder_rangeusingm6m10.callmethodofh_cell'SELECT'.callmethodofh_cell'MERGE'.performfill_cellusingm60'AuthorisedSignatory'xlrightxlcenter0.performborder_cellusingm1'1''1'2.performborder_cellusingm10'2''1'2.performborder_cellusingm5'2''1'2.performborder_rangeusingm1m10.callmethodofh_cell'borders'=h_borderexporting#1='4'."topsetpropertyofh_border'LINESTYLE'='1'.setpropertyofh_border'weight'=2.freeobjecth_border.

"===========================================SAVEEXCELFILE=======================endloop.callmethodofh_wrkbook'SAVEAS'exporting#1=fullpath.callmethodofh_wrkbook'CLOSE'.callmethodofh_excel'QUIT'.freeobjecth_wrkbook.freeobjecth_excel.message:'Downloadingcompleted.'type'S'.

endform.>>>>>>>>>>>>>INCLUDEMYEXCEL_PRESHP >>>>>>start>>>>>>>>>>>>>>>>>>>>INCLUDEMYEXCEL01 >>>>>>start>>>>>>>*&---------------------------------------------------------------------**&IncludeMYEXCEL01addbysandip*&---------------------------------------------------------------------*

formprint_excelusingp_autoid.ifrd_2'X'.performget_exeldatausingp_autoid.endif.performimg_dwnld.ifrd_1='X'.concatenate'EPSI_'p_autoidintofilename.elseifrd_2='X'.

concatenate'ARE-1_'p_autoidintofilename.

elseifrd_3='X'.

concatenate'EPL_'p_autoidintofilename.elseifrd_4='X'.

concatenate'ANNEXURE_'p_autoidintofilename.endif.callmethodcl_gui_frontend_services=>file_save_dialogexportingwindow_title='SAVEFILEAS'default_extension='XLS'file_filter='*.XLS'default_file_name=filename*prompt_on_overwrite='x'changingfilename=filenamepath=pathfullpath=fullpath.iffullpathisnotinitial.ifrd_1='X'.performEXCEL_PRESHPinprogramYPRESHP_INV1iffound.elseifrd_2='X'.performEXCEL_PRESHP_ARE_1inprogramYPRESHP_INV1iffoundusingp_autoidP_MANIDTENBEXDAT1.elseifrd_3='X'.performEXCEL_PRESHP_packinprogramYPRESHP_INV1iffound.

elseifrd_4='X'.performEXCEL_PRESHP_anexinprogramYPRESHP_INV1iffound.endif.else.message:'Filenameisnotentered!'type'E'.endif.endform."PRINT_EXCEL

FORMget_exeldataUSINGp_autoid.tables:lips,tvm1t,vbap,t005t,yxp_contdtl,yxp_bonddtl,t001w,tvko,zparameter.clear:cadrc.data:faltutypestring.data:linestypei.data:netwrlikebapicurr-bapicurr.data:it_item1typety_itemoccurs0.data:werkstypet001w-werks."DATA:WA_YXP_EXPTD_LIC3LIKEYXP_EXPTD_LIC.select*intocorrespondingfieldsoftableit_yxp_invprefromyxp_invprewhereyxp_invpre~auto_id=p_autoid.

loopatit_yxp_invpreintowa_yxp_invpre.selectsingle*fromlipswherevbeln=wa_yxp_invpre-doc_nr.selectsingle*fromlikpwherevbeln=wa_yxp_invpre-doc_nr.selectsingle*fromvbakwherevbeln=lips-vgbel.selectsingle*fromvbapwherevbeln=lips-vgbel.ifrd_4='X'.selectsingle*fromvbakintoa_vbakwherevbeln=vbak-bname.selectsingle*fromj_1imocompintoJ_1IMOCOMPwherebukrs=a_vbak-vkorg.elseifrd_4'X'.selectsingle*fromj_1imocompintoJ_1IMOCOMPwherebukrs=vbak-vkorg.endif.selectsingle*fromt001wherebukrs=vbak-vkorg.selectsingle*fromvbpawherevbeln=lips-vgbelandparvw='Z2'.selectsingle*fromadrcintonadrc1whereaddrnumber=vbpa-adrnr.********ForCor.Addressselectsingle*fromtvkowherevkorg=vbak-vkorg.selectsingle*fromadrcintoeadrcwhereaddrnumber=tvko-adrnr.*************ForWGBLIECNo

selectsingle*fromzparameterwhereparakey2=vbak-vkorgandparakey1='IECNO'.text2=zparameter-parakey7.

selectsingle*fromzparameterwhereparakey2=vbak-vkorgandparakey1='BIN'.text_B=zparameter-parakey7."================ADDBYSANDIP==========================selectsingle*fromzparameterwhereparakey2=vbak-vkorgandparakey5='INMUN1'"wa_yxp_shphd-port_CODEandparakey1='SUFFNO'.""PORTINPARAKET5

date1='20120522'.*addedbychintan22.05.2012ifwa_YXP_invpre-audat>=date1.ifzparameter-parakey5='INMUN1'.text_1='VIII/48-141/FS/MP&SEZ/2012-13DT:11.05.2012'.else.text_1=zparameter-parakey8.endif.text_2=zparameter-parakey9.else.text_1=zparameter-parakey8.text_2=zparameter-parakey9.endif.

*********************ASPERMAILCONFIRMATIONFROMALPESHANDAVINASHSIR*CHANGEINCOTERMFORMDELIVERYTOSOselectsingle*fromvbkdwherevbeln=lips-vgbel.

inco1=vbkd-inco1.

*Manuclear:vbpa.*BREAK-POINT.selectsingle*fromvbrkwherevbeln=wa_yxp_invpre-doc_nr.

selectsingle*fromt001wwherewerks=wa_yxp_invpre-werksandekorg=wa_yxp_invpre-vkorg.

selectsingle*fromadrcintoit_adrcwhereaddrnumber=t001w-adrnr.

*************************selectsingle*fromvbakwherevbelneqvbrp-aubel.selectsingle*fromvbakwherevbelneqvbak-bname.

selectsinglewerksintowerksfromvbapwherevbeln=vbak-vbeln.*CHANGEBYAJAY*SELECTSINGLE*FROMT001WHEREBUKRSEQVBAK-VKORG.**BREAK-POINT.selectsingle*fromt001wwherewerks=werksandvkorg=vbak-vkorg.selectsingle*fromadrcintomadrcwhereaddrnumbereqt001w-adrnr.**********ICENoOFPlant

selectsingle*fromzparameterwhereparakey2=werksandparakey1='IECNO'.text1=zparameter-parakey7.

************

*PRE-CARRIERBY*BREAK-POINT.*BREAK-POINT.

precarrier='ANJAR'.ifwerks='2800'.precarrier='ANJAR'.elseifwerks='2000'orwerks='1200'.precarrier='MORAI,VAPI'.endif.

selectsingle*fromkna1intowa_kna1wherekunnr=vbak-kunnr.selectsingle*fromvbpawherevbeln=lips-vgbelandparvw='WE'."IN('SH','WE').selectsingle*fromadrcintocadrcwhereaddrnumber=vbpa-adrnr.selectsingle*fromvbpawherevbeln=lips-vgbelandparvw='AG'."IN('SH','WE').

ifvbpa-kunnrnevbak-kunnr.selectsingle*fromadrcintosadrcwhereaddrnumbereqvbpa-adrnr.endif.

selectsinglelandxfromt005tintocont1whereland1eqsadrc-countryandspraseq'E'.

selectsingle*fromylceordwherevbeln=lips-vgbel.

selectsingle*fromylcelcmstintoit_ylcelcmst1wherelc_refnr=ylceord-lc_refnr.

ifit_ylcelcmst1-usance='X'.concatenate'L/C'it_ylcelcmst1-usance_day'ATSIGHT'intostring1separatedbyspace.else.concatenateit_ylcelcmst1-inco1'ATSIGHT'intostring1separatedbyspace.endif.

selectsingle*fromt005twhereland1=it_ylcelcmst1-cntry_organdspras='E'.selectsinglelandxintoflandxfromt005twhereland1=it_ylcelcmst1-cntry_finandspras='E'.

select*fromyxp_invpreintotableit_yxp_invprewhereauto_id=wa_yxp_invpre-auto_id.ift005t-landxisinitial.t005t-landx='INDIA'.endif.clear:sales,bstkd.*LOOPATIT_YXP_INVPREINTOW_YXP_INVPRE.select*fromyxp_itemintotableit_yxp_itemforallentriesinit_yxp_invprewheredoc_nr=it_yxp_invpre-doc_nr.*CARTON

select*fromyxp_contman_itmintotableit_yxp_contman_itmforallentriesinit_yxp_itemwheredelv=it_yxp_item-doc_nrandmanid=p_manidandideq'M'.

it_yxp_contman_itm1[]=it_yxp_contman_itm[].it_yxp_contman_itm2[]=it_yxp_contman_itm[].

sortit_yxp_contman_itm2byso_vbeln.deleteadjacentduplicatesfromit_yxp_contman_itm2comparingso_vbeln.loopatit_yxp_contman_itm2intowa_yxp_contman_itm2.*ONCHANGEOFWA_YXP_CONTMAN_ITM2-VBELN."SACHIN*CONCATENATESALESWA_YXP_CONTMAN_ITM2-VBELN*INTOSALESSEPARATEDBY','.*ENDON.concatenatesaleswa_yxp_contman_itm2-vbelnintosalesseparatedby','.concatenatebstkdwa_yxp_contman_itm2-ebelnspace"SACHINintobstkdseparatedby','.endloop.shiftsalesleftdeletingleading','.shiftsalesrightdeletingtrailing','.shiftbstkdleftdeletingleading','.shiftbstkdrightdeletingtrailing','.clear:p_ntgew,p_grosswt.loopatit_yxp_contman_itmintowa_yxp_contman_itm.vessel=wa_yxp_contman_itm-vesselname.port_load=wa_yxp_contman_itm-load_desc.port_desc=wa_yxp_contman_itm-dschr_desc.*WA_YXP_INVPRE-NO_PACK=WA_YXP_INVPRE-NO_PACK*+WA_YXP_CONTMAN_ITM-CARTON.ifwa_yxp_contman_itm-contnoisinitial.carton=carton+wa_yxp_contman_itm-carton.*TOT_PC=TOT_PC+WA_YXP_CONTMAN_ITM-TOT_PCS.else.onchangeofwa_yxp_contman_itm-contno.carton=carton+wa_yxp_contman_itm-carton.*TOT_PC=TOT_PC+WA_YXP_CONTMAN_ITM-TOT_PCS.endon.endif.*aJAYCHANGEp_ntgew=p_ntgew+wa_yxp_contman_itm-ntgew_kg.p_grosswt=p_grosswt+wa_yxp_contman_itm-brgew_kg.

endloop.*f-POINT.sortit_yxp_invprebydoc_nr.

loopatit_yxp_invpreintow_yxp_invpre.ifp_freightisinitial.p_freight=w_yxp_invpre-freight."addedbysachinendif.ifp_insuisinitial.p_insu=w_yxp_invpre-commison.endif.ifp_disisinitial.p_dis=w_yxp_invpre-discount.endif.ifp_othrisinitial.p_othr=w_yxp_invpre-other.endif.p_freighttxt=w_yxp_invpre-freighttxt.p_commisontxt=w_yxp_invpre-commisontxt.p_discounttxt=w_yxp_invpre-discounttxt.p_txt=w_yxp_invpre-othertxt.ifp_freighttxtisinitial.p_freighttxt='Freight'.endif.ifp_commisontxtisinitial.p_commisontxt='Commission'.endif.ifp_discounttxtisinitial.p_discounttxt='Discount'.endif.ifp_txtisinitial.p_txt='Other'.endif.selectsinglevgbelfromlipsintolips-vgbelwherevbelneqw_yxp_invpre-doc_nr.*ONCHANGEOFLIPS-VGBEL."SACHIN*CONCATENATESALESLIPS-VGBELINTOSALESSEPARATEDBY','.*ENDON.*SHIFTSALESLEFTDELETINGLEADING','.*SHIFTSALESRIGHTDELETINGTRAILING','.onchangeofw_yxp_invpre-audat.concatenatew_yxp_invpre-audat''intosdat.endon.*P_GROSSWT=WA_YXP_INVPRE-BRGEW."aJAYCHANGE*P_NTGEW=WA_YXP_INVPRE-NTGEW.*BREAK-POINT.selectsingle*fromyxp_shphdwheredoc_nr=w_yxp_invpre-auto_idanddoc_clas='0009'.

selectsingle*fromvbkdwherevbeln=lips-vgbel.

****************StartHideByChiragOn09.05.2011

*ONCHANGEOFLIPS-VGBEL.*CONCATENATEBSTKDVBKD-BSTKDSPACE"SACHIN*INTOBSTKDSEPARATEDBY','.*ENDON.*SHIFTBSTKDLEFTDELETINGLEADING','.*SHIFTBSTKDRIGHTDELETINGTRAILING','.*********************EndOf.

endloop.

sortit_yxp_itembymatnr.*DESCRIBETABLEIT_YXP_ITEMLINESLINES.

*LOOPATIT_YXP_ITEMINTOWA_YXP_ITEM.*SELECTSINGLEj_1ichidINTOWA_YXP_ITEM-HS_CODE*FROMJ_1IMTCHID*WHEREMATNR=WA_YXP_ITEM-MATNR.**MODIFYIT_YXP_ITEMFROMWA_YXP_ITEM.*ENDLOOP.data:w_lipstypelips.data:w_konvtypekonv.data:w_vbaktypevbak.clear:it_final1[],p_sumqty,p_sumamt,sumq,sumr,suma,wa_final1,p_ntwt,ntwt.

loopatit_yxp_itemintowa_yxp_item.weark=wa_yxp_item-waerk.

selectsinglevgbelvgposfromlipsintocorrespondingfieldsofw_lipswherevbeln=wa_yxp_item-doc_nrandposnr=wa_yxp_item-posnr.selectsingleknumvintocorrespondingfieldsofw_vbakfromvbakwherevbeln=w_lips-vgbel.selectsingle*fromkonvintow_konvwhereknumv=w_vbak-knumvandkposn=w_lips-vgposandkschl='PR00'.

*WA_YXP_ITEM-NETPR1=W_KONV-KBETR.p_sumamt1=wa_yxp_item-netwr+p_sumamt1.*W_KONV-KBETR=W_KONV-KBETR/100.

callfunction'BAPI_CURRENCY_CONV_TO_EXTERNAL'exportingcurrency=wa_yxp_item-waerkamount_internal=w_konv-kbetrimportingamount_external=netwr.wa_yxp_item-netpr1=netwr.*WA_YXP_ITEM-NETPR1=W_KONV-KBETR.*WA_YXP_ITEM-NETPR1=WA_YXP_ITEM-NETPR1/100.callfunction'BAPI_CURRENCY_CONV_TO_EXTERNAL'exportingcurrency=wa_yxp_item-waerkamount_internal=wa_yxp_item-netwrimportingamount_external=netwr.wa_yxp_item-netwr=netwr.

selectsingle*frommarawherematnr=wa_yxp_item-matnr.selectsinglemaktxintowa_yxp_item-arktxfrommaktwherematnr=wa_yxp_item-matnrandspras='E'.*WA_YXP_ITEM-ARKTX=clearwa_final1-hs_code.selectsingle*frommaraintomara1wherematnr=mara-bismt.selectsingle*frommvkewherematnr=mara-bismtandvkorg=vbak-vkorgandvtweg=vbak-vtweg.*BREAK-POINT.selectsinglej_1ichidintowa_final1-hs_codefromj_1imtchidwherematnr=mvke-pmatn.

iflinesgt1.

*ONCHANGEOFMARA-MATKL.selectsingle*frommvkewherematnr=mara-matnr.selectsingle*fromtvm1twheremvgr1=mvke-mvgr1andspras='EN'.datahdr8tmptypestring.datahdr9tmptypestring.datahdr10tmptypestring.

concatenate'Quantity'wa_yxp_item-vrkmeintohdr8tmpseparatedby''.concatenate'Ratein'wa_yxp_item-waerkintohdr9tmpseparatedby''.concatenate'Amount'wa_yxp_item-waerkintohdr10tmpseparatedby''.ifmara-spart='20'."TTwa_hdrinv-hdr1='HSCodeCustomer#sRef'.wa_hdrinv-hdr2='DescriptionofGoods'.wa_hdrinv-hdr3='Size'.wa_hdrinv-hdr4='GSM'.wa_hdrinv-hdr5='Type'.wa_hdrinv-hdr6='Const'.wa_hdrinv-hdr7='TC'.wa_hdrinv-hdr8=hdr8tmp.wa_hdrinv-hdr9=hdr9tmp.

wa_hdrinv-hdr10=hdr10tmp.

wa_final1-desc_good=tvm1t-bezei.*BREAK-POINT.splitwa_yxp_item-arktxat'/'intowa_final1-sizefaltu.splitfaltuat'GSM'intofaltuwa_final1-gsm.*WA_FINAL1-TYP.**WA_FINAL1-GSM.splitwa_final1-gsmat'/'intowa_final1-gsmfaltu.

splitwa_yxp_item-arktxat'/'intowa_final1-typfaltu.splitfaltuat'/'intowa_final1-typfaltu.splitfaltuat'/'intowa_final1-typfaltu.

elseifmara-spart='BS'ormara-spart='DB'."BSconcatenate'Quantity'wa_yxp_item-vrkmeintohdr8tmpseparatedby''.concatenate'Ratein'wa_yxp_item-waerkintohdr9tmpseparatedby''.concatenate'Amount'wa_yxp_item-waerkintohdr10tmpseparatedby''.wa_hdrinv-hdr1='HSCodeCustomer#sRef'.wa_hdrinv-hdr2='DescriptionofGoods'.wa_hdrinv-hdr3='Flat'.wa_hdrinv-hdr4='Fitted'.wa_hdrinv-hdr5='Pillow'.wa_hdrinv-hdr6='Const'.wa_hdrinv-hdr7='TC'.wa_hdrinv-hdr8=hdr8tmp.wa_hdrinv-hdr9=hdr9tmp.wa_hdrinv-hdr10=hdr10tmp.

splittvm1t-bezeiat'('intowa_final1-desc_goodfaltu.splitfaltuat'FLAT'intowa_final1-sizefaltu.splitfaltuat'+FITTED'intowa_final1-gsmfaltu.splitfaltuat'+PILLOWS'intowa_final1-typfaltu.*SPLITWA_YXP_ITEM-ARKTXAT'TC'INTOWA_FINAL1-TCFALTU.***WA_FINAL1-DESC_GOOD=TVM1T-BEZEI.wa_final1-tc=mara1-groes.endif.

ifsy-tabix1.wa_final1-qty=sumq.wa_final1-ntwt=ntwt.wa_final1-vrkme=wa_yxp_item-vrkme.wa_final1-rate=sumr.wa_final1-amt=suma.wa_final1-vrkme=wa_yxp_item-vrkme.p_sumqty=sumq+p_sumqty.p_sumamt=suma+p_sumamt.*appendwa_final1toit_final1.

endif.*ENDON.sumq=wa_yxp_item-kwmeng."+SUMQ.ntwt=wa_yxp_item-ntgew.sumr=wa_yxp_item-netpr1.".suma=(sumr*sumq)."+SUMA.else.sumq=wa_yxp_item-kwmeng+sumq.ntwt=wa_yxp_item-ntgew+ntwt.sumr=wa_yxp_item-netpr1."+SUMR.suma=(sumr*wa_yxp_item-kwmeng)+suma.wa_final1-qty=sumq.wa_final1-ntwt=ntwt.wa_final1-rate=sumr.wa_final1-amt=suma.*APPENDWA_FINAL1TOIT_FINAL1.

p_sumqty=wa_yxp_item-kwmeng+p_sumqty.p_ntwt=wa_yxp_item-ntgew+p_ntwt.*P_SUMAMT=SUMA+P_SUMAMT.

selectsingle*frommvkewherematnr=mara-matnr.

selectsingle*fromtvm1twheremvgr1=mvke-mvgr1andspras='EN'.concatenate'Quantity'wa_yxp_item-vrkmeintohdr8tmpseparatedby''.concatenate'Ratein'wa_yxp_item-waerkintohdr9tmpseparatedby''.concatenate'Amount'wa_yxp_item-waerkintohdr10tmpseparatedby''.ifmara-spart='20'."TTwa_hdrinv-hdr1='HSCodeCustomer#sRef'.wa_hdrinv-hdr2='DescriptionofGoods'.wa_hdrinv-hdr3='Size'.wa_hdrinv-hdr4='GSM'.wa_hdrinv-hdr5='Type'.wa_hdrinv-hdr6='Const'.wa_hdrinv-hdr7='TC'.wa_hdrinv-hdr8=hdr8tmp.wa_hdrinv-hdr9=hdr9tmp.wa_hdrinv-hdr10=hdr10tmp.

wa_final1-desc_good=tvm1t-bezei.splitwa_yxp_item-arktxat'/'intowa_final1-sizefaltu.splitfaltuat'GSM'intofaltuwa_final1-gsm.*WA_FINAL1-TYP.**WA_FINAL1-GSM.splitwa_final1-gsmat'/'intowa_final1-gsmfaltu.

splitwa_yxp_item-arktxat'/'intowa_final1-typfaltu.splitfaltuat'/'intowa_final1-typfaltu.splitfaltuat'/'intowa_final1-typfaltu.

elseifmara-spart='BS'ormara-spart='DB'."BSconcatenate'Quantity'wa_yxp_item-vrkmeintohdr8tmpseparatedby''.concatenate'Ratein'wa_yxp_item-waerkintohdr9tmpseparatedby''.concatenate'Amount'wa_yxp_item-waerkintohdr10tmpseparatedby''.

wa_hdrinv-hdr1='HSCodeCustomer#sRef'.wa_hdrinv-hdr2='DescriptionofGoods'.wa_hdrinv-hdr3='Flat'.wa_hdrinv-hdr4='Fitted'.wa_hdrinv-hdr5='Pillow'.wa_hdrinv-hdr6='Const'.wa_hdrinv-hdr7='TC'.wa_hdrinv-hdr8=hdr8tmp.wa_hdrinv-hdr9=hdr9tmp.wa_hdrinv-hdr10=hdr10tmp.

splittvm1t-bezeiat'('intowa_final1-desc_goodfaltu.

splitfaltuat'+'intowa_final1-sizefaltu.splitfaltuat'+'intowa_final1-gsmfaltu.splitfaltuat'+'intowa_final1-typfaltu.

shiftwa_final1-typrightdeletingtrailing')'.*SPLITWA_YXP_ITEM-ARKTXAT'TC'INTOWA_FINAL1-TCFALTU.*SPLITWA_FINAL1-TCAT'/'INTOWA_FINAL1-TCFALTU.wa_final1-tc=mara1-groes.

*SHIFTWA_FINAL1-TCLEFTDELETINGLEADING'/'.***WA_FINAL1-DESC_GOOD=TVM1T-BEZEI.endif.appendwa_final1toit_final1.

*APPENDWA_FINAL1TOIT_FINAL1.**ONCHANGEOFWA_FINAL1-SIZEOR**WA_FINAL1-GSMOR**WA_FINAL1-TYPOR**WA_FINAL1-RATE.**IFSY-TABIXNE1.**WA_FINAL1-DOC_NR=WA_YXP_ITEM-DOC_NR.**APPENDWA_FINAL1TOIT_FINAL1.**CLEAR:SUMA,SUMQ.**ENDIF.**ENDON.endif.

p_commission=wa_yxp_invpre-commison.p_discount=wa_yxp_invpre-discount.*CalculateCommissionandLessAmount*****P_COMAMT=P_SUMAMT*COM/100.*****P_LESSAMT=P_SUMAMT*DIS/100.*CalculateExchangeRateAmount.

p_kursfamt=wa_yxp_invpre-kursf*p_sumamt.

*CALCULATETOTALFOBVALUEp_totfob=p_kursfamt."+WA_YXP_INVPRE-FREIGHT.*getcenvatpayableselectsingletot_drintop_cenvatfromyxp_bonddtlwhereauto_id=wa_yxp_invpre-auto_id.

selectsinglebnobdatbrfromyxp_bonddtlinto(bno,bdat,yxp_bonddtl-br)whereauto_id=wa_yxp_invpre-auto_id.

bstatus=yxp_bonddtl-br.

ifyxp_bonddtl-brisinitial.ifwa_yxp_invpre-bondisinitial.string3='EXPORTUNDERREBATE'.else.string3='EXPORTUNDERBOND'.endif.else.ifyxp_bonddtl-breq'R'.string3='EXPORTUNDERREBATE'.else.string3='EXPORTUNDERBOND'.endif.endif.*WA_YXP_ITEM-WAERK.

callfunction'Y_XP_SPELL_AMOUNT'exportingcurrency=wa_yxp_item-waerkamount=p_sumamtimportingin_words=amt_wordexceptionserror=1others=2.ifsy-subrc0.messageidsy-msgidtypesy-msgtynumbersy-msgnowithsy-msgv1sy-msgv2sy-msgv3sy-msgv4.endif.*BREAK-POINT.onchangeofwa_yxp_item-doc_nr.select*fromyxp_contdtlintow_yxp_contdtlwheredoc_nr=wa_yxp_item-doc_nr.appendw_yxp_contdtltoi_yxp_contdtl.endselect.endon.clear:sumq,sumr,suma,ntwt.

*APPENDWA_FINAL1TOIT_FINAL1.*SELECTSINGLE*FROMYXP_CONTDTL*WHEREDOC_NR=WA_YXP_ITEM-DOC_NR.**ONCHANGEOFYXP_CONTDTL-CONTNO.*CONCATENATECONTNOYXP_CONTDTL-CONTNOINTOCONTNO*SEPARATEDBY','.*CONCATENATESEALNOYXP_CONTDTL-SEALNOINTOSEALNO*SEPARATEDBY','.*ENDON.*SHIFTCONTNOLEFTDELETINGLEADING','.*SHIFTCONTNORIGHTDELETINGTRAILING','.*SHIFTSEALNOLEFTDELETINGLEADING','.*SHIFTSEALNORIGHTDELETINGTRAILING','.

endloop.

***clearit_item[].sortit_yxp_contman_itm1bycont.

loopatit_yxp_contman_itm1intowa_yxp_contman_itm1.wa_item-contno=wa_yxp_contman_itm1-contno.wa_item-cont_size=wa_yxp_contman_itm1-cont_size.wa_item-carton=wa_yxp_contman_itm1-carton.ifcartonisinitial.carton=carton+wa_item-carton.endif.readtablei_yxp_contdtlintow_yxp_contdtlwithkeydoc_nr=wa_yxp_contman_itm1-delv.ifsy-subrc=0.wa_item-cont_size=w_yxp_contdtl-cont_size.wa_item-contno=w_yxp_contdtl-contno.wa_item-sealno1=w_yxp_contdtl-sealno.wa_item-esealno=w_yxp_contdtl-esealno.wa_item-buyerseal=w_yxp_contdtl-buyerseal.endif.

appendwa_itemtoit_item.

endloop.clear:it_item2[],it_item1[].it_item1[]=it_item[].it_item2[]=it_item[].clearit_item[].sortit_item1bycontnosealno1.deleteadjacentduplicatesfromit_item1comparingcontnosealno1.clear:carton,wa_item2,wa_item,carton1,wa_item.

loopatit_item1intowa_item1.wa_item-contno=wa_item1-contno.wa_item-cont_size=wa_item1-cont_size.wa_item-sealno1=wa_item1-sealno1.wa_item-esealno=wa_item1-esealno.wa_item-buyerseal=wa_item1-buyerseal.ifwa_item-contnoisnotinitial.loopatit_item2intowa_item2wherecontno=wa_item-contno.

carton1=carton1+wa_item2-carton.wa_item-carton=carton1.endloop.endif.ifwa_item-contnoisinitialandwa_item-sealno1isnotinitial.loopatit_item2intowa_item2wheresealno1=wa_item-sealno1.carton1=carton1+wa_item2-carton.wa_item-carton=carton1.endloop.endif.carton=carton+wa_item-carton.clearcarton1.appendwa_itemtoit_item.clearwa_item2.endloop.

*******READTABLEIT_FINAL1INTOWA_FINAL1WITHKEY*******DOC_NR=WA_YXP_ITEM-DOC_NR.*******IFSY-SUBRCNE0.*******WA_FINAL1-DOC_NR=WA_YXP_ITEM-DOC_NR.*******APPENDWA_FINAL1TOIT_FINAL1.*******CLEAR:SUMA,SUMQ.*******ELSE.*******WA_FINAL1-DOC_NR=WA_YXP_ITEM-DOC_NR.*******MODIFYIT_FINAL1FROMWA_FINAL1INDEXSY-TABIXTRANSPORTING*DOC_NR.*******ENDIF.sortit_final1bysizegsmtyprate.data:it_repairlikeit_final1withheaderline.data:wa_repairlikeit_repair.*****CHANGEDBYSACHIN*LOOPATIT_FINAL1INTOWA_FINAL1.*CLEARWA_FINAL1-TYP.*MODIFYIT_FINAL1FROMWA_FINAL1.*ENDLOOP.

loopatit_final1intowa_final1."SACHINonchangeofwa_final1-sizeorwa_final1-gsmorwa_final1-typorwa_final1-rate.ifsy-tabixne1.wa_repair-qty=sumq.wa_repair-ntwt=ntwt.wa_repair-amt=suma.appendwa_repairtoit_repair.clear:sumq,suma,ntwt..endif.endon.

move-correspondingwa_final1towa_repair.*APPENDWA_REPAIRTOIT_REPAIR.sumq=wa_final1-qty+sumq.ntwt=wa_final1-ntwt+ntwt.suma=wa_final1-amt+suma.atlast.wa_repair-qty=sumq.wa_repair-ntwt=ntwt.wa_repair-amt=suma.appendwa_repairtoit_repair.clear:sumq,suma,ntwt.endat.endloop.

readtableit_repairintowa_repairwithkeydoc_nr=wa_final1-doc_nr.ifsy-subrcne0.move-correspondingwa_final1towa_repair.wa_repair-qty=sumq.wa_repair-ntwt=ntwt.wa_repair-amt=suma.appendwa_repairtoit_repair.clear:sumq,suma,ntwt.endif.

clearit_final1[].

it_final1[]=it_repair[].****ENDOFCHANGES

*IFLINESGT1.*WA_FINAL1-QTY=SUMQ.*WA_FINAL1-RATE=SUMR.*WA_FINAL1-AMT=SUMA.**P_SUMQTY=SUMQ+P_SUMQTY.*P_SUMAMT=SUMA+P_SUMAMT.**BREAK-POINT.*APPENDWA_FINAL1TOIT_FINAL1.*ENDIF.

callfunction'Y_XP_SPELL_AMOUNT'exportingcurrency=wa_yxp_item-waerkamount=p_sumamt1importingin_words=amt_wordexceptionserror=1others=2.ifsy-subrc0.messageidsy-msgidtypesy-msgtynumbersy-msgnowithsy-msgv1sy-msgv2sy-msgv3sy-msgv4.endif.

callfunction'BAPI_CURRENCY_CONV_TO_EXTERNAL'exportingcurrency=wa_yxp_item-waerkamount_internal=p_sumamtimportingamount_external=netwr.*BREAK-POINT.p_sumamt=netwr.p_kursfamt=wa_yxp_invpre-kursf*p_sumamt.callfunction'BAPI_CURRENCY_CONV_TO_EXTERNAL'exportingcurrency=wa_yxp_item-waerkamount_internal=p_kursfamtimportingamount_external=netwr.p_kursfamt=netwr.

p_totfob=p_kursfamt+wa_yxp_invpre-freight.

callfunction'BAPI_CURRENCY_CONV_TO_EXTERNAL'exportingcurrency=wa_yxp_item-waerkamount_internal=p_totfobimportingamount_external=netwr.p_totfob=netwr.*becuzfreightwillbeenteredinINR.*P_TOTFOB=P_KURSFAMT+WA_YXP_INVPRE-FREIGHT.

selectsingle*fromylcesadrintoiylcesadrwhereadrnr=it_ylcelcmst1-adrnr.

describetableit_final1lineslines.

*BREAK-POINT.select*fromyxp_exptd_licintotableit_yxp_exptd_licwheredoc_nr=wa_yxp_invpre-auto_idanddoc_clas='0009'.

data:date_inv(10).data:d(2),m(2),y(4).*BREAK-POINT.loopatit_yxp_exptd_licintowa_yxp_exptd_lic2.clear:y,m,d.y=wa_yxp_exptd_lic2-licencedt+0(4).m=wa_yxp_exptd_lic2-licencedt+4(2).d=wa_yxp_exptd_lic2-licencedt+6(2).concatenatedmyintodate_invseparatedby'.'.*CONVERTDATEWA_YXP_EXPTD_LIC2-LICENCEDT*INTOINVERTED-DATEDATE_INV.ifwa_yxp_exptd_lic2-licensetype='DEPB'orwa_yxp_exptd_lic2-licensetype='ADVP'.concatenate'UNDER'''wa_yxp_exptd_lic2-licensetype'''SCHEMESR.NO.'wa_yxp_exptd_lic2-lic_sion'''OFTEXTILEPRODUCT'intostring_n1.elseifwa_yxp_exptd_lic2-licensetype='DBK1'.string_n1='UNDERDRAWBACKSCHEMEAGAINSTSRNO630201.'.elseifwa_yxp_exptd_lic2-licensetype='DBK2'.string_n1='UNDERDRAWBACKSCHEMEAGAINSTSRNO630202.'.elseifwa_yxp_exptd_lic2-licensetype='DBK3'.string_n1='UNDERDRAWBACKSCHEMEAGAINSTSRNO630401.'.elseifwa_yxp_exptd_lic2-licensetype='DBK4'.string_n1='UNDERDRAWBACKSCHEMEAGAINSTSRNO630402.'.elseifwa_yxp_exptd_lic2-licensetype='DBK5'.string_n1='UNDERDRAWBACKSCHEMEAGAINSTSRNO5811.'.elseifwa_yxp_exptd_lic2-licensetype='DBK6'orwa_yxp_exptd_lic2-licensetype='DBK7'orwa_yxp_exptd_lic2-licensetype='DBK8'orwa_yxp_exptd_lic2-licensetype='DBK9'orwa_yxp_exptd_lic2-licensetype='DB10'orwa_yxp_exptd_lic2-licensetype='DB11'orwa_yxp_exptd_lic2-licensetype='DB12'orwa_yxp_exptd_lic2-licensetype='DB13'.string_n1='UNDERDRAWBACKSCHEMEAGAINSTSRNO560302.'.elseifwa_yxp_exptd_lic2-licensetype='DB