Skip to Content
0
Jan 10, 2006 at 06:02 AM

Query Regarding ALV - Very Urgent

20 Views

Hi experts,

I have defined a ALV grid in my program using the startdard function module as editable. Now I want the grid to be displayed in the screen with my pf-status. how can i do that?.

Here is the sample code.

REPORT zadvcformsub

NO STANDARD PAGE HEADING MESSAGE-ID zf

LINE-SIZE 255 LINE-COUNT 66.

INCLUDE zftsvar .

TYPE-POOLS : slis.

TABLES : zftsregstr, zftsintnum, zftscusttc,

zadvcform, konv, knvv, sscrfields.

DATA : it_fieldcat TYPE slis_t_fieldcat_alv.

DATA : w_layout TYPE slis_layout_alv,

w_fieldcat TYPE slis_fieldcat_alv.

DATA : BEGIN OF it_initial OCCURS 1,

bukrs(4) TYPE c,

wkreg(3) TYPE c,

zkunag(10) TYPE c,

validfrom(10) TYPE c,

validto(10) TYPE c,

vkorg(4) TYPE c,

aland(3) TYPE c,

zformtype(1) TYPE c,

frmintno(10) TYPE c,

uname(12) TYPE c,

datum(10) TYPE c,

uzeit(8) TYPE c,

END OF it_initial.

DATA : BEGIN OF it_part OCCURS 1,

zkunag LIKE zadvcform-zkunag,

frmintno LIKE zadvcform-frmintno,

validfrom LIKE zadvcform-validfrom,

validto LIKE zadvcform-validto,

END OF it_part.

DATA : w_sno(2) TYPE c,

w_cust(10) TYPE c,

w_cform(10) TYPE c,

w_from(10) TYPE c,

w_to(10) TYPE c,

w_blank1(10) TYPE c,

w_blank2(10) TYPE c,

w_blank3(10) TYPE c,

w_blank4(10) TYPE c,

w_string_len TYPE i,

w_sel_line(255) TYPE c,

w_indx(2) TYPE c.

SELECTION-SCREEN SKIP 1.

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

SELECT-OPTIONS:

s_bukrs FOR zadvcform-bukrs NO INTERVALS NO-EXTENSION OBLIGATORY,

s_aland FOR zadvcform-aland NO INTERVALS NO-EXTENSION OBLIGATORY,

s_wkreg FOR zadvcform-wkreg NO INTERVALS NO-EXTENSION OBLIGATORY,

s_vkorg FOR zadvcform-vkorg NO INTERVALS NO-EXTENSION OBLIGATORY,

s_fmtyp FOR zadvcform-zformtype NO INTERVALS NO-EXTENSION OBLIGATORY.

SELECTION-SCREEN END OF BLOCK b1.

INITIALIZATION.

AT SELECTION-SCREEN.

START-OF-SELECTION.

w_fieldcat-fieldname = 'ZKUNAG'.

w_fieldcat-tabname = 'IT_PART'.

w_fieldcat-ref_fieldname = 'ZKUNAG'.

w_fieldcat-ref_tabname = 'ZADVCFORM'.

w_fieldcat-seltext_l = 'Customer Code'.

w_fieldcat-ddictxt = 'L'.

w_fieldcat-input = 'X'.

w_fieldcat-edit = 'X'.

APPEND w_fieldcat TO it_fieldcat.

w_fieldcat-fieldname = 'FRMINTNO'.

w_fieldcat-tabname = 'IT_PART'.

w_fieldcat-ref_fieldname = 'FRMINTNO'.

w_fieldcat-ref_tabname = 'ZADVCFORM'.

w_fieldcat-seltext_l = 'C Form No'.

w_fieldcat-ddictxt = 'L'.

w_fieldcat-input = 'X'.

w_fieldcat-edit = 'X'.

APPEND w_fieldcat TO it_fieldcat.

w_fieldcat-fieldname = 'VALIDFROM'.

w_fieldcat-tabname = 'IT_PART'.

w_fieldcat-ref_fieldname = 'VALIDFROM'.

w_fieldcat-ref_tabname = 'ZADVCFORM'.

w_fieldcat-seltext_l = 'Valid From'.

w_fieldcat-ddictxt = 'L'.

w_fieldcat-input = 'X'.

w_fieldcat-edit = 'X'.

APPEND w_fieldcat TO it_fieldcat.

w_fieldcat-fieldname = 'VALIDTO'.

w_fieldcat-tabname = 'IT_PART'.

w_fieldcat-ref_fieldname = 'VALIDTO'.

w_fieldcat-ref_tabname = 'ZADVCFORM'.

w_fieldcat-seltext_l = 'Valid To'.

w_fieldcat-ddictxt = 'L'.

w_fieldcat-input = ' '.

w_fieldcat-edit = ' '.

APPEND w_fieldcat TO it_fieldcat.

DO 15 TIMES.

CLEAR it_part.

APPEND it_part.

ENDDO.

SET PF-STATUS 'ZADVCFORM_COPY'.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = sy-cprog

  • i_callback_pf_status_set = 'ZADVCFORM_COPY'

it_fieldcat = it_fieldcat

i_grid_title = 'Advanced C Form Submission'

TABLES

t_outtab = it_part[]

EXCEPTIONS

program_error = 1

OTHERS = 2.

IF sy-subrc <> 0.

MESSAGE i039(zaba) WITH 'Error in ALV'.

ENDIF.

-


I am geting the editable ALV grid but how to set my gui status.

regards,

Arul Jothi.