Retrieve P4210 Processing Options in P42101

coolkl

Well Known Member
We have added custom Processing Option for Order Hold in P4210. Now instead of adding the same to P42101 can we use the PO values in P4210. I can see B4210440 Get P42101 Processing Options. But dont see anything to retrieve from P4210 and pointers and how BSFN works will help
 
I hope you can use the below function

B9090001 - Get Processing Option Data

0001 Get Processing Option Data
"R59TEST" -> BF szNameObject
"JDE001" -> BF szVersion
"1" -> BF szPOOptionID
FC Description <> BF szString
 
You could create custom C BSFN like this (LPDSD55PUT8 should be you custom DS too):

JDEBFRTN (ID) JDEBFWINAPI Get_P4210_ProcessingOptions (LPBHVRCOM lpBhvrCom, LPVOID lpVoid, LPDSD55PUT8 lpDS)
{
/************************************************************************
* Variable declarations
************************************************************************/
ID idReturnValue = ER_SUCCESS;
ID idJDEDBReturn = JDEDB_PASSED; /* DB API Return Code */

HUSER hUser;

/************************************************************************
* Declare structures
************************************************************************/

/************************************************************************
* Declare pointers
************************************************************************/
LPDST4210 lpdsProcOptions = (LPDST4210)NULL;

/************************************************************************
* Check for NULL pointers
************************************************************************/
if ((lpBhvrCom == (LPBHVRCOM) NULL) ||
(lpVoid == (LPVOID) NULL) ||
(lpDS == (LPDSD55PUT8) NULL))
{
jdeErrorSet (lpBhvrCom, lpVoid, (ID) 0, "4363", (LPVOID) NULL);
return ER_ERROR;
}
/**************************************************************************
* Initialize Behavior Routine
**************************************************************************/
idJDEDBReturn = JDB_InitBhvr((void *)lpBhvrCom, &hUser, (char *) NULL,
JDEDB_COMMIT_AUTO);

if (idJDEDBReturn != JDEDB_PASSED)
{
jdeSetGBRError(lpBhvrCom, lpVoid, (ID) 0, "078S");
return ER_ERROR;
}

/************************************************************************
* Set pointers
************************************************************************/

/************************************************************************
* Main Processing
************************************************************************/
if (IsStringBlank(lpDS->P4210_Version))
{
strcpy((char *)lpDS->P4210_Version, (const char *)"ZJDE0001");
}

lpdsProcOptions = (LPDST4210)AllocatePOVersionData(hUser,"P4210", /*Now you're in a "God mode" :) */
lpDS->P4210_Version,
sizeof(DST4210));


if (lpdsProcOptions != (LPDST4210)NULL)
{

strcpy((char *)lpDS->OrderType,
(const char *)lpdsProcOptions->szDefaultOrdertype);

MathCopy(&lpDS->LineNumberIncrement,
&lpdsProcOptions->mnDefaultLineIncrement);

strcpy((char *)lpDS->LineType,
(const char *)lpdsProcOptions->szDefaultLinetype);

FreePODataStructure(lpdsProcOptions);
}
else
{
idReturnValue = ER_ERROR;
}

/************************************************************************
* Function Clean Up
************************************************************************/

return (idReturnValue);
}
 
Thanks for the reply Rauf,Neal, Sergey. B9090001 is a client only function, than can i copy it and just make it Client Server ? I have not tried doing this yet.
 
I've looked at the function body and I don't really think there is something that could be an obstacle to make it client-server. You should try.
 
IIRC, that function includes jdeObj.h which is the client only portion. Perhaps it has changed in newer releases, but I don't think so.

Craig
 
Hi coolkl,

The BSFN that you search is B4201610 - RetrieveSOEProcessingOptions - Retrieve Sales Order Entry Processing Options. It is client and server BSFN, I've tested with ObjectBrowser and works fine.

Regards,
Alfre.
 
Thanks Alfre, perfect. Thats was what I was looking for. Thanks all for the reply.
 
Back
Top