Problem with top of page in interactive ALV

Hello all,
I am displaying 2 level ALV list.
If List heading for the first page is 'First level' and for Second level list is 'Second level'.
but when I come back to first level list from second level using back button first level list shows me top of page as 'Second page'.
How to resolve this?
I am using function module approach.
Thanks and Regards,
Anup

Hello Clemens,
I've only one top of page event. what I am doing is for the first list I am populating  a internal table (say A), slis_listheader with 'First level' and passing this to top-of-page event and outputting using REUSE_ALV_COMMENTARY_WRITE.display using REUSE_ALV_GRID_DISPLAY_LVC.
for the second list (at user command 'Double click' ) I am populating another internal table (say B), and slis_listheader with 'Second level'. display using REUSE_ALV_GRID_DISPLAY_LVC.
It works fine till this point. Problem is when i click back button on second level list I get 'Second level' again in top of page for the first level.
where do i set ps_selfield-refresh = 'X'?
Regards,
Anup

Similar Messages

  • Problem with top of page in alv

    Hi
    i gotta probelm with my alv report in this , in the first level i am displaying the purchase order header details,in the secod level i am displaying the purchase order item detials..
    I am getting the top of page contents properly in the header level. but when i double click it for item level i am getting the same top of page header instead of displaying the item level what i have mentioned..
    Can any one suggest me some ways to get the item level top of page contents??
    Here is my code.
    REPORT  ZZ_22038_22098_002 NO STANDARD PAGE HEADING LINE-SIZE 650
    MESSAGE-ID ZZ_9838                      .
    TYPE-POOLS: SLIS.
    *type declaration for values from ekko
    TYPES: BEGIN OF I_EKKO,
           EBELN LIKE EKKO-EBELN,
           AEDAT LIKE EKKO-AEDAT,
           BUKRS LIKE EKKO-BUKRS,
           BSART LIKE EKKO-BSART,
           LIFNR LIKE EKKO-LIFNR,
           END OF I_EKKO.
    DATA: IT_EKKO TYPE STANDARD TABLE OF I_EKKO INITIAL SIZE 0,
          WA_EKKO TYPE I_EKKO.
    *type declaration for values from ekpo
    TYPES: BEGIN OF I_EKPO,
           EBELN LIKE EKPO-EBELN,
           EBELP LIKE EKPO-EBELP,
           MATNR LIKE EKPO-MATNR,
           MENGE LIKE EKPO-MENGE,
           MEINS LIKE EKPO-MEINS,
           NETPR LIKE EKPO-NETPR,
           END OF I_EKPO.
    DATA: IT_EKPO TYPE STANDARD TABLE OF I_EKPO INITIAL SIZE 0,
          WA_EKPO TYPE I_EKPO .
    *variable for Report ID
    DATA: V_REPID LIKE SY-REPID .
    *declaration for fieldcatalog
    DATA: I_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
          WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    DATA: X_I_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
          X_WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    DATA: IT_LISTHEADER TYPE SLIS_T_LISTHEADER,
          X_IT_LISTHEADER TYPE SLIS_T_LISTHEADER.
    declaration for events table where user comand or set PF status will
    be defined
    DATA: V_EVENTS TYPE SLIS_T_EVENT,
          WA_EVENT TYPE SLIS_ALV_EVENT.
    declartion for layout
    DATA: ALV_LAYOUT TYPE SLIS_LAYOUT_ALV.
    declaration for variant(type of display we want)
    DATA: I_VARIANT TYPE DISVARIANT,
          I_VARIANT1 TYPE DISVARIANT,
          I_SAVE(1) TYPE C.
    *PARAMETERS : p_var TYPE disvariant-variant.
    *Title displayed when the alv list is displayed
    DATA:  I_TITLE_EKKO TYPE LVC_TITLE VALUE 'FIRST LIST DISPLAYED'.
    DATA:  I_TITLE_EKPO TYPE LVC_TITLE VALUE 'SECONDRY LIST DISPLAYED'.
    INITIALIZATION.
      V_REPID = SY-REPID.
      PERFORM BUILD_FIELDCATLOG.
      PERFORM EVENT_CALL.
      PERFORM POPULATE_EVENT.
    START-OF-SELECTION.
      PERFORM DATA_RETRIEVAL.
      PERFORM BUILD_LISTHEADER USING IT_LISTHEADER.
      PERFORM DISPLAY_ALV_REPORT.
    *&      Form  BUILD_FIELDCATLOG
          Fieldcatalog has all the field details from ekko
    FORM BUILD_FIELDCATLOG.
      WA_FIELDCAT-TABNAME = 'IT_EKKO'.
      WA_FIELDCAT-FIELDNAME = 'EBELN'.
      WA_FIELDCAT-SELTEXT_M = 'PO NO.'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_EKKO'.
      WA_FIELDCAT-FIELDNAME = 'AEDAT'.
      WA_FIELDCAT-SELTEXT_M = 'DATE.'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_EKKO'.
      WA_FIELDCAT-FIELDNAME = 'BUKRS'.
      WA_FIELDCAT-SELTEXT_M = 'COMPANY CODE'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
    WA_FIELDCAT-TABNAME = 'IT_EKKO'.
      WA_FIELDCAT-FIELDNAME = 'BUKRS'.
      WA_FIELDCAT-SELTEXT_M = 'DOCMENT TYPE'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
    WA_FIELDCAT-TABNAME = 'IT_EKKO'.
      WA_FIELDCAT-FIELDNAME = 'LIFNR'.
      WA_FIELDCAT-NO_OUT    = 'X'.
      WA_FIELDCAT-SELTEXT_M = 'VENDOR CODE'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
    ENDFORM.                    "BUILD_FIELDCATLOG
    *&      Form  EVENT_CALL
      we get all events - TOP OF PAGE or USER COMMAND in table v_events
    FORM EVENT_CALL.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
       EXPORTING
         I_LIST_TYPE           = 0
       IMPORTING
         ET_EVENTS             = V_EVENTS
      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.                    "EVENT_CALL
    *&      Form  POPULATE_EVENT
         Events populated for TOP OF PAGE & USER COMAND
    FORM POPULATE_EVENT.
      READ TABLE V_EVENTS INTO WA_EVENT WITH KEY NAME = 'TOP_OF_PAGE'.
      IF SY-SUBRC EQ 0.
        WA_EVENT-FORM = 'TOP_OF_PAGE'.
        MODIFY V_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =
    WA_EVENT-FORM.
      ENDIF.
      READ TABLE V_EVENTS INTO WA_EVENT WITH KEY NAME = 'USER_COMMAND'.
      IF SY-SUBRC EQ 0.
        WA_EVENT-FORM = 'USER_COMMAND'.
        MODIFY V_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =
    WA_EVENT-NAME.
      ENDIF.
    ENDFORM.                    "POPULATE_EVENT
    *&      Form  data_retrieval
      retreiving values from the database table ekko
    FORM DATA_RETRIEVAL.
      SELECT EBELN AEDAT BUKRS BSART LIFNR FROM EKKO INTO TABLE IT_EKKO.
    ENDFORM.                    "data_retrieval
    *&      Form  bUild_listheader
          text
         -->I_LISTHEADEtext
    FORM BUILD_LISTHEADER USING IT_LISTHEADER TYPE SLIS_T_LISTHEADER.
      DATA HLINE TYPE SLIS_LISTHEADER.
      HLINE-INFO = 'Purchase Order Header Details'.
      HLINE-TYP = 'H'.
      APPEND HLINE TO IT_LISTHEADER.
    ENDFORM.                    "build_listheader
    *&      Form  display_alv_report
          text
    FORM DISPLAY_ALV_REPORT.
      V_REPID = SY-REPID.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         I_CALLBACK_PROGRAM                = V_REPID
         I_CALLBACK_USER_COMMAND           = 'USER_COMMAND'
         I_CALLBACK_TOP_OF_PAGE            = 'TOP_OF_PAGE'
         I_GRID_TITLE                      = I_TITLE_EKKO
         IT_FIELDCAT                       = I_FIELDCAT[]
         I_SAVE                            = 'A'
         IT_EVENTS                         = V_EVENTS
        TABLES
          T_OUTTAB                          = IT_EKKO
      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  TOP_OF_PAGE
          text
    FORM TOP_OF_PAGE.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          IT_LIST_COMMENTARY       = IT_LISTHEADER
    ENDFORM.                    "TOP_OF_PAGE
    *&      Form  USER_COMMAND
          text
         -->R_UCOMM    text
         -->,          text
         -->RS_SLEFIELDtext
    FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
    RS_SELFIELD TYPE SLIS_SELFIELD.
      CASE R_UCOMM.
        WHEN '&IC1'.
          READ TABLE IT_EKKO INTO WA_EKKO INDEX RS_SELFIELD-TABINDEX.
          PERFORM BUILD_FIELDCATLOG_EKPO.
          PERFORM EVENT_CALL_EKPO.
          PERFORM POPULATE_EVENT_EKPO.
          PERFORM DATA_RETRIEVAL_EKPO.
          PERFORM BUILD_LISTHEADER_EKPO USING X_IT_LISTHEADER.
          PERFORM DISPLAY_ALV_EKPO.
      ENDCASE.
    ENDFORM.                    "user_command
    *&      Form  BUILD_FIELDCATLOG_EKPO
          text
    FORM BUILD_FIELDCATLOG_EKPO.
      X_WA_FIELDCAT-TABNAME = 'IT_EKPO'.
      X_WA_FIELDCAT-FIELDNAME = 'EBELN'.
      X_WA_FIELDCAT-SELTEXT_M = 'PO NO.'.
      APPEND X_WA_FIELDCAT TO X_I_FIELDCAT.
      CLEAR X_WA_FIELDCAT.
      X_WA_FIELDCAT-TABNAME = 'IT_EKPO'.
      X_WA_FIELDCAT-FIELDNAME = 'EBELP'.
      X_WA_FIELDCAT-SELTEXT_M = 'LINE NO'.
      APPEND X_WA_FIELDCAT TO X_I_FIELDCAT.
      CLEAR X_WA_FIELDCAT.
      X_WA_FIELDCAT-TABNAME = 'I_EKPO'.
      X_WA_FIELDCAT-FIELDNAME = 'MATNR'.
      X_WA_FIELDCAT-SELTEXT_M = 'MATERIAL NO.'.
      APPEND X_WA_FIELDCAT TO X_I_FIELDCAT.
      CLEAR X_WA_FIELDCAT.
    X_WA_FIELDCAT-TABNAME = 'I_EKPO'.
      X_WA_FIELDCAT-FIELDNAME = 'MENGE'.
      X_WA_FIELDCAT-SELTEXT_M = 'QUANTITY'.
      APPEND X_WA_FIELDCAT TO X_I_FIELDCAT.
      CLEAR X_WA_FIELDCAT.
    X_WA_FIELDCAT-TABNAME = 'I_EKPO'.
      X_WA_FIELDCAT-FIELDNAME = 'MEINS'.
      X_WA_FIELDCAT-SELTEXT_M = 'UOM'.
      APPEND X_WA_FIELDCAT TO X_I_FIELDCAT.
      CLEAR X_WA_FIELDCAT.
    X_WA_FIELDCAT-TABNAME = 'I_EKPO'.
      X_WA_FIELDCAT-FIELDNAME = 'NETPR'.
      X_WA_FIELDCAT-SELTEXT_M = 'PRICE'.
      APPEND X_WA_FIELDCAT TO X_I_FIELDCAT.
      CLEAR X_WA_FIELDCAT.
    ENDFORM.                    "BUILD_FIELDCATLOG_EKPO
    *&      Form  event_call_ekpo
      we get all events - TOP OF PAGE or USER COMMAND in table v_events
    FORM EVENT_CALL_EKPO.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
       EXPORTING
         I_LIST_TYPE           = 0
       IMPORTING
         ET_EVENTS             = V_EVENTS
      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.                    "event_call_ekpo
    *&      Form  POPULATE_EVENT
           Events populated for TOP OF PAGE & USER COMAND
    FORM POPULATE_EVENT_EKPO.
      READ TABLE V_EVENTS INTO WA_EVENT WITH KEY NAME = 'TOP_OF_PAGE'.
      IF SY-SUBRC EQ 0.
        WA_EVENT-FORM = 'TOP_OF_PAGE1'.
        MODIFY V_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =
    WA_EVENT-FORM.
      ENDIF.
      ENDFORM.                    "POPULATE_EVENT
    *&      Form  TOP_OF_PAGE
          text
    FORM F_TOP_OF_PAGE1.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          IT_LIST_COMMENTARY       = X_IT_LISTHEADER.
    ENDFORM.                    "TOP_OF_PAGE
    *&      Form  USER_COMMAND
          text
         -->R_UCOMM    text
         -->,          text
         -->RS_SLEFIELDtext
    *retreiving values from the database table ekko
    FORM DATA_RETRIEVAL_EKPO.
    SELECT EBELN EBELP MATNR MENGE MEINS NETPR FROM EKPO INTO TABLE IT_EKPO.
    ENDFORM.
    FORM BUILD_LISTHEADER_EKPO USING X_IT_LISTHEADER TYPE SLIS_T_LISTHEADER.
    DATA: HLINE1 TYPE SLIS_LISTHEADER.
    HLINE1-TYP = 'H'.
    HLINE1-INFO = 'Purchase Order Item details'.
    APPEND HLINE1 TO X_IT_LISTHEADER.
    ENDFORM.
    FORM DISPLAY_ALV_EKPO.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
       I_CALLBACK_PROGRAM                = V_REPID
       I_CALLBACK_TOP_OF_PAGE            = 'TOP_OF_PAGE'
       I_GRID_TITLE                      = I_TITLE_EKPO
       IT_FIELDCAT                       = X_I_FIELDCAT[]
       I_SAVE                            = 'A'
       IT_EVENTS                         = V_EVENTS
      TABLES
        T_OUTTAB                          = IT_EKPO
    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.

    When you are calling the FM 'REUSE_AVL_GRID_DISPLAY', to display item details, you are passing the form name for 'i_callback_top_of_page' as 'TOP_OF_PAGE' which is for header details. For item details you have created another form, 'F_TOP_OF_PAGE1' pass it to 'i_callback_top_of_page'  instead of  'TOP_OF_PAGE' .

  • How to display 3 alv with top-of-page using splitter container

    Hi,
    I want to display 3 different alv in a single container corresponding to the 3 check boxes on selection screen.
    i.e.
    If user selects 1 check box only one alv should be displayed, if 2 checkboxes selected by user 2 alv should be displayed and same for 3.
    I cannot use 3 different containers bcoz if second checkbox is not selected then that place remains blank. So I am using single container and using splitter container dividing it into the no of rows corresponding to the no. of checkboxs selected by user.
    Now I also want to display top-of-page for each alv. Please guide me how to achieve this.
    Thanks & regards,
    Harshada

    create with some IF_ELSE conditions as i have done below. in my case the same things are required. if error table is there only then it will be displayed, else only output will be displayed.
    * First Main Container
      CREATE OBJECT obj_main1
        EXPORTING
          container_name = 'CC_CONTAINER'
          style          = cl_gui_custom_container=>ws_maximizebox.
    * create top-document
      CREATE OBJECT obj_dyndoc_id
        EXPORTING
          style = 'ALV_GRID'.
      IF pr_view EQ c_x OR pr_stat EQ c_x.
    * First Splitter Container
        CREATE OBJECT obj_splitter1
          EXPORTING
            parent  = obj_main1
            rows    = 2
            columns = 1.
    * Place obj_parent_html in First row First column
    * for Top_of_page
        CALL METHOD obj_splitter1->get_container
          EXPORTING
            row       = 1
            column    = 1
          RECEIVING
            container = obj_parent_html.
    * Place obj_container1 in Second row First column
        CALL METHOD obj_splitter1->get_container
          EXPORTING
            row       = 2
            column    = 1
          RECEIVING
            container = obj_container1.
    * Set the height of Top of page
        CALL METHOD obj_splitter1->set_row_height
          EXPORTING
            id     = 1
            height = 24.
      ELSEIF pr_email EQ c_x.
    * First Splitter Container
        CREATE OBJECT obj_splitter1
          EXPORTING
            parent  = obj_main1
            rows    = 3
            columns = 1.
    * Place obj_parent_html in First row First column
    * for Top_of_page
        CALL METHOD obj_splitter1->get_container
          EXPORTING
            row       = 1
            column    = 1
          RECEIVING
            container = obj_parent_html.
    * Place obj_container1 in First row First column
        CALL METHOD obj_splitter1->get_container
          EXPORTING
            row       = 2
            column    = 1
          RECEIVING
            container = obj_container1.
    * Place obj_container2 in Second row First column
        CALL METHOD obj_splitter1->get_container
          EXPORTING
            row       = 3
            column    = 1
          RECEIVING
            container = obj_container2.
    * Set the height of Top of page
        CALL METHOD obj_splitter1->set_row_height
          EXPORTING
            id     = 1
            height = 24.
      ENDIF.
    Please note there is no need to create a hEADER in the container, but create it for the 1st table only which is always displayed
    ags.
    Edited by: ags on Nov 4, 2009 4:49 PM
    Edited by: ags on Nov 4, 2009 4:50 PM

  • OOP's ALV with top of page

    Hi,
    Does any one have code or pointers for creating a ALV with top of page using OOPS.
    I need to create a top of page with variables like :
    Report Name : ZABC
    User Name : Z234ASD
    Date : System Date
    Time : System Time
    Transaction : ZXYZ
    Thanks
    Khan.

    The code i used to implement top of page for OO ALV is as below but when you proceed to print out the report, it doesn't print out the header as the list output doesn't show the header.
    codeREPORT ZTEST1234_ALV_TOP MESSAGE-ID ZZ .
    DATA: G_GRID TYPE REF TO CL_GUI_ALV_GRID.
    DATA: L_VALID TYPE C,
    V_FLAG,
    V_DATA_CHANGE,
    V_ROW TYPE LVC_S_ROW,
    V_COLUMN TYPE LVC_S_COL,
    V_ROW_NUM TYPE LVC_S_ROID.
    "The Below Definitions Must.....
    DATA:
    Reference to document
    DG_DYNDOC_ID TYPE REF TO CL_DD_DOCUMENT,
    Reference to split container
    DG_SPLITTER TYPE REF TO CL_GUI_SPLITTER_CONTAINER,
    Reference to grid container
    DG_PARENT_GRID TYPE REF TO CL_GUI_CONTAINER,
    Reference to html container
    DG_HTML_CNTRL TYPE REF TO CL_GUI_HTML_VIEWER,
    Reference to html container
    DG_PARENT_HTML TYPE REF TO CL_GUI_CONTAINER.
    "up to here
    CLASS lcl_event_handler DEFINITION
    CLASS LCL_EVENT_HANDLER DEFINITION .
    PUBLIC SECTION .
    METHODS:
    **Hot spot Handler
    HANDLE_HOTSPOT_CLICK FOR EVENT HOTSPOT_CLICK OF CL_GUI_ALV_GRID
    IMPORTING E_ROW_ID E_COLUMN_ID ES_ROW_NO,
    **Double Click Handler
    HANDLE_DOUBLE_CLICK FOR EVENT DOUBLE_CLICK OF CL_GUI_ALV_GRID
    IMPORTING E_ROW E_COLUMN ES_ROW_NO,
    TOP_OF_PAGE FOR EVENT TOP_OF_PAGE "event handler
    OF CL_GUI_ALV_GRID
    IMPORTING E_DYNDOC_ID.
    ENDCLASS. "lcl_event_handler DEFINITION
    CLASS lcl_event_handler IMPLEMENTATION
    CLASS LCL_EVENT_HANDLER IMPLEMENTATION.
    *Handle Hotspot Click
    METHOD HANDLE_HOTSPOT_CLICK .
    CLEAR: V_ROW,V_COLUMN,V_ROW_NUM.
    V_ROW = E_ROW_ID.
    V_COLUMN = E_COLUMN_ID.
    V_ROW_NUM = ES_ROW_NO.
    MESSAGE I000 WITH V_ROW 'clicked'.
    ENDMETHOD. "lcl_event_handler
    *Handle Double Click
    METHOD HANDLE_DOUBLE_CLICK.
    ENDMETHOD. "handle_double_click
    METHOD TOP_OF_PAGE. "implementation
    Top-of-page event
    PERFORM EVENT_TOP_OF_PAGE USING DG_DYNDOC_ID.
    ENDMETHOD. "top_of_page
    ENDCLASS. "LCL_EVENT_HANDLER IMPLEMENTATION
    *& Global Definitions
    DATA: G_CUSTOM_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER,"Container1
    G_HANDLER TYPE REF TO LCL_EVENT_HANDLER. "handler
    DATA: OK_CODE LIKE SY-UCOMM,
    SAVE_OK LIKE SY-UCOMM,
    G_CONTAINER1 TYPE SCRFNAME VALUE 'TEST',
    GS_LAYOUT TYPE LVC_S_LAYO.
    Fieldcatalog for First and second Report
    DATA: IT_FIELDCAT TYPE LVC_T_FCAT,
    X_FIELDCAT TYPE LVC_S_FCAT,
    LS_VARI TYPE DISVARIANT.
    START-OF_SELECTION
    START-OF-SELECTION.
    DATA:BEGIN OF ITAB OCCURS 0,
    VBELN LIKE LIKP-VBELN,
    POSNR LIKE LIPS-POSNR,
    CELLCOLOR TYPE LVC_T_SCOL, "required for color
    DROP(10),
    END OF ITAB.
    SELECT VBELN
    POSNR
    FROM LIPS
    UP TO 20 ROWS
    INTO CORRESPONDING FIELDS OF TABLE ITAB.
    END-OF-SELECTION.
    IF NOT ITAB[] IS INITIAL.
    CALL SCREEN 100.
    ELSE.
    MESSAGE I002 WITH 'NO DATA FOR THE SELECTION'(004).
    ENDIF.
    *& Form CREATE_AND_INIT_ALV
    text
    FORM CREATE_AND_INIT_ALV .
    DATA: LT_EXCLUDE TYPE UI_FUNCTIONS.
    "attention.....from here
    "split your container here...into two parts
    "create the container
    CREATE OBJECT G_CUSTOM_CONTAINER
    EXPORTING CONTAINER_NAME = G_CONTAINER1.
    "this is for top of page
    Create TOP-Document
    CREATE OBJECT DG_DYNDOC_ID
    EXPORTING STYLE = 'ALV_GRID'.
    Create Splitter for custom_container
    CREATE OBJECT DG_SPLITTER
    EXPORTING PARENT = G_CUSTOM_CONTAINER
    ROWS = 2
    COLUMNS = 1.
    Split the custom_container to two containers and move the reference
    to receiving containers g_parent_html and g_parent_grid
    "i am allocating the space for grid and top of page
    CALL METHOD DG_SPLITTER->GET_CONTAINER
    EXPORTING
    ROW = 1
    COLUMN = 1
    RECEIVING
    CONTAINER = DG_PARENT_HTML.
    CALL METHOD DG_SPLITTER->GET_CONTAINER
    EXPORTING
    ROW = 2
    COLUMN = 1
    RECEIVING
    CONTAINER = DG_PARENT_GRID.
    "you can set the height of it
    Set height for g_parent_html
    CALL METHOD DG_SPLITTER->SET_ROW_HEIGHT
    EXPORTING
    ID = 1
    HEIGHT = 5.
    "from here as usual..you need to specify parent as splitter part
    "which we alloted for grid
    CREATE OBJECT G_GRID
    EXPORTING I_PARENT = DG_PARENT_GRID.
    Set a titlebar for the grid control
    CLEAR GS_LAYOUT.
    GS_LAYOUT-GRID_TITLE = TEXT-003.
    GS_LAYOUT-ZEBRA = SPACE.
    GS_LAYOUT-CWIDTH_OPT = 'X'.
    GS_LAYOUT-NO_ROWMARK = 'X'.
    GS_LAYOUT-CTAB_FNAME = 'CELLCOLOR'.
    CALL METHOD G_GRID->REGISTER_EDIT_EVENT
    EXPORTING
    I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_ENTER.
    CREATE OBJECT G_HANDLER.
    SET HANDLER G_HANDLER->HANDLE_DOUBLE_CLICK FOR G_GRID.
    SET HANDLER G_HANDLER->HANDLE_HOTSPOT_CLICK FOR G_GRID.
    SET HANDLER G_HANDLER->TOP_OF_PAGE FOR G_GRID.
    DATA: LS_CELLCOLOR TYPE LVC_S_SCOL. "required for color
    DATA: L_INDEX TYPE SY-TABIX.
    "Here i am changing the color of line 1,5,10...
    "so you can change the color of font conditionally
    LOOP AT ITAB.
    L_INDEX = SY-TABIX.
    IF L_INDEX = 1 OR L_INDEX = 5 OR L_INDEX = 10.
    LS_CELLCOLOR-FNAME = 'VBELN'.
    LS_CELLCOLOR-COLOR-COL = '6'.
    LS_CELLCOLOR-COLOR-INT = '0'.
    LS_CELLCOLOR-COLOR-INV = '1'.
    APPEND LS_CELLCOLOR TO ITAB-CELLCOLOR.
    MODIFY ITAB INDEX L_INDEX TRANSPORTING CELLCOLOR.
    LS_CELLCOLOR-FNAME = 'POSNR'.
    LS_CELLCOLOR-COLOR-COL = '6'.
    LS_CELLCOLOR-COLOR-INT = '0'.
    LS_CELLCOLOR-COLOR-INV = '1'.
    APPEND LS_CELLCOLOR TO ITAB-CELLCOLOR.
    MODIFY ITAB INDEX L_INDEX TRANSPORTING CELLCOLOR.
    ENDIF.
    ENDLOOP.
    setting focus for created grid control
    CALL METHOD CL_GUI_CONTROL=>SET_FOCUS
    EXPORTING
    CONTROL = G_GRID.
    Build fieldcat and set editable for date and reason code
    edit enabled. Assign a handle for the dropdown listbox.
    PERFORM BUILD_FIELDCAT.
    PERFORM SET_DRDN_TABLE.
    Optionally restrict generic functions to 'change only'.
    (The user shall not be able to add new lines).
    PERFORM EXCLUDE_TB_FUNCTIONS CHANGING LT_EXCLUDE.
    **Vaiant to save the layout
    LS_VARI-REPORT = SY-REPID.
    LS_VARI-HANDLE = SPACE.
    LS_VARI-LOG_GROUP = SPACE.
    LS_VARI-USERNAME = SPACE.
    LS_VARI-VARIANT = SPACE.
    LS_VARI-TEXT = SPACE.
    LS_VARI-DEPENDVARS = SPACE.
    **Calling the Method for ALV output
    CALL METHOD G_GRID->SET_TABLE_FOR_FIRST_DISPLAY
    EXPORTING
    IT_TOOLBAR_EXCLUDING = LT_EXCLUDE
    IS_VARIANT = LS_VARI
    IS_LAYOUT = GS_LAYOUT
    I_SAVE = 'A'
    CHANGING
    IT_FIELDCATALOG = IT_FIELDCAT
    IT_OUTTAB = ITAB[].
    "do these..{
    Initializing document
    CALL METHOD DG_DYNDOC_ID->INITIALIZE_DOCUMENT.
    Processing events
    CALL METHOD G_GRID->LIST_PROCESSING_EVENTS
    EXPORTING
    I_EVENT_NAME = 'TOP_OF_PAGE'
    I_DYNDOC_ID = DG_DYNDOC_ID.
    "end }
    Set editable cells to ready for input initially
    CALL METHOD G_GRID->SET_READY_FOR_INPUT
    EXPORTING
    I_READY_FOR_INPUT = 1.
    ENDFORM. "CREATE_AND_INIT_ALV
    *& Form EXCLUDE_TB_FUNCTIONS
    text
    -->PT_EXCLUDE text
    FORM EXCLUDE_TB_FUNCTIONS CHANGING PT_EXCLUDE TYPE UI_FUNCTIONS.
    Only allow to change data not to create new entries (exclude
    generic functions).
    DATA LS_EXCLUDE TYPE UI_FUNC.
    LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_COPY_ROW.
    APPEND LS_EXCLUDE TO PT_EXCLUDE.
    LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_DELETE_ROW.
    APPEND LS_EXCLUDE TO PT_EXCLUDE.
    LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_APPEND_ROW.
    APPEND LS_EXCLUDE TO PT_EXCLUDE.
    LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_INSERT_ROW.
    APPEND LS_EXCLUDE TO PT_EXCLUDE.
    LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_MOVE_ROW.
    APPEND LS_EXCLUDE TO PT_EXCLUDE.
    LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_COPY.
    APPEND LS_EXCLUDE TO PT_EXCLUDE.
    LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_CUT.
    APPEND LS_EXCLUDE TO PT_EXCLUDE.
    LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_PASTE.
    APPEND LS_EXCLUDE TO PT_EXCLUDE.
    LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_PASTE_NEW_ROW.
    APPEND LS_EXCLUDE TO PT_EXCLUDE.
    LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_UNDO.
    APPEND LS_EXCLUDE TO PT_EXCLUDE.
    ENDFORM. " EXCLUDE_TB_FUNCTIONS
    *& Form build_fieldcat
    Fieldcatalog
    FORM BUILD_FIELDCAT .
    DATA: L_POS TYPE I.
    L_POS = L_POS + 1.
    X_FIELDCAT-SCRTEXT_M = 'Delivery'(024).
    X_FIELDCAT-FIELDNAME = 'VBELN'.
    X_FIELDCAT-TABNAME = 'IT_FINAL'.
    X_FIELDCAT-COL_POS = L_POS.
    X_FIELDCAT-NO_ZERO = 'X'.
    X_FIELDCAT-OUTPUTLEN = '10'.
    X_FIELDCAT-HOTSPOT = 'X'.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    L_POS = L_POS + 1.
    X_FIELDCAT-SCRTEXT_M = 'Item'(025).
    X_FIELDCAT-FIELDNAME = 'POSNR'.
    X_FIELDCAT-TABNAME = 'IT_FINAL'.
    X_FIELDCAT-COL_POS = L_POS.
    X_FIELDCAT-OUTPUTLEN = '5'.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    L_POS = L_POS + 1.
    X_FIELDCAT-SCRTEXT_M = 'Drop'(025).
    X_FIELDCAT-FIELDNAME = 'DROP'.
    X_FIELDCAT-TABNAME = 'IT_FINAL'.
    X_FIELDCAT-COL_POS = L_POS.
    X_FIELDCAT-OUTPUTLEN = '5'.
    X_FIELDCAT-EDIT = 'X'.
    X_FIELDCAT-DRDN_HNDL = '1'.
    X_FIELDCAT-DRDN_ALIAS = 'X'.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    ENDFORM. " build_fieldcat
    *& Module STATUS_0100 OUTPUT
    text
    MODULE STATUS_0100 OUTPUT.
    SET PF-STATUS 'MAIN100'.
    SET TITLEBAR 'MAIN100'.
    IF G_CUSTOM_CONTAINER IS INITIAL.
    **Initializing the grid and calling the fm to Display the O/P
    PERFORM CREATE_AND_INIT_ALV.
    ENDIF.
    ENDMODULE. " STATUS_0100 OUTPUT
    *& Module USER_COMMAND_0100 INPUT
    text
    MODULE USER_COMMAND_0100 INPUT.
    CASE SY-UCOMM.
    WHEN 'BACK'.
    LEAVE TO SCREEN 0.
    ENDCASE.
    ENDMODULE. " USER_COMMAND_0100 INPUT
    *& Form SET_DRDN_TABLE
    text
    FORM SET_DRDN_TABLE.
    DATA:LT_DRAL TYPE LVC_T_DRAL,
    LS_DRAL TYPE LVC_S_DRAL.
    LOOP AT ITAB .
    First listbox (handle '1').
    IF SY-INDEX = 1.
    LS_DRAL-HANDLE = '1'.
    LS_DRAL-VALUE = ' '.
    LS_DRAL-INT_VALUE = ' '.
    ELSE.
    LS_DRAL-HANDLE = '1'.
    LS_DRAL-VALUE = ITAB-POSNR.
    LS_DRAL-INT_VALUE = ITAB-POSNR.
    ENDIF.
    APPEND LS_DRAL TO LT_DRAL.
    ENDLOOP.
    **Setting the Drop down table for Reason Code
    CALL METHOD G_GRID->SET_DROP_DOWN_TABLE
    EXPORTING
    IT_DROP_DOWN_ALIAS = LT_DRAL.
    ENDFORM. " set_drdn_table
    *& Form EVENT_TOP_OF_PAGE
    text
    -->DG_DYNDOC_ID text
    FORM EVENT_TOP_OF_PAGE USING DG_DYNDOC_ID TYPE REF TO CL_DD_DOCUMENT.
    "this is more clear.....check it
    "first add text, then pass it to comentry write fm
    DATA : DL_TEXT(255) TYPE C. "Text
    Populating header to top-of-page
    CALL METHOD DG_DYNDOC_ID->ADD_TEXT
    EXPORTING
    TEXT = 'Test Report'
    SAP_STYLE = CL_DD_AREA=>HEADING.
    Add new-line
    CALL METHOD DG_DYNDOC_ID->NEW_LINE.
    CLEAR : DL_TEXT.
    Move program ID
    CONCATENATE 'Program Name :' SY-REPID
    INTO DL_TEXT SEPARATED BY SPACE.
    Add Program Name to Document
    PERFORM ADD_TEXT USING DL_TEXT.
    Add new-line
    CALL METHOD DG_DYNDOC_ID->NEW_LINE.
    CLEAR : DL_TEXT.
    Move User ID
    CONCATENATE 'User ID :' SY-UNAME INTO DL_TEXT SEPARATED BY SPACE
    Add User ID to Document
    PERFORM ADD_TEXT USING DL_TEXT.
    Add new-line
    CALL METHOD DG_DYNDOC_ID->NEW_LINE.
    CLEAR : DL_TEXT.
    Move Client
    CONCATENATE 'Client :' SY-MANDT INTO DL_TEXT SEPARATED BY SPACE.
    Add Client to Document
    PERFORM ADD_TEXT USING DL_TEXT.
    Add new-line
    CALL METHOD DG_DYNDOC_ID->NEW_LINE.
    CLEAR : DL_TEXT.
    Move date
    WRITE SY-DATUM TO DL_TEXT.
    CONCATENATE 'Date :' DL_TEXT INTO DL_TEXT SEPARATED BY SPACE.
    Add Date to Document
    PERFORM ADD_TEXT USING DL_TEXT.
    Add new-line
    CALL METHOD DG_DYNDOC_ID->NEW_LINE.
    CLEAR : DL_TEXT.
    Move time
    WRITE SY-UZEIT TO DL_TEXT.
    CONCATENATE 'Time :' DL_TEXT INTO DL_TEXT SEPARATED BY SPACE.
    Add Time to Document
    PERFORM ADD_TEXT USING DL_TEXT.
    Add new-line
    CALL METHOD DG_DYNDOC_ID->NEW_LINE.
    Populating data to html control
    PERFORM HTML.
    ENDFORM. " EVENT_TOP_OF_PAGE
    *& Form ADD_TEXT
    To add Text
    FORM ADD_TEXT USING P_TEXT TYPE SDYDO_TEXT_ELEMENT.
    Adding text
    CALL METHOD DG_DYNDOC_ID->ADD_TEXT
    EXPORTING
    TEXT = P_TEXT
    SAP_EMPHASIS = CL_DD_AREA=>HEADING.
    ENDFORM. " ADD_TEXT
    *& Form HTML
    text
    FORM HTML.
    DATA : DL_LENGTH TYPE I, " Length
    DL_BACKGROUND_ID TYPE SDYDO_KEY VALUE SPACE. " Background_id
    Creating html control
    IF DG_HTML_CNTRL IS INITIAL.
    CREATE OBJECT DG_HTML_CNTRL
    EXPORTING
    PARENT = DG_PARENT_HTML.
    ENDIF.
    Reuse_alv_grid_commentary_set
    CALL FUNCTION 'REUSE_ALV_GRID_COMMENTARY_SET'
    EXPORTING
    DOCUMENT = DG_DYNDOC_ID
    BOTTOM = SPACE
    IMPORTING
    LENGTH = DL_LENGTH.
    Get TOP->HTML_TABLE ready
    CALL METHOD DG_DYNDOC_ID->MERGE_DOCUMENT.
    Set wallpaper
    CALL METHOD DG_DYNDOC_ID->SET_DOCUMENT_BACKGROUND
    EXPORTING
    PICTURE_ID = DL_BACKGROUND_ID.
    Connect TOP document to HTML-Control
    DG_DYNDOC_ID->HTML_CONTROL = DG_HTML_CNTRL.
    Display TOP document
    CALL METHOD DG_DYNDOC_ID->DISPLAY_DOCUMENT
    EXPORTING
    REUSE_CONTROL = 'X'
    PARENT = DG_PARENT_HTML
    EXCEPTIONS
    HTML_DISPLAY_ERROR = 1.
    IF SY-SUBRC NE 0.
    MESSAGE I999 WITH 'Error in displaying top-of-page'(036).
    ENDIF.
    ENDFORM. " HTML
    [/code]

  • Problem with an update page.

    I have a problem with an update page on my website
    Here's how it work
    values are defualted in from the advert table  - this works fine
    I should then be able to change the fields and click on the update button
    This works fine but ONLY when the O_year field is populated. 
    There doesn't seem to be anything special about the O_year field
    I thought spry text validation would of been causing the issues, but I removed them and have the same problem.
    For some reason the POST_MMupdate value is not being set to 'form4', which it is doing if O_year is set.
    Please can someone have a look at this, code,
    Also, is there a way of 'stepping through' dreamweaver code to debug it?
    Thanks
    Adam
    $colname_Advert = "-1";
    if (isset($_GET['advert_id'])) {
      $colname_Advert = $_GET['advert_id'];
    mysql_select_db($database_guitarswap_db, $guitarswap_db);
    $query_Advert = sprintf("SELECT * FROM advert WHERE advert_id = %s", GetSQLValueString($colname_Advert, "int"));
    $Advert = mysql_query($query_Advert, $guitarswap_db) or die(mysql_error());
    $row_Advert = mysql_fetch_assoc($Advert);
    $totalRows_Advert = mysql_num_rows($Advert);
    if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form4"))
        //Сheck that we have a file
    if((!empty($_FILES["PictureLocation"])) && ($_FILES['PictureLocation']['error'] == 0))
          //Check if the file is JPEG image and it's size is less than 350Kb
          $filename = basename($_FILES["PictureLocation"]["name"]);
          $ext = substr($filename, strrpos($filename, '.') + 1);
          if (($ext == "jpg") && ($_FILES["PictureLocation"]["type"] == "image/jpeg") &&
        ($_FILES["PictureLocation"]["size"] < 350000))
            //Determine the path to which we want to save this file
              $newname = dirname(__FILE__).'/upload/'.$filename;
              //Check if the file with the same name is already exists on the server
              if (!file_exists($newname))
                //Attempt to move the uploaded file to it's new place
                if ((move_uploaded_file($_FILES['PictureLocation']['tmp_name'],$newname)))
                       // echo "It's done! The file has been saved as: ".$newname;
                else
                       // echo "Error: A problem occurred during file upload!";
            else
                 // echo "Error: File ".$_FILES["PictureLocation"]["name"]." already exists";
          else
             // echo "Error: Only .jpg images under 350Kb are accepted for upload";
        else
         // echo "Error: No file uploaded";
        $filename=$row_Advert['PictureLocation'];
        // set default opentoalloffers
    if (!isset($_POST['checkopentoalloffers']))
        $_POST['checkopentoalloffers'] = 'n';
      $updateSQL = sprintf("UPDATE advert SET PictureLocation=%s, O_Make=%s, O_Model=%s, O_Country=%s, O_Year=%s, O_Colour=%s, O_Body=%s, O_Neck=%s, O_Fingerboard=%s, O_Pickups=%s, `value`=%s, `condition`=%s,  W_Make=%s, W_Model=%s, W_Country=%s, W_Year=%s, W_Colour=%s, W_Body=%s, W_Neck=%s, W_Fingerboard=%s, W_Pickups=%s, Comments=%s, opentoalloffers=%s, ChangeFlg = %s  WHERE advert_id=%s",
                           GetSQLValueString($filename, "text"),
                           GetSQLValueString($_POST['O_Make'], "text"),
                           GetSQLValueString($_POST['O_Model'], "text"),
                           GetSQLValueString($_POST['O_Country'], "text"),
                           GetSQLValueString($_POST['O_Year'], "date"),
                           GetSQLValueString($_POST['O_Colour'], "text"),
                           GetSQLValueString($_POST['O_Body'], "text"),
                           GetSQLValueString($_POST['O_Neck'], "text"),
                           GetSQLValueString($_POST['O_Fingerboard'], "text"),
                           GetSQLValueString($_POST['O_Pickups'], "text"),
                           GetSQLValueString($_POST['value'], "int"),
                           GetSQLValueString($_POST['condition'], "text"),
                           GetSQLValueString($_POST['W_Make'], "text"),
                           GetSQLValueString($_POST['W_Model'], "text"),
                           GetSQLValueString($_POST['W_Country'], "text"),
                           GetSQLValueString($_POST['W_Year'], "date"),
                           GetSQLValueString($_POST['W_Colour'], "text"),
                           GetSQLValueString($_POST['W_Body'], "text"),
                           GetSQLValueString($_POST['W_Neck'], "text"),
                           GetSQLValueString($_POST['W_Fingerboard'], "text"),
                           GetSQLValueString($_POST['W_Pickups'], "text"),
                           GetSQLValueString($_POST['Comments'], "text"),
                           GetSQLValueString($_POST['checkopentoalloffers'], "text"),
                           GetSQLValueString('y', "text"),
                           GetSQLValueString($_POST['advert_id'], "int"));
      mysql_select_db($database_guitarswap_db, $guitarswap_db);
      $Result1 = mysql_query($updateSQL, $guitarswap_db) or die(mysql_error());
        $updateGoTo = "Member2.php";
         if (isset($_SERVER['QUERY_STRING'])) {
           $updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
           $updateGoTo .= $_SERVER['QUERY_STRING'];
         header(sprintf("Location: %s", $updateGoTo));
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <link href="Layout3.css" rel="stylesheet" type="text/css" /><!--[if IE 5]>
    <style type="text/css">
    /* place css box model fixes for IE 5* in this conditional comment */
    .twoColFixLtHdr #sidebar1 { width: 230px; }
    </style>
    <![endif]--><!--[if IE]>
    <style type="text/css">
    /* place css fixes for all versions of IE in this conditional comment */
    .twoColFixLtHdr #sidebar1 { padding-top: 30px; }
    .twoColFixLtHdr #mainContent { zoom: 1; }
    /* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */
    </style>
    <![endif]-->
    <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
    <link href="SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    <!--
    body {
        background-color: #FFF;
        margin-left: 20px;
    .twoColFixLtHdr #container #main3 #form1 div fieldset {
        border: thin ridge #CCC;
    -->
    </style>
    <script type="text/javascript">
    <!--
    function MM_goToURL() { //v3.0
      var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
      for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
    //-->
    </script>
    <link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
    </head>
    <body class="twoColFixLtHdr">
    <div id="container">
      <div id="header">
        <div id="Righty">
          <ul id="MenuBar2" class="MenuBarHorizontal">
        <li><a href="index.php">Search</a>      </li>
        <li><a href="Member2.php">Members</a></li>
      </ul>
      <p> </p>
    </div>
    <span id="LoginDiv">
        <?php
          if (isset($_SESSION['MM_Username']))
            echo "hello ". $_SESSION['MM_Username']. "";
            echo " <a href='Logout.php'>Log out</a> ";
        else
            echo "
                <a href='Login.php'>Login</a> / <a href='Register.php'>Register</a>
        ?>
        </a></span>
    <div id="Middle">
      <h1 align="center">GuitarSwap</h1>
    </div>
      </div>
      <div id="sidebar1">
        <h4>Members Area</h4>
        <ul id="MenuBar1" class="MenuBarVertical">
          <li><a href="Member2.php">My Adverts</a></li>
          <li><a href="NewAdvert.php">Create new Advert</a></li>
          <li><a href="UpdateUserDets.php">My Account</a></li>
        </ul>
        <h3>  </h3>
      </div>
      <div id="mainContent">
        <h4>Update Advert</h4>
        <!-- end #mainContent -->
      </div>
      <!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats -->
      <div id="main3">
        <div id="main">
          <fieldset>
            <legend>Please update advert details and confirm</legend>
            <form action="<?php echo $editFormAction; ?>" enctype="multipart/form-data" method="post" name="form4" id="form4">
              <input type="hidden" name="advert_id" value="<?php echo $row_Advert['advert_id']; ?>" />
              <p></p>
              <table width="650" align="center">
                <tr valign="baseline">
                  <td width="17" rowspan="15" valign="middle" nowrap="nowrap"><?php echo "<img src='upload/" .$row_Advert['PictureLocation']."' width='64' height='180'/>" ?></td>
                  <td width="133" align="right" nowrap="nowrap"> </td>
                  <td width="240" align="center" bgcolor="#CCCCCC"><strong>Offered</strong></td>
                  <td width="240" align="center" bgcolor="#CCCCCC"><strong>Wanted</strong></td>
                </tr>
                <tr valign="baseline">
                  <td nowrap="nowrap" align="right"><strong>Make:</strong></td>
                  <td bgcolor="#CCFFCC"><input name="O_Make" type="text" value="<?php echo $row_Advert['O_Make']; ?>" size="30" maxlength="15" /></td>
                  <td bgcolor="#CCFFFF"><input name="W_Make" type="text" value="<?php echo $row_Advert['W_Make']; ?>" size="30" maxlength="15" /></td>
                </tr>
                <tr valign="baseline">
                  <td nowrap="nowrap" align="right"><strong>Model:</strong></td>
                  <td bgcolor="#CCFFCC"><input name="O_Model" type="text" value="<?php echo $row_Advert['O_Model']; ?>" size="30" maxlength="30" /></td>
                  <td bgcolor="#CCFFFF"><input name="W_Model" type="text" value="<?php echo $row_Advert['W_Model']; ?>" size="30" maxlength="30" /></td>
                </tr>
                <tr valign="baseline">
                  <td nowrap="nowrap" align="right"><strong>Country:</strong></td>
                  <td bgcolor="#CCFFCC"><input name="O_Country" type="text" value="<?php echo $row_Advert['O_Country']; ?>" size="30" maxlength="15" /></td>
                  <td bgcolor="#CCFFFF"><input name="W_Country" type="text" value="<?php echo $row_Advert['W_Country']; ?>" size="30" maxlength="15" /></td>
                </tr>
                <tr valign="baseline">
                  <td nowrap="nowrap" align="right"><strong>Year:</strong></td>
                  <td bgcolor="#CCFFCC"><span id="sprytextfield1">
                  <input name="O_Year" type="text" value="<?php echo $row_Advert['O_Year']; ?>" size="4" maxlength="4" />
    <span class="textfieldInvalidFormatMsg">Invalid format.</span><span class="textfieldMinValueMsg">The entered value is less than the minimum required.</span><span class="textfieldMaxValueMsg">The entered value is greater than the maximum allowed.</span></span></td>
                  <td bgcolor="#CCFFFF"><span id="sprytextfield2">
                  <input name="W_Year" type="text" value="<?php echo $row_Advert['W_Year']; ?>" size="4" maxlength="4" />
    <span class="textfieldInvalidFormatMsg">Invalid format.</span><span class="textfieldMinValueMsg">The entered value is less than the minimum required.</span><span class="textfieldMaxValueMsg">The entered value is greater than the maximum allowed.</span></span></td>
                </tr>
                <tr valign="baseline">
                  <td nowrap="nowrap" align="right"><strong>Colour:</strong></td>
                  <td bgcolor="#CCFFCC"><input name="O_Colour" type="text" value="<?php echo $row_Advert['O_Colour']; ?>" size="30" maxlength="15" /></td>
                  <td bgcolor="#CCFFFF"><input name="W_Colour" type="text" value="<?php echo $row_Advert['W_Colour']; ?>" size="30" maxlength="15" /></td>
                </tr>
                <tr valign="baseline">
                  <td nowrap="nowrap" align="right"><strong>Body:</strong></td>
                  <td bgcolor="#CCFFCC"><input name="O_Body" type="text" value="<?php echo $row_Advert['O_Body']; ?>" size="30" maxlength="15" /></td>
                  <td bgcolor="#CCFFFF"><input name="W_Body" type="text" value="<?php echo $row_Advert['W_Body']; ?>" size="30" maxlength="15" /></td>
                </tr>
                <tr valign="baseline">
                  <td nowrap="nowrap" align="right"><strong>Neck:</strong></td>
                  <td bgcolor="#CCFFCC"><input name="O_Neck" type="text" value="<?php echo $row_Advert['O_Neck']; ?>" size="30" maxlength="15" /></td>
                  <td bgcolor="#CCFFFF"><input name="W_Neck" type="text" value="<?php echo $row_Advert['W_Neck']; ?>" size="30" maxlength="15" /></td>
                </tr>
                <tr valign="baseline">
                  <td nowrap="nowrap" align="right"><strong>Fingerboard:</strong></td>
                  <td bgcolor="#CCFFCC"><input name="O_Fingerboard" type="text" value="<?php echo $row_Advert['O_Fingerboard']; ?>" size="30" maxlength="15" /></td>
                  <td bgcolor="#CCFFFF"><input name="W_Fingerboard" type="text" value="<?php echo $row_Advert['W_Fingerboard']; ?>" size="30" maxlength="15" /></td>
                </tr>
                <tr valign="baseline">
                  <td nowrap="nowrap" align="right"><strong>Pickups:</strong></td>
                  <td bgcolor="#CCFFCC"><input name="O_Pickups" type="text" value="<?php echo $row_Advert['O_Pickups']; ?>" size="30" maxlength="15" /></td>
                  <td bgcolor="#CCFFFF"><input name="W_Pickups" type="text" value="<?php echo $row_Advert['W_Pickups']; ?>" size="30" maxlength="15" /></td>
                </tr>
                <tr valign="baseline">
                  <td nowrap="nowrap" align="right"><strong>Condition:</strong></td>
                  <td bgcolor="#CCFFCC"><label for="condition">
                    <select name="condition" size="1" id="condition">
                      <option selected="selected" value="" <?php if (!(strcmp("", $row_Advert['condition']))) {echo "selected=\"selected\"";} ?>>---select---</option>
                      <option value="immaculate" <?php if (!(strcmp("immaculate", $row_Advert['condition']))) {echo "selected=\"selected\"";} ?>>immaculate</option>
                      <option value="excellent" <?php if (!(strcmp("excellent", $row_Advert['condition']))) {echo "selected=\"selected\"";} ?>>excellent</option>
                      <option value="good" <?php if (!(strcmp("good", $row_Advert['condition']))) {echo "selected=\"selected\"";} ?>>good</option>
                      <option value="well used" <?php if (!(strcmp("well used", $row_Advert['condition']))) {echo "selected=\"selected\"";} ?>>well used</option>
                      <option value="poor" <?php if (!(strcmp("poor", $row_Advert['condition']))) {echo "selected=\"selected\"";} ?>>poor</option>
                  </select>
                  </label></td>
                  <td bgcolor="#FFFFFF"> </td>
                </tr>
                <tr valign="baseline">
                  <td nowrap="nowrap" align="right"><strong>Value:</strong></td>
                  <td bgcolor="#CCFFCC"><span id="sprytextfield3">
                  <input name="value" type="text" value="<?php echo $row_Advert['value']; ?>" size="11" maxlength="11" />
    <span class="textfieldInvalidFormatMsg">Invalid format.</span></span></td>
                  <td bgcolor="#FFFFFF"> </td>
                </tr>
                <tr valign="baseline">
                  <td align="right" valign="top" nowrap="nowrap"><strong>Comments:</strong></td>
                  <td bgcolor="#CCFFCC"><textarea name="Comments" cols="25" rows="3"><?php echo $row_Advert['Comments']; ?></textarea></td>
                  <td bgcolor="#FFFFFF"> </td>
                </tr>
                <tr valign="baseline">
                  <td nowrap="nowrap" align="right"><strong>Picture location</strong></td>
                  <td bgcolor="#CCFFCC"><label for="checkopentoalloffers"></label>                <input type="file" name="PictureLocation" value="<?php echo $row_Advert['PictureLocation']; ?>" size="20" /></td>
                  <td bgcolor="#FFFFFF"> </td>
                </tr>
                <tr valign="baseline">
                  <td height="26" align="right" nowrap="nowrap"><strong>Open to all offers:</strong></td>
                  <td bgcolor="#CCFFCC"><input name="checkopentoalloffers" type="checkbox" id="checkopentoalloffers" value="y" <?php if (!(strcmp($row_Advert['opentoalloffers'],"y"))) {echo "checked=\"checked\"";} ?> /></td>
                  <td bgcolor="#FFFFFF"> </td>
                </tr>
              </table>
              <p> </p>
              <div id="submitdiv">
                <input type="hidden" name="MM_update" value="form4" />
                <input name="submit button" type="submit" id="submit button" value="Update Advert" />
              </div>
              <div id="exitdiv">
                <label for="button15"></label>
                <input name="button" type="button" id="button15" onclick="MM_goToURL('parent','Member2.php');return document.MM_returnValue" value="Exit" />
                <label for="button16"></label>
              </div>
              <p> </p>
            </form>
          </fieldset>
          <script type="text/javascript">
    var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "integer", {validateOn:["blur"], minValue:1900, maxValue:2010, isRequired:false});
    var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "integer", {validateOn:["blur"], minValue:1900, maxValue:2010});
    var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2", "integer", {minValue:1900, maxValue:2010, validateOn:["blur"], isRequired:false});
    var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3", "currency", {validateOn:["blur"], isRequired:false});
          </script>
          <br class="clearfloat" />
      <!-- end #container -->
    </div></div></div>
    <script type="text/javascript">
    <!--
    var  = new Spry.Widget.MenuBar("", {imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
    var MenuBar2 = new Spry.Widget.MenuBar("MenuBar2", {imgDown:"../SpryAssets/SpryMenuBarDownHover.gif", imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"});
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
    //-->
    </script>
    </body>
    </html>
    <?php
    mysql_free_result($Advert);
    if (is_resource($Result1)) mysql_free_result($Result1);
    ?>

    Please note,
    Removing I investigated spry a little more, in the end I settled for removing spry altogether,
    Maybe it was because the text field in a $GET (for the default) AND a $PUT (for the update)

  • Dynamic Header(TOP-OF-PAGE) In HIERSEQ ALV

    Hi Experts,
    My Requirment is to develop a customer ledger in which the top of page is the detailed customer address follwed by list doc no...
    please suggest me how to get the Dynamic top-of page in HIERSEQ ALV ...
    Thanks in advance,
    With regards,
    Prakash

    Hi Prakash,
    Try this way.
    <font color=blue><b><pre>REPORT ZTEST_NOTEPAD.
    DATA: BEGIN OF IT_EKKO OCCURS 0,
             EBELN TYPE EKKO-EBELN,
             BUKRS TYPE EKKO-BUKRS,
             BSTYP TYPE EKKO-BSTYP,
             BSART TYPE EKKO-BSART,
           END OF IT_EKKO.
    DATA: BEGIN OF IT_EKPO OCCURS 0,
             EBELN TYPE EKPO-EBELN,
             EBELP TYPE EKPO-EBELP,
             LOEKZ TYPE EKPO-LOEKZ,
             TXZ01 TYPE EKPO-TXZ01,
             MATNR TYPE EKPO-MATNR,
           END OF IT_EKPO.
    TYPE-POOLS : SLIS.
    DATA : IT_EVENTS   TYPE SLIS_T_EVENT,
            WA_EVENTS   TYPE SLIS_ALV_EVENT,
            IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
            WA_FIELDCAT LIKE LINE OF IT_FIELDCAT,
            LIST_LAYOUT TYPE SLIS_LAYOUT_ALV,
            GS_KEYINFO  TYPE SLIS_KEYINFO_ALV.
    DATA:PROGRAM TYPE SY-REPID.
    START-OF-SELECTION.
       PROGRAM = SY-REPID.
       SELECT * FROM EKKO INTO CORRESPONDING FIELDS OF TABLE IT_EKKO UP TO 100 ROWS.
       IF NOT IT_EKKO[] IS INITIAL.
         SELECT * INTO CORRESPONDING FIELDS OF TABLE IT_EKPO FROM EKPO FOR ALL ENTRIES IN IT_EKKO
               WHERE EBELN = IT_EKKO-EBELN.
       ENDIF.
       WA_EVENTS-NAME = 'TOP_OF_PAGE'.
       WA_EVENTS-FORM = 'TOP_OF_PAGE'.
       APPEND WA_EVENTS TO IT_EVENTS.
       GS_KEYINFO-HEADER01 = 'EBELN'.
       GS_KEYINFO-ITEM01   = 'EBELN'.
       DEFINE FIELDCATALOG.
         WA_FIELDCAT-COL_POS   = &1.
         WA_FIELDCAT-FIELDNAME = &2.
         WA_FIELDCAT-TABNAME   = &3.
         WA_FIELDCAT-SELTEXT_M = &4.
         APPEND WA_FIELDCAT TO IT_FIELDCAT.
         CLEAR  WA_FIELDCAT.
       END-OF-DEFINITION.
       FIELDCATALOG: '1' 'EBELN' 'IT_EKKO' 'EKKO-EBELN',
                     '2' 'BUKRS' 'IT_EKKO' 'EKKO-BUKRS',
                     '3' 'BSTYP' 'IT_EKKO' 'EKKO-BSTYP',
                     '4' 'BSART' 'IT_EKKO' 'EKKO-BSART'.
       FIELDCATALOG:  '1' 'EBELN' 'IT_EKPO' 'EKPO-EBELN',
                     '2' 'EBELP' 'IT_EKPO' 'EKPO-EBELP',
                     '3' 'LOEKZ' 'IT_EKPO' 'EKPO-LOEKZ',
                     '4' 'TXZ01' 'IT_EKPO' 'EKPO-TXZ01',
                     '5' 'MATNR' 'IT_EKPO' 'EKPO-MATNR'.
       CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
         EXPORTING
           I_CALLBACK_PROGRAM = PROGRAM
           IT_FIELDCAT        = IT_FIELDCAT
           I_TABNAME_HEADER   = 'IT_EKKO'
           I_TABNAME_ITEM     = 'IT_EKPO'
           IT_EVENTS          = IT_EVENTS
           IS_KEYINFO         = GS_KEYINFO
         TABLES
           T_OUTTAB_HEADER    = IT_EKKO
           T_OUTTAB_ITEM      = IT_EKPO.
    *&      Form  TOP-OF-page
    FORM TOP_OF_PAGE.
       WRITE: SY-TITLE,
             / SY-REPID.
       WRITE: SY-DATUM, SY-UZEIT.
       WRITE sy-uline.
    ENDFORM.                    "TOP-OF-page</pre></b></font>
    Thanks
    Venkat.O

  • Problems with the new Pages.

    Hi everyone.
    I wonder if i am the only one experiencing a little problem with the new Pages?
    My problem is that every other time i want to correct the font lets say trying to underline or make the font fatter using the hotkeys "Command+B" or "Command+U" or "Command+I", or even changing it manually in "formats" my font gets stuck, and i have to copy-paste text from another pages-file into my old one to get et back to normal.
    Anyone else tried this?
    Martin.

    VladRO wrote:
    These are the problems that I am encountering for the moment! If there will come up some new once, I will write them here!
    Instead of starting a new list, go to
    https://discussions.apple.com/thread/5468056?tstart=0

  • Problem with Frameset and page session

    All,
    I am having a problem with Framesets and page session attributes. I
    have a client who's application uses a three frame frameset. They
    have a requirement on several pages that when a button is pushed two
    different pages load into the right and left frames. The way they
    are accomplishing this is that on the pages were this is required,
    they are adding target="_top" to the form declaration in their JSP.
    Then they store the page names they want to display in session,
    forward the request to the frameset, the frameset then determines
    which pages to display based on the session variables. This works
    exactly how they want it to.
    Here is our problem. We need to store some information in page
    session attributes. We have tried to get a handle to the desired
    view bean and call the setPageSessionAttribute method. However,
    since we are forwarding to the frame and the frame handles displaying
    the desired JSP, that view bean we had the handle to is not the one
    that is created to hand the display of the JSP.
    The next thing I tried was to use the request object. In the
    handleBtnRequest method, I set an attribute in the request object. I
    then query the request object in the beginDisplay event of the view
    bean. When the frame is reset the request object does not contain
    the attribute that I have set. I'm confused by this because I
    thought the request object would be available to me throughout the
    life of the request.
    Given the above information, does anyone have any suggestions? Also,
    am I going about this in the wrong manner.
    The client had been storing this information in user session, which
    seemed to work. However, since the data being stored dealt
    specifically with data for the requested page, we felt that storing
    it as page session was more appropriate.
    Thanks,

    The script on your page web page has some obvious bugs.. Best
    fix those
    first before looking to blame Flash.
    Jeckyl

  • Problem with display of pages in IE

    I'll keep this short and simple, I'm not after criticism of my work but if it is a mess then I understand, I've re-coded a website designed by a friend who has joined the army & is currently serving so I cannot get in touch with him for help, I'm a novice website designer but I'm stumped as to why my pages are behaving the way they are
    I've made a website for a friend's pub and it all looked brilliant in DreamWeaver CS5's Design View so I went ahead and used ftp program FileZilla to send it live on my domain and basically it shifted my pictures and it displays differently in IE to what it does in Chrome e.g. My "Find Us" page has a large white bar at the bottom in IE which shouldn't be there and I can't get rid of it, but it doesn't show in chrome?
    Any help or code I may be able to implement would be greatly appreciated, thanks Freecey.
    Edit: Forgot to add the link to my site - www.thelightdragoon.co.uk
    Also I am aware of the problems with the Home Page & the Menu Page but I am yet to attempt to fix those yet.

    You still have a problem on that page.
    <head>
    <meta name="generator" content="HTML Tidy for Linux (vers 25 March 2009), see www.w3.org" /><object type="{0C55C096-0F1D-4F28-AAA2-85EF591126E7}" id="cosymantecbfw" class="c1"></object>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    Note that you STILL have an <object> tag within the head region.  That's invalid.
    Also, you are using absolute positioning to place elements within your header region - that's definitely suboptimal and unnecessary since it precludes centering the page in various width viewports.  However, if you make the following changes you can muddle by -
    1.  Change the CSS for #outerShadow to set the left/right margins to "auto".  Make it position:relative.
    2.  Change the left values for the absolutely positioned elements to whatever you need for them to be correctly located within #outerShadow.
    3.  Twiddle the remaining out of place element margins to locate them correctly within #outerShadow.
    That should do it.  But the real way to build this page is without using absolute positioning at all.  It's not necessary and will always make your maintenance more complicated as long as you have it.

  • Does anyone else how problems with numbers or pages spinning ball of death when saving

      Does anyone else have problems with Numbers or Pages when saving
    I have the spinning ball of death sitting there for a very long time..
    I am on a core i5 2.8ghz imac 27in with osx 10.7.5
    I have 12 gig of ram and it flies for eveything else but both numbers and pages have the problem when I go to quit..
    help please

    "We absolutely have to work off of a server so I can't get around that."
    Somebody has forced you to suffer the consequences.
    I've worked for companies like that and you have my condolences.

  • Please help us, we have a problem with loading a page is slow we have to wait a longer time to open our one page, thanks in advance

    Please help us, we have a problem with loading a page is slow we have to wait a longer time to open our one page, thanks in advance

    You can try these steps in case of issues with web pages:
    You can reload web page(s) and bypass the cache to refresh possibly outdated or corrupted files.
    *Hold down the Shift key and left-click the Reload button
    *Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
    *Press "Command + Shift + R" (Mac)
    Clear the cache and cookies only from websites that cause problems.
    "Clear the Cache":
    *Firefox/Tools > Options > Advanced > Network > Cached Web Content: "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Firefox/Tools > Options > Privacy > "Use custom settings for history" > Cookies: "Show Cookies"
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem.
    *Switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance
    *Do NOT click the Reset button on the Safe Mode start window
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • ALV output download to excel with top of page

    Hi,
    i want to download ALV grid output to excel sheet including the top of page. i am using the icon in application tool bar. but only data's are download to excel sheet. i cannot download the top of page. with out write coding in program can we download it. if yes pls explain.
    thanks.

    I'm sorry but I can't find FM with DOWNLOAD_EXCEL_*.
    I want to know more detail thing.
    plz. give answer to me anytime.
    I'm waiting..
    Edited by: Kwang Seop Kim on Sep 26, 2008 6:57 AM

  • Reg: Download alv grid data with top of page into excel sheet

    Hi All,
    I have a selection screen with radio button for download .
    If that radio button was selected then the data will download into excel sheet (like if we execute normal ALV grid display from there we can download top-of-page and body as it is).
    AOO : 2009P               
    Fiscal year : 2009               
    Posting period : 00               
    Local Currency : USD               
    CO Area Currency :               
    Accounting standard:               
    Sector : 23               
    BB code     Period Value LC     Periodic Quantity
    AHDKGKAJ   200                         0

    Did not get your question

  • Issue with top of page event

    Hi All,
         In my Report i am printing both interactive and alv grid display in same report.means i have one check box it is then report print as a alv format otherwise classical format.
        But here i have small problem  i am trying  print in alv format its automatically trigger the top of page event thatsway a blank screen is generated so please tell how to skip the Top of page event.
    Regards,
    Venkatesh

    END-OF-SELECTION.
      SORT tab1 BY ebeln ebelp.
      DESCRIBE TABLE tab1 LINES tabln.
      IF tabln = 0.
        MESSAGE ID 'ME' TYPE 'I' NUMBER '260'.
        EXIT.
      ENDIF.
      SORT tab1 BY sortkey knttp ebeln ebelp.
    if P_ALV = 'X'.
      LOOP AT tab1.
        IF tab1-knttp = '1'.
              gs_final-str = text-k01.
              gs_final-kont1 = tab1-kont1.
              gs_final-kont2 = tab1-kont2.
          ELSEIF tab1-knttp = '2'.
              gs_final-str = text-k02.
              gs_final-kont1 = tab1-kont1.
              gs_final-kont2 = tab1-kont2.
          ELSEIF tab1-knttp = '3'.
           gs_final-str = text-k03.
              gs_final-kont1 = tab1-kont1.
              gs_final-kont2 = tab1-kont2.
          ELSEIF tab1-knttp = '4'.
              gs_final-str = text-k04.
              gs_final-kont1 = tab1-kont1.
              gs_final-kont2 = tab1-kont2.
          ELSEIF tab1-knttp = '5'.
              gs_final-str = text-k05.
              gs_final-kont1 = tab1-kont1.
              gs_final-kont2 = tab1-kont2.
          ELSEIF tab1-knttp = '6'.
              gs_final-str = text-k04.
              gs_final-kont1 = tab1-kont1.
          ELSEIF tab1-knttp IS INITIAL.
            gs_final-str = 'Stock without Account Assignment'.
          ENDIF.
           gs_final-ebeln = tab1-ebeln.
           gs_final-lifnr = tab1-lifnr.
           gs_final-name1 = tab1-name1.
           gs_final-aedat = tab1-aedat.
           gs_final-udate = tab1-udate.
           gs_final-inco1 = tab1-inco1.
           gs_final-inco2 = tab1-inco2.
           gs_final-ebelp = tab1-ebelp.
           gs_final-matnr = tab1-matnr.
           gs_final-txz01 = tab1-txz01.
           gs_final-paedt = tab1-paedt.
           gs_final-eindt = tab1-eindt.
           gs_final-eindt1 = tab1-eindt1.
           gs_final-labnr = tab1-labnr.                  "NWC-29042005
           gs_final-budat = tab1-budat.
           gs_final-menge = tab1-menge.
           gs_final-wemng = tab1-wemng.
           gs_final-meins = tab1-meins.
           gs_final-vbeln = tab1-vbeln.
           gs_final-tddat = tab1-tddat.
         IF NOT tab1-vbeln IS INITIAL.
          FORMAT COLOR 4 INTENSIFIED OFF.
          WRITE:/3 wa_tab1-vbeln.
          READ TABLE lines INDEX 1.
          MOVE lines-tdline TO l_text.
          CLEAR lines.
          READ TABLE lines INDEX 2.
          CONCATENATE l_text lines-tdline INTO l_text SEPARATED BY ' '.
          FORMAT COLOR 5 INTENSIFIED OFF.
          gs_final-l_text = l_text.
          SKIP.                                  "NWC-16092003
        ENDAT.
        APPEND gs_final to gt_final.
      ENDLOOP.
      PERFORM maintain_fieldcatlog.
      PERFORM Display_data.
    ELSE.
      LOOP AT tab1.
        MOVE tab1 TO wa_tab1.
        AT NEW kont1.
          RESERVE 5 LINES.
          FORMAT COLOR 3 INTENSIFIED.
          IF tab1-knttp = '1'.
            WRITE:/(20) text-k01, 20 ':  ', 22(30) tab1-kont1 NO-ZERO,
                                            60(74) tab1-kont2.
          ELSEIF tab1-knttp = '2'.
            WRITE:/(20) text-k02, 20 ':  ', 22(30) tab1-kont1 NO-ZERO,
                                            60(74) tab1-kont2.
          ELSEIF tab1-knttp = '3'.
            WRITE:/(20) text-k03, 20 ':  ', 22(30) tab1-kont1 NO-ZERO,
                                            60(74) tab1-kont2.
          ELSEIF tab1-knttp = '4'.
            WRITE:/(20) text-k04, 20 ':  ', 22(30) tab1-kont1 NO-ZERO,
                                            60(74) tab1-kont2.
          ELSEIF tab1-knttp = '5'.
            WRITE:/(20) text-k05, 20 ':  ', 22(30) tab1-kont1 NO-ZERO,
                                            60(74) tab1-kont2.
          ELSEIF tab1-knttp = '6'.
            WRITE:/(20) text-k04, 20 ':  ', 22(30) wa_tab1-kont1 NO-ZERO,
                    60  text-k02, 75 ':  ', 77(57) wa_tab1-kont2 NO-ZERO.
          ELSEIF tab1-knttp IS INITIAL.
            WRITE:/ 'Stock without Account Assignment'.
          ENDIF.
          WRITE 170 ' '.
          FORMAT COLOR INTENSIFIED OFF.
        ENDAT.
        AT NEW ebeln.
          RESERVE 4 LINES.
          FORMAT COLOR 1 INTENSIFIED OFF.
          WRITE:/ wa_tab1-ebeln,
                11 '  ',
                13 wa_tab1-lifnr,
                23 wa_tab1-name1,
                60 wa_tab1-aedat NO-ZERO,
                73 wa_tab1-udate NO-ZERO,
                86 wa_tab1-inco1,
                91(37) wa_tab1-inco2,
               170 ' '.
        ENDAT.
        AT NEW ebelp.
          RESERVE 3 LINES.
          FORMAT COLOR 2 INTENSIFIED OFF.
          WRITE:/2 wa_tab1-ebelp,
                 9 wa_tab1-matnr,
                30(40) wa_tab1-txz01,
                73(10) wa_tab1-paedt,
                84(10) wa_tab1-eindt,
                95(10) wa_tab1-eindt1 NO-ZERO,
                106(15) wa_tab1-labnr,                  "NWC-29042005
                122(10) wa_tab1-budat NO-ZERO,
                133(16) wa_tab1-menge NO-ZERO,
                150(16) wa_tab1-wemng NO-ZERO,
                167(3)  wa_tab1-meins,
                170 ' '.
        ENDAT.
        HIDE: tab1-ebeln, tab1-ebelp.
        I
          READ TABLE lines INDEX 1.
          MOVE lines-tdline TO l_text.
          CLEAR lines.
          READ TABLE lines INDEX 2.
          CONCATENATE l_text lines-tdline INTO l_text SEPARATED BY ' '.
          FORMAT COLOR 5 INTENSIFIED OFF.
          WRITE: /3(132) l_text,
                  170 ' '.
          SKIP.                                  "NWC-16092003
        ENDAT.
      ENDLOOP.
    ENDIF.
    AT LINE-SELECTION.
      CHECK NOT tab1-ebeln IS INITIAL.
      SET PARAMETER ID 'BES' FIELD tab1-ebeln.
      CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
      CLEAR tab1.
    TOP-OF-PAGE.
    if P_ALV ne 'X'.
      IF sy-pagno = 1.
        DETAIL.
        WRITE: /2 text-a01.
        RESERVE 1 LINES.
        SUMMARY.
        IF lifnr IS INITIAL.
          WRITE: /4 text-a02, 26 'All'.
        ELSE.
          LOOP AT lifnr WHERE sign = 'I'.
            IF lifnr-option = 'EQ'.
              WRITE : /4 text-a02, 26 lifnr-low.
            ELSE.
              WRITE: /4 text-a02, 26 'From', 32 lifnr-low,
                                   44 'to', 48 lifnr-high.
            ENDIF.
          ENDLOOP.
        ENDIF.
        IF matnr IS INITIAL.
          WRITE: /4 text-a14, 26 'All'.
        ELSE.
          LOOP AT matnr WHERE sign = 'I'.
            IF matnr-option = 'EQ'.
              WRITE : /4 text-a14, 26 matnr-low.
            ELSE.
              WRITE: /4 text-a14, 26 'From', 32 matnr-low,
                                   44 'to', 48 matnr-high.
            ENDIF.
          ENDLOOP.
        ENDIF.
        IF ebeln IS INITIAL.
          WRITE: /4 text-a03, 26 'All'.
        ELSE.
          LOOP AT ebeln WHERE sign = 'I'.
            IF ebeln-option = 'EQ'.
              WRITE : /4 text-a03, 26 ebeln-low.
            ELSE.
              WRITE: /4 text-a03, 26 'From', 32 ebeln-low,
                                   44 'to', 48 ebeln-high.
            ENDIF.
          ENDLOOP.
        ENDIF.
        IF aedat IS INITIAL.
          WRITE: /4 text-a04, 26 'All'.
        ELSE.
          LOOP AT aedat WHERE sign = 'I'.
            IF aedat-option = 'EQ'.
              WRITE : /4 text-a04, 26 aedat-low.
            ELSE.
              WRITE: /4 text-a04, 26 'From', 32 aedat-low,
                                   44 'to', 48 aedat-high.
            ENDIF.
          ENDLOOP.
        ENDIF.
        IF eindt IS INITIAL.
          WRITE: /4 text-a13, 26 'All'.
        ELSE.
          LOOP AT eindt WHERE sign = 'I'.
            IF eindt-option = 'EQ'.
              WRITE : /4 text-a13, 26 eindt-low.
            ELSE.
              WRITE: /4 text-a13, 26 'From', 32 eindt-low,
                                   44 'to', 48 eindt-high.
            ENDIF.
          ENDLOOP.
        ENDIF.
        IF bednr IS INITIAL.
          WRITE: /4 text-a15, 26 'All'.
        ELSE.
          LOOP AT bednr WHERE sign = 'I'.
            IF bednr-option = 'EQ'.
              WRITE : /4 text-a15, 26 bednr-low.
            ELSE.
              WRITE: /4 text-a15, 26 'From', 32 bednr-low,
                                   44 'to', 48 bednr-high.
            ENDIF.
          ENDLOOP.
        ENDIF.
        linno = sy-linno + 1.
        BACK.
        IF ekorg IS INITIAL.
          WRITE: /70 text-a11, 92 'All'.
        ELSE.
          LOOP AT ekorg WHERE sign = 'I'.
            IF ekorg-option = 'EQ'.
              WRITE : /70 text-a11, 92 ekorg-low.
            ELSE.
              WRITE: /70 text-a11, 92 'From', 98 ekorg-low,
                                   104 'to', 108 ekorg-high.
            ENDIF.
          ENDLOOP.
        ENDIF.
        IF ekgrp IS INITIAL.
          WRITE: /70 text-a12, 92 'All'.
        ELSE.
          LOOP AT ekgrp WHERE sign = 'I'.
            IF ekgrp-option = 'EQ'.
              WRITE : /70 text-a12, 92 ekgrp-low.
            ELSE.
              WRITE: /70 text-a12, 92 'From', 98 ekgrp-low,
                                   104 'to', 108 ekgrp-high.
            ENDIF.
          ENDLOOP.
        ENDIF.
        IF werks IS INITIAL.
          WRITE: /70 text-a05, 92 'All'.
        ELSE.
          LOOP AT werks WHERE sign = 'I'.
            IF werks-option = 'EQ'.
              WRITE : /70 text-a05, 92 werks-low.
            ELSE.
              WRITE: /70 text-a05, 92 'From', 98 werks-low,
                                   104 'to', 108 werks-high.
            ENDIF.
          ENDLOOP.
        ENDIF.
        IF pspid IS INITIAL.
          WRITE: /70 text-a06, 92 'All'.
        ELSE.
          LOOP AT pspid WHERE sign = 'I'.
            WRITE:/70 text-a06, 92 pspid-low.
          ENDLOOP.
        ENDIF.
        IF pspnr1 IS INITIAL.
          WRITE: /70 text-a07, 92 'All'.
        ELSE.
          LOOP AT pspnr1 WHERE sign = 'I'.
            WRITE:/70 text-a07, 92 pspnr1-low.
          ENDLOOP.
        ENDIF.
        IF elikz EQ 'X'.
          WRITE: /70 text-a08, 92 'Open PO only'.
        ELSEIF elikz IS INITIAL.
          WRITE: /70 text-a08, 92 'All PO'.
        ENDIF.
        IF stock EQ 'X'.
          WRITE: ', Common Stock Items'.
        ELSEIF pspnr IS INITIAL.
          WRITE: ', All Stock'.
        ENDIF.
        IF sy-linno >= linno.
          linno = sy-linno + 1.
        ENDIF.
        SKIP TO LINE linno.
        ULINE.
    ENDIF.
      FORMAT COLOR 1 INTENSIFIED OFF.
      WRITE:/ 'PO',
            12 'Vendor no.',
            25 'Company',
            60 'PO Crt dt',
            73 'Approved dt',
            86 'Incoterm',
           170 ' '.
      FORMAT COLOR 2 INTENSIFIED OFF.
      WRITE:/2 'Item',
             9 'Material',
            30 'Description',
            73 'Chged date',
            84 'Delv date',
            95 'OA date',
           106 'OA Number',                              "NWC-29042005
           122 'GR date',
           138 'Order Qty',
           158 'GR Qty',
           167 'UoM',
           170 ' '.
      FORMAT COLOR 4 INTENSIFIED OFF.
      WRITE:/2 'Ship notf #',
             15 'ETD.',
             26 'ETA',
             44 'Shipped Qty',
             57 'UoM',
            170 ' '.
      FORMAT COLOR 5 INTENSIFIED OFF.
      WRITE:/2 'Remarks',
           170 ' '.
      ULINE.
    ENDIF.
    form MAINTAIN_FIELDCATLOG .
    REFRESH gt_fieldcat.
    CLEAR gs_fieldcat.
    PERFORM fill_fieldcatlog USING:
            '01' '01' 'STR' 'GT_FINAL' 'Account Assignment',
            '01' '02' 'KONT1' 'GT_FINAL' 'Kont1',
            '01' '03' 'KONT2' 'GT_FINAL' 'Kont2',
            '01' '04' 'EBELN' 'GT_FINAL' 'PO',
            '01' '05' 'LIFNR' 'GT_FINAL' 'Vendor no',
            '01' '06' 'NAME1' 'GT_FINAL' 'Company',
            '01' '07' 'AEDAT' 'GT_FINAL' 'PO Crt dt',
            '01' '08' 'UDATE' 'GT_FINAL' 'Approved dt' ,
            '01' '09' 'INCO1' 'GT_FINAL' 'Incoterm Code',
            '01' '10' 'INCO2' 'GT_FINAL' 'Incoterm Text',
            '01' '11' 'EBELP' 'GT_FINAL' 'Item',
            '01' '12' 'MATNR' 'GT_FINAL' 'Material',
            '01' '13' 'TXZ01' 'GT_FINAL' 'Description',
            '01' '14' 'PAEDT' 'GT_FINAL' 'Chged date',
            '01' '15' 'EINDT' 'GT_FINAL' 'Delv date',
            '01' '16' 'EINDT1' 'GT_FINAL' 'OA date',
            '01' '17' 'LABNR' 'GT_FINAL' 'OA Number',
            '01' '18' 'BUDAT' 'GT_FINAL' 'GR date',
            '01' '19' 'MENGE' 'GT_FINAL' 'Order Qty',
            '01' '20' 'WEMNG' 'GT_FINAL' 'GR Qty',
            '01' '21' 'MEINS' 'GT_FINAL' 'UoM',
            '01' '22' 'VBELN' 'GT_FINAL' 'Ship notf #',
            '01' '23' 'TDDAT' 'GT_FINAL' 'ETD',
            '01' '24' 'LFDAT' 'GT_FINAL' 'ETA',
            '01' '25' 'LFIMG' 'GT_FINAL' 'Shipped Qty',
            '01' '26' 'VRKME' 'GT_FINAL' 'UoM',
            '01' '27' 'L_TEXT' 'GT_FINAL' 'Remarks'.
    endform.                    " MAINTAIN_FIELDCATLOG
    form FILL_FIELDCATLOG  using   lv_rowpos    TYPE sycurow
                                   lv_colpos    TYPE sycucol
                                   lv_fldnam    TYPE fieldname
                                   lv_tabnam    TYPE tabname
                                   lv_seltext   TYPE dd03p-scrtext_l.
      gs_fieldcat-row_pos   = lv_rowpos.
      gs_fieldcat-col_pos   = lv_colpos.
      gs_fieldcat-fieldname = lv_fldnam.
      gs_fieldcat-tabname   = lv_tabnam.
      gs_fieldcat-seltext_l = lv_seltext.
      APPEND gs_fieldcat TO gt_fieldcat.
      CLEAR gs_fieldcat.
    endform.                    " FILL_FIELDCATLOG
    form DISPLAY_DATA .
    DATA : lv_repid TYPE syrepid.
      lv_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         i_callback_program                = lv_repid
         it_fieldcat                       = gt_fieldcat
        TABLES
         t_outtab                          = gt_final
       EXCEPTIONS
         program_error                     = 1
         OTHERS                            = 2.
      IF sy-subrc <> 0.                              "#EC NEEDED
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    endform.                    " DISPLAY_DATA

  • Problem with Digital Editions page view

    I used Digital Editions on two books just recently and was able to fit each page of the ebook to it's full height from top to bottom.
    I just downloaded my third book to DE, and I can't seem to find the button to fit each page to their full heights (top/bottom). Instead, it's stuck on dual-page view. The single-page view button option isn't even there on the third book, but IS there on the first two books. I downloaded a fourth book and it's experiencing the same problem; stuck in dual-page view with no single-page option.
    If I try to re-size the DE window to force it into a single page view, the page numbers are all messed up appearing at random spots of each page rather than at the top right where they are suppose to be.
    I re-installed DE but the problem still persists. Is this a problem with the books in specific? Or something else?
    Thanks

    http://visguy.com/vgforum/index.php?topic=5849.15
    Paul Herber, Sandrila Ltd. Engineering and software shapes for Visio
    Sandrila Ltd

Maybe you are looking for

  • Making a net in Indesign?

    Is it possible to make a product net in Indesign CS5? What would be the best way to create this template? I have to design an accurate box cover with images and text on, and all the tabs ect. The only way I can think of is by making all the different

  • Sync problems with 6021

    I am having problems with moving the contacts on my 6021 to MSOutlook. I am on Windows XP, service pack 1 I have PC Suite that came with the phone 6.5 12 I am using infra red connection. I recently upgraded from a Nokia 6230i to a 6021. The contacts

  • [UNSOLVED] qt4-gnome-globalmenu-git

    I am trying to compile a plugin that should make gnome-globalmenu work with qt apps. It should be fairly simple, the source tree only holds 3 files. I am however, sadly so incompetent that I can't work out what to do with my own improvised PKGBUILD t

  • Just a little positive feedback

    Hi all! I've sent this to Toshiba already but I could only ever find tech support submission which this doesn't really fit into. I don't know where else to post it and since I took the time to write it I figure I might as well put it here. If someone

  • Cl_bds_document_set= create_with_table docx and xlsx

    Hello, I use cl_bds_document_set=>create_with_table to put files from a server in the database but I can't add files of office 2007, other files a doc, jpg, pdf are no problem. The problem is that there is no mime type in table toadd of docx. What ca