Hi,
When creating sales order, it is mandatory to input ship-to party and sold-to party on header level.
So, in the first case, when inputting SH/SP = 50004 and ITM_NU=10, this means you have specified for item 10, ship-to party and sold-to party is 50004. But since you have not specified ship-to and sold-to on header level, error "please enter sold-to party or ship-to party" is issued.
When you removed line item number in partner function(ITM_NU=0), this means the entered ship-to and sold-to are used for header level(ITM_NU=0 means header level), so the error is not issued.
If you want to create sales order with multiple items, and ship-to party of items are different from the one on header level, you could input following value:
SH/SP= 500004 ITM_NU = 0 => This means 500004 is used for header level
SH= 500005(for example) ITM_NU = 10 => This means 500005 is used for item 10
Hope I was able to help with above information.
Best regards,
Crystal Lin