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: 

SAP Internal Tables - Reading Data

former_member645803
Discoverer
0 Kudos

Hello,

I have created an internal table AR and infoset field ARREARS. I am trying to get infoset field ARREARS to report the value in internal table AR field KUNNR. Can anyone please assist? The script I am using is below

DATA: ARS TYPE SORTED TABLE OF BSID WITH NON-UNIQUE KEY KKBER KUNNR.

DATA: AR TYPE BSID.

SELECT * FROM BSID INTO TABLE ARS.

CLEAR ARREARS.

READ TABLE ARS INTO AR WITH KEY KUNNR = '224560'.

ARREARS = AR-KUNNR.

5 REPLIES 5

FredericGirod
Active Contributor

ARREARS = '224560'

I don't understand the objective of this code

you could replace all this with

SELECT * 
into table @data(ars)
from bsis.

read table ars into @data(ar) with kunnr = ...

but this code is evil, and should be really optimized

ponrajasekharan
Participant
0 Kudos

Check the sy-subrc result .

Abinathsiva
Active Contributor

Hi,

Please use code button when using code in questions. Also follow coding standards, KUNNR data type mismatch could be reason pass value with preceding zero and try

Sandra_Rossi
Active Contributor
0 Kudos

As S Abinath said: "Please use code button when using code in questions."

Sandra_Rossi
Active Contributor

Your question is completely unclear. Selecting data from the whole table BSID is non-sense -> please ask an "experienced" ABAP developer.