Problem with 'BACK' option for ALV grid

Hi Friends,
I'm using FM, REUSE_ALV_GRID_DISPLAY in my report.
Once I got an ALV output, when I press the BACK button,
it's going to blank sceen again when I press BACK am getting selection screen.
From output am not able to goto the selection screen. Kindly suggest on this issue.
Thanks in advance.
Regards,
Bharat.

Hi,
I don't have write statement anywhere in my prog.
pls refer to the code.
REPORT  ZCDC_TRACKING_REPORT no standard page heading message-id zz1
tables:vbak,
       vbap,
       vbkd,
       vtfa,
       vbfa,
       vtrkh,
       vttk.
TYPE-POOLS: SLIS.                      "Field catalog structure
DATA: FCATALOG TYPE SLIS_FIELDCAT_ALV OCCURS 30.
DATA: FZEILE   TYPE SLIS_FIELDCAT_ALV OCCURS 30 with header line.
data:w_disp_variant TYPE disvariant,
     s_alv_layout   type slis_layout_alv.
DATA: W_REPID     LIKE SY-REPID,
      W_SUBRC     LIKE SY-SUBRC,
      W_LOOPCOUNT LIKE SY-TABIX,
      W_LINES     TYPE I,
      IS_VARIANT  LIKE DISVARIANT,
      GS_LAYOUT   TYPE SLIS_LAYOUT_ALV.
*Internal table declaration.
data: begin of i_vbak occurs 0,
      vbeln like vbak-vbeln,
      kunnr like vbak-kunnr,
      bstnk like vbak-bstnk,
      end of i_vbak.
data: begin of i_vbfa occurs 0,
      vbeln like vbfa-vbeln,
      vbelv like vbfa-vbelv,
      end of i_vbfa.
data: begin of i_vtfa occurs 0,
      tknum like vtfa-tknum,
      vbeln like vbak-vbeln,
      end of i_vtfa.
data: begin of i_vttp occurs 0,
      tknum like vtfa-tknum,
      vbeln like vbak-vbeln,
      end of i_vttp.
data: begin of i_vttk occurs 0,
      tknum like vtfa-tknum,
      vsart like vttk-vsart,
      dtabf like vttk-dtabf,
      tdlnr like vttk-tdlnr,
      TNDR_TRKID like vttk-TNDR_TRKID,
      end of i_vttk.
data: begin of i_final occurs 0,
      kunnr like vbak-kunnr,
      name1 like kna1-name1,
      vbeln like vbak-vbeln,
      bstkd like vbkd-bstkd,
      dtabf like vttk-dtabf,
      tdlnr like vttk-tdlnr,
      TNDR_TRKID like vttk-TNDR_TRKID,
      end of i_final,
      wa_final like i_final.
data: v_name1 like kna1-name1,
      v_trackno like vtrkh-trackn.
**selection-screen.
SELECTION-SCREEN begin of block b1 with frame.
parameters: R1 RADIOBUTTON GROUP rad1 DEFAULT 'X'.
parameters: p_vbeln like vbak-vbeln,
            p_bstkd like vbkd-bstkd.
SKIP.
SKIP.
*SELECTION-SCREEN end of block b1.
*SELECTION-SCREEN begin of block b2.
parameters: R2 RADIOBUTTON GROUP rad1.
select-options: s_kunnr for vbak-kunnr.
select-options: s_dtabf for VTTK-DTABF.
SELECTION-SCREEN end of block b1.
SELECTION-SCREEN begin of block b2 with frame.
parameters: P_track RADIOBUTTON GROUP rad2 default 'X',
            P_car RADIOBUTTON GROUP rad2,
            P_both RADIOBUTTON GROUP rad2.
SELECTION-SCREEN end of block b2.
**Initialization.
Initialization.
  MOVE SY-REPID TO W_REPID.
*At selection-screen.
At selection-screen.
if R1 eq 'X'.
   if p_vbeln eq ' ' and p_bstkd eq ' '.
     message e000(zz1) with 'Please enter either PO # or SO #'.
   endif.
elseif R2 eq 'X'.
  if ( s_kunnr-low is initial and  s_kunnr-high is initial ) and
     ( s_dtabf-low is initial and  s_dtabf-high is initial )  .
     message e000(zz1) with 'Please limit your selection criteria, this'
                         'cannot run without a Customer # & Date range'.
  endif.
endif.
**start-of-selection.
start-of-selection.
**if option foreground is selected
IF R1 eq 'X'.
**step1 select data from VBAK,VBKD
**step2 select data from VTTK
  perform get_data_foreground.
Perform process_data.
elseif R2 eq 'X'.
**if option Batch processing selected
**select data from KNA1,VBAK,VTTKelseif R2 eq 'X'.
  perform get_data_batch_processing.
endif.
  Perform process_data.
end-of-selection.
*&      Form  get_data_foreground
      text
-->  p1        text
<--  p2        text
form get_data_foreground .
if p_vbeln ne ' ' and p_bstkd ne ' '.
select vbeln
       kunnr
       bstnk
       from vbak into table i_vbak
       where vbeln eq p_vbeln
         and bstnk eq p_bstkd.
elseif p_vbeln eq ' ' .
select vbeln
       kunnr
       bstnk
       from vbak into table i_vbak
       where bstnk eq p_bstkd.
elseif p_bstkd eq ' '.
select vbeln
       kunnr
       bstnk
       from vbak into table i_vbak
       where vbeln eq p_vbeln.
endif.
**Get data from VBFA
  if not i_vbak[] is initial.
   select vbeln
          vbelv from VBFA into table i_vbfa
          for all entries in i_vbak
          where vbelv = i_vbak-vbeln
            and vbtyp_n = 'J'.
  endif.
**select data from VTTP
  if not i_vbfa[] is initial.
   select tknum
          vbeln
          from vttp into table i_vttp
          for all entries in i_vbfa
          where vbeln = i_vbfa-vbeln.
  endif.
*select data from VTTK
if not i_vttp[] is initial.
   select  tknum
           vsart
           dtabf
           tdlnr
           TNDR_TRKID  from vttk into table i_vttk
           for all entries in i_vttp
           where tknum eq i_vttp-tknum.
endif.
**select data from VTFA
if not i_vbak[] is initial.
  select tknum
         vbeln
         from vtfa into table i_vtfa
         for all entries in i_vbak
         where vbeln = i_vbak-vbeln.
endif.
*select data from VTTK
if not i_vtfa[] is initial.
  select  tknum
          dtabf
          tdlnr
          TNDR_TRKID  from vttk into table i_vttk
          for all entries in i_vtfa
          where tknum eq i_vtfa-tknum.
endif.
endform.                    " get_data_foreground
*&      Form  get_data_batch_processing
      text
-->  p1        text
<--  p2        text
form get_data_batch_processing .
select vbeln
       kunnr
       bstnk
       from vbak into table i_vbak
       where kunnr in s_kunnr.
**Get data from VBFA
  if not i_vbak[] is initial.
   select vbeln from VBFA into table i_vbfa
          for all entries in i_vbak
          where vbelv = i_vbak-vbeln
            and vbtyp_n = 'J'.
  endif.
**select data from VTTP
  if not i_vbfa[] is initial.
   select tknum
          vbeln
          from vttp into table i_vttp
          for all entries in i_vbfa
          where vbeln = i_vbfa-vbeln.
  endif.
*select data from VTTK
if not i_vttp[] is initial.
   select  tknum
           vsart
           dtabf
           tdlnr
           TNDR_TRKID  from vttk into table i_vttk
           for all entries in i_vttp
           where tknum eq i_vttp-tknum
             and dtabf eq s_dtabf.
endif.
**select data from VTFA
if not i_vbak[] is initial.
  select tknum
         vbeln
         from vtfa into table i_vtfa
         for all entries in i_vbak
         where vbeln = i_vbak-vbeln.
endif.
**select data from VTTK
if not i_vtfa[] is initial.
  select  tknum
          dtabf
          tdlnr
          TNDR_TRKID  from vttk into table i_vttk
          for all entries in i_vtfa
          where tknum eq i_vtfa-tknum
            and dtabf eq s_dtabf.
endif.
endform.                    " get_data_batch_processing
*&      Form  process_data
      text
-->  p1        text
<--  p2        text
form process_data .
**loop processing
loop at i_vbak.
   wa_final-vbeln = i_vbak-vbeln.
   wa_final-bstkd = i_vbak-bstnk.
   wa_final-kunnr = i_vbak-kunnr.
   select single name1 into v_name1
                       from kna1
                       where kunnr eq wa_final-kunnr.
   if sy-subrc eq 0.
     wa_final-name1 = v_name1.
   endif.
  read table i_vbfa with key vbelv = i_vbak-vbeln.
  if sy-subrc eq 0.
     read table i_vttp with key vbeln = i_vbfa-vbeln.
     if sy-subrc eq 0.
        read table i_vttk with key tknum = i_vttp-tknum.
         if sy-subrc eq 0.
            wa_final-dtabf = i_vttk-dtabf.
            if p_track eq 'X'.
               if i_vttk-vsart = 'LTL'.
                  wa_final-TNDR_TRKID = i_vttk-TNDR_TRKID.
               else.
                 select single trackn from VTRKH into v_trackno
                                  where uevbeln = i_vbfa-vbeln
                                    and uevbtyp = 'J'
                                    and vbtyp   = 'X'.
                   if sy-subrc eq 0.
                    wa_final-TNDR_TRKID = v_trackno.
                   endif.
               endif.
            elseif P_car eq 'X'.
               wa_final-tdlnr = i_vttk-tdlnr.
            else.
               wa_final-tdlnr = i_vttk-tdlnr.
               if i_vttk-vsart = 'LTL'.
                  wa_final-TNDR_TRKID = i_vttk-TNDR_TRKID.
               else.
                 select single trackn from VTRKH into v_trackno
                                  where uevbeln = i_vbfa-vbeln
                                    and uevbtyp = 'J'
                                    and vbtyp   = 'X'.
                   if sy-subrc eq 0.
                    wa_final-TNDR_TRKID = v_trackno.
                   endif.
               endif.
            endif.
         endif.
      endif.
  endif.
  append wa_final to i_final.
  clear : i_final, wa_final,i_vbak,i_vbfa,i_vttp, i_vttk,v_name1.
endloop.
IF R1 eq 'X'.
  PERFORM FIELDCATALOG.
  PERFORM LAYOUT_BUILD CHANGING GS_LAYOUT.
  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
         I_CALLBACK_PROGRAM       = W_REPID
         IS_LAYOUT                = GS_LAYOUT
         IT_FIELDCAT              = FCATALOG
        TABLES
             T_OUTTAB             = i_final
        EXCEPTIONS
             PROGRAM_ERROR        = 1
             OTHERS               = 2.
else.
  PERFORM BACKGROUND_JOB.
**Transfer of data into Application server
OPEN DATASET P_PFILE for output IN TEXT MODE encoding DEFAULT .
  if sy-subrc eq 0.
      loop at itab.
     transfer itab to p_pfile.
    endloop.
  else.
   message e000(zz1) with p_pfile.
  endif.
CLOSE dataset p_pfile.
endif.
endform.                    " process_data
*&      Form  FIELDCATALOG
      text
-->  p1        text
<--  p2        text
form FIELDCATALOG .
  DATA: L_FIELDNO LIKE SY-TABIX.
  L_FIELDNO = 1.
**Cust. Number
  CLEAR FZEILE.
  FZEILE-COL_POS    = L_FIELDNO.
  L_FIELDNO         = L_FIELDNO + 1.
  FZEILE-FIELDNAME  = 'KUNNR'.
  FZEILE-DATATYPE   = 'CHAR'.
  FZEILE-OUTPUTLEN  = 15.
  FZEILE-SELTEXT_L  = 'Customer' .
  FZEILE-LOWERCASE  = 'X'.
  FZEILE-SP_GROUP   = 'A'.
  FZEILE-KEY = 'X'.
  FZEILE-DDICTXT       = 'M'.          " medium text
  APPEND FZEILE TO FCATALOG.
**Customer name
  CLEAR FZEILE.
  FZEILE-COL_POS    = L_FIELDNO.
  L_FIELDNO         = L_FIELDNO + 1.
  FZEILE-FIELDNAME  = 'NAME1'.
  FZEILE-DATATYPE   = 'CHAR'.
  FZEILE-OUTPUTLEN  = 35.
  FZEILE-SELTEXT_L  = 'Customer Name' .
  FZEILE-LOWERCASE  = 'X'.
  FZEILE-SP_GROUP   = 'A'.
  FZEILE-KEY = 'X'.
  FZEILE-DDICTXT       = 'M'.          " medium text
  APPEND FZEILE TO FCATALOG.
**Sales order
  CLEAR FZEILE.
  FZEILE-COL_POS    = L_FIELDNO.
  L_FIELDNO         = L_FIELDNO + 1.
  FZEILE-FIELDNAME  = 'VBELN'.
  FZEILE-DATATYPE   = 'CHAR'.
  FZEILE-OUTPUTLEN  = 10.
  FZEILE-SELTEXT_L  = 'Sales order' .
  FZEILE-LOWERCASE  = 'X'.
  FZEILE-SP_GROUP   = 'A'.
  FZEILE-KEY = 'X'.
  FZEILE-DDICTXT       = 'M'.          " medium text
  APPEND FZEILE TO FCATALOG.
**Custmoer PO
  CLEAR FZEILE.
  FZEILE-COL_POS    = L_FIELDNO.
  L_FIELDNO         = L_FIELDNO + 1.
  FZEILE-FIELDNAME  = 'BSTKD'.
  FZEILE-DATATYPE   = 'CHAR'.
  FZEILE-OUTPUTLEN  = 30.
  FZEILE-SELTEXT_L  = 'Custmoer PO' .
  FZEILE-LOWERCASE  = 'X'.
  FZEILE-SP_GROUP   = 'A'.
  FZEILE-KEY = 'X'.
  FZEILE-DDICTXT       = 'M'.          " medium text
  APPEND FZEILE TO FCATALOG.
**Date shipped
  CLEAR FZEILE.
  FZEILE-COL_POS    = L_FIELDNO.
  L_FIELDNO         = L_FIELDNO + 1.
  FZEILE-FIELDNAME  = 'DTABF'.
  FZEILE-DATATYPE   = 'CHAR'.
  FZEILE-OUTPUTLEN  = 15.
  FZEILE-SELTEXT_L  = 'Date shipped' .
  FZEILE-LOWERCASE  = 'X'.
  FZEILE-SP_GROUP   = 'A'.
  FZEILE-KEY = 'X'.
  FZEILE-DDICTXT       = 'M'.          " medium text
  APPEND FZEILE TO FCATALOG.
**Carrier
  CLEAR FZEILE.
  FZEILE-COL_POS    = L_FIELDNO.
  L_FIELDNO         = L_FIELDNO + 1.
  FZEILE-FIELDNAME  = 'TDLNR'.
  FZEILE-DATATYPE   = 'CHAR'.
  FZEILE-OUTPUTLEN  = 15.
  FZEILE-SELTEXT_L  = 'Carrier' .
  FZEILE-LOWERCASE  = 'X'.
  FZEILE-SP_GROUP   = 'A'.
  FZEILE-KEY = 'X'.
  FZEILE-DDICTXT       = 'M'.          " medium text
  APPEND FZEILE TO FCATALOG.
**Tracking/Pro #
  CLEAR FZEILE.
  FZEILE-COL_POS    = L_FIELDNO.
  L_FIELDNO         = L_FIELDNO + 1.
  FZEILE-FIELDNAME  = 'TNDR_TRKID'.
  FZEILE-DATATYPE   = 'CHAR'.
  FZEILE-OUTPUTLEN  = 15.
  FZEILE-SELTEXT_L  = 'Tracking/Pro#' .
  FZEILE-LOWERCASE  = 'X'.
  FZEILE-SP_GROUP   = 'A'.
  FZEILE-KEY = 'X'.
  FZEILE-DDICTXT       = 'M'.          " medium text
  APPEND FZEILE TO FCATALOG.
  CLEAR FZEILE.
endform.                    " FIELDCATALOG
*&      Form  LAYOUT_BUILD
      text
     <--P_GS_LAYOUT  text
form LAYOUT_BUILD  changing p_gs_layout TYPE SLIS_LAYOUT_ALV.
  CLEAR P_GS_LAYOUT.
  P_GS_LAYOUT-ZEBRA            = 'X'.
  P_GS_LAYOUT-BOX_FIELDNAME    = SPACE.
  P_GS_LAYOUT-MAX_LINESIZE     = 250.
endform.                    " LAYOUT_BUILD
*&      Form  BACKGROUND_JOB
      text
