It's not that easy...
i never know if i have to put a blank char see this..
IF g_recCustomer.GET("Clientes Marcações".Empresa) THEN
IF ("Clientes Marcações".Empresa = 'CNE1001') OR ("Clientes Marcações".Empresa = 'CNE1050') THEN
WichEmployee := "Clientes Marcações"."Num. Empregado"
ELSE
WichEmployee := "Clientes Marcações"."Num. Empregado SAP";
IF WichEmployee <> '' THEN BEGIN
IF (g_recCustomer."Empresa Financiadora" = TRUE) THEN
IF (g_recCustomer."Grupo TAP" = TRUE)
THEN BEGIN
g_EmployeeNo := WichEmployee;
g_KeyString := WichEmployee+GetFamRelation("Clientes Marcações".Tipo)+GetParentSeq("Num seq parentesco");
g_CodUCS := "Clientes Marcações"."Cód. Cliente";
FillChar;
g_fileFicheiro1.WRITE(g_EmployeeNo+g_KeyString+g_CodUCS);
END;
END;
IF g_EmployeeNo = '' THEN
g_EmployeeNo := PADSTR(g_EmployeeNo,MAXSTRLEN(g_EmployeeNo),BlankSpace);
IF STRLEN(g_EmployeeNo) < MAXSTRLEN(g_EmployeeNo) THEN
i := MAXSTRLEN(g_EmployeeNo) - STRLEN(g_EmployeeNo);
IF i <> 0 THEN BEGIN
REPEAT
g_EmployeeNo := INSSTR(g_EmployeeNo,BlankSpace,1);
i -= 1;
UNTIL i = 0;
END;
IF g_KeyString = '' THEN
g_KeyString := PADSTR(g_KeyString,MAXSTRLEN(g_KeyString),BlankSpace);
IF STRLEN(g_KeyString) < MAXSTRLEN(g_KeyString) THEN
i := MAXSTRLEN(g_KeyString) - STRLEN(g_KeyString);
IF i <> 0 THEN BEGIN
REPEAT
g_KeyString := INSSTR(g_KeyString,BlankSpace,1);
i -= 1;
UNTIL i = 0;
END;
IF g_CodUCS = '' THEN
g_CodUCS := PADSTR(g_CodUCS,MAXSTRLEN(g_CodUCS),BlankSpace);
IF STRLEN(g_CodUCS) < MAXSTRLEN(g_CodUCS) THEN
i := MAXSTRLEN(g_CodUCS) - STRLEN(g_CodUCS);
IF i <> 0 THEN BEGIN
REPEAT
g_CodUCS := INSSTR(g_CodUCS,BlankSpace,1);
i -= 1;
UNTIL i = 0;
END;
Answers
so, can you tell us more info?and can you post your code?
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
i never know if i have to put a blank char see this..
IF g_recCustomer.GET("Clientes Marcações".Empresa) THEN
IF ("Clientes Marcações".Empresa = 'CNE1001') OR ("Clientes Marcações".Empresa = 'CNE1050') THEN
WichEmployee := "Clientes Marcações"."Num. Empregado"
ELSE
WichEmployee := "Clientes Marcações"."Num. Empregado SAP";
IF WichEmployee <> '' THEN BEGIN
IF (g_recCustomer."Empresa Financiadora" = TRUE) THEN
IF (g_recCustomer."Grupo TAP" = TRUE)
THEN BEGIN
g_EmployeeNo := WichEmployee;
g_KeyString := WichEmployee+GetFamRelation("Clientes Marcações".Tipo)+GetParentSeq("Num seq parentesco");
g_CodUCS := "Clientes Marcações"."Cód. Cliente";
FillChar;
g_fileFicheiro1.WRITE(g_EmployeeNo+g_KeyString+g_CodUCS);
END;
END;
Clientes Marcações - OnPostDataItem()
diaProgress.CLOSE;
InicializarFicheiro()
g_fileFicheiro1.TEXTMODE(TRUE);
g_fileFicheiro1.WRITEMODE(TRUE);
g_fileFicheiro1.CREATE(g_textFileName1);
FillChar()
BlankSpace := '0';
IF g_EmployeeNo = '' THEN
g_EmployeeNo := PADSTR(g_EmployeeNo,MAXSTRLEN(g_EmployeeNo),BlankSpace);
IF STRLEN(g_EmployeeNo) < MAXSTRLEN(g_EmployeeNo) THEN
i := MAXSTRLEN(g_EmployeeNo) - STRLEN(g_EmployeeNo);
IF i <> 0 THEN BEGIN
REPEAT
g_EmployeeNo := INSSTR(g_EmployeeNo,BlankSpace,1);
i -= 1;
UNTIL i = 0;
END;
IF g_KeyString = '' THEN
g_KeyString := PADSTR(g_KeyString,MAXSTRLEN(g_KeyString),BlankSpace);
IF STRLEN(g_KeyString) < MAXSTRLEN(g_KeyString) THEN
i := MAXSTRLEN(g_KeyString) - STRLEN(g_KeyString);
IF i <> 0 THEN BEGIN
REPEAT
g_KeyString := INSSTR(g_KeyString,BlankSpace,1);
i -= 1;
UNTIL i = 0;
END;
IF g_CodUCS = '' THEN
g_CodUCS := PADSTR(g_CodUCS,MAXSTRLEN(g_CodUCS),BlankSpace);
IF STRLEN(g_CodUCS) < MAXSTRLEN(g_CodUCS) THEN
i := MAXSTRLEN(g_CodUCS) - STRLEN(g_CodUCS);
IF i <> 0 THEN BEGIN
REPEAT
g_CodUCS := INSSTR(g_CodUCS,BlankSpace,1);
i -= 1;
UNTIL i = 0;
END;
first of all...try to substitute this
with this
(there is a space between the quotes)
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
I don't understand you, sorry...ok, now I have understood the phrase...let me think
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
If Yes you cannot add spaces at the extremity of a code Variable !
You should change your Variable Type into Text.
=D> =D>
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog