Zero bleed at inside page on even and odd master pages

Hello guys!  Going directly to my question would be how to apply bleed option specifically on inside pages when working with individual master pages for master and facing pages on the main document. The thing is when I've set no bleed on inside on my Document Setup it has applied on my even and odd master pages (remembering I have individual master pages set on my document). I am not sure if I was clear enough but I keep it open for eventual comments and so on.  Thank you.

Ok Peter. Thank you! I am posting some screen shots to help understanding.

Similar Messages

  • Is there a way to apply a master page to even (or odd) pages in a long document?

    I'm taking a very simple, large pdf document and bringing it into InDesign to add some graphics. The pdf is actually a customized 2-page document for a large employee group (i.e. pages 1 and 2 are for employee001, pages 3 and 4 are for employee002, pages 5 and 6 are for employee003, etc.).
    I've found a script that allows me to bring in all the pages of the pdf at one time, provided I've set up the correct number of blank pages in InDesign. What I'm looking for now is a way to apply a master page to all even numbered pages at one time. Or all odd pages. Anyone have any ideas?
    Ideally, an option that would import the entire pdf document, add the appropriate number of pages to the InDesign document, and be able to assign different master pages to even and odd pages would rock! Help!

    for (var i=0;i<= PageLength-1;i++)
    var isEven = function(someNumber){
    return (someNumber%2 == 0) ? true : false;
    if(isEven(newDoc.pages.item(i).name) == true)
              //Apply Master B for right page
              newDoc.pages.item(i).appliedMaster = app.activeDocument.masterSpreads.item("B-Master");
    //Move elements by x, y position, script label ContactEmail
    newDoc.pages.item(i).pageItems.item("ContactEmail").move([0.7292, 6.011]);
    }else{
              //Apply Master A for left page
              newDoc.pages.item(i).appliedMaster = app.activeDocument.masterSpreads.item("A-Master");
    }//for Else
    }//For

  • Unable to set site master page and system master page separetly in SP 2013

    hi,
    How to set site master page and system master page separetly in SP 2013,even setting different master pages through code or UI.Always only  single custom master page is getting applied for both.
    Thanks &amp; Regards, Krishna

    Check below:
    http://msdn.microsoft.com/en-us/library/office/ee537530(v=office.14).aspx
    Normally on Masterpage setting of publising site the second option is for Settings page and 1st option is for site.

  • I need page no's and top of page header to every page

    Hi Experts,
    i need page no's and top of page header to every page
    to this report.
    i took print outs it came only page number 1 to all the pages, after took prints it seems header to all the pages
    but not displaying in output screen.
    TYPE-POOLS: SLIS.
    TABLES: MKPF,LFA1,MSEG,EKET,T001L,MAKT,S031,S032,MARA,LIPS,LIKP,T001W.
    DATA  FLAG TYPE I.
    DATA : MENGE_RE LIKE MSEG-MENGE,
           MENGE_IS LIKE MSEG-MENGE,
           MENGE_O LIKE MSEG-MENGE,
           MENGE_BAL LIKE MSEG-MENGE.
    DATA  MAGBB LIKE S031-MAGBB.
    DATA  MZUBB LIKE S031-MZUBB.
    DATA  V_MONTH LIKE S031-SPMON.
    DATA  XBLNR LIKE MKPF-XBLNR.
    DATA : BEGIN OF ITAB1 OCCURS 100,
           MATNR LIKE MAKT-MATNR,
           END OF ITAB1.
    DATA : BEGIN OF ITAB2 OCCURS 100,
    MATNR LIKE MAKT-MATNR,
    WERKS LIKE MARD-WERKS,
    LGORT LIKE MARD-LGORT,
    BUSTW LIKE MSEG-BUSTW,
    BWART LIKE MSEG-BWART,
    SHKZG LIKE MSEG-SHKZG,
    MENGE LIKE MSEG-MENGE,
    END OF ITAB2.
    DATA: PAGNO(5) TYPE C.
    DATA : PAGENO LIKE SY-PAGNO.
    DATA: STR1 TYPE DATS,
          STR2(14) TYPE C,
          STR3(10) TYPE C.
    DATA : V_MONUM LIKE T015M-MONUM,
           V_MONAM LIKE T015M-MONAM.
    TYPES:  FARBE TYPE SLIS_T_SPECIALCOL_ALV.
    DATA  V_STOCK LIKE MSEG-MENGE.
    DATA  V_STOCK1 LIKE MSEG-MENGE.
    DATA: V_MONTH1 LIKE S031-SPMON.
    DATA: OSTOCK LIKE MSEG-MENGE.
    CONSTANTS:
    GC_FORMNAME_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE 'TOP_OF_PAGE'.
    DATA: GT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
          GT_LAYOUT   TYPE SLIS_LAYOUT_ALV,
          GS_KEYINFO  TYPE SLIS_KEYINFO_ALV,
          GT_SORT     TYPE SLIS_T_SORTINFO_ALV,
          GT_SP_GROUP TYPE SLIS_T_SP_GROUP_ALV,
          GT_EVENTS   TYPE SLIS_T_EVENT,
         G_PRINT     TYPE SLIS_PRINT_ALV.
    DATA:  LS_FIELDCAT TYPE SLIS_FIELDCAT_ALV OCCURS 0 WITH HEADER LINE.
    DATA: FC_HIER      TYPE SLIS_FIELDCAT_ALV OCCURS 0 WITH HEADER LINE.
    DATA: GT_LIST_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER.
    DATA: GT_REPID       LIKE SY-REPID.
    DATA: GT_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE 'TOP_OF_PAGE'.
    DATA: GT_TOP_OF_LIST TYPE SLIS_FORMNAME VALUE 'TOP_OF_LIST'.
    DATA: FLD(15).
    DATA: TXT(50).
    I N I T I A L I Z A T I O N
    GT_REPID = SY-REPID.
    PAGNO = SY-PAGNO.
    PERFORM EVENTTAB_BUILD USING GT_EVENTS[].
    A T  S E L E C T I O N  S C R E E N
    *AT SELECTION-SCREEN ON BUDAT.
    PERFORM VALIDATION.
    S T A R T O F S E L E C T I O N
    START-OF-SELECTION.
      PERFORM FIELDCAT_INIT USING GT_FIELDCAT[].
      PERFORM FETCH_DATA.
    E N D O F S E L E C T I O N
    END-OF-SELECTION.
      IF NOT ITAB2[] IS INITIAL.
        PERFORM COMMENT_BUILD USING GT_LIST_TOP_OF_PAGE[].
       CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
         EXPORTING
           I_CALLBACK_PROGRAM = GT_REPID
           IT_FIELDCAT        = GT_FIELDCAT[]
           IT_EVENTS          = GT_EVENTS[]
           IT_SORT            = GT_SORT[]
           IS_LAYOUT          = GT_LAYOUT
         TABLES
           T_OUTTAB           = ITAB2.
      ELSE.
        MESSAGE S006(Z1).
      ENDIF.
      CLEAR : GT_LAYOUT.
    Report Selections
      DATA: BEGIN OF IT_HEADER OCCURS 10,
      WERKS LIKE MSEG-WERKS,
      NAME1 LIKE T001W-NAME1,
      MAKTX LIKE MAKT-MAKTX,
      MATNR LIKE MSEG-MATNR,
      MENGE_O LIKE MSEG-MENGE,
      END OF IT_HEADER.
      DATA: BEGIN OF ITAB OCCURS 50,
            WERKS LIKE MSEG-WERKS,
            MATNR LIKE MSEG-MATNR,
            BWART LIKE MSEG-BWART,
            LGORT LIKE MSEG-LGORT,
            EBELN LIKE MSEG-EBELN,
            XBLNR LIKE MKPF-XBLNR,
            BUDAT LIKE MKPF-BUDAT,
            MBLNR LIKE MSEG-MBLNR,
            MENGE LIKE MSEG-MENGE,
            MAKTX LIKE MAKT-MAKTX,
            XAUTO LIKE MSEG-XAUTO,
            NAME1 LIKE T001W-NAME1,
            MENGE_O LIKE MSEG-MENGE,
            SHKZG LIKE MSEG-SHKZG,
            MENGE_IS LIKE MSEG-MENGE,
            MENGE_RE LIKE MSEG-MENGE,
      END OF ITAB.
      DATA: BEGIN OF INT_DATA OCCURS 50,
            WERKS LIKE MSEG-WERKS,
            MATNR LIKE MSEG-MATNR,
            BWART LIKE MSEG-BWART,
            XBLNR LIKE MKPF-XBLNR,
            MBLNR LIKE MSEG-MBLNR,
            BUDAT LIKE MKPF-BUDAT,
            MAKTX LIKE MAKT-MAKTX,
            MENGE_O LIKE MSEG-MENGE,
            MENGE_R LIKE MSEG-MENGE,
            MENGE_TO LIKE MSEG-MENGE,
            MENGE_TI LIKE MSEG-MENGE,
            MENGE_S LIKE MSEG-MENGE,
            MENGE_ST LIKE MSEG-MENGE,
            MENGE_AD LIKE MSEG-MENGE,
            MENGE_RT LIKE MSEG-MENGE,
            MENGE_C LIKE MSEG-MENGE,
            MENGE_CL LIKE MSEG-MENGE,
            MENGE_BAL LIKE MSEG-MENGE,
            MENGE_CR LIKE MSEG-MENGE,
            NAME1 LIKE T001W-NAME1,
            MENGE_RE LIKE MSEG-MENGE,
            MENGE_IS LIKE MSEG-MENGE,
            MENGE_BAL1 LIKE MSEG-MENGE,
            SHKZG LIKE MSEG-SHKZG,
             MENGE LIKE MSEG-MENGE,
            END OF INT_DATA.
      DATA: BEGIN OF INT_DATA1 OCCURS 50,
             WERKS LIKE MSEG-WERKS,
             MATNR LIKE MSEG-MATNR,
             BWART LIKE MSEG-BWART,
             MENGE_ST LIKE MSEG-MENGE,
             MENGE_O LIKE MSEG-MENGE,
             WAMNG LIKE EKET-WAMNG,
             WEMNG LIKE EKET-WEMNG,
             MENGE LIKE MSEG-MENGE,
             RETPO LIKE EKPO-RETPO,
             UMREN LIKE EKPO-UMREN,
             UMREZ LIKE EKPO-UMREZ,
             BSTMG LIKE EKPO-MENGE,
             XBLNR LIKE MKPF-XBLNR,
       END OF INT_DATA1.
      DATA: BEGIN OF INT_DATA2 OCCURS 50,
             WERKS LIKE MSEG-WERKS,
             LGORT LIKE S031-LGORT,
             MATNR LIKE MSEG-MATNR,
             BWART LIKE MSEG-BWART,
             MENGE_IS LIKE MSEG-MENGE,
             MBWBEST LIKE S032-MBWBEST,
             MAKTX LIKE MAKT-MAKTX,
       END OF INT_DATA2.
      DATA:V_GJAHR LIKE MKPF-BUDAT.
      DATA : FLAG6 TYPE C,
        PAGENO1 LIKE SY-PAGNO,
        PAGENO2 LIKE SY-PAGNO.
      SELECTION-SCREEN BEGIN OF BLOCK 0 WITH FRAME TITLE TEXT-064.
      SELECT-OPTIONS:
      MATNR FOR MSEG-MATNR,
      MATKL FOR MARA-MATKL OBLIGATORY,
      WERKS FOR MSEG-WERKS OBLIGATORY,
      LGORT FOR MSEG-LGORT,
    *CHARG FOR MSEG-CHARG,
      BWART FOR MSEG-BWART,
    *LIFNR FOR LFA1-LIFNR,
    *WADAT FOR LIKP-WADAT_IST,
      BUDAT FOR MKPF-BUDAT.
      SELECTION-SCREEN END OF BLOCK 0.
    *SELECTION-SCREEN SKIP 1.
    Parameters
    *SELECTION-SCREEN SKIP 1.
    Variante
    *SELECTION-SCREEN BEGIN OF BLOCK 0 WITH FRAME TITLE TEXT-064.
      DATA: P_VARI LIKE DISVARIANT-VARIANT.
    *SELECTION-SCREEN END OF BLOCK 0.
    Layout
      SELECTION-SCREEN BEGIN OF BLOCK A WITH FRAME TITLE TEXT-060.
      DATA:   P_ZEBRA VALUE 'X'.
      SELECTION-SCREEN END OF BLOCK A.
      SELECTION-SCREEN BEGIN OF BLOCK D WITH FRAME TITLE TEXT-063.
      PARAMETERS:
                  P_EXPAND AS CHECKBOX DEFAULT ' '.
      DATA: P_DETPOP VALUE 'X' .
      SELECTION-SCREEN END OF BLOCK D.
      DATA:       G_BOXNAM TYPE SLIS_FIELDNAME VALUE  'BOX',
                  G_EXPANDNAME TYPE SLIS_FIELDNAME VALUE 'EXPAND',
                  P_F2CODE LIKE SY-UCOMM       VALUE  '&ETA',
                  P_LIGNAM TYPE SLIS_FIELDNAME VALUE  'LIGHTS',
                  G_SAVE(1) TYPE C,
                  G_TABNAME_HEADER TYPE SLIS_TABNAME,
                  G_TABNAME_ITEM   TYPE SLIS_TABNAME,
                  G_EXIT(1) TYPE C,
                  GX_VARIANT LIKE DISVARIANT,
                  G_VARIANT LIKE DISVARIANT.
    INITIALIZATION.
      GT_REPID = SY-REPID.
      G_TABNAME_HEADER = 'IT_HEADER'.
      G_TABNAME_ITEM   = 'INT_DATA'.
    define keyinfo
      CLEAR GS_KEYINFO.
      GS_KEYINFO-HEADER01 = 'MATNR'.
      GS_KEYINFO-ITEM01   = 'MATNR'.
    *GS_KEYINFO-HEADER01.
    PERFORM E01_FIELDCAT_INIT  USING GT_FIELDCAT[].
    PERFORM E03_EVENTTAB_BUILD USING GT_EVENTS[].
    PERFORM E04_COMMENT_BUILD  USING GT_LIST_TOP_OF_PAGE[].
    PERFORM E06_T_SORT_BUILD   USING GT_SORT[].
    PERFORM E07_SP_GROUP_BUILD USING GT_SP_GROUP[].
    Schalter Varianten benutzerspezifisch/allgemein speicherbar setzen
    Set Options: save variants userspecific or general
      G_SAVE = 'A'.
      PERFORM VARIANT_INIT.
    Get default variant
      GX_VARIANT = G_VARIANT.
      CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
        EXPORTING
          I_SAVE     = G_SAVE
        CHANGING
          CS_VARIANT = GX_VARIANT
        EXCEPTIONS
          NOT_FOUND  = 2.
      IF SY-SUBRC = 0.
        P_VARI = GX_VARIANT-VARIANT.
      ENDIF.
    Process on value request
    *AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_VARI.
      PERFORM F4_FOR_VARIANT.
    AT SELECTION-SCREEN.
      PERFORM PAI_OF_SELECTION_SCREEN.
    START-OF-SELECTION.
    END-OF-SELECTION.
    PERFORM LAYOUT_BUILD USING GT_LAYOUT.     "wg. Parameters
    Call ABAP/4 List Viewer
      CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM = GT_REPID
          IS_LAYOUT          = GT_LAYOUT
          IT_FIELDCAT        = GT_FIELDCAT[]
          IT_SPECIAL_GROUPS  = GT_SP_GROUP[]
          IT_SORT            = GT_SORT[]
          I_SAVE             = G_SAVE
          IS_VARIANT         = G_VARIANT
          IT_EVENTS          = GT_EVENTS[]
          I_TABNAME_HEADER   = G_TABNAME_HEADER
          I_TABNAME_ITEM     = G_TABNAME_ITEM
          IS_KEYINFO         = GS_KEYINFO
          IS_PRINT           = G_PRINT
        TABLES
          T_OUTTAB_HEADER    = IT_HEADER
          T_OUTTAB_ITEM      = INT_DATA.
          FORM E01_FIELDCAT_INIT                                        *
    -->  E01_LT_FIELDCAT                                               *
    FORM FIELDCAT_INIT
                      USING RT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
      DATA: LS_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
      DATA: POS TYPE I VALUE 1.
    CLEAR LS_FIELDCAT.
    LS_FIELDCAT-FIELDNAME    = 'WERKS'.
    LS_FIELDCAT-TABNAME      =  G_TABNAME_HEADER .
    LS_FIELDCAT-SELTEXT_L        = 'Plant'.
    APPEND LS_FIELDCAT TO RT_FIELDCAT.
    CLEAR LS_FIELDCAT.
    LS_FIELDCAT-FIELDNAME    = 'NAME1'.
    LS_FIELDCAT-TABNAME      =  G_TABNAME_HEADER .
    LS_FIELDCAT-SELTEXT_L        = 'Description'.
    APPEND LS_FIELDCAT TO RT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'MATNR'.
      LS_FIELDCAT-TABNAME      =  G_TABNAME_HEADER .
      LS_FIELDCAT-SELTEXT_M        = 'Material'.
      APPEND LS_FIELDCAT TO RT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'MAKTX'.
      LS_FIELDCAT-TABNAME      =  G_TABNAME_HEADER .
      LS_FIELDCAT-SELTEXT_M        = 'Material Description'.
      APPEND LS_FIELDCAT TO RT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'XBLNR'.
      LS_FIELDCAT-TABNAME      =  G_TABNAME_ITEM .
      LS_FIELDCAT-SELTEXT_M        = ' Doc No.'.
      APPEND LS_FIELDCAT TO RT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'BUDAT'.
      LS_FIELDCAT-TABNAME      =  G_TABNAME_ITEM .
      LS_FIELDCAT-SELTEXT_M        = ' Doc Date.'.
      APPEND LS_FIELDCAT TO RT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'BWART'.
      LS_FIELDCAT-TABNAME      =  G_TABNAME_ITEM .
      LS_FIELDCAT-SELTEXT_M        = ' Mvt.'.
      APPEND LS_FIELDCAT TO RT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'MBLNR'.
      LS_FIELDCAT-TABNAME      =  G_TABNAME_ITEM .
      LS_FIELDCAT-SELTEXT_M        = ' Mat.Doc No'.
      APPEND LS_FIELDCAT TO RT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'MENGE_R'.
      LS_FIELDCAT-TABNAME      =  G_TABNAME_ITEM .
      LS_FIELDCAT-SELTEXT_M    = '  STO-In '.
      APPEND LS_FIELDCAT TO RT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'MENGE_RT'.
      LS_FIELDCAT-TABNAME      =  G_TABNAME_ITEM .
      LS_FIELDCAT-SELTEXT_M    = ' Sales Returns '.
      APPEND LS_FIELDCAT TO RT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'MENGE_CL'.
      LS_FIELDCAT-TABNAME      =  G_TABNAME_ITEM .
      LS_FIELDCAT-SELTEXT_M    = ' Canc of Invoice'.
      APPEND LS_FIELDCAT TO RT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'MENGE_AD'.
      LS_FIELDCAT-TABNAME      =  G_TABNAME_ITEM .
      LS_FIELDCAT-SELTEXT_M    = ' Adjustments '.
      APPEND LS_FIELDCAT TO RT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'MENGE_S'.
      LS_FIELDCAT-TABNAME      =  G_TABNAME_ITEM .
      LS_FIELDCAT-SELTEXT_M     = '  Sales.  '.
      APPEND LS_FIELDCAT TO RT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'MENGE_TO'.
      LS_FIELDCAT-TABNAME      =  G_TABNAME_ITEM .
      LS_FIELDCAT-SELTEXT_M    = '  STO-Out  '.
      APPEND LS_FIELDCAT TO RT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'MENGE_CR'.
      LS_FIELDCAT-TABNAME      =  G_TABNAME_ITEM .
      LS_FIELDCAT-SELTEXT_M    = ' Canc of Sal Returns'.
      APPEND LS_FIELDCAT TO RT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'MENGE_AD'.
      LS_FIELDCAT-TABNAME      =  G_TABNAME_ITEM .
      LS_FIELDCAT-SELTEXT_M    = 'Adjustments '.
      APPEND LS_FIELDCAT TO RT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'MENGE_O'.
      LS_FIELDCAT-TABNAME      =  G_TABNAME_ITEM .
      LS_FIELDCAT-SELTEXT_M    = ' Opening Balance  '.
      LS_FIELDCAT-NO_ZERO = 'X'.
      APPEND LS_FIELDCAT TO RT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'MENGE_BAL'.
      LS_FIELDCAT-TABNAME      =  G_TABNAME_ITEM .
      LS_FIELDCAT-SELTEXT_M    = ' Balance   '.
      APPEND LS_FIELDCAT TO RT_FIELDCAT.
    ENDFORM.                    "E01_FIELDCAT_INIT
          FORM E02_DATA_ADD                                             *
    -->  E02_LT_SFLIGHT                                                *
          FORM E03_EVENTTAB_BUILD                                       *
    -->  E03_LT_EVENTS                                                 *
    *FORM E03_EVENTTAB_BUILD USING E03_LT_EVENTS TYPE SLIS_T_EVENT.
    DATA: LS_EVENT TYPE SLIS_ALV_EVENT.
    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
       EXPORTING
         I_LIST_TYPE = 1
       IMPORTING
         ET_EVENTS   = E03_LT_EVENTS.
    READ TABLE E03_LT_EVENTS WITH KEY NAME = SLIS_EV_TOP_OF_PAGE
                              INTO LS_EVENT.
    IF SY-SUBRC = 0.
       MOVE GC_FORMNAME_TOP_OF_PAGE TO LS_EVENT-FORM.
       APPEND LS_EVENT TO E03_LT_EVENTS.
    ENDIF.
    *ENDFORM.                    "E03_EVENTTAB_BUILD
          FORM E04_COMMENT_BUILD                                        *
    -->  E04_LT_TOP_OF_PAGE                                            *
    FORM E04_COMMENT_BUILD USING E04_LT_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER.
      DATA: LS_LINE TYPE SLIS_LISTHEADER.
    Listenüberschrift: Typ H
      CLEAR LS_LINE.
      LS_LINE-TYP  = 'H'.
      LS_LINE-INFO = TEXT-001.
      APPEND LS_LINE TO E04_LT_TOP_OF_PAGE.
      CLEAR LS_LINE.
      LS_LINE-TYP  = 'S'.
      LS_LINE-KEY  = TEXT-050.
      LS_LINE-INFO = TEXT-010.
      APPEND LS_LINE TO E04_LT_TOP_OF_PAGE.
      LS_LINE-KEY  = TEXT-051.
      APPEND LS_LINE TO E04_LT_TOP_OF_PAGE.
    Aktionsinfo: Typ A
      CLEAR LS_LINE.
      LS_LINE-TYP  = 'A'.
      LS_LINE-INFO = TEXT-002.
      APPEND LS_LINE TO  E04_LT_TOP_OF_PAGE.
    ENDFORM.                    "E04_COMMENT_BUILD
          FORM E05_LAYOUT_BUILD                                         *
    <->  E05_LS_LAYOUT                                                 *
    FORM LAYOUT_BUILD USING LS_LAYOUT TYPE SLIS_LAYOUT_ALV.
      LS_LAYOUT-F2CODE            = P_F2CODE.
      LS_LAYOUT-ZEBRA          = P_ZEBRA.
      LS_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
      IF P_EXPAND = 'X'.
        LS_LAYOUT-EXPAND_FIELDNAME     = G_EXPANDNAME.
      ELSE.
        CLEAR LS_LAYOUT-EXPAND_FIELDNAME.
      ENDIF.
      LS_LAYOUT-DETAIL_POPUP      = P_DETPOP.
    ENDFORM.                    "E05_LAYOUT_BUILD
          FORM E06_T_SORT_BUILD                                         *
    -->  E06_LT_SORT                                                   *
    *FORM E06_T_SORT_BUILD USING E06_LT_SORT TYPE SLIS_T_SORTINFO_ALV.
    DATA: LS_SORT TYPE SLIS_SORTINFO_ALV.
    CLEAR LS_SORT.
    LS_SORT-FIELDNAME = 'WERKS'.
    LS_SORT-TABNAME   = G_TABNAME_HEADER.
    LS_SORT-SPOS      = 1.
    LS_SORT-UP        = 'X'.
    APPEND LS_SORT TO E06_LT_SORT.
    CLEAR LS_SORT.
    LS_SORT-FIELDNAME = 'MATNR'.
    LS_SORT-TABNAME   = G_TABNAME_ITEM.
    LS_SORT-SPOS      = 2.
    LS_SORT-UP      = 'X'.
    APPEND LS_SORT TO E06_LT_SORT.
    *ENDFORM.                    "E06_T_SORT_BUILD
          FORM E07_SP_GROUP_BUILD                                       *
    -->  E07_LT_SP_GROUP                                               *
    FORM E07_SP_GROUP_BUILD USING E07_LT_SP_GROUP TYPE SLIS_T_SP_GROUP_ALV.
      DATA: LS_SP_GROUP TYPE SLIS_SP_GROUP_ALV.
      CLEAR  LS_SP_GROUP.
      LS_SP_GROUP-SP_GROUP = 'A'.
      LS_SP_GROUP-TEXT     = TEXT-005.
      APPEND LS_SP_GROUP TO E07_LT_SP_GROUP.
    ENDFORM.                    "E07_SP_GROUP_BUILD
          FORM SELECTION                                                *
    FORM FETCH_DATA .
      STR3 = BUDAT-LOW+0(4).
      SELECT * FROM MARA INTO CORRESPONDING FIELDS OF TABLE ITAB1
                         WHERE MATNR IN MATNR AND
                         MATKL IN MATKL.
      SELECT MATNR WERKS LGORT
                         INTO TABLE ITAB2
                         FROM MARD FOR ALL ENTRIES IN ITAB1
                         WHERE WERKS IN WERKS AND
                               LGORT IN LGORT AND
                               MATNR = ITAB1-MATNR.
      SELECT SINGLE NAME1 FROM T001W INTO INT_DATA-NAME1
           WHERE WERKS = INT_DATA-WERKS.
      LOOP AT ITAB2.
        SELECT M~MATNR M~WERKS M~LGORT M~MENGE M~MBLNR  M~MJAHR M~XAUTO M~SHKZG
                       M~BWART M~EBELN N~BUDAT N~XBLNR S~NAME1
                       INTO CORRESPONDING FIELDS OF ITAB
                       FROM   MSEG AS M INNER JOIN MKPF AS N ON
                              M~MBLNR = N~MBLNR
                              AND M~MJAHR = N~MJAHR
                            INNER JOIN T001W AS S ON
                              M~WERKS = S~WERKS
                          WHERE N~BUDAT IN BUDAT AND
                             M~WERKS = ITAB2-WERKS AND
                             M~LGORT = ITAB2-LGORT AND
                             M~MATNR = ITAB2-MATNR AND
                    M~BWART IN BWART.
          APPEND ITAB.
          CLEAR ITAB.
        ENDSELECT.
        IF SY-SUBRC NE 0.
          ITAB-MATNR = ITAB2-MATNR.
          ITAB-WERKS = ITAB2-WERKS.
          ITAB-LGORT = ITAB2-LGORT.
          ITAB-BWART = ITAB2-BWART.
          APPEND ITAB.
        ENDIF.
        CLEAR: ITAB2,ITAB.
      ENDLOOP.
      DELETE ADJACENT DUPLICATES FROM ITAB2 COMPARING MATNR WERKS .
      V_MONTH = BUDAT-LOW+0(6).
      SELECT * INTO CORRESPONDING FIELDS OF TABLE INT_DATA2
               FROM S032 FOR ALL ENTRIES IN ITAB2
               WHERE MATNR = ITAB2-MATNR
                     AND WERKS   = ITAB2-WERKS
                     AND LGORT   = SPACE
                     AND   MBWBEST <> SPACE.
      LOOP AT INT_DATA2 .
        SELECT SINGLE *  FROM S031
                         WHERE MATNR = INT_DATA2-MATNR AND
                               WERKS = INT_DATA2-WERKS AND
                               LGORT = SPACE AND
                               SPMON GT V_MONTH.
        MODIFY INT_DATA2.
        CLEAR: INT_DATA2, S031.
      ENDLOOP.
      DELETE INT_DATA WHERE MENGE_O IS INITIAL .
      DELETE ADJACENT DUPLICATES FROM INT_DATA COMPARING XBLNR MATNR MAKTX.
      V_MONTH1 = BUDAT-LOW+0(6).
      SORT ITAB BY  MATNR  WERKS  XBLNR .
      LOOP AT ITAB.
        XBLNR = ITAB-XBLNR.
        INT_DATA-MENGE = ITAB-MENGE.
        INT_DATA-BWART = ITAB-BWART.
        INT_DATA-XBLNR = ITAB-XBLNR.
        INT_DATA-BUDAT = ITAB-BUDAT.
        INT_DATA-MATNR = ITAB-MATNR.
        INT_DATA-MBLNR = ITAB-MBLNR.
        INT_DATA-MENGE = ITAB-MENGE.
        INT_DATA-SHKZG = ITAB-SHKZG.
        INT_DATA-MENGE_IS = ITAB-MENGE_IS.
        INT_DATA-MENGE_RE = ITAB-MENGE_RE.
        INT_DATA-MENGE_O = ITAB-MENGE_O.
        INT_DATA-NAME1 = ITAB-NAME1.
        AT NEW MATNR.
          FLAG = 1.
          IT_HEADER-MATNR = INT_DATA-MATNR.
          SELECT SINGLE MAKTX FROM MAKT INTO IT_HEADER-MAKTX WHERE
          MATNR = INT_DATA-MATNR.
          APPEND IT_HEADER.
          CLEAR IT_HEADER.
        ENDAT.
        IF FLAG = 1.
          PERFORM GET_OPENING_STOCK.
        ENDIF.
        INT_DATA-MENGE_O = OSTOCK.
        CASE ITAB-BWART.
          WHEN '101'.
            IF INT_DATA-SHKZG = 'S'.
              INT_DATA-MENGE_R = INT_DATA-MENGE_R + ITAB-MENGE.
            ENDIF.
          WHEN  '453'.
            IF INT_DATA-SHKZG = 'S'.
              IF ITAB-XAUTO = 'X'.
                INT_DATA-MENGE_RT = INT_DATA-MENGE_RT + ITAB-MENGE.
              ENDIF.
            ENDIF.
          WHEN '351' OR '641'.
           IF ITAB-LGORT = 0.
             INT_DATA-MENGE_R = INT_DATA-MENGE_R + ITAB-MENGE.
           ELSE.
             INT_DATA-MENGE_TO = INT_DATA-MENGE_TO + ITAB-MENGE.
           ENDIF.
          WHEN '602' OR '642'.
            IF INT_DATA-SHKZG = 'S'.
              IF ITAB-LGORT = 0.
                INT_DATA-MENGE_CL = INT_DATA-MENGE_CL + ITAB-MENGE.
              ENDIF.
            ENDIF.
          WHEN '552' OR '310'.
            IF INT_DATA-SHKZG = 'S'.
              INT_DATA-MENGE_AD = INT_DATA-MENGE_AD - ITAB-MENGE.
            ENDIF.
          WHEN '601'.
            IF INT_DATA-SHKZG = 'H'.
              INT_DATA-MENGE_S = INT_DATA-MENGE_S + ITAB-MENGE.
            ENDIF.
          WHEN  '641' .
            IF INT_DATA-SHKZG = 'H'.
              IF ITAB-LGORT = 0.
                INT_DATA-MENGE_TO = INT_DATA-MENGE_TO + ITAB-MENGE.
              ENDIF.
            ENDIF.
          WHEN  '454' OR '102'.
            IF INT_DATA-SHKZG = 'H'.
              IF ITAB-XAUTO = 'X'.
                INT_DATA-MENGE_CR = INT_DATA-MENGE_CR - ITAB-MENGE.
              ENDIF.
            ENDIF.
          WHEN '551' OR '309'.
            IF INT_DATA-SHKZG = 'H'.
              INT_DATA-MENGE_AD = INT_DATA-MENGE_AD + ITAB-MENGE.
            ENDIF.
            IF INT_DATA-SHKZG = 'S'.
              MENGE_O = INT_DATA-MENGE_O + ITAB-MENGE.
            ENDIF.
        ENDCASE.
        IF INT_DATA-SHKZG = 'S'.
          MENGE_RE = INT_DATA-MENGE_R + INT_DATA-MENGE_RT + INT_DATA-MENGE_CL
          + INT_DATA-MENGE_AD.
        ENDIF.
        IF INT_DATA-SHKZG = 'H'.
          MENGE_IS =  INT_DATA-MENGE_S + INT_DATA-MENGE_TO +
                        INT_DATA-MENGE_CR + INT_DATA-MENGE_AD.
        ENDIF.
        PERFORM BALANCE.
        COLLECT INT_DATA.
        CLEAR: INT_DATA,ITAB ,XBLNR, FLAG, OSTOCK.
      ENDLOOP.
      SORT INT_DATA BY XBLNR BUDAT WERKS MATNR.
      LOOP AT INT_DATA.
        READ TABLE INT_DATA2 WITH KEY MATNR = INT_DATA-MATNR
                                      WERKS = INT_DATA-WERKS.
        SELECT SINGLE * FROM MAKT WHERE MATNR = INT_DATA-MATNR.
        INT_DATA-MAKTX = MAKT-MAKTX.
        MODIFY INT_DATA.
        CLEAR: INT_DATA, INT_DATA2.
      ENDLOOP.
      LOOP AT INT_DATA WHERE  MENGE_O = 0 AND MENGE_RT = 0 AND
                            MENGE_CL = 0 AND MENGE_AD = 0 AND
                            MENGE_S = 0 AND MENGE_TO = 0 AND
                            MENGE_CR = 0 AND MENGE_R = 0 AND MENGE_BAL = 0.
        DELETE IT_HEADER WHERE MATNR = INT_DATA-MATNR.
      ENDLOOP.
      DELETE INT_DATA WHERE MENGE_O = 0 AND MENGE_RT = 0 AND
                            MENGE_CL = 0 AND MENGE_AD = 0 AND
                            MENGE_S = 0 AND MENGE_TO = 0 AND
                            MENGE_CR = 0 AND MENGE_R = 0 AND MENGE_BAL = 0.
    ENDFORM.                    "SELECTION
    *&      Form  EVENTTAB_BUILD
          text
         -->P_GT_EVENTS[]  text
    FORM EVENTTAB_BUILD USING RT_EVENTS TYPE SLIS_T_EVENT.
      DATA: LS_EVENT TYPE SLIS_ALV_EVENT.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          I_LIST_TYPE = 1
        IMPORTING
          ET_EVENTS   = RT_EVENTS.
      READ TABLE RT_EVENTS WITH KEY NAME = SLIS_EV_TOP_OF_PAGE
                               INTO LS_EVENT.
      IF SY-SUBRC = 0.
        MOVE GT_TOP_OF_PAGE TO LS_EVENT-FORM.
        APPEND LS_EVENT TO RT_EVENTS.
      ENDIF.
    ENDFORM.                    " EVENTTAB_BUILD
          FORM TOP_OF_PAGE                                              *
    FORM TOP_OF_PAGE.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
       EXPORTING
         I_LOGO             = 'ENJOYSAP_LOGO'
         IT_LIST_COMMENTARY = LT_TOP_OF_PAGE.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          I_LOGO             = 'ENJOYSAP_LOGO'
          IT_LIST_COMMENTARY = GT_LIST_TOP_OF_PAGE.
    ENDFORM.                    "TOP_OF_PAGE
          FORM F4_FOR_VARIANT                                           *
    FORM F4_FOR_VARIANT.
      CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
        EXPORTING
          IS_VARIANT       = G_VARIANT
          I_SAVE           = G_SAVE
          I_TABNAME_HEADER = G_TABNAME_HEADER
          I_TABNAME_ITEM   = G_TABNAME_ITEM
        IMPORTING
          E_EXIT           = G_EXIT
          ES_VARIANT       = GX_VARIANT
        EXCEPTIONS
          NOT_FOUND        = 2.
      IF SY-SUBRC = 2.
        MESSAGE ID SY-MSGID TYPE 'S'      NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ELSE.
        IF G_EXIT = SPACE.
          P_VARI = GX_VARIANT-VARIANT.
        ENDIF.
      ENDIF.
    ENDFORM.                    "F4_FOR_VARIANT
    *&      Form  PAI_OF_SELECTION_SCREEN
          text
    FORM PAI_OF_SELECTION_SCREEN.
      IF NOT P_VARI IS INITIAL.
        MOVE G_VARIANT TO GX_VARIANT.
        MOVE P_VARI TO GX_VARIANT-VARIANT.
        CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
          EXPORTING
            I_SAVE     = G_SAVE
          CHANGING
            CS_VARIANT = GX_VARIANT.
        G_VARIANT = GX_VARIANT.
      ELSE.
        PERFORM VARIANT_INIT.
      ENDIF.
    ENDFORM.                               " PAI_OF_SELECTION_SCREEN
    *&      Form  VARIANT_INIT
          text
    -->  p1        text
    <--  p2        text
    FORM VARIANT_INIT.
      CLEAR G_VARIANT.
      G_VARIANT-REPORT = GT_REPID.
    ENDFORM.                               " VARIANT_INIT
    *&      Form  GET_OPENING_STOCK
          text
    FORM GET_OPENING_STOCK.
      SELECT SUM( MZUBB ) SUM( MAGBB )  INTO (V_STOCK, V_STOCK1)
                    FROM S031 WHERE MATNR = ITAB-MATNR AND
                                    WERKS = ITAB-WERKS AND
                                    SPMON LT V_MONTH1 AND LGORT = ITAB-LGORT.
      OSTOCK = V_STOCK1 - V_STOCK.
      IF OSTOCK < 0.
        OSTOCK = OSTOCK * -1.
      ENDIF.
    ENDFORM.                               " GET_OPENING_STOCK
    *&      Form  check
          text
    FORM CHECK.
      AUTHORITY-CHECK OBJECT 'M_IS_MATNR'
        ID 'ACTVT' DUMMY
        ID 'MATNR' FIELD MATNR-LOW.
      IF SY-SUBRC <> 0.
        MESSAGE E016(Z1) WITH MATNR-LOW.
      ENDIF.
    ENDFORM.                    "CHECK_AUTHORIZATION
    *&      Form  EVENTTAB_BUILD
          text
         -->P_GT_EVENTS[]  text
    *FORM EVENTTAB_BUILD USING RT_EVENTS TYPE SLIS_T_EVENT.
    DATA: LS_EVENT TYPE SLIS_ALV_EVENT.
    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
       EXPORTING
         I_LIST_TYPE = 1
       IMPORTING
         ET_EVENTS   = RT_EVENTS.
    READ TABLE RT_EVENTS WITH KEY NAME = SLIS_EV_TOP_OF_PAGE
                              INTO LS_EVENT.
    IF SY-SUBRC = 0.
       MOVE GT_TOP_OF_PAGE TO LS_EVENT-FORM.
       APPEND LS_EVENT TO RT_EVENTS.
    ENDIF.
    *ENDFORM.                    " EVENTTAB_BUILD
          FORM TOP_OF_PAGE
    *FORM TOP_OF_PAGE.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
       EXPORTING
         I_LOGO             = 'ENJOYSAP_LOGO'
         IT_LIST_COMMENTARY = GT_LIST_TOP_OF_PAGE.
    *ENDFORM.                    "TOP_OF_PAGE
    *&      Form  COMMENT_BUILD
          text
         -->P_GT_LIST_TOP_OF_PAGE[]  text
    FORM COMMENT_BUILD USING LT_TOP_OF_PAGE TYPE
                           SLIS_T_LISTHEADER.
      DATA: LS_LINE TYPE SLIS_LISTHEADER.
      DATA: LV_PAGE_STRING(11),
             LV_PAGE_NO(3).
      PAGNO = SY-PAGNO.
      DATA: PAGNO(5) TYPE C.
      CLEAR
         LS_LINE.
      REFRESH LT_TOP_OF_PAGE.
      CLEAR
         LS_LINE.
      LS_LINE-TYP  = 'S'.
      LS_LINE-KEY = 'Page Number'.
      PAGNO = SY-PAGNO.
      IF
        PAGNO = 0.
        PAGNO =  1.
      ENDIF.
      SHIFT PAGNO LEFT DELETING LEADING SPACE.
      LS_LINE-INFO = PAGNO.
      APPEND LS_LINE TO LT_TOP_OF_PAGE.
      CLEAR LS_LINE.
      LS_LINE-TYP  = 'H'.
      LS_LINE-INFO = TEXT-001.
      APPEND LS_LINE TO LT_TOP_OF_PAGE.
      CLEAR LS_LINE.
      LS_LINE-TYP  = 'A'.
      SELECT SINGLE * FROM T001W WHERE
                      WERKS IN WERKS.
      CONCATENATE 'Name Of The Plant ' '-'  T001W-NAME1 INTO
                            TXT SEPARATED BY SPACE.
      LS_LINE-INFO = TXT.
      APPEND LS_LINE TO LT_TOP_OF_PAGE.
      CLEAR:TXT, LS_LINE.
      LS_LINE-TYP  = 'H'.
      LS_LINE-INFO = TEXT-002.
      APPEND LS_LINE TO LT_TOP_OF_PAGE.
      CLEAR LS_LINE.
      IF WERKS-HIGH EQ SPACE.
        CONCATENATE 'Plant :  ' WERKS-LOW INTO TXT.
      ELSE.
        CONCATENATE 'FROM PLANT : ' WERKS-LOW 'TO PLANT : ' WERKS-HIGH INTO TXT SEPARATED  BY SPACE.
      ENDIF.
      LS_LINE-TYP  = 'H'.
      LS_LINE-INFO = TXT.
      APPEND LS_LINE TO LT_TOP_OF_PAGE.
      IF BUDAT-HIGH EQ SPACE.
        BUDAT-HIGH = BUDAT-LOW.
      ENDIF.
      CONCATENATE 'Date : From ' BUDAT-LOW6(2) '-' BUDAT-LOW4(2) '-'
                            BUDAT-LOW0(4) 'to' BUDAT-HIGH6(2) '-'
                            BUDAT-HIGH4(2) '-' BUDAT-HIGH0(4) INTO
                            TXT SEPARATED BY SPACE.
      CLEAR LS_LINE.
      LS_LINE-TYP  = 'A'.
      LS_LINE-INFO = TXT.
      APPEND LS_LINE TO  LT_TOP_OF_PAGE.
    ENDFORM.                    "COMMENT_BUILD
    *&      Form  LAYOUT_INIT
          text
         -->P_GT_LAYOUT  text
    FORM LAYOUT_INIT USING RS_LAYOUT TYPE SLIS_LAYOUT_ALV.
      RS_LAYOUT-DETAIL_POPUP      = 'X'.
      RS_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
    ENDFORM.                    " LAYOUT_INIT
    *&      Form  BALANCE
          text
    -->  p1        text
    <--  p2        text
    FORM BALANCE.
      IF INT_DATA-SHKZG = 'S'.
        MENGE_RE = INT_DATA-MENGE_O + INT_DATA-MENGE.
        INT_DATA-MENGE_BAL = MENGE_RE.
        INT_DATA-MENGE_RE = INT_DATA-MENGE.
      ELSEIF INT_DATA-SHKZG = 'H'.
        MENGE_RE =  MENGE_RE - INT_DATA-MENGE.
        INT_DATA-MENGE_BAL = MENGE_RE.
        INT_DATA-MENGE_IS = INT_DATA-MENGE.
      ENDIF.
    ENDFORM.                    " BALANCE
    Thanks & Regards,
    Sreedhar.

    Hi,
    try like this.........
      get v_linct from system varaible sy-linct
      describe table t_output lines lv_lines - Where 
      t_output is ur final internal table which is displayed
      v_pagct = ( lv_lines div v_linct ) + 3.
      write: 'PAGE NO:' , sy-pagno  ,'/', v_pagct.
    Madhavi

  • I applied a template to a page with SWFs and now that page does not play the SWFs. Why?

    I applied a template to a page with SWFs and now that page does not play the SWFs (just a blank area where the SWF should be). When I detach the template it will play the flash file. This site will eventually be updated via Adobe Contribute. And I just discovered that when applying a template to a page that uses HTML datasets (Master/Detail),it no longer reads the Master/detail regions and displays a blank. Any thoughts?
    [Moved to Dreamweaver forum by moderator]

    Firstly, you shouldn't really 'apply' a template to a page, you should create a child page by going to FILE>NEW>Page from Template.  Too many things can happen when applying a template the way you are doing it. eg:; editable and non-editable regions not matching up and being asked where to place these regions and in all likelihood, you end up with 2 or more of the same region.
    When a swf file is inserted into a page, a corresponding Scripts folder is written automatically is stored in the root of the site - it is also linked to in the head of the document. What I believe is happening is that when you apply a template to the page, the Template has no idea that there is a swf file on the page and is not aware of the correct link to the Scripts folder.  If you do a test and add the swf file to the template page itself, I bet that the links to the swf and the scripts folder are correct - because DW knows the correct path to the script file.   Hence the reason the page probably works when you detach it from a template.

  • How to get the page layouts programmatically and create a page for that pagelayout

    how get the page layouts programmatically and create a page for that pagelayout and add webpart
    please help me with da code.Thanks
    adityadugyala

    Hi if your page layouts alreday created then create new page programaticaaly  and apply your page ayouts to that page by coding you can do something like following
    PublishingWeb publishingWeb =
    PublishingWeb.GetPublishingWeb(web);
    PageLayout[] layouts = publishingWeb.GetAvailablePageLayouts();
    PageLayout layout = layouts[0];
    string pageName =
    "MyPublishingPage5.aspx";
    PublishingPage newPage = publishingWeb.GetPublishingPages().Add(newFolder.Folder.ServerRelativeUrl +
    "/"+ pageName, layout); 
    newPageUrl = web.Url +"/" + newPage.Url;
    newPage.Description = "This my sample publishing page";
    newPage.Title = "My Publishing Page";
    newPage.Update();
    Please follow link
    http://blogs.msdn.com/b/sowmyancs/archive/2008/03/15/create-publishing-pages-in-portal-sites-programmatically.aspx
    Please mark answer , if you think answer is helpful or correct.

  • How to work even and odd number query

    Plz explain how below worked even and odd query
    2 ) why used subquery after from and which time we can use(what time of out put)
    even
    select * FROM (SELECT ROW_NUMBER() OVER(ORDER BY stud_id) as row ,grno,stud_id from stud_Enrollment) d
     WHERE d.row %2=0   
    odd
    select * FROM (SELECT ROW_NUMBER() OVER(ORDER BY stud_id) as row ,grno,stud_id from stud_Enrollment) d
     WHERE d.row %2=1

    Row_Number function returns the sequential number of a row
    (By using partition of a result set, starting at 1 for the first row in each partition)
    >> why used subquery after from and which time we can use(what time of out put)
    When we need sequntial numbers, we can use row_number function. Put it into derived table and use this derived table after FROM clause (Same way it is used in your query)
    CREATE TABLE stud_Enrollment (
    grno int,
    stud_id int,
    stud_name varchar(20)
    INSERT INTO stud_Enrollment
    VALUES (101, 511, 'Dheeraj'), (112, 521, 'Vaibhav'), (132, 522, 'Lalit'), (124, 564, 'Amogh'), (143, 598, 'Sushrut')
    SELECT * FROM stud_Enrollment
    -- Result of your table
    --grno stud_id stud_name
    --101 511 Dheeraj
    --112 521 Vaibhav
    --132 522 Lalit
    --124 564 Amogh
    --143 598 Sushrut
    -- Now we need to find out the rows which are at even position, ie row should be at position of 0,2,4,6,8 etc..
    -- But we don't have sequential number here in your table result
    -- So we can create one new column by using row_number function
    SELECT
    ROW_NUMBER() OVER (ORDER BY stud_id) AS row, --> additiona "row" column
    grno,
    stud_id,
    stud_name
    FROM stud_Enrollment
    -- We got "row" column in below output
    --row grno stud_id stud_name
    --1 101 511 Dheeraj
    --2 112 521 Vaibhav
    --3 132 522 Lalit
    --4 124 564 Amogh
    --5 143 598 Sushrut
    -- Now above table is used after FROM clause. It uses row column in WHERE part
    SELECT
    FROM (SELECT
    ROW_NUMBER() OVER (ORDER BY stud_id) AS row,
    grno,
    stud_id,
    stud_name
    FROM stud_Enrollment) d
    WHERE d.row % 2 = 0
    --row grno stud_id stud_name
    --2 112 521 Vaibhav
    --4 124 564 Amogh
    -Vaibhav Chaudhari

  • Add Even and Odd Numbers

    I have a programming assignment that needs to read a set of integers and then finds and prints the sum of the evens and sum of the odds.
    I know how to find out which numbers are odd and even, I just can't figure out how to add up the evens and odds. Say a set of 10 integers is inputted, how can they be added up after it is determined if they are even or odd?

    Here is my code after the tip from student... It compiles but once ran it doesn't do anything after the integers are put in.
    import java.util.*;
    public class EvenOddIntegers {
        static Scanner console = new Scanner(System.in);
        static final int limit = 10;
        public static void main(String[] args) {
             int number = 0, limit = 0, sumEven = 0, sumOdd = 0;
             int odds = 0;
            int evens = 0;
             System.out.print("Enter ten positive integers: ");
             while (limit <= 10)
                  number = console.nextInt();
             if (number % 2 == 0)
                  sumEven += number;
             else if (number % 2 != 0)
                  sumOdd += number;
             System.out.println("Sum of even numbers is " + sumEven + ".");
             System.out.println("Sum of odd numbers is " + sumOdd + ".");
    }

  • Counting even and odd values

    Is there another way to count even and odd number than this one
    private static int countEvenOrOdd(int[] array, boolean countEvenNumbers){
              int count = 0;
              int remainderRequired = (countEvenNumbers ? 0 : 1);
              for(int i = 0; i < array.length; ++i){
                   if(array[i] % 2 == remainderRequired){
                        ++count;
              return count;
         }

    > I like hacking ;-) Have a look at this: ...
    Jos, you forgot the method for counting both:int countOddsAndEvens(int[] array) {
    return (countOdds(array) + countEvens(array));
    } ; )Yep, you're right, and for completeness reason I'd like to add the following:int countOthers(int[] array) {
       return array.length-countOddsAndEvens(array);
    }And for those junit maniacs:boolean testCounters(int[] array) {
       return countOddsAndEvens(array)+countOthers(array) == array.length;
    }btw, the moment I posted my previous reply I realized that I could've done better:int countOdds(int[] array) {
       int c= 0;
       for (int i= 0; i < array.length; c+= array[i++]&1);
       return c;
    }kind regards,
    Jos ( <-- never has to maintain others' code ;-)

  • How to display even and odd number ranges between two given inputs.

    Hi Every one,
    I am just started my career in sap abap and trying to find the solution for this.
    I am trying to display number range using select options, but I am getting an error "Memory low leave the transaction before taking a break".
    Example: when I give two number 2 and 10 , it should display set of all even and odd numbers in that range.
    Below is the code logic that I am using:
    data: a type i,
             b type i,
             c type i,
             d type i,
             num type i.
    select-options: in for num.
    a = inp-low.
    b=inp-high.
    c = inp-low mod 2.
    d = inp-high mod 2.
    while a <=b and c = 0.
    write: "even numbers:', a.
    b = a + 1.
    endwhile.
    while a <=b and c <> 0.
    write: "odd numbers:', b.
    b = a + 1.
    endwhile.
    Any help will be much appreciated.

    This is your logic...changed:
    data: a type i,
              b type i,
              c type i,
              d type i,
              num type i.
    data: even type i,
           odd  type i.
    select-options: in for num.
    a = in-low.
    b = in-high.
    c = a mod 2.
    if c is INITIAL. "It measn a is even
       even = a.
       odd  = a + 1.
    else.
       odd  = a.
       even = a + 1.
    endif.
    * Even
    a = even.
    while a <= b.
       write: / 'even numbers:', a.
    *  b = a + 1.
       a = a + 2. "The next even number
    endwhile.
    * Odd
    a = odd.
    while a <= b .
       write: / 'odd numbers:', a.
       a = a + 2. "The next odd number
    endwhile.

  • How to remove all pages from layout? (except Master Page)

    Geetings Experts:
    I'm implementing additional security measures into my 'initialze' event, where I'll check some global variables and render the file unreadable if needed.
    Which object and properties do I access to remove all my pages from the form?
    I would like to createa a function that removes all the sub pages, leavning only the Matster Page, enable a label in the MasterPage and save itself.
    I searched for xfa.layout and Page[n].remove() methods but cannot find any reference to these.
    .presence = "hidden", fulfills my purpose but the pages remian visible and I need for a clean solution no pages are visible.
    I'm advanced in C# but a novice in LC JavaScript, so any comment, reference or code snipet will be greatly appreciated
    Thank you for your time,
    Ivan A. Loreto – Computer Education Technician
    LOMA LINDA UNIVERSITY | School of Allied Health Professions - Department of Physical Therapy
    [PDF Development Platform]
    Windows XP SP3
    Acrobat Pro 9
    LifeCycle Designer ES 8.2

    Hi Ivan,
    The particular syntax of Javascript in LC Designer is different from that used in Acrobat and different (as I understand it) from core javascript and other applications. There are several free guides on the Adobe web site which cover Acrobat and LC:
    http://www.adobe.com/go/learn_lc_scriptingBasics
    http://www.adobe.com/go/learn_lc_scriptingReference
    http://www.adobe.com/go/learn_lc_formCalc
    http://www.adobe.com/devnet/livecycle/articles/Adobe_XML_Form_Object_Model_Refer ence.pdf
    http://www.adobe.com/devnet/acrobat/pdfs/lc_migrating_acrobat_xmlform.pdf
    And a very handy resource (it goes back to version 6, but is still applicable):http://partners.adobe.com/public/developer/en/tips/CalcScripts.pdf
    JP Terry's book on LC Forms is very good and we use www.pdfscripting (which is a subscription service). If you are going to be doing a lot of LC Designer work, these may be of help.
    I am not a coder, so I going to try and work through your script. Bear with me if you already have this sorted...
    The script looks ok and you are using the resolveNode method correctly. Seeing topmostSubform in the resolveNode indicates that you imported an existing document into LC. This is fine, but sometimes it restricts some of the functionality.
    For starters I think that mPg is returning null. You can use the following in your script to see what is happening (debugging) and then comment it out:
    console.println("mpg: " + mPg);
    Then when previewing hit control+J to bring up the javascript console, then will show the value of mPg when that script executes.
    Try deleting the SOM up to #pageSet:
    var mPg = xfa.resolveNode("#pageSet.MasterPage1");
    The javascript console will show you when the script is working.
    In relation to the loop, I would advise a few changes:
    for (var i=1; i <= xfa.layout.pageCount(); i++)
         var vPage = ("xfa.form.topmostSubform.Page" + i).toString();
         //console.println("vPage: " + vPage);
         var curPage = xfa.resolveNode(vPage);
         curPage.presence = "hidden"; 
    }//next page
    There are a few things here:
    I would declare i as a variable, not an integer (not sure if it makes a difference);
    I would use pageCount rather than numPages and then <=;
    There was an extra ; at the end of the loop declaration;
    I would break the script into steps and get the full SOM of the page as a variable first and then resolveNode that variable;
    You don't need to go to the current page;
    I tend to name master pages with a capital "P" and pages with a small "p". Personal preference, but it can make tracking script easier.
    Have a crack off that and hopefully you can get it to work,
    Niall
    ps another tip, if you want to reference an object in script. First click on the object you want to script for and then scroll (or click on the master page) for the object you want to reference. Click inside the script editor and then when you move the mouse back into the form, press and hold Control, this will turn the mouse into a "V". When you click on the object you want to reference it will insert the SOM into the script. If it needs the resolveNode it will automatically put that in for you. Holding Shift and Control will insert a fully resolved node.

  • Even and odd page break

    Hi ALL
    I have a requirement in my report there are two things location with customer details and meter reading with costing Now my req is that location details should come on odd pages and starting from page 3. For meter details should come on even pages starting from page 4 can you plz help me in this
    Regards
    Prasoon

    i did not quite get what your report structure is.
    Is it something like
    -Customer
    -- Location details
    -- Meter reading
    -Customer
    -- Location details
    -- Meter readingIf so does the customer record fill pages 1 and 2?
    Does the location details always fit on one page or could per be more data than for one page?
    Does the meter-reding details always fit on one page or could per be more data than for one page?

  • Merge even and odd pages

    My printer won't do duplex scan, and I need to scan a large amount of 2-sided text. So I'm going to create one document of the odd-numbered pages, and another of the even-numbered pages. I know I can manually combine them into the right order, but I'm hoping there is some automatic way to merge the documents - one of odd-numbered pages, and one of even-numbered pages - into one document in which the pages are in the correct numerical order.
    Is there?

    Hey Seth and others:
    Thanks for the positive feedback. I found myself needing to do some collating and reversing again, and discovered that the script didn't show up in Acrobat 9. So I updated the script, and moved the menu item into the "Document" menu.
    Unfortunately I can't figure out how to attach the updated script in the new form editor, so I'll inline it. Copy the following script into a file and install it into your Javascripts folder, as before.
    // Complements: Planet PDF (http://www.planetpdf.com/)
    // Modified by Jeff Baitis for Acrobat 9 compatibility
    // Improved Collate function with status bar.
    // Add a menu item to reverse all pages in the active document
    app.addMenuItem({ cName: "Reverse", cParent: "Document", cExec: "trustedReversePages();", cEnable: "event.rc = (event.target != null);", nPos: 0 });
    app.addMenuItem({ cName: "Collate", cParent: "Document", cExec: "trustedCollatePages();", cEnable: "event.rc = (event.target != null);", nPos: 0 });
    trustedReversePages = app.trustedFunction(function()
      app.beginPriv(); // Explicitly raise privileges
      var t = app.thermometer;
      t.duration = this.numPages;
      t.begin();
      for (i = this.numPages - 1; i >= 0; i--)
        t.value = (i-this.numPages)*-1;
        this.movePage(i);
        t.text = 'Moving page ' + (i + 1);
      t.end();
      app.endPriv();
    // Collating pages
      Title: Collate Document
      Purpose: User is prompted to select document to insert/collate.
      Author: Sean Stewart, ARTS PDF, www.artspdf.com
    trustedCollatePages = app.trustedFunction(function()
      app.beginPriv(); // Explicitly raise privileges
      // create an array to use as the rect parameter in the browse for field
      var arRect = new Array();
      arRect[0] = 0;
      arRect[1] = 0;
      arRect[2] = 0;
      arRect[3] = 0;
      // create a non-visible form field to use as a browse for field
      var f = this.addField("txtFilename", "text", this.numPages - 1, arRect);
      f.delay = true;
      f.fileSelect = true;
      f.delay = false;
      // user prompted to select file to collate the open document with
      app.alert("Select the PDF file to merge with")
      // open the browse for dialog
      f.browseForFileToSubmit();
      var evenDocPath = f.value;
      var q = this.numPages;
      var t = app.thermometer;
      t.duration = q;
      t.begin();
      // insert pages from selected document into open document
      for (var i = 0; i < q; i++) {
          var j = i*2;
          this.insertPages(j, evenDocPath, i);
          t.value = i;
          t.text = 'Inserting page ' + (i+1);
      t.end();
      // remove unused field
      this.removeField("txtFilename");
      app.endPriv();
    Have fun
    Edited: Found some bugs, fixed the code up a bit

  • Can't print even or odd numbered pages

    No matter I choose "even numbered page" or "odd numbered page" in the printer setting,
    it just print out all pages without differences.
    I tried two different printer, hp Laserjet 1300 & Epson stylus C68, and got the same result.
    However, printing even/odd numbered pages works fine in Tiger.
    Does anybody have the same problem?

    sonic64 wrote:
    My friend told me that his Lexmark printer works fine in printing even/odd numbered pages on Leopard.
    However, his printer is directly connected to Airport Express.
    It seems that Gutenprint drivers may not be fully compatible with Leopard.
    That anecdotal experience is good, but it does not further trying to find an answer for your situation. I have had no problems with printing odd or even pages using the Gutenprint drivers with my HP DeskJet 870. That is why I asked if you could connect one of the printers directly to your Mac running Leopard and see if the Gutenprint drivers behave correctly. The goal is to find out whether it is the Gutenprint drivers, something about printing to a shared Windows printer, or something else that is causing this behavior.
    You might also want to try the hpijs drivers for the LaserJet 1300 to see if they are able to print odd or even pages. That also would be of help in determining where the problem is. http://www.linux-foundation.org/en/OpenPrinting/MacOSX/hpijs
    Matt

  • Combining Indesign files, and maintaining Master Pages

    Hi
    I have some Indesign files which I need to combine.
    But I'd like for them to keep their individual Master Pages,
    because of how they are page numbered.
    I suppose there is a way of working with Sections for this,
    but the page numbers appear on either the left side or the right side
    depending on whether they are even or odd...
    So is there a way of doing this?
    I'm stuck...
    Only other way I can think of is doing separate PDF files and
    combining those... But there's gotta be a way in Indesign... Hasn't there?
    Thanks a lot
    Nikki

    You are correct, printing double sided indeed.
    And yes, the reader will see it as spreads.
    To be honest, we are both relatively new,
    and are just following what people in our
    positions in the past have done.
    They used to do their catalogs
    all in Photoshop, and then combine into a PDF.
    So even simply using InDesign to layout the pages
    was a bit of a stretch in terms of opening
    up eyes!
    The way we're  doing it should still work out fine though
    I guess it just wasn't the most efficient.
    Is this what you mean?
    Nikki

Maybe you are looking for

  • How do i redownload game center

    Since I updated my Iphone5 to the ios7 i do not have the game center app showing with the rest of my apps but it is on the phone can get to it by asking siri but would prefer having the app. Can i re download it or how do I get an app to show up.

  • PROBLEM CONVERTING MSWORD & MSPROJECT TO PDF!

    Hi, I'm running Vista, Office 2007 (inc. MSProject) and have Acrobat 8 Professional. I'm having all sorts of problems converting. I don't know whether its someting to do with the pathing, since I first installed on D drive, rather than C. I just copi

  • Clone tool - why does it darken in layers?

    Some years ago I used to use an old version of PS at work. It was before the CSs but I can't remember the version. When I used the clone tool it would simply clone the area with the same tonal depth and I used it a lot. I now have CS6 and when I use

  • Moving AW to a new Intel MacBook

    Hello I say, I say, I say, I've just helped my mother-in-law buy a new MacBook. Sadly, as yet there's no punch-line. In the Apple Store we were able to read her existing Appleworks 6 documents on a new intel machine. When I got back to her place I co

  • Can't buy skype credit - An internal error occurre...

    i got this error message when buying skype credit. "An internal error occurred. Sorry, but we were unable to start your payment. Please try again later." any help would be appreciated.