-->  p1        text
<--  p2        text
form BACKGROUND_JOB .
DATA: JOB_NAME         LIKE TBTCO-JOBNAME,
JOB_NR           LIKE TBTCO-JOBCOUNT,
JOB_RELEASED     TYPE C,
JOB_START_SOFORT TYPE C.
DATA: TITEL(15) TYPE C,
TEXT1(35) TYPE C,
TEXT2(40) TYPE C,
ANSWER    TYPE C.
DATA: PARAMS    LIKE PRI_PARAMS,
VALID     TYPE C.
JOB_NAME = SYST-REPID.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
JOBNAME          = JOB_NAME
IMPORTING
JOBCOUNT         = JOB_NR
EXCEPTIONS
CANT_CREATE_JOB  = 1
INVALID_JOB_DATA = 2
JOBNAME_MISSING  = 3
OTHERS           = 4.
IF SYST-SUBRC NE 0.
MESSAGE I162(00) WITH
'An error occured while creating the background job.'.
STOP.
ELSE.
*set print parameters to output any errors to spool...
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
IMMEDIATELY            = ' '
MODE                   = 'BATCH'
NO_DIALOG              = 'X'
RELEASE                = 'X'
NEW_LIST_ID            = 'X'
LINE_SIZE              = SY-LINSZ
*LIST_NAME              = 'RBE'
LIST_TEXT              = 'Extract Results'
IMPORTING
OUT_PARAMETERS         = PARAMS
VALID                  = VALID
EXCEPTIONS
ARCHIVE_INFO_NOT_FOUND = 1
INVALID_PRINT_PARAMS   = 2
INVALID_ARCHIVE_PARAMS = 3
OTHERS                 = 4.
IF VALID NE SPACE.
*submit job with all the selection screen params...
SUBMIT (JOB_NAME) USER SYST-UNAME
VIA JOB JOB_NAME NUMBER JOB_NR
*WITH CLIENT   = CLIENT
*WITH MONIFROM = MONIFROM
*WITH MONI_TO  = MONI_TO
*WITH TQ_FROM  = TQ_FROM
*WITH TQ_TO    = TQ_TO
*WITH WORKLOAD = WORKLOAD
*WITH ALL      = ALL
*WITH SPL1     = SPL1
*WITH APPSERV1 = APPSERV1
*WITH SPOOLNR  = SPOOLNR
*WITH APPPATH1 = APPPATH1
*WITH PCPATH   = PCPATH
*WITH SPL2     = SPL2
*WITH APPSERV2 = APPSERV2
TO SAP-SPOOL SPOOL PARAMETERS PARAMS
WITHOUT SPOOL DYNPRO
AND RETURN.
IF SYST-SUBRC <> 0.
CASE SYST-SUBRC.
WHEN  4.
MESSAGE I162(00) WITH
'Error defining background job!'
' Background job canceled by User.'.
WHEN 8.
MESSAGE I162(00) WITH
'Error defining background job!'
' Error in job scheduling (JOB_SUBMIT)'.
WHEN 12.
MESSAGE I162(00) WITH
'Error defining background job!'
' Error in internal number assignment'.
ENDCASE.
ENDIF.
endif.
endif.
endform.                    " BACKGROUND_JOB

