Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Read Statement Issue

HI,

I am facing problem with read statement, please find below my code and provide the solution.

My Internal Tables.

TYPES: BEGIN OF TYP_BSAK,

BUKRS TYPE BSAK-BUKRS,

LIFNR TYPE BSAK-LIFNR,

AUGDT TYPE BSAK-AUGDT,

GJAHR TYPE BSAK-GJAHR,

BELNR TYPE BSAK-BELNR,

BUZEI TYPE BSAK-BUZEI,

BUDAT TYPE BSAK-BUDAT,

BLART TYPE BSAK-BLART,

DMBTR TYPE BSAK-DMBTR,

SGTXT TYPE BSAK-SGTXT,

AUGBL TYPE BSAK-AUGBL,

HKONT TYPE BSAK-HKONT,

END OF TYP_BSAK.

DATA : IT_BSAK TYPE STANDARD TABLE OF TYP_BSAK WITH HEADER LINE,

WA_BSAK TYPE TYP_BSAK.

READ STATEMENT :

LOOP AT IT_BSIS INTO WA_BSIS. -> I am getting data in wa_BSIs

READ TABLE IT_BSAK INTO WA_BSAK -> I am Getting record in IT_BSAK bu the same is not populated in WA_BSAK

WITH KEY BUKRS = S_BUKRS.

IF SY-SUBRC = 0.

WA_OUTPUT-SAPSYS = 'PROBE'.

WA_OUTPUT-BUKRS = WA_BSAK-BUKRS.

WA_OUTPUT-BUKRS = WA_BSAK-BUKRS.

WA_OUTPUT-BELNR = WA_BSAK-BELNR.

WA_OUTPUT-SGTXT = WA_BSAK-SGTXT.

WA_OUTPUT-BUDAT = WA_BSAK-BUDAT.

WA_OUTPUT-AUGBL = WA_BSAK-AUGBL.

WA_OUTPUT-LIFNR = WA_LFA1-LIFNR.

WA_OUTPUT-NAME1 = WA_LFA1-NAME1.

WA_OUTPUT-STRAS = WA_LFA1-STRAS.

WA_OUTPUT-ORT01 = WA_LFA1-ORT01.

WA_OUTPUT-REGIO = WA_LFA1-REGIO.

WA_OUTPUT-PSTLZ = WA_LFA1-PSTLZ.

WA_OUTPUT-STCD2 = WA_LFA1-STCD2.

ENDIF.

APPEND WA_OUTPUT TO IT_OUTPUT.

ENDLOOP.

Thanks and Regards

VB

Former Member
Former Member replied

This is still a pretty basic question. Please press F1 on READ before posting here.

Rob

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question