Multiple line discounting in P4210

jfoster02

Member
I need to apply a line level discount to each detail record in the P4210 program. I added a form exit in the sales order detail revisions form that will call the Price history (P4074). I only want to display the P4074 program once to get the discount from the user, but dont show the form for the remaining detail records while using the program to calculate the discount.

Ive managed to loop through all the detail records and apply the discount that was given to the first record. But for each subsequent detail record the P4070 displays. The user then has to hit the OK button for each record. I have added a push button OK in the write grid line after but it still displays the form for each record.

Believe it or not i can get this to work in debug mode but not while running without debug. I think it has something to do with my placement of the push button OK but ive tried everywhere.

Any help would be greatly appreciated, Jeff
 
Which event did you put your press button to call the form exit for P4074?

Also, the reason it may work in Debug is probably due to the fact that P4210 uses Asychronous processing. When putting P4210 into debug your essentially making it Synchronous.
 
freew8s,

As an alternative to your mod, if you have a set series of discounts to apply to your lines you can use Advanced Pricing Order Detail Adjustments rules. These can be set-up to kick-in based on Order Detail fields (review via P4092), some of which come from the Header (as you want all lines on the order to receive the same discount).

If you cannot find a suitable field to use that already comes from the Header, you can change your app to enable the manual population of one of the price specific fields (i.e Price Code 1, 2, 3) via a Header default or on the grid rows direct.

Hope this helps.
 
Craig, Pon, Thanks for your response. I still couldnt get the Push button OK to work so i will try the Advanced Pricing suggestion. Jeff
 
Back
Top