Skip to Content
0
Former Member
Jul 16, 2012 at 07:13 AM

data not showed using write statement after the click event

16 Views

*&---------------------------------------------------------------------*

*& Report ZINTERACTIVE_SCREEN

*&

*&---------------------------------------------------------------------*

*&

*&

*&---------------------------------------------------------------------*

REPORT ZINTERACTIVE_SCREEN .

*tables:zekpo,zekko.

TYPES : BEGIN OF str_zekko,

comcode TYPE Zekko-comcode,

doccat TYPE Zekko-doccat,

doctype TYPE Zekko-doctype,

status TYPE zekko-status,

itemnumber TYPE zekko-itemnumber,

venaccno TYPE zekko-venaccno,

END OF str_Zekko.

DATA : wa_Zekko TYPE str_Zekko,

it_zekko TYPE TABLE OF str_Zekko.

TYPES : BEGIN OF str_Zekpo,

comcode TYPE Zekpo-comcode,

matno TYPE Zekpo-matno,

matgroup TYPE Zekpo-matgroup,

price TYPE Zekpo-price,

END OF str_Zekpo.

DATA : wa_Zekpo TYPE str_Zekpo,

it_Zekpo TYPE TABLE OF str_Zekpo.

TYPES: BEGIN of str_zekno,

comcode TYPE zekno-comcode,

comname TYPE zekno-comname,

comadd TYPE zekno-comadd,

END OF str_zekno.

DATA: wa_zekno TYPE str_zekno,

it_ZEKNO TYPE TABLE OF str_zekno.

TYPES : BEGIN OF str_final,

comcode TYPE Zekko-comcode,

doccat TYPE Zekko-doccat,

doctype TYPE Zekko-docTYPE,

status TYPE zekko-status,

itemnumber TYPE zekko-itemnumber,

venaccno TYPE zekko-venaccno,

matno TYPE Zekpo-matno,

matgroup TYPE Zekpo-matgroup,

price TYPE Zekpo-price,

comname TYPE zekno-comname,

comadd TYPE zekno-comadd,

END OF str_final.

DATA: wa_final TYPE str_final,

it_final TYPE TABLE OF str_final.

PARAMETERS : ccode TYPE ZEKKO-comcode,

dcat TYPE ZEKKO-doccat .

SELECT comcode doccat doctype status itemnumber venaccno FROM ZEKKO

INTO TABLE it_ZEKKO

WHERE comcode = ccode AND doccat = dcat .

SELECT comcode matno matgroup price

FROM ZEKPO

INTO TABLE it_ZEKPO FOR ALL ENTRIES IN it_ZEKKO

WHERE COMCODE = it_ZEKKO-COMCODE .

SELECT comcode comname comadd

FROM ZEKNO

INTO TABLE it_ZEKNO FOR ALL ENTRIES IN it_ZEKPO

WHERE COMCODE = it_ZEKPO-comcode.

LOOP AT it_ZEKNO INTO wa_ZEKNO.

WRITE : /1 wa_ZEKNO-COMCODE COLOR 1,

wa_ZEKNO-COMNAME COLOR 4.

HIDE wa_ZEKNO-COMCODE .

ENDLOOP.

*CLEAR wa_ZEKNO-COMCODE.

AT LINE-SELECTION.

REFRESH it_final.

CLEAR wa_final.

ULINE.

IF sy-lsind = 1.

WRITE : /1 'COMPANY CODE',

20 'COMPANY NAME' ,

50 'COMPANY ADDRESS' ,

70 'DOCUMENT CATG' COLOR 2,

90 'DOCUMENT TYPE' COLOR 3 ,

110 'STATUS',

130 'MATERIAL NO ' ,

150 'MATERIAL GROUP' ,

170 'PRICE' .

ULINE.

ENDIF.

LOOP AT it_ZEKNO INTO wa_ZEKNO WHERE COMCODE =

wa_ZEKPO-COMCODE.

wa_final-COMCODE = wa_ZEKNO-COMCODE.

wa_final-COMNAME = WA_ZEKNO-COMNAME.

wa_final-COMADD = wa_ZEKNO-COMADD.

wa_final-MATNO = wa_ZEKPO-MATNO.

wa_final-MATGROUP = wa_ZEKPO-MATGROUP.

wa_final-PRICE = wa_ZEKPO-PRICE.

READ TABLE it_ZEKKO INTO wa_ZEKKO WITH KEY

COMCODE = wa_ZEKPO-COMCODE.

wa_final-DOCCAT = wa_ZEKkO-DOCCAT.

wa_final-DOCTYPE = wa_ZEKkO-DOCTYPE.

wa_final-STATUS = wa_ZEKkO-STATUS.

APPEND wa_final TO it_final.

ENDLOOP.

LOOP AT it_final INTO wa_final.

WRITE : /1 wa_final-COMCODE ,

20 wa_final-COMNAME ,

50 wa_final-COMADD ,

70 wa_final-DOCCAT COLOR 2,

90 wa_final-DOCTYPE COLOR 3,

110 wa_final-STATUS,

130 wa_final-MATNO,

150 wa_final-MATGROUP,

170 wa_final-PRICE.

ENDLOOP.

TOP-OF-PAGE.

WRITE : /1 'COMPANY CODE' COLOR 1,

50 'COMPANY NAME' COLOR 3.

ULINE .