Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

please check the code

Former Member
0 Kudos

Hi ABAP Guru's .pls check the code and do needful. My problem is i am not getting heading for this report.pls don't suggest for other methods.pls rectify my problem in this report

Thanks & Regards,

TABLES : kna1.

TYPE-POOLS : slis.

DATA : t_fcat TYPE slis_t_fieldcat_alv,

w_fcat TYPE slis_fieldcat_alv.

w_fcat-col_pos = '1'.

w_fcat-fieldname = 'KUNNR'.

w_fcat-seltext_m = 'CUSTOMER NUMBER'.

w_fcat-emphasize = 'C100'.

APPEND w_fcat TO t_fcat.

w_fcat-col_pos = '2'.

w_fcat-fieldname = 'LAND1'.

w_fcat-seltext_m = 'COUNTRY'.

w_fcat-emphasize = 'C210'.

APPEND w_fcat TO t_fcat.

w_fcat-col_pos = '3'.

w_fcat-fieldname = 'NAME1'.

w_fcat-seltext_m = 'CUSTOMER NAME'.

w_fcat-emphasize = 'C300'.

APPEND w_fcat TO t_fcat.

w_fcat-col_pos = '4'.

w_fcat-fieldname = 'ORT01'.

w_fcat-seltext_m = 'CUSTOMER CITY'.

w_fcat-emphasize = 'C401'.

APPEND w_fcat TO t_fcat.

w_fcat-col_pos = '5'.

w_fcat-fieldname = 'PSTLZ'.

w_fcat-seltext_m = 'POSTAL CODE'.

w_fcat-emphasize = 'C511'.

APPEND w_fcat TO t_fcat.

TYPES : BEGIN OF ty_kna1,

kunnr TYPE kunnr,

land1 TYPE land1,

name1 TYPE name1,

ort01 TYPE ort01,

pstlz TYPE pstlz,

END OF ty_kna1.

DATA : it TYPE ty_kna1 OCCURS 1 ,

wa like line of it.

*PERFORM SUB1.

SELECT-OPTIONS : s_kunnr FOR kna1-kunnr.

START-OF-SELECTION.

SELECT kunnr

land1

name1

ort01

pstlz FROM kna1 INTO TABLE it

WHERE kunnr IN s_kunnr.

DATA : t_events TYPE slis_t_event,

w_events TYPE slis_alv_event.

clear w_events.

w_events-form = 'SUB1'.

w_events-name = 'TOP_OF_PAGE'.

APPEND w_events TO t_events.

DATA : t_comments TYPE slis_t_listheader,

w_comments TYPE slis_listheader.

w_comments-typ = 'H'.

w_comments-info = 'CUSTOMER INFORMATION LIST USING ALV'.

APPEND w_comments TO t_comments.

clear w_comments.

*perform fill_events_table.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

  • I_INTERFACE_CHECK = ' '

  • I_BYPASSING_BUFFER = ' '

  • I_BUFFER_ACTIVE = ' '

i_callback_program = 'zuk_sample_alv_all_events_01'

  • I_CALLBACK_PF_STATUS_SET = ' '

  • I_CALLBACK_USER_COMMAND = ' '

I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'

  • I_CALLBACK_HTML_TOP_OF_PAGE = ' '

  • I_CALLBACK_HTML_END_OF_LIST = ' '

  • I_STRUCTURE_NAME =

  • I_BACKGROUND_ID = ' '

  • I_GRID_TITLE = 'CUSTOMER INFO'

  • I_GRID_SETTINGS =

  • IS_LAYOUT =

it_fieldcat = t_fcat

  • IT_EXCLUDING =

  • IT_SPECIAL_GROUPS =

  • IT_SORT =

  • IT_FILTER =

  • IS_SEL_HIDE =

  • I_DEFAULT = 'X'

  • I_SAVE = ' '

  • IS_VARIANT =

it_events = t_events

  • IT_EVENT_EXIT =

  • IS_PRINT =

  • IS_REPREP_ID =

  • I_SCREEN_START_COLUMN = 0

  • I_SCREEN_START_LINE = 0

  • I_SCREEN_END_COLUMN = 0

  • I_SCREEN_END_LINE = 0

  • I_HTML_HEIGHT_TOP = 0

  • I_HTML_HEIGHT_END = 0

  • IT_ALV_GRAPHICS =

  • IT_HYPERLINK =

  • IT_ADD_FIELDCAT =

  • IT_EXCEPT_QINFO =

  • IR_SALV_FULLSCREEN_ADAPTER =

  • IMPORTING

  • E_EXIT_CAUSED_BY_CALLER =

  • ES_EXIT_CAUSED_BY_USER =

TABLES

t_outtab = it

  • EXCEPTIONS

  • PROGRAM_ERROR = 1

  • OTHERS = 2

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

*&----


*

*& Form SUB1

*&----


*

  • text

*----


*

  • --> p1 text

  • <-- p2 text

*----


*

FORM sub1 .

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

it_list_commentary = T_COMMENTS.

  • I_LOGO =

  • I_END_OF_LIST_GRID =

  • I_ALV_FORM =

ENDFORM. " SUB1

3 REPLIES 3

Former Member
0 Kudos

You are not getting the column heading or report heading ???

In case of re[port heading, Use the statement 'SET TITLEBAR' and create a report title.

Former Member
0 Kudos

Hi,

R u using the version ECC 6.0 conform this.

Thank You.

0 Kudos

Hi Abhi i mean he use to say Top of page..?

regards

sas