Bad Pointer Error

subashh

Member
Hi List,

I'm working on E811 and there is a need to develop new BSFN to copy Sales Order Header media Objects comment to its Related Purchase Order Header.

the flow of the BSFN is like this
1. Check whether the SO has attachment by using its key fields (SHDOCO,SHDCTO,SHKCOO)
(API Used : GetGenericText )

2. if there is comment then the same will be copied to its related PO.
(API Used : CopyGenericTextName )

It was working fine. Now, suddenly it is stopped working.
and throwing an error at API "GetGenericText", it gives me "BAD POINTER" error..

Pls help me to rectify this issue..

Sample Code :

PJSTR lpSOTextStr = (PJSTR) NULL;

MathCopy(&dsGT4201A.mnDocumentorderinvoicee, &lpDS->mnSODocumentNumber);
jdeStrncpy((JCHAR *)dsGT4201A.szOrdertype,
(const JCHAR *)lpDS->szSOOrderType, DIM(dsGT4201A.szOrdertype));
jdeStrncpy((JCHAR *)dsGT4201A.szCompanykeyorderno,
(const JCHAR *)lpDS->szSOOrderType, DIM(dsGT4201A.szCompanykeyorderno));


MathCopy(&dsGT4301.mnDocumentorderinvoicee, &lpDS->mnPODocumentNumber);
jdeStrncpy((JCHAR *)dsGT4301.szOrdertype,
(const JCHAR *)lpDS->szPOOrderType, DIM(dsGT4301.szOrdertype));
jdeStrncpy((JCHAR *)dsGT4301.szDocumentCompany,
(const JCHAR *)lpDS->szPODocumentCompany, DIM(dsGT4301.szDocumentCompany));


lpSOTextStr = GetGenericText(_J("GT4301"), 0, (LPVOID)&dsGT4301, TRUE);

If (lpSOTextStr)
{
eResult = CopyGenericTextName(_J("GT4201A"), (void *)&dsGT4201A,
_J("GT4301"), (void *)&dsGT4301);
}
 
Back
Top Bottom