Skip to Content
0
Former Member
Nov 13, 2012 at 12:51 AM

ABAP DSO Lookup Routine

1139 Views

I am new to ABAP......

I am supposed to create a lookup into a DSO1 while loading data to DSO2.

I wrote the routine as shown below. But, my problem is that my routine is not fetching any data into the DSO that i am loading into.

Here is my routine

Start Routine

Global Declaration

DATA: ITAB TYPE STANDARD TABLE OF /BIC/AZVC_MAT00,

WA_ITAB TYPE /BIC/AZVC_MAT00.

SELECT /BIC/ZVC_PLAN /BIC/ZVC_STYR MATERIAL /BIC/ZVC_BILN

FROM /BIC/AZVC_MAT00 INTO CORRESPONDING FIELDS OF TABLE ITAB

FOR ALL ENTRIES IN SOURCE_PACKAGE WHERE

/BIC/ZVC_PLAN = SOURCE_PACKAGE-PLAN1

AND

/BIC/ZVC_STYR = SOURCE_PACKAGE-STORAGEYEARS.

endif.

Field Routine

READ TABLE ITAB INTO WA_ITAB

WITH KEY

/BIC/ZVC_PLAN = SOURCE_FIELDS-PLAN1

/BIC/ZVC_STYR = SOURCE_FIELDS-STORAGEYEARS.

IF SY-SUBRC = 0.

RESULT = WA_ITAB-/BIC/ZVC_BILN.

ENDIF.

What am i doing wrong? Someone help me.

Also, there is data in the active table of the DSO i created lookup to.