Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Error while saving the Sales Order

Former Member
0 Likes
1,643

Hi experts,

i am getting a runtime error while saving a sales order stating: SAPSQL_EMPTY_TABNAME. It says the field T681-KOTAB could be empty. I would give in more inputs. Someone plz help.

Thanks.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,563

If this is a standard SAP transaction, this error would probably be indicative of a configuration error related to condition set up, the programming for which involves a lot of soft-coding that relies on the configuration set up.

For example, Function module SD_COND_ACCESS in Include LV61ZU01 has code that could be suspect in this connection since T681-KOTAB is used in the from clause in numerous selects in this function module

e.g.

select xxx from (T681-KOTAB) where xxx

The error you are getting would occur in such a case if KOTAB were blank.

see http://www.s001.org/ABAP-Hlp/abapfrom_clause.htm

and search on SAPSQL_EMPTY_TABNAME

I would not be surprised if the error was occuring in this function module.

Good luck

Brian

Message was edited by:

Brian Sammond

15 REPLIES 15
Read only

former_member186078
Active Participant
0 Likes
1,563

Abhinav,

Please provide some more details. You can see the exact place where the dump has occurred when you execute the ABAP debugger button on the left hand top.

And also see the error text.....

Thanks,

Adithya K

Read only

Former Member
0 Likes
1,563

Is this from the standard SAP transaction?

Rob

Read only

0 Likes
1,563

thanks Rob. Yes, i have replied in the thread. Can u go thru it?

Read only

0 Likes
1,563

This is an error in a standard SAP transaction. I don't see any notes, so I think your best option is to open a message to OSS.

rob

Read only

0 Likes
1,563

Actually SAP got back to me saying that this short dump could be due to inconsistencies in your access sequences and condition tables. Do you have any good document on pricing procedure for free goods.

Thanks.

Read only

0 Likes
1,563

Better talk to your functional consultant.

Rob

Read only

0 Likes
1,563

As Rob said, talk to your functional people.

The problem is with the condition set up, and they are responsible for that.

Here is a link to another recent thread regarding free goods that has some good links on free goods configuration etc, courtesy of SAP Help and Dasari Narendra who dug them up:

Good luck

Brian

Message was edited by:

Brian Sammond

Fixed wording

Read only

0 Likes
1,563

One other thing:

You could, at the very least, look at table T681, and see what entries have a blank or invalid KOTAB.

The value in KOTAB for all entries should be a valid table name. The tables should all exist in the ABAP dictionary.

If any of them are blank or not valid table names, that is the likely culprit.

You can use SE16 to look at the table.

At least this might give you some information to help in discussing the matter with the functional people.

If none of them are blank or invalid, there is a problem elsewhere related to how SAP is choosing the T681 record to select. This would point to a problem further up in the configuration.

Good luck

Brian

Message was edited by:

Brian Sammond

Read only

0 Likes
1,563

Thanks Brian. Actually i checked the entries for T681 table. For KOTABNR = 521, there is one blank entry in KOTAB. Also there is another entry for KOTABNR = 521 which is KOTAB = KOTN521. Now if 521 is the condition table, what is KOTN521?

Read only

0 Likes
1,563

I would expect that KOTN521 would be a Database table defined in the ABAP Dictionary that relates to the condition implemented in 521 for the usage specified in that record.

You should be able to go into the info system, SE84, and search under ABAP Dictionary / Database Tables to see what KOTN521 is.

Also, since the only Keys to T681 are KVEWE and KOTABNR, and there are two KOTABNR entries with a value of 521, then there must be two different usages (KVEWE) associated with that table.

If you see what they are, you can check to see what the usages represent. Based on a lookup, it appears that a usage of N is for Free Goods, A is for Pricing etc. In our system, we only have A entries.

What are the usages for the 521 entries? Do they relate to Free Goods/Pricing???

Does the table KOTN521 exist in the ABAP Dictionary?

Answering these questions may get you closer to the answer.

Can you compare the values in these entries to what you have in different SIDs?

Is this problem happening in Production, or is it still in a development or Quality Assurance client?

If it is still in development or Q, then it may be that a recent customization change was made.

Compare the entries across your systems, if possible.

Good luck

Brian

Read only

0 Likes
1,563

We are still in development. Actually it maybe due to a recent customization change. in SE16 when i look for T681 Entries by giving KOTABNR = 521, i get 3 entries for which KVEWE is A, G, N and KOTAB entry corresponding to KVEWE as G is blank. Meanwhile, SAP again got back to me suggesting to check customizing in v/05, v/06 and v/07. They sat that I need to delete the access which contains fields not in T681-KOTAB. Does this mean that i need to delete the KVEWE entry corresponding to 'G' for which KOTAB is blank in T681 table?

Read only

0 Likes
1,563

I would say that you should follow SAP's advice and maintain the configuration after consulting with the people responsible for configuration..

Removing the G entry would probably be a good idea, but you should check with your functional people first and review what changes are planned or in place, and why they are being made.

If they are doing customization, they should have documentation, functional specs, transports etc

You may even be able to check (if you are authorized) if such transports exist. If the transports are not yet released, have them correct the configuration before the changes are released and moved up!

Good luck

Brian

Read only

0 Likes
1,563

Hi Brian,

The issue is resolved. One of the tables under the 'G' (T681-VKEWE) usage value(listing/exclusion) was causing the dump. So, i deleted that table entry under that particular access sequence. Thanks again for all the help.

Read only

Former Member
0 Likes
1,564

If this is a standard SAP transaction, this error would probably be indicative of a configuration error related to condition set up, the programming for which involves a lot of soft-coding that relies on the configuration set up.

For example, Function module SD_COND_ACCESS in Include LV61ZU01 has code that could be suspect in this connection since T681-KOTAB is used in the from clause in numerous selects in this function module

e.g.

select xxx from (T681-KOTAB) where xxx

The error you are getting would occur in such a case if KOTAB were blank.

see http://www.s001.org/ABAP-Hlp/abapfrom_clause.htm

and search on SAPSQL_EMPTY_TABNAME

I would not be surprised if the error was occuring in this function module.

Good luck

Brian

Message was edited by:

Brian Sammond

Read only

0 Likes
1,563

thanks a lot for the reply Brian. Yes u r right.The trigger location for the exception is as follows:

program: SAPLV61Z

include: LV61ZU01

Row: 672

module name: SEL_KONDTAB

This is where the error is in the standard SAP code:

if se_read_all_prestep is initial.

select * from (t681-kotab) appending table <cond_tab>

up to 1 rows

where kappl = se_kappl

and kschl = se_kschl

and datbi >= se_date

and datab <= se_date

and (coding_tab).

h_subrc = sy-subrc.

actually SAP got back to us abt this saying that there is some config issue with the access sequence, condition table in pricing for free goods

Could u provide any more help?