on 01-25-2018 4:57 PM
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.
Can you explain what is the Business requirement for which, you were trying this ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
9 | |
8 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.