Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Surya
Creator II
Creator II

Need Help In Recover Corrupted QVF file

Hello 

We are facing issue in main application Please help me to retrive that application.

Please find attached qvf if possible sent script.

2 Solutions

Accepted Solutions
ArnadoSandoval
Specialist II
Specialist II

Hi @Surya 

You are very lucky, your application open in my environment; I am in the process of copying and pasting all its modules to a new application! then I will post it.

These are the script sections; please confirm the script is from your corrupted Qlik Application.

Main

SET ThousandSep=',';
SET DecimalSep='.';
SET MoneyThousandSep=',';
SET MoneyDecimalSep='.';
SET MoneyFormat='$#,##0.00;($#,##0.00)';
SET TimeFormat='h:mm:ss TT';
SET DateFormat='M/D/YYYY';
SET TimestampFormat='M/D/YYYY h:mm:ss[.fff] TT';
SET FirstWeekDay=6;
SET BrokenWeeks=1;
SET ReferenceDay=0;
SET FirstMonthOfYear=1;
SET CollationLocale='en-US';
SET CreateSearchIndexOnReload=1;
SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';
SET LongMonthNames='January;February;March;April;May;June;July;August;September;October;November;December';
SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';
SET LongDayNames='Monday;Tuesday;Wednesday;Thursday;Friday;Saturday;Sunday';