Similar Messages

  • Problem with back button in alv o/p

    Hi guys,
    I am using Grid display to display a data. but when i am clicking on back button on o/p the o/p is displaying duplicate records for the first o/p. i,e it is displaying multiple records, again clicking on back it displaying extended o/p with more duplicate data...

    Hi
    Check did u refreshed the internal that u displayed.
    And also check grid control is initial or not
    Data: g_cust_container TYPE REF TO cl_gui_custom_container,
             g_cust_grid TYPE REF TO cl_gui_alv_grid.
    **Create Container ALV Grid
      IF g_cust_grid IS INITIAL.
    Create Control Container for Grid
        CREATE OBJECT g_cust_container
           EXPORTING
              container_name = g_container.
        IF sy-subrc <> 0.
    add your handling, for example
          CALL FUNCTION 'POPUP_TO_INFORM'
            EXPORTING
              titel = sy-repid
              txt2  = sy-subrc
              txt1  = text-m02. "The control could not be created.
        ENDIF.
        CREATE OBJECT g_cust_grid
           EXPORTING
              i_parent = g_cust_container.
      ENDIF.
      CALL METHOD g_cust_grid->refresh_table_display.
    Regards,
    Raghu.

  • Problem with Excel button in ALV Grid...URGENT

    Hi All,
    I have developed a report in ALV Grid. As we all know that by default we get few buttons in ALV Grid, like summation, sorting download, etc.. In that we have one excel button. When i click that excel button the output of the report should give the output in excel sheet. But this is not working.
    The report is running fine except the excel button.
    Do anyone of u have any idea how to do that?
    Its very urgent...
    Regards,
    Parvez.

    Go through the code and Execute it on your system, I think this will do for you.
    In this code I used 3 radio buttons in my selection screen:
    If u selects the first radio button your out put shows into to the Excel sheet.
    If u selects the second radio button your out put shows the in the Editor screen.
    If u clicks the third radio button your output shows into the Excel as well as in the Editor.
    *&                       DATA DECLARATION                              *
    TABLES: MARA,                      "GENERAL MASTER DATA
            MARC,                      "PLANT DATA FOR MATERIAL
            MARD,                      "STORAGE LOCATION DATA FOR MATERIAL
            MBEW,                      "MATERIAL VALUATION
            MVKE,                      "SALES DATA FOR MATERIAL
            MAKT,                      "MATERIAL DESCRIPTION
            EKKO,                      "PURCHASING DOCUMENT HEADER
            EKPO,                      "PURCHASING DOCUMENT ITEM
            VBAK,                      "SALES DOCUMENT HEADER DATA
            VBAP.                      "SALES DOCUMENT ITEM DATA
    TYPE-POOLS : SLIS.
    DATA: VT_FIELDCAT1 TYPE SLIS_T_FIELDCAT_ALV,
          V_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
          V_LAYOUT TYPE SLIS_LAYOUT_ALV,
          BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
          BEGIN OF I_MARA OCCURS 0,
             MATNR LIKE MARA-MATNR,  "MATERIAL NUMBER
             MBRSH LIKE MARA-MBRSH,  "INDUSTRY SECTOR
             MEINS LIKE MARA-MEINS,  "BASE UNIT OF MEASURE
             MATKL LIKE MARA-MATKL,  "MATERIAL GROUP
          END OF I_MARA,
          BEGIN OF I_MARC OCCURS 0,
             MATNR LIKE MARC-MATNR,  "MATERIAL NUMBER
             WERKS LIKE MARC-WERKS,  "PLANT
             LVORM LIKE MARC-LVORM,  "FLAG MATERIAL FOR DELETION AT PLANT
                                      "LEVEL
             DISPO LIKE MARC-DISPO,  "MRP CONTROLLER
          END OF I_MARC,
          BEGIN OF I_MAKT OCCURS 0,
             MATNR LIKE MAKT-MATNR,  "MATERIAL NUMBER
             MAKTX LIKE MAKT-MAKTX,  "MATERIAL DESCRIPTION
             SPRAS LIKE MAKT-SPRAS,  "LANGUAGE KEY
          END OF I_MAKT,
          BEGIN OF I_MVKE OCCURS 0,
             MATNR LIKE MVKE-MATNR,  "MATERIAL NUMBER
             VKORG LIKE MVKE-VKORG,  "SALES ORGANIZATION
             VTWEG LIKE MVKE-VTWEG,  "DISTRIBUTION CHANNEL
          END OF I_MVKE,
          BEGIN OF I_MARD OCCURS 0,
            MATNR LIKE MARD-MATNR,  "MATERIAL NUMBER
            LGORT LIKE MARD-LGORT,  "STORAGE LOCATION
            LABST LIKE MARD-LABST,  "VALUATED STOCK WITH UNRESTRICTED USE
          END OF I_MARD,
          BEGIN OF I_EKPO OCCURS 0,
            EBELN LIKE EKPO-EBELN,  "PURCHASING DOCUMENT NUMBER
            EBELP LIKE EKPO-EBELP,  "ITEM NUMBER OF PURCHASING DOCUMENT
            MATNR LIKE EKPO-MATNR,  "MATERIAL NUMBER
          END OF I_EKPO,
          BEGIN OF I_VBAP OCCURS 0,
            VBELN LIKE VBAP-VBELN,  "SALES DOCUMENT
            POSNR LIKE VBAP-POSNR,  "SALES DOCUMENT ITEM
            MATNR LIKE VBAP-MATNR,  "MATERIAL NUMBER
          END OF I_VBAP,
          BEGIN OF I_OUT OCCURS 0,
            MATNR LIKE MARC-MATNR,
            WERKS LIKE MARC-WERKS,
            LVORM LIKE MARC-LVORM,
            DISPO LIKE MARC-DISPO,
            MBRSH LIKE MARA-MBRSH,
            MEINS LIKE MARA-MEINS,
            MATKL LIKE MARA-MATKL,
            VKORG LIKE MVKE-VKORG,
            VTWEG LIKE MVKE-VTWEG,
            SPRAS LIKE MAKT-SPRAS,
            MAKTX LIKE MAKT-MAKTX,
            LGORT LIKE MARD-LGORT,
            LABST LIKE MARD-LABST,
            EBELN LIKE EKPO-EBELN,
            EBELP LIKE EKPO-EBELP,
            VBELN LIKE VBAP-VBELN,
            POSNR LIKE VBAP-POSNR,
          END OF I_OUT,
          BEGIN OF I_HEADING OCCURS 0,
            TEXT1(20),
            TEXT2(20),
            TEXT3(20),
            TEXT4(20),
            TEXT5(20),
            TEXT6(20),
            TEXT7(20),
            TEXT8(20),
            TEXT9(20),
            TEXT10(20),
            TEXT11(40),
            TEXT12(20),
            TEXT13(20),
            TEXT14(20),
            TEXT15(20),
            TEXT16(20),
            TEXT17(20),
          END OF I_HEADING.
    *&                   S E L E C T I O N - S C R E E N                   *
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-100.
    SELECT-OPTIONS: S_MATNR FOR MARA-MATNR. "OBLIGATORY.
    PARAMETERS: P_WERKS LIKE MARC-WERKS. "OBLIGATORY.
    SELECT-OPTIONS: S_LGORT FOR MARD-LGORT,
                    S_DISPO FOR MARC-DISPO,
                    S_EBELN FOR EKPO-EBELN .
    SELECTION-SCREEN END OF BLOCK B1.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-101.
    PARAMETERS : RB1 RADIOBUTTON GROUP G1,
                 RB2 RADIOBUTTON GROUP G1,
                 RB3 RADIOBUTTON GROUP G1.
    SELECTION-SCREEN END OF BLOCK B2.
    *&             S T A R T - O F - S E L E C T I O N                     *
    START-OF-SELECTION.
      SELECT MATNR WERKS LVORM DISPO FROM MARC
      INTO CORRESPONDING FIELDS OF TABLE I_MARC
                          WHERE MATNR IN S_MATNR
                          AND DISPO IN S_DISPO
                          AND WERKS = P_WERKS.
      IF I_MARC[] IS INITIAL.
        WRITE:/ 'NO MATCHING DATA AVAILABLE FROM MARC'.
        EXIT.
      ENDIF.
      PERFORM PURCHASEDATA_VALIDATION.
      PERFORM SALESDATA_VALIDATION.
      SELECT MATNR LGORT LABST FROM MARD INTO TABLE  I_MARD
                          FOR ALL ENTRIES IN I_MARC
                          WHERE MATNR = I_MARC-MATNR
                          AND WERKS EQ P_WERKS
                          AND LGORT IN S_LGORT.
      IF I_MARD[] IS INITIAL.
        WRITE:/ 'NO MATCHING DATA AVAILABLE FROM MARD'.
        EXIT.
      ENDIF.
      SELECT MATNR VKORG VTWEG FROM MVKE INTO TABLE I_MVKE
                          FOR ALL ENTRIES IN I_MARC
                          WHERE MATNR = I_MARC-MATNR.
      IF I_MVKE[] IS INITIAL.
        WRITE:/ 'NO MATCHING DATA AVAILABLE FROM MVKE'.
        EXIT.
      ENDIF.
      LOOP AT I_MARC.
        MOVE-CORRESPONDING I_MARC TO I_OUT.
        CLEAR MARC.
        SELECT SINGLE MATNR MBRSH MEINS MATKL FROM MARA
                          INTO CORRESPONDING FIELDS OF MARA
                          WHERE MATNR = I_OUT-MATNR.
        IF SY-SUBRC = 0.
          MOVE: MARA-MBRSH TO I_OUT-MBRSH,
                MARA-MEINS TO I_OUT-MEINS,
                MARA-MATKL TO I_OUT-MATKL.
        ELSE.
          CONTINUE.
        ENDIF.
        SELECT SINGLE MATNR MAKTX SPRAS FROM MAKT
                        INTO  CORRESPONDING FIELDS OF MAKT
                        WHERE  MATNR = I_OUT-MATNR.
        IF SY-SUBRC = 0.
          MOVE: MAKT-MAKTX TO I_OUT-MAKTX,
                MAKT-SPRAS TO I_OUT-SPRAS.
        ELSE.
          CONTINUE.
        ENDIF.
        LOOP AT I_EKPO WHERE MATNR =  I_MARC-MATNR.
          MOVE: I_EKPO-EBELN TO I_OUT-EBELN,
                I_EKPO-EBELP TO I_OUT-EBELP.
        ENDLOOP.
        LOOP AT I_VBAP WHERE MATNR =  I_MARC-MATNR.
          MOVE: I_VBAP-VBELN TO I_OUT-VBELN,
                I_VBAP-POSNR TO I_OUT-POSNR.
        ENDLOOP.
        LOOP AT I_MARD WHERE MATNR = I_MARC-MATNR.
          MOVE: I_MARD-LABST TO I_OUT-LABST,
                I_MARD-LGORT TO I_OUT-LGORT.
        ENDLOOP.
        LOOP AT I_MVKE WHERE MATNR = I_MARC-MATNR.
          MOVE: I_MVKE-VKORG TO I_OUT-VKORG,
                I_MVKE-VTWEG TO I_OUT-VTWEG.
          APPEND I_OUT.
        ENDLOOP.
        CLEAR I_OUT.
      ENDLOOP.
      PERFORM OPTIONS.
                         FORM  OPTIONS                                *
    FORM OPTIONS.
      IF RB2 = 'X'.
        PERFORM FIELDCAT.
        PERFORM OUTPUT.
      ELSE.
        IF RB1 = 'X'.
          PERFORM HEADINGS.
          PERFORM DLOAD.
        ELSE.
          IF RB3 = 'X'.
            PERFORM HEADINGS.
            PERFORM DLOAD.
            PERFORM FIELDCAT.
            PERFORM OUTPUT.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDFORM.                    "OPTIONS
                         FORM  HEADINGS                               *
    FORM HEADINGS.
      I_HEADING-TEXT1 = 'MATNR'.
      I_HEADING-TEXT2 = 'WERKS'.
      I_HEADING-TEXT3 = 'LVORM'.
      I_HEADING-TEXT4 = 'DISPO'.
      I_HEADING-TEXT5 = 'MBRSH'.
      I_HEADING-TEXT6 = 'MEINS'.
      I_HEADING-TEXT7 = 'MATKL'.
      I_HEADING-TEXT8 = 'VKORG'.
      I_HEADING-TEXT9 = 'VTWEG'.
      I_HEADING-TEXT10 = 'SPRAS'.
      I_HEADING-TEXT11 = 'MAKTX'.
      I_HEADING-TEXT12 = 'LGORT'.
      I_HEADING-TEXT13 = 'LABST'.
      I_HEADING-TEXT14 = 'EBELN'.
      I_HEADING-TEXT15 = 'EBELP'.
      I_HEADING-TEXT16 = 'VBELN'.
      I_HEADING-TEXT17 = 'POSNR'.
      APPEND I_HEADING.
    ENDFORM.                    "HEADINGS
                         FORM  DLOAD                                  *
    FORM DLOAD.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          FILENAME              = 'C:\MATSTK.XLS'
          FILETYPE              = 'DAT'
          WRITE_FIELD_SEPARATOR = 'X'
        TABLES
          DATA_TAB              = I_HEADING
        EXCEPTIONS
          FILE_WRITE_ERROR      = 1.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          FILENAME              = 'C:\MATSTK.XLS'
          FILETYPE              = 'DAT'
          APPEND                = 'X'
          WRITE_FIELD_SEPARATOR = 'X'
        TABLES
          DATA_TAB              = I_OUT.
    ENDFORM.                    "DLOAD
                              FORM  FIELDCAT                          *
    FORM FIELDCAT.
      V_FIELDCAT-COL_POS = '1'.
      V_FIELDCAT-FIELDNAME     = 'MATNR'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
      V_FIELDCAT-HOTSPOT = 'X'.
      V_FIELDCAT-REF_FIELDNAME = 'MATNR'.
      V_FIELDCAT-REF_TABNAME   = 'MARC'.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
      V_FIELDCAT-COL_POS = '2'.
      V_FIELDCAT-FIELDNAME     = 'WERKS'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
      V_FIELDCAT-REF_FIELDNAME = 'WERKS'.
      V_FIELDCAT-REF_TABNAME   = 'MARC'.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
      V_FIELDCAT-COL_POS = '3'.
      V_FIELDCAT-FIELDNAME     = 'LVORM'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
      V_FIELDCAT-REF_FIELDNAME = 'LVORM'.
      V_FIELDCAT-REF_TABNAME   = 'MARC'.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
      V_FIELDCAT-COL_POS = '4'.
      V_FIELDCAT-FIELDNAME     = 'DISPO'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
      V_FIELDCAT-REF_FIELDNAME = 'DISPO'.
      V_FIELDCAT-REF_TABNAME   = 'MARC'.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
      V_FIELDCAT-COL_POS = '5'.
      V_FIELDCAT-FIELDNAME     = 'MBRSH'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
      V_FIELDCAT-REF_FIELDNAME = 'MBRSH'.
      V_FIELDCAT-REF_TABNAME   = 'MARA'.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
      V_FIELDCAT-COL_POS = '6'.
      V_FIELDCAT-FIELDNAME     = 'MEINS'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
      V_FIELDCAT-REF_FIELDNAME = 'MEINS'.
      V_FIELDCAT-REF_TABNAME   = 'MARA'.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
      V_FIELDCAT-COL_POS = '7'.
      V_FIELDCAT-FIELDNAME     = 'MATKL'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
      V_FIELDCAT-REF_FIELDNAME = 'MATKL'.
      V_FIELDCAT-REF_TABNAME   = 'MARA'.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
      V_FIELDCAT-COL_POS = '8'.
      V_FIELDCAT-FIELDNAME     = 'VKORG'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
      V_FIELDCAT-REF_FIELDNAME = 'VKORG'.
      V_FIELDCAT-REF_TABNAME   = 'MVKE'.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
      V_FIELDCAT-COL_POS = '9'.
      V_FIELDCAT-FIELDNAME     = 'VTWEG'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
      V_FIELDCAT-REF_FIELDNAME = 'VTWEG'.
      V_FIELDCAT-REF_TABNAME   = 'MVKE'.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
      V_FIELDCAT-COL_POS = '10'.
      V_FIELDCAT-FIELDNAME     = 'SPRAS'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
      V_FIELDCAT-REF_FIELDNAME = 'SPRAS'.
      V_FIELDCAT-REF_TABNAME   = 'MAKT'.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
      V_FIELDCAT-COL_POS = '11'.
      V_FIELDCAT-FIELDNAME     = 'MAKTX'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
      V_FIELDCAT-REF_FIELDNAME = 'MAKTX'.
      V_FIELDCAT-REF_TABNAME   = 'MAKT'.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
      V_FIELDCAT-COL_POS = '12'.
      V_FIELDCAT-FIELDNAME     = 'LGORT'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
    V_FIELDCAT-REF_FIELDNAME = 'LGORT'.
    V_FIELDCAT-REF_TABNAME   = 'MARD'.
      V_FIELDCAT-SELTEXT_L = 'STRG LOCT'.
      V_FIELDCAT-OUTPUTLEN = 10.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
      V_FIELDCAT-COL_POS = '13'.
      V_FIELDCAT-FIELDNAME     = 'LABST'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
      V_FIELDCAT-SELTEXT_M = 'STOCK'.
      V_FIELDCAT-OUTPUTLEN = 15.
    V_FIELDCAT-REF_FIELDNAME = 'LABST'.
    V_FIELDCAT-REF_TABNAME   = 'MARD'.
      V_FIELDCAT-DO_SUM = 'X'.
      V_LAYOUT-TOTALS_TEXT = 'TOTAL STOCK:'.
      V_FIELDCAT-HOTSPOT = 'X'.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
      V_FIELDCAT-COL_POS = '14'.
      V_FIELDCAT-FIELDNAME     = 'EBELN'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
      V_FIELDCAT-HOTSPOT = 'X'.
      V_FIELDCAT-REF_FIELDNAME = 'EBELN'.
      V_FIELDCAT-REF_TABNAME   = 'EKPO'.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
      V_FIELDCAT-COL_POS = '15'.
      V_FIELDCAT-FIELDNAME     = 'EBELP'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
      V_FIELDCAT-REF_FIELDNAME = 'EBELP'.
      V_FIELDCAT-REF_TABNAME   = 'EKPO'.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
      V_FIELDCAT-COL_POS = '16'.
      V_FIELDCAT-FIELDNAME     = 'VBELN'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
      V_FIELDCAT-HOTSPOT = 'X'.
      V_FIELDCAT-REF_FIELDNAME = 'VBELN'.
      V_FIELDCAT-REF_TABNAME   = 'VBAP'.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
      V_FIELDCAT-COL_POS = '17'.
      V_FIELDCAT-FIELDNAME     = 'POSNR'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
      V_FIELDCAT-REF_FIELDNAME = 'POSNR'.
      V_FIELDCAT-REF_TABNAME   = 'VBAP'.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
    ENDFORM.                      "FIELDCAT
                              FORM  OUTPUT                            *
    FORM OUTPUT.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM      = SY-REPID
          I_CALLBACK_TOP_OF_PAGE  = 'TOP-OF-PAGE'
          I_GRID_TITLE = 'CLICK ON MATERIAL/PURDOC/SALESDOC FOR DETAILS'
          I_CALLBACK_USER_COMMAND = 'DISPLAYDETAILS'
          IS_LAYOUT               = V_LAYOUT
          IT_FIELDCAT             = VT_FIELDCAT1
        TABLES
          T_OUTTAB                = I_OUT.
      IF SY-SUBRC <> 0.
      ENDIF.
    ENDFORM.                    "OUTPUT
                            FORM  TOP-OF-PAGE                         *
    FORM TOP-OF-PAGE.
      DATA: T_HEADER TYPE SLIS_T_LISTHEADER,
            WA_HEADER TYPE SLIS_LISTHEADER.
      WA_HEADER-TYP = 'H'.
      WA_HEADER-INFO = 'REPORT FOR : '.
      APPEND WA_HEADER TO T_HEADER.
      CLEAR WA_HEADER.
      WA_HEADER-TYP = 'S'.
      WA_HEADER-INFO = 'MATERIAL DETAILS'.
      APPEND WA_HEADER TO T_HEADER.
      CLEAR WA_HEADER.
      WA_HEADER-TYP = 'S'.
      WA_HEADER-INFO = 'PURCHASE ORDER DETAILS'.
      APPEND WA_HEADER TO T_HEADER.
      CLEAR WA_HEADER.
      WA_HEADER-TYP = 'S'.
      WA_HEADER-INFO = 'SALES ORDER DETAILS'.
      APPEND WA_HEADER TO T_HEADER.
      CLEAR WA_HEADER.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          I_LOGO             = 'GEAR'
          IT_LIST_COMMENTARY = T_HEADER.
    ENDFORM.                    "TOP-OF-PAGE
    *&                  FORM  PURCHASEDATA_VALIDATION                      *
    FORM PURCHASEDATA_VALIDATION.
      SELECT EBELN EBELP MATNR
                 FROM EKPO
                 INTO TABLE I_EKPO
                 FOR ALL ENTRIES IN I_MARC
                 WHERE MATNR = I_MARC-MATNR
                 AND EBELN IN S_EBELN
                 AND WERKS EQ P_WERKS.
      IF I_EKPO[] IS INITIAL.
        WRITE:/ 'NO MATCHING DATA IS SELECTED FROM TABLE EKPO'.
        EXIT.
      ENDIF.
      DATA: T_EKPO LIKE I_EKPO OCCURS 0 WITH HEADER LINE.
      T_EKPO[] = I_EKPO[].
      REFRESH I_EKPO.
      FREE I_EKPO.
      LOOP AT T_EKPO.
        SELECT SINGLE EBELN FROM EKKO INTO EKPO-EBELN
        WHERE EBELN = T_EKPO-EBELN.
        IF SY-SUBRC = 0.
          MOVE-CORRESPONDING T_EKPO TO I_EKPO.
          APPEND I_EKPO.
          CLEAR I_EKPO.
        ELSE.
          CONTINUE.
        ENDIF.
      ENDLOOP.
      SORT I_EKPO.
    ENDFORM.                    "PURCHASEDATA_VALIDATION
    *&                  FORM  SALESDATA_VALIDATION                         *
    FORM SALESDATA_VALIDATION.
      SELECT VBELN POSNR MATNR
              FROM VBAP
              INTO CORRESPONDING FIELDS OF TABLE
              I_VBAP FOR ALL ENTRIES IN I_MARC
              WHERE MATNR = I_MARC-MATNR.
      DATA: T_VBAP LIKE I_VBAP OCCURS 0 WITH HEADER LINE.
      T_VBAP[] = I_VBAP[].
      REFRESH I_VBAP.
      FREE I_VBAP.
      LOOP AT T_VBAP.
        SELECT SINGLE VBELN FROM VBAK INTO VBAK-VBELN
        WHERE VBELN = T_VBAP-VBELN.
        IF SY-SUBRC = 0.
          MOVE-CORRESPONDING T_VBAP TO I_VBAP.
          APPEND I_VBAP.
          CLEAR I_VBAP.
        ELSE.
          CONTINUE.
        ENDIF.
      ENDLOOP.
      SORT I_VBAP.
    ENDFORM.                    "SALESDATA_VALIDATION

  • Problems with F4 help in ALV grid

    Hi all,
    I am trying to create a F4 help for the field Payee number in my reprot output (ALV Grid OO), i am able to get the window for selection of the value in the F4 help , but i am unable to pass the value back on to the screen.
    I need to insert the selected value from the F4 help and aslo need to populate the Name of the payee into the Payee field.
    Can some one help me in finding what error have i done in the code.
    Thanks in advance for all.
    I have the following code
    *&  Include      ZRMM_ALV_TOP                *
    data: gc_control100 type  ref to cl_gui_custom_container,
          gc_control101 type  ref to cl_gui_custom_container.
    data: gi_outtab100  type  table of ty_purchase.
    data: g_cont0100    type  ref to cl_gui_custom_container,
          g_grid0100    type  ref to cl_gui_alv_grid, " For Screen 100 Grid
          gi_fcat0100   type  lvc_t_fcat,  " Field Catalog for Screen 100
          gi_sort0100   type  lvc_t_sort,
          g_lout0100    type  lvc_s_layo.
    data: okcode_100    like  sy-ucomm,
          save_0100     like  sy-ucomm,
          okcode_200    like  sy-ucomm,
          save_0200     like  sy-ucomm.
    types: begin of f4_itab_type,
                  LIFNR type lifnr,
                  BUKRS type name1,
               end of f4_itab_type.
    data: f4_itab type table of f4_itab_type,
          ls_f4_itab type f4_itab_type.
    data : it_IZEMTAB type table of IZEMTAB,
           wa_IZEMTAB type IZEMTAB.
    Class Definitions.
    class event_receiver_0100 definition.
      PUBLIC SECTION.
        types: begin of onf4_event_parameters_type,
                  c_fieldname     type lvc_fname,
                  cs_row_no       type lvc_s_roid,
                  cr_event_data   type ref to cl_alv_event_data,
                  ct_bad_cells    type lvc_t_modi,
                  c_display       type char01,
                end of onf4_event_parameters_type.
        data: fieldcatalog type lvc_t_fcat.
        data :   f4_alv  type ref to cl_gui_alv_grid,
                 f4_cont type ref to cl_gui_custom_container.
        data: f4_params type onf4_event_parameters_type.
        METHODS:
           ON_F4 FOR EVENT ONF4 of cl_gui_alv_grid
               importing sender
                         e_fieldname
                         e_fieldvalue
                         es_row_no
                         er_event_data
                         et_bad_cells
                         e_display.
      on_data_changed for event
                       data_changed of cl_gui_alv_grid
            importing e_onf4
                      e_onf4_before
                      e_onf4_after
                      er_data_changed
                      e_ucomm
                      sender.
    endclass.                    "lcl_event_receiver DEFINITION
    data: gs_variant type disvariant,
          gc_save    value 'A',
          gs_toolbar  TYPE stb_button,
          gs_toolbar1 type stb_button,
          gs_toolbar2 type stb_button.
    DATA : T_RETURN TYPE STANDARD TABLE OF DDSHRETVAL WITH HEADER LINE.
    DATA : event_receiver_0100 TYPE REF TO EVENT_RECEIVER_0100.
    Class Implementation.
    class event_receiver_0100  implementation.
    For f4 help.
      method on_f4.
    data: ls_outtab type ty_purchase.
    field-symbols <itab> type lvc_t_modi.
    data: ls_modi type lvc_s_modi,
          ls_f4_itab type f4_itab_type.
        f4_params-c_fieldname   = e_fieldname.
        f4_params-cs_row_no     = es_row_no.
        f4_params-cr_event_data = er_event_data.
        f4_params-ct_bad_cells  = et_bad_cells.
        f4_params-c_display     = e_display.
    read table it_purchase into ls_outtab index f4_params-cs_row_no-row_id.
    Clear f4_itab[].
    CALL FUNCTION 'FI_VENDOR_ALTERN_PAYERS_READ'
      EXPORTING
        I_LIFNR                  = ls_outtab-lifnr
        I_BUKRS                  = ls_outtab-bukrs
      TABLES
        T_ZEMTAB                 = it_izemtab.
         clear f4_itab[].
        if not ls_outtab-lifnr is initial.
        loop at it_izemtab into wa_izemtab.
          ls_f4_itab-LIFNR = wa_izemtab-empfb.
          ls_f4_itab-BUKRS = wa_izemtab-name1.
          append ls_f4_itab to f4_itab.
        endloop.
        endif.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
      EXPORTING
       RETFIELD              = 'LIFNR'
       DYNPPROG              = sy-repid
       DYNPNR                = '100'
       WINDOW_TITLE          = 'f4 help for PAYEE'
       VALUE_ORG             = 'S'
      TABLES
        VALUE_TAB            = f4_itab
        RETURN_TAB           = T_RETURN.
    IF SY-SUBRC <> 0.
    ENDIF.
    assign f4_params-cr_event_data->m_data->* to <itab>.
    ls_modi-row_id = f4_params-cs_row_no-row_id.
        read table f4_itab into ls_f4_itab index es_row_no-row_id.
        if not f4_itab is initial.
           ls_modi-row_id    = es_row_no-row_id.
           ls_modi-value     = ls_f4_itab-LIFNR.
           ls_modi-FIELDNAME = 'LIFNR'.
           append ls_modi to <itab>.
           ls_modi-row_id    = es_row_no-row_id.
           ls_modi-value     = ls_f4_itab-BUKRS.
           ls_modi-FIELDNAME = 'NAME1'.
           append ls_modi to <itab>.
        endif.
       er_event_data->m_event_handled = 'X'.
    ENDMETHOD.                           
    *--ENDMETHOD SHOW_F4--
    endclass.    "lcl_event_receiver IMPLEMENTATION

    I have used the following FM for F4 help on editable ALV grid column and it worked fine.Try the below.
    Call function for Input helps
        CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
             EXPORTING
                  i_title               = text-049
                  i_selection           = c_check
                  i_zebra               = c_check
                  i_screen_start_column = 55
                  i_screen_end_column   = 125
                  i_screen_start_line   = 10
                  i_screen_end_line     = 20
                  i_tabname             = c_fcat_str
                  it_fieldcat           = tl_fieldcat
             IMPORTING
                  es_selfield           = wal_selfield
             TABLES
                  t_outtab              = tl_code
             EXCEPTIONS
                  program_error         = 1
                  OTHERS                = 2.
        IF sy-subrc <> 0.
         MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ELSEIF sy-subrc = 0 AND NOT wal_selfield IS INITIAL.
          wl_index = wal_selfield-tabindex.
          READ TABLE tl_code ASSIGNING <l_code>
          INDEX wl_index.
          IF sy-subrc = 0.
            <l_fgis_lots>-status   = <l_code>.
          ENDIF.
        ENDIF.
      ENDIF.

  • Problem with check box in ALV Grid Display

    I am Displaying Material Master Data in ALV Grid Display with Check Box for each record and if i checked check box then i am processing Update operation in Database,  my question is after perform update operation check box should be clear.
    Kindly help me!!!!

    Hello Raj
    Given the fact that you do not tell us the most important piece of information (namely whether you are using OO-based ALV or not) I assume you are using fm-based ALV lists.
    In this case you probably have defined a USER_COMMAND routine as described in the documentation of the fm.
    FORM user_command  USING r_ucomm LIKE sy-ucomm
                             rs_selfield TYPE slis_selfield.
    * define local data
      DATA: ls_outtab  LIKE LINE OF gt_outtab,
                ld_idx       TYPE i.
      LOOP AT gt_outtab INTO ls_outtab
                     WHERE ( chkbox = 'X' ).
        ld_idx = syst-tabix.
        " Call your update function / method / perform
       ls_outtab-chkbox = space.
       MODIFY gt_outtab FROM ls_outtab INDEX ld_Idx
          TRANSPORTING chkbox.
      ENDLOOP.
    " And now trigger refresh of the ALV display:
      rs_selfield-refresh = 'X'.  " <<< !!!
    ENDFORM.
    Regards
      Uwe

  • Problem with print preview in alv grid

    Hello all,
    I have to display base unit of measure(meins) in alv grid output. i am using a conversion routine to convert it from ST TO PC before display.After executing the report i am getting the correct data. the problem is when i select the print preview
    alv list is displayed. in that the unit of measure pc is not displayed, it is comming as '*******. what i came to know is the same conversion routine is triggered in the standard program for the display. so it canot convert that.
    so please help me out in solving this.
    Thanks in advance,
    Sarat

    hi sarath,
        this is an example code try using the statement before displaying, i think it works.
    *example cdoe.
    LOOP AT i_grp1 INTO wa_grp1.
    AT NEW tknum.
    READ TABLE i_grp1 intto wa_grp1 index sy-tabix.
    SUM.
    MOVE-CORRESPONDING wa_grp1 TO wa_grp2.
    APPEND wa_grp2 TO i_grp2.
    ENDAT.
    ENDLOOP.

  • Problem with F4 option for one field

    Hi,
    While creating pricing condition records (VK11), one field is not having F4 option. That field is KGKG1 (Condition group1).
    Ihave created one table with s.org, dist.channel and condition group1 (KDKG1).
    While creating onle this problem. While changing and displaying the F4 option (i am able to select the values from list) available.
    What would be the reason. Is it require to change in table like domain, fields.
    Please help me to solveit out.
    Regards
    Lakshmikanth

    Hi,
    you can create new condition groups here.
    IMG>Logistics - General>Business Partner>Customers>Control>Define Condition Groups.
    Goto Customer master maintain condition groups.
    XD01/02. goto general data , In Menu select Extras and choose additional data. maintain condition group for customer.
    Regards,
    Chandra

  • Problem with Edit option for a role created in GRC 10.0

    Hello Experts,
    I created a role in GRC 10.0 , I see my newly created role in the list of roles . If I want to Edit the role I select the row and click " OPEN" and edit the role.
    But when I click the role directly and enter the role , the "EDIT"  button is disabled and even maintain authorization button is disabled.
    Did SAP defined in such  a way that we should selct the role and click OPEN then only we can Edit or is this a Bug??
    Please let me know if any one of you faced the same problem.
    Regards,
    Jagadish Bhandaru

    Hi,
    Sabita is correct.
    Here is the link to the documentation
    SAP Access Control 10.0
    Simon

  • I have been a loyal customer for years and have a hot spot because internet options are very limited in our rural area.  I have stayed with 10G since the beginning.  Most months I don't use the 10G.  Verizon has no problem with me paying for Data I don't

    I have been a loyal customer for years and have a hot spot because internet options are very limited in our rural area.  I have stayed with 10G since the beginning.  Most months I don't use the 10G.  Verizon has no problem with me paying for Data I don't use.  This month my daughter comes home from College and she accidentally uses 24G.....14 over get blind sided with $140.00 in overages.  I called Verizon today......stopped in to the store today......My neighbor told me they waved charges for her one time.  Lots of charges.....But I'm am getting no help.  Not even an offer of a payment plan to help me out.  I went back just 6 months and I have over paid for 19G.....Seems like they would like to help out their loyal customers!!!!     Does anybody have any suggestions on how to deal with them?   We are not wealthy....or I would just pay this and walk away......

    There is a big misconception in what customers believe a cell carrier is obligated to do.
    You pay a set price to use up to that amount of xx data. It makes no difference if you use it to the paid limit or way under. Its like peace of mind when you don't have to worry about a data counter.
    Your daughter used the data, your plan is quite clear of what overage charges are. Why should or would Verizon wireless just forgive the charges because you are a customer? Your daughter used the data, get the money from her. That is the responsible thing to do.
    There is no "I have been a loyal customer so please remove the $120, or $250, or $2,000.00 since I did not mean to use it"
    Your electric company, or gas company or any other company does not remove valid charges. Why should Verizon wireless?
    Just pay the invoice and don't think you are being mistreated because Verizon is a business and not a charity.
    Good Luck

  • Can't back-up new iMac with fusion HD.  The back-up proceeds to within 10% of the total storage needed and then the "of" number increases.  I suspect there is a problem with backing up the fusion drive.  We have a new 3 TB time Capsule.  Any ideas?

    Can't back-up new iMac with fusion HD.  The back-up proceeds to within 10% of the total storage needed and then the "of" number increases.  I suspect there is a problem with backing up the fusion drive.  We have a new 3 TB time Capsule.  I tried excluding different parts of the software from the back-up but it didn't make any difference.  I even tried exluding "invisible items" to no avail.  Any ideas?

    When you setup the wireless and ethernet in the computer.. ipv6 will be on automatic.. this is wrong for the latest TC firmware and airport utility. http://support.apple.com/kb/TS4597
    Go to the wireless and ethernet setup in preferences and change ipv6 to link local.
    Once you do the big backup by ethernet the wireless will function fine for incremental.. it is obviously not estimating the size correctly..
    A full back-up on the iMac would be about 650 GB.  The partial updates that I have been trying start out at 115MB and keep growing indefinitely.  The original back-up never finished nor have any of the follow-up attempts.
    The first estimate should be the full backup but it will keep growing as the backup advances.. I would also delete any inprogress files to make sure it is not messing up .. delete even a sparsebundle if there is one for the imac on the TC and start afresh once you have ethernet connection.
    See A10 here.
    Pondini may have some other clues there to give you an idea of why the backup is slow or not finishing.. there is a lot of issues with TM when it decides not to work.

  • How to merge rows with similar values in alv grid display in webdynpro

    Hi experts,
                   i want to know about how to merge rows with similar values in alv grid display of webdynpro.grouping rows is possible in table display in webdynpro but i am not able to do row grouping in the alv grid display in webdynpro.
    kindly suggest.
    thanks ,
    Anita.

    Hi Anita,
    did you find a solution for this? I have opened a Thread, if you know the answer maybe you could help me out:
    Is there an ALV function similar to the TABLE Row grouping?
    Thanx in advanced!!!
    Kind Regards,
    Gerardo J

  • I need simple example for alv grid

    hi
    i need code for simple example for alv grid.
    thanks.

    hi bharat,
                  this is report with most of the functionality.
    report zus_alv_demo_grid .
    tables:     ekko.
    type-pools: slis.
    types: begin of t_ekko,
    ebeln type ekpo-ebeln,
    ebelp type ekpo-ebelp,
    statu type ekpo-statu,
    aedat type ekpo-aedat,
    matnr type ekpo-matnr,
    menge type ekpo-menge,
    meins type ekpo-meins,
    netpr type ekpo-netpr,
    peinh type ekpo-peinh,
    line_color(4) type c, "Used to store row color
    end of t_ekko.
    data: it_ekko type standard table of t_ekko initial size 0,
           wa_ekko type t_ekko.
    *ALV data declarations
    data: fieldcatalog type slis_t_fieldcat_alv with header line,
          gd_tab_group type slis_t_sp_group_alv,
          gd_layout    type slis_layout_alv,
          gd_repid     like sy-repid.
    Data declaration for EVENT and PRINT PARAMETER.
    data: gt_events type slis_t_event,
           gd_prntparams type slis_print_alv.
    data declaration for sorting.
    data : it_sortcat   type slis_sortinfo_alv occurs 1,
           wa_sort like line of it_sortcat.
    data :  i_list_comments type slis_t_listheader.
    start-of-selection.
      perform data_retrieval.
    perform user_command.
      perform build_fieldcatalog.
      perform build_layout.
      perform build_events.
      perform build_print_params.
      perform build_sortcat.
      perform display_alv_report.
    end-of-selection.
    *TOP-OF-PAGE.
    PERFORM top-of-page.
    end-of-page.
    *&      Form  build_fieldcatalog
          text
    -->  p1        text
    <--  p2        text
    form build_fieldcatalog.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'Purchase Order'.
      fieldcatalog-col_pos     = 0.
      fieldcatalog-outputlen   = 10.
      fieldcatalog-emphasize   = 'X'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELP'.
      fieldcatalog-seltext_m   = 'PO Item'.
      fieldcatalog-col_pos     = 1.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'STATU'.
      fieldcatalog-seltext_m   = 'Status'.
      fieldcatalog-col_pos     = 2.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'AEDAT'.
      fieldcatalog-seltext_m   = 'Item change date'.
      fieldcatalog-col_pos     = 3.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MATNR'.
      fieldcatalog-seltext_m   = 'Material Number'.
      fieldcatalog-col_pos     = 4.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MENGE'.
      fieldcatalog-seltext_m   = 'PO quantity'.
      fieldcatalog-col_pos     = 5.
      fieldcatalog-do_sum = 'X'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MEINS'.
      fieldcatalog-seltext_m   = 'Order Unit'.
      fieldcatalog-col_pos     = 6.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'NETPR'.
      fieldcatalog-seltext_m   = 'Net Price'.
      fieldcatalog-col_pos     = 7.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-datatype     = 'CURR'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'PEINH'.
      fieldcatalog-seltext_m   = 'Price Unit'.
      fieldcatalog-col_pos     = 8.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
    endform.                    " build_fieldcatalog
    *&      Form  build_layout
          text
    -->  p1        text
    <--  p2        text
    form build_layout.
      gd_layout-no_input          = 'X'.
      gd_layout-colwidth_optimize = 'X'.
      gd_layout-totals_text       = 'Totals'(201).
    Set layout field for row attributes(i.e. color)
      gd_layout-info_fieldname =      'LINE_COLOR'.
    gd_layout-totals_only        = 'X'.
    gd_layout-f2code            = 'DISP'.  "Sets fcode for
    *when double
                                            "click(press f2)*
    gd_layout-group_change_edit = 'X'.
    gd_layout-header_text       = 'helllllo'.
    endform.                    " build_layout
    *&      Form  data_retrieval
          text
    -->  p1        text
    <--  p2        text
    form data_retrieval.
      data: ld_color(1) type c.
      select ebeln ebelp statu aedat matnr menge meins netpr
    peinh from ekpo  into table it_ekko.
    *Populate field with color attributes
      loop at it_ekko into wa_ekko.
    Populate color variable with colour properties
    Char 1 = C (This is a color property)
    Char 2 = 3 (Color codes: 1 - 7)
    Char 3 = Intensified on/off ( 1 or 0 )
    Char 4 = Inverse display on/off ( 1 or 0 )
              i.e. wa_ekko-line_color = 'C410'
        ld_color = ld_color + 1.
    Only 7 colours so need to reset color value
        if ld_color = 8.
          ld_color = 1.
        endif.
        concatenate 'C' ld_color '10' into wa_ekko-line_color.
    wa_ekko-line_color = 'C410'.
        modify it_ekko from wa_ekko.
      endloop.
    endform.                    " data_retrieval
    *&      Form  display_alv_report
          text
    -->  p1        text
    <--  p2        text
    form display_alv_report.
      gd_repid = sy-repid.
      call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program       = gd_repid
                is_layout                = gd_layout
                i_callback_top_of_page   = 'TOP-OF-PAGE'
                i_callback_user_command  = 'USER_COMMAND'
                i_callback_pf_status_set = 'SET_PF_STATUS'
                it_event                 = gt_events
                is_print                 = gd_prntparams
                it_fieldcat              = fieldcatalog[]
                it_sort                 = it_sortcat
                i_save                   = 'X'
           tables
                t_outtab                 = it_ekko
           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.
    endform.              " DISPLAY_ALV_REPORT
    *&      Form  user_command
          text
    -->  p1        text
    <--  p2        text
    *&      Form  top-of-page
          text
    -->  p1        text
    <--  p2        text
    form top-of-page.
    *ALV Header declarations
      data: t_header type slis_t_listheader,
            wa_header type slis_listheader,
            t_line like wa_header-info,
            ld_lines type i,
            ld_linesc(10) type c.
    Title
      wa_header-typ  = 'H'.
      wa_header-info = 'EKKO Table Report'.
      append wa_header to t_header.
      clear wa_header.
    Date
      wa_header-typ  = 'S'.
      wa_header-key = 'Date: '.
      concatenate  sy-datum+6(2) '.'
                   sy-datum+4(2) '.'
       sy-datum(4) into wa_header-info."todays date
      append wa_header to t_header.
      clear: wa_header.
    Total No. of Records Selected
      describe table it_ekko lines ld_lines.
      ld_linesc = ld_lines.
      concatenate 'Total No. of Records Selected: ' ld_linesc
         into t_line separated by space.
      wa_header-typ  = 'A'.
      wa_header-info = t_line.
      append wa_header to t_header.
      clear: wa_header, t_line.
      call function 'REUSE_ALV_COMMENTARY_WRITE'
           exporting
           it_list_commentary = t_header
           i_logo             = 'GANESH_LOGO'.
    endform.                    " top-of-page
          FORM user_command                                             *
    -->  R_UCOMM                                                       *
    -->  RS_SELFIELD                                                   *
    form user_command using r_ucomm like sy-ucomm
    rs_selfield type slis_selfield.
      case r_ucomm.
        when '&IC1'.
          if rs_selfield-fieldname = 'EBELN'.
            read table it_ekko into wa_ekko index rs_selfield-tabindex.
            set parameter id 'BES' field wa_ekko-ebeln.
            call transaction 'ME23N' and skip first screen.
          endif.
        when 'ULHAS'.
          if rs_selfield-fieldname = 'EBELN'.
            read table it_ekko into wa_ekko index rs_selfield-tabindex.
            set parameter id 'BES' field wa_ekko-ebeln.
            call transaction 'ME23N' and skip first screen.
          endif.
      endcase.
    endform.
          FORM set_pf_status                                            *
    -->  RT_EXTAB                                                      *
    form set_pf_status using rt_extab type slis_t_extab.
      set pf-status 'ZNEWSTATUS'.
    endform.
    *&      Form  build_events
          text
    -->  p1        text
    <--  p2        text
    form build_events.
      data: ls_event type slis_alv_event.
      call function 'REUSE_ALV_EVENTS_GET'
       exporting
         i_list_type           = 0
       importing
         et_events             = gt_events[]
    EXCEPTIONS
      LIST_TYPE_WRONG       = 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.
      read table gt_events with key name =  slis_ev_end_of_page
                  into ls_event.
      if sy-subrc = 0.
        move 'END_OF_PAGE' to ls_event-form.
        append ls_event to gt_events.
      endif.
      read table gt_events with key name =  slis_ev_end_of_list
                  into ls_event.
      if sy-subrc = 0.
        move 'END_OF_LIST' to ls_event-form.
        append ls_event to gt_events.
      endif.
    endform.                    " build_events
    *&      Form  build_print_params
          text
    -->  p1        text
    <--  p2        text
    form build_print_params.
      gd_prntparams-reserve_lines = '3'.   "Lines reserved for footer
      gd_prntparams-no_coverpage = 'X'.
    endform.                    " build_print_params
          FORM END_OF_PAGE                                              *
    form end_of_page.
      data: listwidth type i,
      ld_pagepos(10) type c,
      ld_page(10)    type c.
      write: sy-uline(50).
      skip.  write:/40 'Page:', sy-pagno .
    endform.
          FORM END_OF_LIST                                              *
    form end_of_list.
      data: listwidth type i,
      ld_pagepos(10) type c,
      ld_page(10)    type c.
      skip.  write:/40 'Page:', sy-pagno .
    endform.
    *&      Form  build_sortcat
          text
    -->  p1        text
    <--  p2        text
    form build_sortcat.
    wa_sort-spos      = 1.
    wa_sort-fieldname = 'EBELN'.
    append wa_sort to it_sortcat.
    wa_sort-spos      = 2.
    wa_sort-fieldname = 'EBELP'.
    append wa_sort to it_sortcat.
    endform.                    " build_sortcat
    Rewards if helpfull
    regards
    vijay dwivedi

  • Facing problem with the code for sending an .xls attachment via email, a field value contains leading zeros but excel automatically removes these from display i.e. (00444 with be displayed as 444).kindly guide .

    Facing problem with the code for sending an .xls attachment via email, a field value contains leading zeros but excel automatically removes these from display i.e. (00444 with be displayed as 444).kindly guide .

    Hi Chhayank,
    the problem is not the exported xls. If you have a look inside with Notepad or something like that, you will see that your leading zeros are exported correct.Excel-settings occurs this problem, it is all about how to open the document. If you use the import-assistant you will have no problems because there are options available how to handle the different columns.
    Another solution might be to get familiar with ABAP2XLS-Project. I got in my mind, that there is a method implemented, that will help you solving this problem. But that is not a five minute job
    ~Florian

  • I have an issue with disappearing option for 1920x1080 in Preferences / Displays.

    Recently updated to 10.9 - have all updates installed - Mid 2010 iMac 21.5.
    I have an issue with disappearing option for 1920x1080 in Preferences / Displays. - After overnight shutdown, my iMac woke up and the screen resolution of my 2nd was set at 800 x 600 - the display a Samsung S22B150 was previously working properly at 1920 x 1080.  This option is no longer available in the system preferences - highest resolution available 1600 x 1200.
    I use my mMac for Photography and use the second monitor for the interface, leaving the iMac screen as a full work area for the photos.
    I have tried:
    Power down Monitor & restart
    Shutdown & restart
    Shutdown & restart in Safe Boot Mode (options same in Prefs)
    Power down Monitor & restart in Safe Boot Mode
    Ran Disc Utility - Repaired Permissions, verified both HDD & Mac OSX
    Udated Pram
    I am now at a loss, I guess I could try a recovery, and download/install  Mavericks again, but do not wish to do this if I can help it.
    I have searched the net to see if there are any Terminal commands to enable the resolution, but can find nothing.
    Anyone out there have any ideas, please.

    Back up all data. Quit System Preferences if it's running.
    Triple-click anywhere in the line below on this page to select it, then copy the text to the Clipboard by pressing the key combination command-C:
    ~/Library/Preferences/ByHost
    In the Finder, select
    Go ▹ Go to Folder...
    from the menu bar. Paste into the box that opens (command-V), then press return. A folder should open. If it does, look for a file with a long name that begins "com.apple.preference.displays2". There may be several such files. Move them to the Trash.
    Test.

  • I'm trying to make a time sheet and include a grid, but I'm having a hard time figuring out how to print a full grid on my spreadsheet.  There are options for shaded grids but I want a defined grid, and I have spent the last 2 hours looking for the answer

    I'm trying to make a time sheet and include a grid, but I'm having a hard time figuring out how to print a full grid on my spreadsheet.  There are options for shaded grids but I want a defined grid, and I have spent the last 2 hours looking for the answer.  Any ideas?

    Hi Cynthia,
    Are you planning to have this table do any of the calculation, or is is to be used as the electronic equivalent of a sheet of paper with a grid printed on it—a place to record the data.
    For your seven column table:
    Are you using one or more rows at the top of the table to label the data below? If so, you might want this row (or these rows) to be set as Header Rows.
    Are you using the leftmost column to label the rows? If so, you may want this column to be a Header column.
    The default table supplied on the "Blank" templates contains one header row and one header column. If you need more (or fewer) Header rows or columns, select the table, then go Table (menu) > Header Rows > (choose the number you need). Repeat to set the number of Header Columns.
    To make a seven column table from the table supplied by default, click on any cell in column H (The eighth column), and drag right to add more cells to the selection, until you get to the last column of the table. With these cells selected, Go Table > Delete Columns.
    To make the remaining seven columns fit across a single page:
    Go View > Show Print View to show the table as it would appear when printed to paper.
    Select the table by clicking its icon in the Sheets List to the left (easy method), OR by carefully clicking on the outside boundary of the table itself (fiddley method).
    With the table selected, you will see square white handles at each corner and at the middle of each side (including the top and bottom).
    With the mouse, grab the handle in the middle of the right side of the table and drag right (or left) until the table just fits onto the width of the defined page.
    With the table still selected, set the thickness and colour of the cell boundaries using the Gaphics Inspector (as described by Jerry), or using the Stroke, Thickness and Color Well controls in the Format bar above the working portion of the Window.
    Regards,
    Barry

Maybe you are looking for