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: 

select query in badi

Former Member
0 Kudos

Hi,

I want to use select statement in one of the methods of badi and use internal tables to hold data. It is not allowing to use internal tables with header. Can any body please give me an example.

Thanks in Advance.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Is your requirement of having an internal table with header absolutely neccessary? Internal tables can be used in BAdIs without any issues normally.

3 REPLIES 3

Former Member
0 Kudos

Is your requirement of having an internal table with header absolutely neccessary? Internal tables can be used in BAdIs without any issues normally.

Former Member
0 Kudos

DATA itab [TYPE linetype|LIKE lineobj] OCCURS n [WITH HEADER LINE].

This variant is not allowed in an ABAP Objects context. See Declaration with OCCURS not allowed.

You can't use that variant in Abap Objects.

Learn to use them this way.


data: i_ekpo type standard table of ekpo,
        wa_ekpo like line of i_ekpo.

select * into wa_ekpo from ekpo.

endselect.

"or

select * into table i_ekpo from ekpo.

Loop at i_ekpo into wa_ekpo.

endloop.

Former Member
0 Kudos

Hi,

You can use internal tables and work areas instead of internal tables with header line.

example.

DATA : lt_item type table of oij_item.

FIELD-SYMBOLS:<fs_nomit> TYPE oij_item.

Thanks,

Vamshi