Skip to Content
0
Jan 25, 2018 at 04:57 PM

How to get the fields Sales Org. / Customer / TAXM2 during Sales Order?

115 Views Last edit Jan 25, 2018 at 09:47 PM 2 rev

Hi,

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:

44 ...

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.

51 ...

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.