I'm trying to get the fields Sales Org. / Customer / TAXM2 during Sales Order creation. Those fields will be used in another part of the logic. I've been in troubles to get it correctly.
This is the part of the code that's getting those fields:
45 * Select the sales orgs
46 SELECT vkorg kunnr
47 FROM komk
48 into corresponding fields of ls_komk
49 where kunnr = komk-kunnr
50 and VKORG = komk-vkorg.
When I activated the formula, the line 47 Result in an ABAP Dump, saying the "KOMK" is not defined in ABAP Dictionary as a table, projection view, or database view.
How can I get those fields during the Sales Order Creation and use in a Pricing Formula?
Thanks a lot.