badda_bing
Well Known Member
Apologies in advance for this but I am no C guru!!!
I am having problems with B0900038 (Edit Posting Edit Code) when called from B0900042 (F0911 Edit Line). Code below;
Now in my humble opinion this simply opens the F0006 record for the MCU passed in and checks the MCPECC field (posting edit code) if the field is equal to N then it displays error “0069”.
Here’s my problem, the system seems to be invoking this error for every BU – if the posting edit code is set to N or not? I have turned debug on and captured the SQL statement that is executed and manually ran this against the DB and it returned the record I expected with a BLANK in the MCPECC field? Yet every time it is run within th BSFN it produces the error – any ideas.
TIA,
Paul
B7332 Win2K SQL2000 SP11.3srv and 11.1client
/* File open business units */
idJDBReturn = JDB_OpenTable(hUser, NID_F0006, ID_F0006_COST_CENTER,
NULL, (ushort)0, (char *)NULL,
&hRequestF0006);
if (idJDBReturn == JDEDB_FAILED)
{
memset((void *)(&dsDE0022),(int)('\0'),sizeof(dsDE0022));
strncpy(dsDE0022.szDescription, (const char *)("F0006"), sizeof(dsDE0022.szDescription));
jdeSetGBRErrorSubText(lpBhvrCom, lpVoid, (ID)0, "078D", &dsDE0022);
JDB_FreeBhvr(hUser);
return ER_ERROR;
}
/* Read the business unit record to find the posting edit code. */
strncpy(dsF0006Key.mcmcu, (const char *)(lpDS->szCostcenter),
sizeof(dsF0006Key.mcmcu));
idJDBReturn = JDB_FetchKeyed(hRequestF0006, ID_F0006_COST_CENTER,
(void *)&dsF0006Key, (short)1,
(void *)lpdsF0006, FALSE);
if (idJDBReturn == JDEDB_PASSED)
{
/* If the business unit posting edit code does not allow posting, */
/* Set an error on the business unit . */
if (dsF0006.mcpecc == 'N')
{
jdeErrorSet(lpBhvrCom, lpVoid, IDERRszCostcenter_1, "0069", (LPVOID)NULL);
JDB_CloseTable(hRequestF0006);
JDB_FreeBhvr(hUser);
return ER_ERROR;
}
}
else
I am having problems with B0900038 (Edit Posting Edit Code) when called from B0900042 (F0911 Edit Line). Code below;
Now in my humble opinion this simply opens the F0006 record for the MCU passed in and checks the MCPECC field (posting edit code) if the field is equal to N then it displays error “0069”.
Here’s my problem, the system seems to be invoking this error for every BU – if the posting edit code is set to N or not? I have turned debug on and captured the SQL statement that is executed and manually ran this against the DB and it returned the record I expected with a BLANK in the MCPECC field? Yet every time it is run within th BSFN it produces the error – any ideas.
TIA,
Paul
B7332 Win2K SQL2000 SP11.3srv and 11.1client
/* File open business units */
idJDBReturn = JDB_OpenTable(hUser, NID_F0006, ID_F0006_COST_CENTER,
NULL, (ushort)0, (char *)NULL,
&hRequestF0006);
if (idJDBReturn == JDEDB_FAILED)
{
memset((void *)(&dsDE0022),(int)('\0'),sizeof(dsDE0022));
strncpy(dsDE0022.szDescription, (const char *)("F0006"), sizeof(dsDE0022.szDescription));
jdeSetGBRErrorSubText(lpBhvrCom, lpVoid, (ID)0, "078D", &dsDE0022);
JDB_FreeBhvr(hUser);
return ER_ERROR;
}
/* Read the business unit record to find the posting edit code. */
strncpy(dsF0006Key.mcmcu, (const char *)(lpDS->szCostcenter),
sizeof(dsF0006Key.mcmcu));
idJDBReturn = JDB_FetchKeyed(hRequestF0006, ID_F0006_COST_CENTER,
(void *)&dsF0006Key, (short)1,
(void *)lpdsF0006, FALSE);
if (idJDBReturn == JDEDB_PASSED)
{
/* If the business unit posting edit code does not allow posting, */
/* Set an error on the business unit . */
if (dsF0006.mcpecc == 'N')
{
jdeErrorSet(lpBhvrCom, lpVoid, IDERRszCostcenter_1, "0069", (LPVOID)NULL);
JDB_CloseTable(hRequestF0006);
JDB_FreeBhvr(hUser);
return ER_ERROR;
}
}
else