let vStatus=1;
//************** Storage Config **************
$(Include=[lib://ConfigFiles (gravitagroup_gravitaqlik)/QVDPath.txt]) ;

Mapping:

Segment1:
Mapping LOAD Right(MATNR,10), SPART
FROM [$(vStage1QvdPath)MARA.qvd](qvd);

Segment2:
Mapping LOAD SPART, VTEXT
FROM [$(vStage1QvdPath)TSPAT.qvd](qvd) Where SPRAS = 'E';

Sub_Segment:
Mapping LOAD Right(MATNR,10) as MATNR, Sub_Segment
FROM [$(vStage1QvdPath)Sub_Segment_MATNR.qvd](qvd);

Plant_Name:
Mapping LOAD Num(Num#(WERKS)) as WERKS, NAME1
FROM [$(vStage1QvdPath)T001W.qvd](qvd);

[WERKS_BUKRS]:
Mapping LOAD Num(Num#(WERKS)), LANDX
FROM [$(vStage1QvdPath)WERKS_BUKRS.qvd](qvd);

Material_Name:
Mapping LOAD Right(MATNR,10) as MATNR, MAKTX
FROM [$(vStage1QvdPath)MAKT.qvd](qvd);

CountryName:
Mapping LOAD LAND1, LANDX50
FROM [$(vStage1QvdPath)T005T.qvd](qvd) Where SPRAS='E';

Shipping_Line_Name:
Mapping LOAD LIFNR, NAME1 as Shipping_Line_Name
FROM [$(vStage1QvdPath)LFA1.qvd](qvd);

Gate_Pass_Type1:
Mapping LOAD GTPASS, if(GPTYPE='I','Inbound',if(GPTYPE='O','Outbound',Null())) as Gate_Pass_Type
FROM [$(vStage1QvdPath)ZTMM_GATEPASS_I_Import.qvd](qvd);

ZTMM_GATEPASS:
LOAD ZZCONTAINER_NO,
GTPASS, 
Date(GINDT) as GINDT,
Date(GOUDT) as GOUDT,
ApplyMap('Gate_Pass_Type1',GTPASS,'NA') as Gate_Pass_Type
FROM [$(vStage1QvdPath)ZTMM_GATEPASS_Import.qvd](qvd);

Gate_Pass_Type:
Mapping LOAD ZZCONTAINER_NO, Gate_Pass_Type
Resident ZTMM_GATEPASS;

Gate_Pass_No:
Mapping LOAD ZZCONTAINER_NO, GTPASS
Resident ZTMM_GATEPASS;

Gate_In_Date:
Mapping LOAD ZZCONTAINER_NO, Date(GINDT) as GINDT
Resident ZTMM_GATEPASS;

Gate_Out_Date:
Mapping LOAD ZZCONTAINER_NO, Date(GOUDT) as GOUDT
Resident ZTMM_GATEPASS;
DROP Table ZTMM_GATEPASS;

Transaction

ZTMM_INBOUND1:
LOAD Num(Num#(VBELN)) as VBELN, Date(ERDAT) as Creation_Date,
ZZVENINVOICE as Vendor_Invoice, Date(ZZVENINVDATE) as Vendor_Invoice_Date,
ZZBLNUM as BL_Number, Date(ZZBLDATE) as BL_Date, Date(ZZBLDATE1) as BL_Receiving_Date, LIFNR
FROM [$(vStage1QvdPath)LIKP_Import.qvd](qvd) Where Match(LFART,'EL');

Left Join (ZTMM_INBOUND1)
LOAD 
Num(Num#(VBELN)) as VBELN,
Num(Num#(VBELN))&'|'&num(Num#(POSNR)) as Key_ZTMM_INBOUND, 
num(Num#(POSNR)) as POSNR,
Num(Num#(WERKS)) as WERKS,
ApplyMap('Plant_Name',Num(Num#(WERKS)),'NA') as Plant_Name,
if(ApplyMap('WERKS_BUKRS',Num(Num#(WERKS)),'NA')='India',ApplyMap('Plant_Name',Num(Num#(WERKS)),'NA'),ApplyMap('WERKS_BUKRS',Num(Num#(WERKS)),'NA')) as Plant_Country,
Right(MATNR,10) as MATNR,
ApplyMap('Material_Name',Right(MATNR,10),'NA') as Material_Name,
ApplyMap('Segment2',ApplyMap('Segment1',Right(MATNR,10),'NA'),'NA') as Segment_temp,
ApplyMap('Sub_Segment',Right(MATNR,10),'NA') as Sub_Segment_temp,
NTGEW,
LFIMG,
MEINS as MEINS_LIPS,
MEINS as UOM_LIPS,
UEBTO,
if(UNTTO=0,UEBTO,UNTTO) as UNTTO,
     ZZUOM, 
     ZZQTY, 
     ZZBELNR, 
     ZZGJAHR, 
     ZZLICNO, 
     ZZEPGNO, 
     ZZBUNDL, 
ZZCONTAINER_NO as Container_No, 
ZZCON_SIZE as Container_Size, 
////ZZINV, 
////ZZPOSNR, 
ZZSHIPPING,
ApplyMap('Shipping_Line_Name',ZZSHIPPING,'NA') as Shipping_Line_Name,
Date(ZZETADATE) as ZZETADATE,
Date(ZZSHBD_DATE) as ZZSHBD_DATE, 
ZZDETFREEDAY as Free_Detention_Day, 
ZZPRTNM as Loading_Port, 
ZZDISCPR, 
ZZFINDEST, 
ZZLINE_SEAL_NO
FROM [$(vStage1QvdPath)LIPS_Import.qvd](qvd);

Left Join (ZTMM_INBOUND1)
LOAD 
Num(Num#(VBELN))&'|'&num(Num#(POSNR)) as Key_ZTMM_INBOUND,
////ZZBLNUM as BL_Number,
///ZZCONTAINER_NO as Container_No,
ApplyMap('Gate_Pass_No',ZZCONTAINER_NO,'NA') as Gate_Pass_No,
ApplyMap('Gate_Pass_Type',ZZCONTAINER_NO,'NA') as Gate_Pass_Type,
ApplyMap('Gate_In_Date',ZZCONTAINER_NO,'NA') as Gate_In_Date,
ApplyMap('Gate_Out_Date',ZZCONTAINER_NO,'NA') as Gate_Out_Date,
//Date(ZZBLDATE) as ZZBLDATE,
Date(ETA_PLANT) as ETA_PLANT_DATE,
Date(ETA_FD) as ETA_FD_DATE,
ETA_FD as Final_Destination,
ETA_PLANT as Final_Destination_Plant,
Date(CRETS_D) as Container_return_Date,
Date(CMOVF_D) as Container_move_Date,
if(Date(CMOVF_D)=Date(Today()),1,0) as Flag_Today_move_Container,
Date(DUTYP_D) as Duty_Payment_Date,
BOE_NO, 
Date(BOE_DATE) as BOE_DATE,
Date(SHIP_LPAY_D) as Shipping_Payment_Date,
Date(OCC_D) as OCC_Date,
OCC_R as OCC_Remark,
Date(DO_VALD_D) as DO_Validity,
Date(DO_EXT_D) as DO_Extend_Date
FROM [$(vStage1QvdPath)ZTMM_INBOUND_Import.qvd](qvd);

Left Join (ZTMM_INBOUND1)
LOAD
LIFNR,
NAME1 as Vendor_Name,
ApplyMap('CountryName',LAND1,'NA') as Vendor_Country,
ORT01 as Vendor_City
FROM [$(vStage1QvdPath)LFA1.qvd](qvd);

Left Join (ZTMM_INBOUND1)
LOAD
Num(Num#(VBELN))&'|'&num(Num#(VBELP)) as Key_ZTMM_INBOUND,
Num(Num#(MENGE)) as MENGE_EKES_1,
Num(Num#(DABMG)) as DABMG_EKES_1
FROM [$(vStage1QvdPath)EKES_Import.qvd](qvd);

ZTMM_INBOUND1_1:
Load *,
if(Match(MEINS_LIPS,'KG'),Num(Num#(MENGE_EKES_1))/1000,if(Match(MEINS_LIPS,'GM','G'),Num(Num#(MENGE_EKES_1))/10000,Num(Num#(MENGE_EKES_1)))) as MENGE_EKES,
if(Match(MEINS_LIPS,'KG'),Num(Num#(DABMG_EKES_1))/1000,if(Match(MEINS_LIPS,'GM','G'),Num(Num#(DABMG_EKES_1))/10000,Num(Num#(DABMG_EKES_1)))) as DABMG_EKES
Resident ZTMM_INBOUND1 Where LFIMG<>0 and not IsNull(LFIMG);
Drop Table ZTMM_INBOUND1;

ZTMM_INBOUND2:
LOAD *,
if(Gate_In_Date<>'NA' and Gate_Out_Date='NA',1,0) as Flag_Container_at_Plant,
if(Match(WERKS,'1005','1006') and Segment_temp='Consumable/Chemicals','Project',Segment_temp) as Segment,
Num(Num#(MENGE_EKES-DABMG_EKES)) as Transit_Quantity_Total,
Num(Num#(MENGE_EKES+(MENGE_EKES*UEBTO/100))) as OverToleranceQty,
Num(Num#(MENGE_EKES-(MENGE_EKES*UNTTO/100))) as UnderToleranceQty,
Num(Num#(MENGE_EKES*UEBTO/100)) as [OverTolerance_%],
Num(Num#(MENGE_EKES*UNTTO/100)) as [UnderTolerance_%]
Resident ZTMM_INBOUND1_1;
DROP Table ZTMM_INBOUND1_1;

ZTMM_INBOUND3:
LOAD *,
if(Segment='Plastic',Sub_Segment_temp,Segment) as Sub_Segment,
if(Num(Num#(Transit_Quantity_Total))=0,'Closed',if(Num(Num#(DABMG_EKES))>=Num(Num#(UnderToleranceQty)) and Num(Num#(DABMG_EKES))<=Num(Num#(OverToleranceQty)),'Preclose','In Transit')) as Flag_Transit_1
Resident ZTMM_INBOUND2;
DROP Table ZTMM_INBOUND2;

ZTMM_INBOUND3_1:
LOAD *,
if(Flag_Transit_1<>'In Transit',Flag_Transit_1,if(Flag_Transit_1='In Transit' and DABMG_EKES=0,'In Transit','Short/Excess Supply')) as Flag_Transit
Resident ZTMM_INBOUND3;
DROP Table ZTMM_INBOUND3;

ZTMM_INBOUND4:
LOAD *,
if(Match(Flag_Transit,'In Transit'),if(IsNull(ETA_FD_DATE),'Need to Updated',if(Date(ETA_FD_DATE)>Date(Today()),'Up Coming Shipment',
if(Date(ETA_FD_DATE)<=Date(Today()) and not IsNull(OCC_Date) and IsNull(Container_move_Date),'OOC Done - Pending for Dispatch',
if(Date(ETA_FD_DATE)<=Date(Today()) and not IsNull(BOE_NO) and IsNull(OCC_Date),'Pending for OOC'
))))) as Flag_ETA_FD_Shipment,
Date(ETA_FD_DATE)-Date(Today()) as ETA_FD_Today,
If(Flag_Transit<>'In Transit' and Date(Gate_In_Date)>='11/1/2018' and IsNull(Container_return_Date),'Container to be Return','Container Returned') as Flag_Container_Return,
if(Match(Flag_Transit,'In Transit'),Transit_Quantity_Total,0) as Transit_Quantity,
if(Match(Flag_Transit,'Preclose'),Transit_Quantity_Total,0) as Preclose_Quantity
Resident ZTMM_INBOUND3_1;
DROP Table ZTMM_INBOUND3_1;

ZTMM_INBOUND5:
LOAD *,
if(Match(Flag_ETA_FD_Shipment,'Up Coming Shipment'),1,0) as Flag_Up_Coming_Shipment,
if(Match(Flag_ETA_FD_Shipment,'Up Coming Shipment'),(Ceil(ETA_FD_Today/7)-1)*7+1&'-'&Ceil(ETA_FD_Today/7)*7,Null()) as Bucket_UpComing_Shipment
Resident ZTMM_INBOUND4;
DROP Table ZTMM_INBOUND4;

EXIT SCRIPT

EXIT SCRIPT;

Calender

Calendr:
Load
Date(LinkDate) as LinkDate,
[Calendar Year],

[Fiscal Quarter],
[Fiscal Year] as Year,
[Fiscal Month] as Month,
[FY Year Name],
[Calendar Month Year],
[Fiscal Month]&'-'&[Calendar Year] as YearMonth_Cal,
[Fiscal Month]&'-'&[Fiscal Year] as YearMonth
//if([Fiscal Year]=$(vFYear),[Fiscal Year]&'-'&[Fiscal Month],[Fiscal Year]) as YearMonth1
From [$(vStage2QvdPath)Calendar_Final.qvd](qvd)
Where [Fiscal Year]>='2014'and LinkDate<=MonthEnd(Date(Today()));

 

 

Arnaldo Sandoval
A journey of a thousand miles begins with a single step.

View solution in original post

ArnadoSandoval
Specialist II
Specialist II

Hi @Surya 

I am attaching two qvf files; extract.qvf (this is the file found in your zip file; it did not have the qvf extension);  and New_Extract.qvf which is the recovered QVF.

Neither of the QVF files have data connections!

I copied all the objects from the corrupted file into a brand new QVF file/application.

The New_Extract.qvf does not have any data.

Arnaldo Sandoval
A journey of a thousand miles begins with a single step.

View solution in original post

3 Replies
ArnadoSandoval
Specialist II
Specialist II

Hi @Surya 

You are very lucky, your application open in my environment; I am in the process of copying and pasting all its modules to a new application! then I will post it.

These are the script sections; please confirm the script is from your corrupted Qlik Application.

Main

SET ThousandSep=',';
SET DecimalSep='.';
SET MoneyThousandSep=',';
SET MoneyDecimalSep='.';
SET MoneyFormat='$#,##0.00;($#,##0.00)';
SET TimeFormat='h:mm:ss TT';
SET DateFormat='M/D/YYYY';
SET TimestampFormat='M/D/YYYY h:mm:ss[.fff] TT';
SET FirstWeekDay=6;
SET BrokenWeeks=1;
SET ReferenceDay=0;
SET FirstMonthOfYear=1;
SET CollationLocale='en-US';
SET CreateSearchIndexOnReload=1;
SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';
SET LongMonthNames='January;February;March;April;May;June;July;August;September;October;November;December';
SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';
SET LongDayNames='Monday;Tuesday;Wednesday;Thursday;Friday;Saturday;Sunday';

let vStatus=1;
//************** Storage Config **************
$(Include=[lib://ConfigFiles (gravitagroup_gravitaqlik)/QVDPath.txt]) ;

Mapping:

Segment1:
Mapping LOAD Right(MATNR,10), SPART
FROM [$(vStage1QvdPath)MARA.qvd](qvd);

Segment2:
Mapping LOAD SPART, VTEXT
FROM [$(vStage1QvdPath)TSPAT.qvd](qvd) Where SPRAS = 'E';

Sub_Segment:
Mapping LOAD Right(MATNR,10) as MATNR, Sub_Segment
FROM [$(vStage1QvdPath)Sub_Segment_MATNR.qvd](qvd);

Plant_Name:
Mapping LOAD Num(Num#(WERKS)) as WERKS, NAME1
FROM [$(vStage1QvdPath)T001W.qvd](qvd);

[WERKS_BUKRS]:
Mapping LOAD Num(Num#(WERKS)), LANDX
FROM [$(vStage1QvdPath)WERKS_BUKRS.qvd](qvd);

Material_Name:
Mapping LOAD Right(MATNR,10) as MATNR, MAKTX
FROM [$(vStage1QvdPath)MAKT.qvd](qvd);

CountryName:
Mapping LOAD LAND1, LANDX50
FROM [$(vStage1QvdPath)T005T.qvd](qvd) Where SPRAS='E';

Shipping_Line_Name:
Mapping LOAD LIFNR, NAME1 as Shipping_Line_Name
FROM [$(vStage1QvdPath)LFA1.qvd](qvd);

Gate_Pass_Type1:
Mapping LOAD GTPASS, if(GPTYPE='I','Inbound',if(GPTYPE='O','Outbound',Null())) as Gate_Pass_Type
FROM [$(vStage1QvdPath)ZTMM_GATEPASS_I_Import.qvd](qvd);

ZTMM_GATEPASS:
LOAD ZZCONTAINER_NO,
GTPASS, 
Date(GINDT) as GINDT,
Date(GOUDT) as GOUDT,
ApplyMap('Gate_Pass_Type1',GTPASS,'NA') as Gate_Pass_Type
FROM [$(vStage1QvdPath)ZTMM_GATEPASS_Import.qvd](qvd);

Gate_Pass_Type:
Mapping LOAD ZZCONTAINER_NO, Gate_Pass_Type
Resident ZTMM_GATEPASS;

Gate_Pass_No:
Mapping LOAD ZZCONTAINER_NO, GTPASS
Resident ZTMM_GATEPASS;

Gate_In_Date:
Mapping LOAD ZZCONTAINER_NO, Date(GINDT) as GINDT
Resident ZTMM_GATEPASS;

Gate_Out_Date:
Mapping LOAD ZZCONTAINER_NO, Date(GOUDT) as GOUDT
Resident ZTMM_GATEPASS;
DROP Table ZTMM_GATEPASS;

Transaction

ZTMM_INBOUND1:
LOAD Num(Num#(VBELN)) as VBELN, Date(ERDAT) as Creation_Date,
ZZVENINVOICE as Vendor_Invoice, Date(ZZVENINVDATE) as Vendor_Invoice_Date,
ZZBLNUM as BL_Number, Date(ZZBLDATE) as BL_Date, Date(ZZBLDATE1) as BL_Receiving_Date, LIFNR
FROM [$(vStage1QvdPath)LIKP_Import.qvd](qvd) Where Match(LFART,'EL');

Left Join (ZTMM_INBOUND1)
LOAD 
Num(Num#(VBELN)) as VBELN,
Num(Num#(VBELN))&'|'&num(Num#(POSNR)) as Key_ZTMM_INBOUND, 
num(Num#(POSNR)) as POSNR,
Num(Num#(WERKS)) as WERKS,
ApplyMap('Plant_Name',Num(Num#(WERKS)),'NA') as Plant_Name,
if(ApplyMap('WERKS_BUKRS',Num(Num#(WERKS)),'NA')='India',ApplyMap('Plant_Name',Num(Num#(WERKS)),'NA'),ApplyMap('WERKS_BUKRS',Num(Num#(WERKS)),'NA')) as Plant_Country,
Right(MATNR,10) as MATNR,
ApplyMap('Material_Name',Right(MATNR,10),'NA') as Material_Name,
ApplyMap('Segment2',ApplyMap('Segment1',Right(MATNR,10),'NA'),'NA') as Segment_temp,
ApplyMap('Sub_Segment',Right(MATNR,10),'NA') as Sub_Segment_temp,
NTGEW,
LFIMG,
MEINS as MEINS_LIPS,
MEINS as UOM_LIPS,
UEBTO,
if(UNTTO=0,UEBTO,UNTTO) as UNTTO,
     ZZUOM, 
     ZZQTY, 
     ZZBELNR, 
     ZZGJAHR, 
     ZZLICNO, 
     ZZEPGNO, 
     ZZBUNDL, 
ZZCONTAINER_NO as Container_No, 
ZZCON_SIZE as Container_Size, 
////ZZINV, 
////ZZPOSNR, 
ZZSHIPPING,
ApplyMap('Shipping_Line_Name',ZZSHIPPING,'NA') as Shipping_Line_Name,
Date(ZZETADATE) as ZZETADATE,
Date(ZZSHBD_DATE) as ZZSHBD_DATE, 
ZZDETFREEDAY as Free_Detention_Day, 
ZZPRTNM as Loading_Port, 
ZZDISCPR, 
ZZFINDEST, 
ZZLINE_SEAL_NO
FROM [$(vStage1QvdPath)LIPS_Import.qvd](qvd);

Left Join (ZTMM_INBOUND1)
LOAD 
Num(Num#(VBELN))&'|'&num(Num#(POSNR)) as Key_ZTMM_INBOUND,
////ZZBLNUM as BL_Number,
///ZZCONTAINER_NO as Container_No,
ApplyMap('Gate_Pass_No',ZZCONTAINER_NO,'NA') as Gate_Pass_No,
ApplyMap('Gate_Pass_Type',ZZCONTAINER_NO,'NA') as Gate_Pass_Type,
ApplyMap('Gate_In_Date',ZZCONTAINER_NO,'NA') as Gate_In_Date,
ApplyMap('Gate_Out_Date',ZZCONTAINER_NO,'NA') as Gate_Out_Date,
//Date(ZZBLDATE) as ZZBLDATE,
Date(ETA_PLANT) as ETA_PLANT_DATE,
Date(ETA_FD) as ETA_FD_DATE,
ETA_FD as Final_Destination,
ETA_PLANT as Final_Destination_Plant,
Date(CRETS_D) as Container_return_Date,
Date(CMOVF_D) as Container_move_Date,
if(Date(CMOVF_D)=Date(Today()),1,0) as Flag_Today_move_Container,
Date(DUTYP_D) as Duty_Payment_Date,
BOE_NO, 
Date(BOE_DATE) as BOE_DATE,
Date(SHIP_LPAY_D) as Shipping_Payment_Date,
Date(OCC_D) as OCC_Date,
OCC_R as OCC_Remark,
Date(DO_VALD_D) as DO_Validity,
Date(DO_EXT_D) as DO_Extend_Date
FROM [$(vStage1QvdPath)ZTMM_INBOUND_Import.qvd](qvd);

Left Join (ZTMM_INBOUND1)
LOAD
LIFNR,
NAME1 as Vendor_Name,
ApplyMap('CountryName',LAND1,'NA') as Vendor_Country,
ORT01 as Vendor_City
FROM [$(vStage1QvdPath)LFA1.qvd](qvd);

Left Join (ZTMM_INBOUND1)
LOAD
Num(Num#(VBELN))&'|'&num(Num#(VBELP)) as Key_ZTMM_INBOUND,
Num(Num#(MENGE)) as MENGE_EKES_1,
Num(Num#(DABMG)) as DABMG_EKES_1
FROM [$(vStage1QvdPath)EKES_Import.qvd](qvd);

ZTMM_INBOUND1_1:
Load *,
if(Match(MEINS_LIPS,'KG'),Num(Num#(MENGE_EKES_1))/1000,if(Match(MEINS_LIPS,'GM','G'),Num(Num#(MENGE_EKES_1))/10000,Num(Num#(MENGE_EKES_1)))) as MENGE_EKES,
if(Match(MEINS_LIPS,'KG'),Num(Num#(DABMG_EKES_1))/1000,if(Match(MEINS_LIPS,'GM','G'),Num(Num#(DABMG_EKES_1))/10000,Num(Num#(DABMG_EKES_1)))) as DABMG_EKES
Resident ZTMM_INBOUND1 Where LFIMG<>0 and not IsNull(LFIMG);
Drop Table ZTMM_INBOUND1;

ZTMM_INBOUND2:
LOAD *,
if(Gate_In_Date<>'NA' and Gate_Out_Date='NA',1,0) as Flag_Container_at_Plant,
if(Match(WERKS,'1005','1006') and Segment_temp='Consumable/Chemicals','Project',Segment_temp) as Segment,
Num(Num#(MENGE_EKES-DABMG_EKES)) as Transit_Quantity_Total,
Num(Num#(MENGE_EKES+(MENGE_EKES*UEBTO/100))) as OverToleranceQty,
Num(Num#(MENGE_EKES-(MENGE_EKES*UNTTO/100))) as UnderToleranceQty,
Num(Num#(MENGE_EKES*UEBTO/100)) as [OverTolerance_%],
Num(Num#(MENGE_EKES*UNTTO/100)) as [UnderTolerance_%]
Resident ZTMM_INBOUND1_1;
DROP Table ZTMM_INBOUND1_1;

ZTMM_INBOUND3:
LOAD *,
if(Segment='Plastic',Sub_Segment_temp,Segment) as Sub_Segment,
if(Num(Num#(Transit_Quantity_Total))=0,'Closed',if(Num(Num#(DABMG_EKES))>=Num(Num#(UnderToleranceQty)) and Num(Num#(DABMG_EKES))<=Num(Num#(OverToleranceQty)),'Preclose','In Transit')) as Flag_Transit_1
Resident ZTMM_INBOUND2;
DROP Table ZTMM_INBOUND2;

ZTMM_INBOUND3_1:
LOAD *,
if(Flag_Transit_1<>'In Transit',Flag_Transit_1,if(Flag_Transit_1='In Transit' and DABMG_EKES=0,'In Transit','Short/Excess Supply')) as Flag_Transit
Resident ZTMM_INBOUND3;
DROP Table ZTMM_INBOUND3;

ZTMM_INBOUND4:
LOAD *,
if(Match(Flag_Transit,'In Transit'),if(IsNull(ETA_FD_DATE),'Need to Updated',if(Date(ETA_FD_DATE)>Date(Today()),'Up Coming Shipment',
if(Date(ETA_FD_DATE)<=Date(Today()) and not IsNull(OCC_Date) and IsNull(Container_move_Date),'OOC Done - Pending for Dispatch',
if(Date(ETA_FD_DATE)<=Date(Today()) and not IsNull(BOE_NO) and IsNull(OCC_Date),'Pending for OOC'
))))) as Flag_ETA_FD_Shipment,
Date(ETA_FD_DATE)-Date(Today()) as ETA_FD_Today,
If(Flag_Transit<>'In Transit' and Date(Gate_In_Date)>='11/1/2018' and IsNull(Container_return_Date),'Container to be Return','Container Returned') as Flag_Container_Return,
if(Match(Flag_Transit,'In Transit'),Transit_Quantity_Total,0) as Transit_Quantity,
if(Match(Flag_Transit,'Preclose'),Transit_Quantity_Total,0) as Preclose_Quantity
Resident ZTMM_INBOUND3_1;
DROP Table ZTMM_INBOUND3_1;

ZTMM_INBOUND5:
LOAD *,
if(Match(Flag_ETA_FD_Shipment,'Up Coming Shipment'),1,0) as Flag_Up_Coming_Shipment,
if(Match(Flag_ETA_FD_Shipment,'Up Coming Shipment'),(Ceil(ETA_FD_Today/7)-1)*7+1&'-'&Ceil(ETA_FD_Today/7)*7,Null()) as Bucket_UpComing_Shipment
Resident ZTMM_INBOUND4;
DROP Table ZTMM_INBOUND4;

EXIT SCRIPT

EXIT SCRIPT;

Calender

Calendr:
Load
Date(LinkDate) as LinkDate,
[Calendar Year],

[Fiscal Quarter],
[Fiscal Year] as Year,
[Fiscal Month] as Month,
[FY Year Name],
[Calendar Month Year],
[Fiscal Month]&'-'&[Calendar Year] as YearMonth_Cal,
[Fiscal Month]&'-'&[Fiscal Year] as YearMonth
//if([Fiscal Year]=$(vFYear),[Fiscal Year]&'-'&[Fiscal Month],[Fiscal Year]) as YearMonth1
From [$(vStage2QvdPath)Calendar_Final.qvd](qvd)
Where [Fiscal Year]>='2014'and LinkDate<=MonthEnd(Date(Today()));

 

 

Arnaldo Sandoval
A journey of a thousand miles begins with a single step.
ArnadoSandoval
Specialist II
Specialist II

Hi @Surya 

I am attaching two qvf files; extract.qvf (this is the file found in your zip file; it did not have the qvf extension);  and New_Extract.qvf which is the recovered QVF.

Neither of the QVF files have data connections!

I copied all the objects from the corrupted file into a brand new QVF file/application.

The New_Extract.qvf does not have any data.

Arnaldo Sandoval
A journey of a thousand miles begins with a single step.
Surya
Creator II
Creator II
Author

Sorry Sir...Im Uploading Wrong file.Please check followed file.