Application Development 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: 

Problem in ALV Report

Former Member
0 Kudos

Hi to all,

I developed the ALV Report, In this Report i am getting two Problems that i am not getting

Problems are..

1) select EKKO~BSART

EKKO~LIFNR

LFA1~NAME1

ekpo~TXZ01 <<<<<----


getting runtime error here

EKKO~BEDAT

EKPO~EBELP

EKPO~MENGE

EKPO~NETPR

into TABLE IT_TAB FROM ekko INNER JOIN ekpo on ekkoebeln = ekpoebeln inner join LFA1 on ekkolifnr = lfa1lifnr where ekko~lifnr in S_LIFNR .

The above code is working properly ,when ever i am adding ekpo~TXZ01 this field i am getting the runtime error.

And second one is

2) I have to add the Total price....

for that i searched in the forums then i got wa_FIELDCAT-do_sum(1) = 'X'. this will help for the grand total.

WA_FIELDCAT-TABNAME = 'IT_EKKO'.

WA_FIELDCAT-FIELDNAME = 'NETPR'.

"WA_FIELDCAT-NO_OUT = 'X'.

wa_FIELDCAT-do_sum(1) = 'X'.

WA_FIELDCAT-SELTEXT_M = 'Net Price'.

APPEND WA_FIELDCAT TO IT_FIELDCAT.

CLEAR WA_FIELDCAT.

with this report is executing normally ,what is happing exactly is i am getting the out put ,in that out put when i am going down to see the sum suddenly i am getting the Rnu time error ,that i am not getting.

Hope i am clear.

5 REPLIES 5

Former Member
0 Kudos

HI Bhanu,

Firstly, the structure of the internal table in which u r collecting the data should be similar

to that of the fields specified in the 'Select' statement..

select EKKO~BSART

EKKO~LIFNR

LFA1~NAME1

ekpo~TXZ01

EKKO~BEDAT

EKPO~EBELP

EKPO~MENGE

EKPO~NETPR

into TABLE IT_TAB .

it_tab structure shd be

BSART

LIFNR

NAME1

TXZ01

BEDAT

EBELP

MENGE

NETPR

For the second dump , try tracing out which statement exactly is causing the dump..

Regards,

Mdi.Deeba

Former Member
0 Kudos

Hi Bhanu,

Try like this.

1) select EKKO~BSART

EKKO~LIFNR

LFA1~NAME1

ekpo~TXZ01

EKKO~BEDAT

EKPO~EBELP

EKPO~MENGE

EKPO~NETPR

into corresponding fields of TABLE IT_TAB FROM ekko INNER JOIN ekpo on ekkoebeln = ekpoebeln inner join LFA1 on ekkolifnr = lfa1lifnr where ekko~lifnr in S_LIFNR .

Add WA_FIELDCAT-DATAELEMENT = 'CURR'.

2) I have to add the Total price....

for that i searched in the forums then i got wa_FIELDCAT-do_sum(1) = 'X'. this will help for the grand total.

WA_FIELDCAT-TABNAME = 'IT_EKKO'.

WA_FIELDCAT-FIELDNAME = 'NETPR'.

"WA_FIELDCAT-NO_OUT = 'X'.

Add WA_FIELDCAT-DATAELEMENT = 'CURR'.

wa_FIELDCAT-do_sum(1) = 'X'.

WA_FIELDCAT-SELTEXT_M = 'Net Price'.

APPEND WA_FIELDCAT TO IT_FIELDCAT.

CLEAR WA_FIELDCAT.

Hope this help you.

Regards,

Vijay

0 Kudos

Hi vijay

thanks for the reply,

1) i tries u r piece of code with select statement but problem not solved

and in the second one is WA_FIELDCAT-DATAELEMENT = 'CURR'. i am getting the syntax error

i.e, WA_FIELDCAT doesnot have the component called "DATAELEMENT "

for this what i have to do.

0 Kudos

Hi Bhanu again,

I am sorry.

use this.

*FIELDCAT-DATATYPE = 'CURR' *

Hope this will help you.

Thanks and Regard,

Vijay

Former Member
0 Kudos

Double-post = Double-lock.

Please read the forum rules, otherwise I will delete your user ID and your boss's user ID well - and tell him that it is your fault!

Got it? Gud..