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

User Exit EXIT_SAPLMEREQ_010 Problem

Former Member
0 Likes
930

i am using the user Exit EXIT_SAPLMEREQ_010 and writing the code

*&---------------------------------------------------------------------*
*&  Include           ZXM02U12                                         *
*&---------------------------------------------------------------------*

  DATA : v_bukrs TYPE mseg-bukrs.



  SELECT SINGLE bukrs INTO v_bukrs FROM aufk
   WHERE aufnr = im_t_ebkn-aufnr.

it gives the error

"IM_T_EBKN" is a table without a header line and therefore has no component called "AUFNR".

kindly suggest

abhishek

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
555

Hi

im_t_ebkn-aufnr is a table without header line, so:

data: v_ebkn type ebkn.

read table im_t_ebkn into v_ebkn index 1.

SELECT SINGLE bukrs INTO v_bukrs FROM aufk

WHERE aufnr = ebkn-aufnr.

Max

i am using the user Exit EXIT_SAPLMEREQ_010 and writing the code

*&---------------------------------------------------------------------*
*&  Include           ZXM02U12                                         *
*&---------------------------------------------------------------------*

  DATA : v_bukrs TYPE mseg-bukrs.



  SELECT SINGLE bukrs INTO v_bukrs FROM aufk
   WHERE aufnr = im_t_ebkn-aufnr.

it gives the error

"IM_T_EBKN" is a table without a header line and therefore has no component called "AUFNR".

kindly suggest

abhishek

2 REPLIES 2
Read only

Former Member
0 Likes
556

Hi

im_t_ebkn-aufnr is a table without header line, so:

data: v_ebkn type ebkn.

read table im_t_ebkn into v_ebkn index 1.

SELECT SINGLE bukrs INTO v_bukrs FROM aufk

WHERE aufnr = ebkn-aufnr.

Max

Read only

former_member480923
Active Contributor
0 Likes
555

Hi,

The table that you have reffered is a defined as a table type and does not have a header line so you cannot refer to the field in a where clause. you can do 2 things

a) create a Range with reference to the aufnr in the im_t_ebkn and call on the select single with respect to that.

b) try this code

loop at im_t_ebkn assigning <l_field_symbol>
       SELECT SINGLE bukrs INTO v_bukrs FROM aufk
   WHERE aufnr = <l_field_symbol>-aufnr

This Might solve your error

Anirban M.