Advanced Pricing - Basis Code 8

eriley

Active Member
Has anyone created a NER/BSFN for advanced pricing basis code 8?

Basis code 8 has been designed to update price and an option to allow customers to customize their own advanced pricing functions that the
current software may not have.

If anyone has done this we have an issue where we receive in the 4211ptr as the documentation says but we are trying to use that pointer to retrieve DOCO, KCOO, LNID and DCTO from the F4211 cache so that we can calculate excess freight allowance but when we pass the 4211ptr into the B4200210 - VerifyandGetSalesDetail it does not return the DOCO, KCOO, LNID and DCTO.

Anyone?
confused.gif
 
The pointer you have been given in that interface is to the current sales order line. It's the same thing you would get in the cache. The sales order keys should be in the pointer as well. Keep in mind though, the pointer you are looking at reflects a record that has not yet been inserted into the cash. At least not in the completed form even if you do find it there.
 
I have created a document that explains it not sure if we are on the same page.
 

Attachments

  • 169944-Pointer Issue.doc
    41.5 KB · Views: 426
That function F4211 Get Sales Detail Row will not work as you are expecting. I'm pretty sure that will look for F4211 records for the key you send to it.

You have all the information you need in the F4211 pointer. There should be an existing function to return the columns you're looking for but I can't search right now. If not it would be pretty easy to write your own if one doesn't exist.

I'll try to find one when I get a minute.
 
As Craig pointed out, VerifyandGetSalesDetail is used to retrieve an F4211 pointer by passing in the F4211 key fields. The exact opposite of what you're trying to do.

You need a function that accepts the F4211 pointer and returns the key fields. I don't know of one off the top of my head, but I imagine one exists. Taking a quick look at the B4200210 source module, there exists another function, GetF4211DetailInformation, that ALMOST does what you want. Modifying it to return the key fields would be a pretty easy and safe task.

There is an 'if' statement toward the beginning of the function that does one thing if a pointer is NOT passed and does an 'else' if you pass it pointer. 4 lines of code added to the 'else' to populate the key field DS parms and you're in business.
 
ok that explains alot. I will check into the GetF4211DetailInformation BSFN and see what I can come up with.

Appreciate all the feedback and if anyone finds a better BSFN to use a pointer with let me know.
 
Ok I was able to use the BSFN GetF4211DetailInformation with a slight modification to the C-code. Just added 4 lines of code for assignment of the key information from the cache. The only issue now is that it has a line number of zero (0). I may have a way around it but will dig deeper and see if I can find where the line number is be placed (or not placed) in the cache and see if something can be done.

Thanks to all who responded.
 
It sounds like you are still trying to fetch the F4211 record which may not even exist at this point (i.e. it will only be in cache if your entering the SO line). Instead of modifying the function to return the DOCO, DCTO etc., have the function return SHAN and the other fields you need.
 
Craig is absolutely right on (and Darren also warned you of this). After taking a look at your attachment, I see you're trying to obtain the F4211 key fields so you can then fetch to the F4211...Bad idea (see Darren's post).

My suggestion:
1) disregard my earlier mod suggestion
2) either find an existing function that accepts the F4211 pointer and returns all the data you need (shan, ecst, itwt) -OR- write a new function that mimmicks what GetF4211DetailInformation does but returns the specific data you need FROM THE POINTER as opposed to the actual F4211 DB record.

Good luck.
 
Changed getting the key information to just getting the 3 fields I needed. so modified the data structure and put the 3 fields at the end. Then modified the BSFN to copy the F4211 data into these fields. Also had to modify the .h file as well. Then using the pointer into the GetF4211DetailInformation returned the SHAN, ECST and ITWT. Worked great with little effort. Thanks everyone for the direction.
 
Just another note of caution...whenever you change a base DSTR, you need to put in the due diligence to make sure there are no ramifications elsewhere...

I, personally, would have created a new function.
 
Just to add to that, at a minimum, when you get ready to promote to PY/PD you should do a FULL build so that any C code that references that function will get recompiled with the newly sized DS. JMR is right, though, a new function would have been just as simple and much less intrusive.
 
Back
Top