Get Processing Option

nkuebelbeck

nkuebelbeck

VIP Member
I would like to programmatically pull processing options for the P4112, sadly a bsfn does not already exist. From what I gather, Processing Option (PO) values are stored in the BLOB field in the F983051.VRPODATA Versions List table. I've looked at b4101300, at it seems that I can use cAPI AllocatePOVersionData to extract the information from the blob field.

Questions
1. Can I NER?
2. Is what I want to do possible?
 
You'll have to write a C-function. And yes, it'll be using AllocatePOVersionData. It's not that hard though: There's a bunch of standard BSFNs that get processing options from various applications, you can base your code on them.. Just search in OMW for Object descriptions like 'Get XXXX Processing Options'. What you do is you create your BSFN Datastructure, your c-bsfn, your .c and .h skeletons. Then copy & paste the appropriate bits of code from one of those standard bsfns into your .c and .h. Also paste the typedefs of the bsfn datastructure and the proc option template into you .h (Again: Look at the .h of the standard bsfn to see where stuff needs to go). Then do some search&replace (since your bsfn will have different datastructure-names and stuff), and some additional modifying on the code-bits you pasted (since you will have different proc option fields). And voilà: you have your own custom bsfn to fetch proc option values.
 
You have to create a C function to do that. It's pretty easy. I think there is a post on my site that talks about how to do this.
 
Got it working. Tricky part was realizing i needed the T***** data structure for the P4114 and not the data structure for the actual business function. After that, it was this chunk of code

idJDBReturn = JDB_InitBhvr((void*)lpBhvrCom, &(hUser), (JCHAR*)NULL, JDEDB_COMMIT_AUTO);

From my research does this

/* this API sets &hUser - User (specific) Handle/pointer which is to be used in JDB_OpenTable() */
 
Well, you need *both* datastructures, don't you?

Not sure what you mean by the 2nd part of your reply. Is it a question? If yes: Isn't that part auto-created when you create your skeletons? Generally speaking, you don't touch anything created in the skeletons. You only modify the bits of code you paste in between the generated 'skeleton-code'.
 
Back
Top