Hi ,
I'm having a requirement to select the main account during SO posting based on custom field , currently as per inventory posting setup and the combination of item/category the items will be posted to the relevant main account that is configured, so now i need to introduce a new field in SO line level and the same field should be introduced in the below posting setup form, so whenever SO line is added user will select the value from new custom lookup field which we going to introduce and at the time of invoice posting we need to fetch main account based on current combination and along with new custom field matching, so could you provide assistance on how to implement this? details of posting classes where we want to customize?
Hi Vignesh,
As mentioned above, you can't extend/change the standard table indexes. Currently there is a unique index which will cause the duplicate record error. You should think of another solution direction, like a new table which is also suggested above.
Hi Andre,
Could you provide some more assistance on this? As per current MS logic, we can't have different main account configuration for same item code/item relation as system will throw duplicate record error and we're trying to overcome this standard limitation by allowing the same item code combination which will be differentiated by new custom field value and main account selection, so could you guide further on the approach we can consider to achieve this?
Hi Vignesh,
For sure you can extend the InventPosting table, but you can't use it as distinction for the ledger account as one of the indexes will not allow duplicates for the current existing fields.
There is no real need to extend the InventPosting form. As alternative the new table can also be set up on a new form. The choice would be up to you.
Hi Andre,
Can't we have new custom field in inventposting without included in existing index? and the main account field mentioned by mariano is specifically used for return orders it seems and we can't make use of that. Also as you mentioned do we need to have new table for custom field and to be used in logic? in that case the new table should also be added as datasource in inventposting form level as we need to show that field there as well.
Hi Vignesh,
As mentioned by Mariano, before you post the invoice, you can fill the main account manually. If you need to have the ledger account as per custom logic, you would not be able to extend the InventPosting table with a new field as you can't extend the indexes. One of the indexes does not allow for duplicates.
You would then need to create an additional table and check where you can hook in to change the ledger account. This could be or filling the fields as suggested by Mariano or during posting, but then you need to really search for the best way to extend the standard coding.
Anybody having idea on this? Any assistance will be appreciated.
Hi Everyone,
Any other inputs on this?
As far as I remember, this field is only used for return orders.
Hi Mariano,
As per current process, the field you highlighted is not getting any value even after sales order is invoiced, the transactions are posted to the main account based on posting profile setup, so could you explain how can we make use of this field?
Have you tried using the standard field "Main account" from the sales line?
You can write your own extension to initializate this field value based on your logic.
André Arnaud de Cal...
292,160
Super User 2025 Season 1
Martin Dráb
230,962
Most Valuable Professional
nmaenpaa
101,156