Yeah, that function is fairly criptic. The mega-IF statement NER would be far simpler and would accomplish the same thing.
Now your second part isn't actually that tough. You just need an understanding of the files involved. I think the manuals cover this pretty well, take a look at those.
The quick rundown on adjustments:
You've got 2 primary files to consider: F4072 and F4094. F4072 holds the adjustments themselves and F4094 holds the group information. ICID is the link between them.
So, this is a 'simple' solution for what you've described (a new GROUP). You can accomplish this programatically as you see fit, but these are the steps.
1. Create a new group definition(F4093).
2. Generate a new F4094 record for the new group and get a new ICID from next number.
3. Copy your existing adjustments from F4072 to new F4072s and replace the ICID with your NEW number from step 2. Viola, you have a new set of adjustments with the new group!
4. Run the Adjustment Update UBE to alter your new records by 5%.
That only covers the generation of a new GROUP, but you can see how easy it is. If you want to also generate a new ADJUSTMENT name you'll have to create an F4071 and fill in the defaults. Then drop that name into your new 4072s.
Pricing is actually very simplistic file-wise. Study the manuals and then scour the data for a bit. It will all make sense quickly.
I hope all that typing cleared things up. Let me know if I just confused you even more. . .
Darren Ricciardi - OneWorld Whipping Boy
Looking for work in OR NEAR Amsterdam THE NETHERLANDS