Get Last Sales Order Detail Line


VIP Member

I'm looking for a function that will return me the last F4211.sdlnid givin doco/kcoo/dcto. I'm still searching but this isn't google so close usually doesn't count.

I realize I could roll my own but I have feeling this exists....

Thanks in advance.

Found something that will work.

Last edited:


Well Known Member
i think you need to first spend some time understanding how JDE handles the line number. Especially when performing line splits at time of pick, ship, etc. How JDE handles the value is places in the decimal is different by application used to handle the split.

For example,

you have 2 lines on the order. Line ID of 1.000 and 2.000. You have to split the item ABC on line 1 15 times and line 2 item CDF one time. Your line numbers will be:

1.000 ABC
1.100 ABC
1.200 ABC
1.300 ABC
1.400 ABC
1.500 ABC
1.600 ABC
1.700 ABC
1.800 ABC
1.900 ABC
2.000 CDF
2.100 ABC
2.200 ABC
2.300 ABC
2.400 ABC
2.500 ABC
2.600 CDF