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

Select Single * is not fetching All data from database

Former Member
0 Likes
1,539

Hi,

I have a peculiar problem, when i am extending the customer to a new company code, we are getting Dump saying 'ASSERTION_FAILED'

when i debugg i am geeting issue with following Code of a FM 'KNA1_SINGLE_READER'

IF NOT i_bypassing_buffer IS INITIAL.

*SELECT SINGLE * FROM kna1*

INTO o_kna1

WHERE kunnr = i_kunnr.

IF sy-subrc 0.

MESSAGE e300(vs) WITH 'KNA1' RAISING not_found.

ENDIF.

i am passing customer number (i_kunnr), this code is executed 2 times first time it is fetching all columns but second time it is only fetching customer number and no other information regarding customer. But in data base all information is present. Can any one help me in this.

Thanks a lot...

Reddy

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,480

Hi,

data : wa_knal type kna1.

Select single *from kna1 into wa_knal where kunnr = .i_kunnr.

Hope this might solve your problem.

With Regards,

Sumodh.P

Hi,

I have a peculiar problem, when i am extending the customer to a new company code, we are getting Dump saying 'ASSERTION_FAILED'

when i debugg i am geeting issue with following Code of a FM 'KNA1_SINGLE_READER'

IF NOT i_bypassing_buffer IS INITIAL.

*SELECT SINGLE * FROM kna1*

INTO o_kna1

WHERE kunnr = i_kunnr.

IF sy-subrc 0.

MESSAGE e300(vs) WITH 'KNA1' RAISING not_found.

ENDIF.

i am passing customer number (i_kunnr), this code is executed 2 times first time it is fetching all columns but second time it is only fetching customer number and no other information regarding customer. But in data base all information is present. Can any one help me in this.

Thanks a lot...

Reddy

11 REPLIES 11
Read only

Former Member
0 Likes
1,481

Hi,

data : wa_knal type kna1.

Select single *from kna1 into wa_knal where kunnr = .i_kunnr.

Hope this might solve your problem.

With Regards,

Sumodh.P

Read only

0 Likes
1,480

Hi Sumod,

Thanks for your reply. but it is a standard code and i can't change this. In fact they are referring KNA1 like below,

VALUE(O_KNA1) LIKE KNA1 STRUCTURE KNA1

Reddy

Read only

0 Likes
1,480

Hi,

I tried on my system but this function module working fine.If error ocuring on dev. server then try on your quality or production server.

Edited by: Mukund Kansara on Jun 2, 2010 12:57 PM

Read only

0 Likes
1,480

Hi ,

can u tell me that stdn pgm name.

With Regards,

Sumodh.P

Read only

0 Likes
1,480

Hi,

Actually this statement is called twice when you try to extend the customer to a company code. It is working fine in our development server but in Quality server first time it is working fine but second time it is only fetching customer no and not all information. Do you see any Buffering Issue??. In Quality server original language of KNA1 table is 'DE' and in Development server it is 'EN'. Do you see any issue here??

Read only

0 Likes
1,480

Hi sumod,

Standard Program name is - lvs01u19, basically it is FM 'KNA1_SINGLE_READER'.

Thank you,

Reddy

Read only

0 Likes
1,480

Hi,

I gone through that FM . I give 2 separate values. For me its giving the values.

Are you doing this in b/w any loop?

Endloop.

Can u paste the code .

With Regards,

Sumodh.P

Read only

0 Likes
1,480

Hi,

It is working for me in development system but not in Test server. I am not using in Loop, just trying to extend the customer to company code through XD01.

Thank you,

Reddy

Read only

0 Likes
1,480

Has anybody apply patches on Test server. Check using SPAU t-code. Or Log off and Log in again in test server.

Edited by: Mukund Kansara on Jun 2, 2010 1:44 PM

Read only

0 Likes
1,480

Hi All,

Thanks for your great support. I find out the issue. issue is basically one of our developer implemented BADI implementation and inside he modified KNA1 from work area , inside work area we have only customer number and Address number. so after this implementation selects statement is triggered and returning only customer number but in DB all data is there because commit is not happened.

Hope this will help others and once again thanks every one...

Reddy

Read only

Former Member
0 Likes
1,480

Issue Solved.