P49005 and plugging in custom BSFNS

johndanter

johndanter

Legendary Poster
Hi folks,

I've been tasked with generating custom shipment references and I've stumbled across P49005.

Here you setup rules of your own to help create the REFN. Hard coded, NN, UDC or BSFN call.

Has anyone tinkered with the BSFN call? How is this integrated and fed back to the P49005?

Thanks

John
 
I have not used this, so this is purely a guess.

You probably have to define BSFNs with specific data structures. Like implementing an interface in an OO language or a callback function in a language like C. P42101 has something similar to pass order data to it which I have used and I have also done things like this myself in custom code.

If you don't know what invokes the user specified BSFNs I would search for the NID_XXXXX table name that stores this information in all the existing C BSFN code. You should eventually find a line that looks something like:

Code:
jdeCallObject(tableRecord.xxcdbf, ....);

Basically instead of a "hard coded" BSFN call you should find a variable of some kind.
From there you should be able to reverse engineer to determine the DS you need to implement, what event will result in invocation of your BSFNs, etc.
 
Hi Brian

What I've worked out is N4901270 calls B4901280

So I think you are right
memset( (void *) &dsCheckDigitTemplate, (int) _J('\0'), sizeof(DSD4901290A ) );
memset( (void *) &dsExternalFunctionTemplate, (int) _J('\0'), sizeof(DSD4901280A ) );

There are 2 calls
* Call Check Digit Function
idBsfnReturn = jdeCallObject ( lpDS->szFunctionName, NULL, lpBhvrCom, lpVoid, (LPVOID) &dsCheckDigitTemplate, (CALLMAP *) NULL, (int) 0,(JCHAR *) _J('\0'),(JCHAR *) _J('\0'), (int) 0 ) ;


idBsfnReturn = jdeCallObject ( lpDS->szFunctionName, NULL, lpBhvrCom, lpVoid, (LPVOID) &dsExternalFunctionTemplate, (CALLMAP *) NULL, (int) 0,(JCHAR *) _J('\0'),(JCHAR *) _J('\0'), (int) 0 ) ;

So it looks like it isn't generic at all and the DSTR must conform to those 2.

Correct?
 
I think you are correct. Just define your two BSFNs with D4901290A and D4901280A and it should work. Of course, I guess you have to know what B4901280 expects your two BSFNs to do...
 
Back
Top