Skip to Content
0
Former Member
Feb 29, 2008 at 06:52 AM

REPORT

19 Views

HOW CAN I PRINT THE DATA FROM THIS CODES

I AM NOT CLEAR ABT THE FIELDS OF KOMOK AND KTOSL AND ALSO HOW DATA ARE CONNECTED TO THESE SLECT OPTION FIELD OF SEL SCREEN .

IF I WANT THE ALL FIELDS OF INTERNAL TABLE DATA PRINT.

PLZ HELP ME.

TABLES: t030, skat, sscrfields.

DATA: BEGIN OF IT,

ktopl LIKE t030-ktopl, "CHART ACCOUNT

konts LIKE t030-konts, "GL/ACCOUNT

bklas LIKE t030-bklas, "VALUATION CLASS

txt20 LIKE skat-txt20, "GL SHORT TEXT

bkbez LIKE t025t-bkbez, "DESCRIPTION VALUE CLASS

END OF IT.

DATA: ITAB LIKE STANDARD TABLE OF IT INITIAL SIZE 0.

SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE text-001.

SELECT-OPTIONS: p_ktopl FOR t030-ktopl, "CHART OF ACC

p_komok FOR t030-komok, "ACC MODIFICATION

p_ktosl FOR t030-ktosl. "TRANSACTION KEY

SELECTION-SCREEN SKIP.

*SELECTION-SCREEN FUNCTION KEY 1. "Adds button to application toolbar

  • Declaration of sel screen buttons

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN PUSHBUTTON (20) w_button USER-COMMAND BUT1.

SELECTION-SCREEN PUSHBUTTON (25) w_but2 USER-COMMAND BUT2.

SELECTION-SCREEN END OF LINE.

SELECT-OPTIONS: p_konts FOR t030-konts, "GL/ACCOUNT

p_bklas FOR t030-bklas. "VALUATION CLASS

PARAMETER: gd_ucomm like sy-ucomm default 'BUT1' no-display.

SELECTION-SCREEN END OF BLOCK block1.

*DATA: gd_repsize TYPE i VALUE '83'.

************************************************************************

*INITIALIZATION.

INITIALIZATION.

  • Add displayed text string to buttons

w_button = 'GL account selection'.

w_but2 = 'Valuation class selection'.

*********************************AT SELECTION-SCREEN

AT SELECTION-SCREEN.

  • Check if buttons have been

if sscrfields-ucomm eq 'BUT1'.

gd_ucomm = 'BUT1'.

clear: p_BKLAS.

refresh: p_BKLAS.

elseif sscrfields-ucomm eq 'BUT2'.

clear: p_KONTS.

refresh: p_KONTS.

gd_ucomm = 'BUT2'.

endif.

************************************************************************

*AT SELECTION-SCREEN OUTPUT.

AT SELECTION-SCREEN OUTPUT.

if gd_ucomm eq 'BUT1'.

loop at screen.

if screen-name CS 'P_KONTS'.

screen-active = 1.

elseif screen-name CS 'P_BKLAS'.

screen-active = 0.

endif.

modify screen.

endloop.

elseif gd_ucomm eq 'BUT2'.

loop at screen.

if screen-name CS 'P_KONTS'.

screen-active = 0.

elseif screen-name CS 'P_BKLAS'.

screen-active = 1.

endif.

modify screen.

endloop.

endif.

*****************START OF SELECTION

START-OF-SELECTION.

SELECT KTOPL KONTS BKLAS FROM T030 INTO TABLE ITAB

WHERE KTOPL IN P_KTOPL AND

KONTS IN P_KONTS AND

BKLAS IN P_BKLAS.

THANKX