Skip to Content

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

report fetch data problem

Hi,

i am not get data of country description in alv display

i am used for all entries on kna1 and t005t tables.

my code is as

SELECT kunnr

land1

spras

INTO TABLE ch_it_kna1

FROM kna1

FOR ALL ENTRIES IN ch_it_output

WHERE kunnr = ch_it_output-kunrg AND

land1 IN s_land1 and

spras = 'EN'.

IF sy-subrc = 0.

SORT ch_it_kna1[] BY kunnr.

DELETE ADJACENT DUPLICATES FROM ch_it_kna1[] COMPARING kunnr.

ENDIF.

SELECT spras

land1

landx

INTO TABLE ch_it_t005t

FROM t005t

FOR ALL ENTRIES IN ch_it_output

WHERE spras = ch_it_output-spras and

land1 = ch_it_output-land1.

IF sy-subrc = 0.

SORT ch_it_t005t[] BY land1.

DELETE ADJACENT DUPLICATES FROM ch_it_t005t[] COMPARING land1.

ENDIF.

LOOP AT ch_it_output INTO ch_wa_output.

READ TABLE ch_it_kna1 INTO ch_wa_kna1 WITH KEY kunnr = ch_wa_output-kunrg

BINARY SEARCH.

IF sy-subrc = 0.

MOVE: ch_wa_kna1-land1 TO ch_wa_output-land1.

MODIFY ch_it_output FROM ch_wa_output

TRANSPORTING land1

WHERE kunrg = ch_wa_kna1-kunnr.

CLEAR: ch_wa_kna1.

ENDIF.

CLEAR: ch_wa_output.

ENDLOOP.

LOOP AT ch_it_output INTO ch_wa_output.

READ TABLE ch_it_t005t INTO ch_wa_t005t WITH KEY land1 = ch_wa_output-land1

BINARY SEARCH.

IF sy-subrc = 0.

MOVE: ch_wa_t005t-landx TO ch_wa_output-landx.

MODIFY ch_it_output FROM ch_wa_output

TRANSPORTING landx

WHERE land1 = ch_wa_kna1-land1.

CLEAR: ch_wa_t005t.

ENDIF.

CLEAR: ch_wa_output.

ENDLOOP.

sir i am not get data of LANDX.

plz give me solution for this problem

Thanks jayant.

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question