Skip to Content
0

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

Jan 25 at 04:57 PM

64

avatar image
Former Member

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.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Raymond Giuseppi
Jan 26 at 07:42 AM
0

KOMK is a structure, so wont be accessed from database but from memory of a program, also during the creation of the Sales Order I hope you didn't expect to find information on this order already in database?

You could look for 'user exit sales order SD' in SAP on line documentation and/or ask an Abaper to look for text 'KOMK' and other pricing structures in Include MV45AFZZ and then read carrefully the forms descriptions. (NB: There are also already many discussions/threads/documents on this in the forum)

Share
10 |10000 characters needed characters left characters exceeded
Rajkumar Narasimman Jan 25 at 08:31 PM
0

Hi Arturo,

"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."

In error itself, it is clear that KOMK is not a table.

"How can I get those fields during the Sales Order Creation and use in a Pricing Formula?"

If you are writing the code sales order creation exit, you can read the values from the structure(ex: XVBAK/XVBAP) or internal table(XKOMP[]).

Regards

Rajkumar Narasimman

Share
10 |10000 characters needed characters left characters exceeded
G Lakshmipathi
Jan 29 at 11:49 AM
0

Can you explain what is the Business requirement for which, you were trying this ?

Share
10 |10000 characters needed characters left characters exceeded