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

SAP Internal Tables - Reading Data

former_member645803
Discoverer
0 Likes
1,526

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.

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
Read only

FredericGirod
Active Contributor
1,452

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

Read only

ponrajasekharan
Participant
0 Likes
1,452

Check the sy-subrc result .

Read only

Abinathsiva
Active Contributor
1,452

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

Read only

Sandra_Rossi
Active Contributor
0 Likes
1,452

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

Read only

Sandra_Rossi
Active Contributor
1,452

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