ADM Hierarchy List question

It seems I'm not the only one having problems using an ADM Hierarchy list.  I've searched the forums and found people have similar issues, but for the life of me I can seem to get the list to display correctly for me.
The list correctly displays the expand/collapse arrows, but where the text should be for each item is just a solid black rectangle.
As instructed by other posters, I implemented the SetDrawProcResursive callback for the list, but the only area of the list I have access to draw into seems to be where the expand/collapse arrows are.  If I create a rectangle that extends into where the text is and paint it, it gets clipped to the arrow area.
In the drawing callback function, I have tried calling the ADMListEntry->DefaultDraw, setting the background and text colors, and used every rectangle the API returns, but to no avail.
I must be missing something, I just can't figure it out!  Is there a different callback I should be using?  Is there a list-item painting callback that isn't documented?

I've got a fully customized & functioning hierarchy list and I don't seem to ever call SetDrawProcResursive(). I'm using a customized version of the IADMHierarchyList & ListEntry objects -- it looks like that gets set every time I create a BaseADMListEntry in its constructor. I don't seem to do anything except set the height recursively, so its standard.
I then do something like this:
IADMRect rect;
GetLocalRect(rect);
drawer.SetADMColor(GetBackgroundColour());
drawer.FillRect(drawRect);
// draw selection (similary to drawing background colour)
// draw icon, etc.

Similar Messages

  • How to include a Header in Hierarchy List (ALV)?

    Hi Gurus,
    If we need to include any header in ALV Grid, then we generate an event and pass that header to TOP_OF_PAGE event. We do have I_CALLBACK_TOP_OF_PAGE parameter for the REUSE_ALV_GRID_DISPLAY function module.
    But how do I generate a Header for a Hierarchy List? I do not find any parameter for TOP_OF_PAGE event. Please help with inputs.
    Regards,
    Kiran

    Hi Kiran,
                The  following codes are very useful to you...
    If any problem let me know...
    REPORT  zxxxxxxxxxxxxxx    LINE-SIZE 220
                               LINE-COUNT 50(5).
    *&                       DATA DECLARATION                              *
    TABLES: MARA,                      "GENERAL MASTER DATA
            MARC,                      "PLANT DATA FOR MATERIAL
            MARD,                      "STORAGE LOCATION DATA FOR MATERIAL
            MBEW,                      "MATERIAL VALUATION
            MVKE,                      "SALES DATA FOR MATERIAL
            MAKT,                      "MATERIAL DESCRIPTION
            EKKO,                      "PURCHASING DOCUMENT HEADER
            EKPO,                      "PURCHASING DOCUMENT ITEM
            VBAK,                      "SALES DOCUMENT HEADER DATA
            VBAP.                      "SALES DOCUMENT ITEM DATA
    TYPE-POOLS : SLIS.
    DATA: VT_FIELDCAT1 TYPE SLIS_T_FIELDCAT_ALV,
          V_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
          V_LAYOUT TYPE SLIS_LAYOUT_ALV,
          BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
          BEGIN OF I_MARA OCCURS 0,
             MATNR LIKE MARA-MATNR,  "MATERIAL NUMBER
             MBRSH LIKE MARA-MBRSH,  "INDUSTRY SECTOR
             MEINS LIKE MARA-MEINS,  "BASE UNIT OF MEASURE
             MATKL LIKE MARA-MATKL,  "MATERIAL GROUP
          END OF I_MARA,
          BEGIN OF I_MARC OCCURS 0,
             MATNR LIKE MARC-MATNR,  "MATERIAL NUMBER
             WERKS LIKE MARC-WERKS,  "PLANT
             LVORM LIKE MARC-LVORM,  "FLAG MATERIAL FOR DELETION AT PLANT
                                      "LEVEL
             DISPO LIKE MARC-DISPO,  "MRP CONTROLLER
          END OF I_MARC,
          BEGIN OF I_MAKT OCCURS 0,
             MATNR LIKE MAKT-MATNR,  "MATERIAL NUMBER
             MAKTX LIKE MAKT-MAKTX,  "MATERIAL DESCRIPTION
             SPRAS LIKE MAKT-SPRAS,  "LANGUAGE KEY
          END OF I_MAKT,
          BEGIN OF I_MVKE OCCURS 0,
             MATNR LIKE MVKE-MATNR,  "MATERIAL NUMBER
             VKORG LIKE MVKE-VKORG,  "SALES ORGANIZATION
             VTWEG LIKE MVKE-VTWEG,  "DISTRIBUTION CHANNEL
          END OF I_MVKE,
          BEGIN OF I_MARD OCCURS 0,
            MATNR LIKE MARD-MATNR,  "MATERIAL NUMBER
            LGORT LIKE MARD-LGORT,  "STORAGE LOCATION
            LABST LIKE MARD-LABST,  "VALUATED STOCK WITH UNRESTRICTED USE
          END OF I_MARD,
          BEGIN OF I_EKPO OCCURS 0,
            EBELN LIKE EKPO-EBELN,  "PURCHASING DOCUMENT NUMBER
            EBELP LIKE EKPO-EBELP,  "ITEM NUMBER OF PURCHASING DOCUMENT
            MATNR LIKE EKPO-MATNR,  "MATERIAL NUMBER
          END OF I_EKPO,
          BEGIN OF I_VBAP OCCURS 0,
            VBELN LIKE VBAP-VBELN,  "SALES DOCUMENT
            POSNR LIKE VBAP-POSNR,  "SALES DOCUMENT ITEM
            MATNR LIKE VBAP-MATNR,  "MATERIAL NUMBER
          END OF I_VBAP,
          BEGIN OF I_OUT OCCURS 0,
            MATNR LIKE MARC-MATNR,
            WERKS LIKE MARC-WERKS,
            LVORM LIKE MARC-LVORM,
            DISPO LIKE MARC-DISPO,
            MBRSH LIKE MARA-MBRSH,
            MEINS LIKE MARA-MEINS,
            MATKL LIKE MARA-MATKL,
            VKORG LIKE MVKE-VKORG,
            VTWEG LIKE MVKE-VTWEG,
            SPRAS LIKE MAKT-SPRAS,
            MAKTX LIKE MAKT-MAKTX,
            LGORT LIKE MARD-LGORT,
            LABST LIKE MARD-LABST,
            EBELN LIKE EKPO-EBELN,
            EBELP LIKE EKPO-EBELP,
            VBELN LIKE VBAP-VBELN,
            POSNR LIKE VBAP-POSNR,
          END OF I_OUT,
          BEGIN OF I_HEADING OCCURS 0,
            TEXT1(20),
            TEXT2(20),
            TEXT3(20),
            TEXT4(20),
            TEXT5(20),
            TEXT6(20),
            TEXT7(20),
            TEXT8(20),
            TEXT9(20),
            TEXT10(20),
            TEXT11(40),
            TEXT12(20),
            TEXT13(20),
            TEXT14(20),
            TEXT15(20),
            TEXT16(20),
            TEXT17(20),
          END OF I_HEADING.
    *&                   S E L E C T I O N - S C R E E N                   *
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-100.
    SELECT-OPTIONS: S_MATNR FOR MARA-MATNR. "OBLIGATORY.
    PARAMETERS: P_WERKS LIKE MARC-WERKS. "OBLIGATORY.
    SELECT-OPTIONS: S_LGORT FOR MARD-LGORT,
                    S_DISPO FOR MARC-DISPO,
                    S_EBELN FOR EKPO-EBELN .
    SELECTION-SCREEN END OF BLOCK B1.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-101.
    PARAMETERS : RB1 RADIOBUTTON GROUP G1,
                 RB2 RADIOBUTTON GROUP G1,
                 RB3 RADIOBUTTON GROUP G1.
    SELECTION-SCREEN END OF BLOCK B2.
    *&             S T A R T - O F - S E L E C T I O N                     *
    START-OF-SELECTION.
      SELECT MATNR WERKS LVORM DISPO FROM MARC
      INTO CORRESPONDING FIELDS OF TABLE I_MARC
                          WHERE MATNR IN S_MATNR
                          AND DISPO IN S_DISPO
                          AND WERKS = P_WERKS.
      IF I_MARC[] IS INITIAL.
        WRITE:/ 'NO MATCHING DATA AVAILABLE FROM MARC'.
        EXIT.
      ENDIF.
      PERFORM PURCHASEDATA_VALIDATION.
      PERFORM SALESDATA_VALIDATION.
      SELECT MATNR LGORT LABST FROM MARD INTO TABLE  I_MARD
                          FOR ALL ENTRIES IN I_MARC
                          WHERE MATNR = I_MARC-MATNR
                          AND WERKS EQ P_WERKS
                          AND LGORT IN S_LGORT.
      IF I_MARD[] IS INITIAL.
        WRITE:/ 'NO MATCHING DATA AVAILABLE FROM MARD'.
        EXIT.
      ENDIF.
      SELECT MATNR VKORG VTWEG FROM MVKE INTO TABLE I_MVKE
                          FOR ALL ENTRIES IN I_MARC
                          WHERE MATNR = I_MARC-MATNR.
      IF I_MVKE[] IS INITIAL.
        WRITE:/ 'NO MATCHING DATA AVAILABLE FROM MVKE'.
        EXIT.
      ENDIF.
      LOOP AT I_MARC.
        MOVE-CORRESPONDING I_MARC TO I_OUT.
        CLEAR MARC.
        SELECT SINGLE MATNR MBRSH MEINS MATKL FROM MARA
                          INTO CORRESPONDING FIELDS OF MARA
                          WHERE MATNR = I_OUT-MATNR.
        IF SY-SUBRC = 0.
          MOVE: MARA-MBRSH TO I_OUT-MBRSH,
                MARA-MEINS TO I_OUT-MEINS,
                MARA-MATKL TO I_OUT-MATKL.
        ELSE.
          CONTINUE.
        ENDIF.
        SELECT SINGLE MATNR MAKTX SPRAS FROM MAKT
                        INTO  CORRESPONDING FIELDS OF MAKT
                        WHERE  MATNR = I_OUT-MATNR.
        IF SY-SUBRC = 0.
          MOVE: MAKT-MAKTX TO I_OUT-MAKTX,
                MAKT-SPRAS TO I_OUT-SPRAS.
        ELSE.
          CONTINUE.
        ENDIF.
        LOOP AT I_EKPO WHERE MATNR =  I_MARC-MATNR.
          MOVE: I_EKPO-EBELN TO I_OUT-EBELN,
                I_EKPO-EBELP TO I_OUT-EBELP.
        ENDLOOP.
        LOOP AT I_VBAP WHERE MATNR =  I_MARC-MATNR.
          MOVE: I_VBAP-VBELN TO I_OUT-VBELN,
                I_VBAP-POSNR TO I_OUT-POSNR.
        ENDLOOP.
        LOOP AT I_MARD WHERE MATNR = I_MARC-MATNR.
          MOVE: I_MARD-LABST TO I_OUT-LABST,
                I_MARD-LGORT TO I_OUT-LGORT.
        ENDLOOP.
        LOOP AT I_MVKE WHERE MATNR = I_MARC-MATNR.
          MOVE: I_MVKE-VKORG TO I_OUT-VKORG,
                I_MVKE-VTWEG TO I_OUT-VTWEG.
          APPEND I_OUT.
        ENDLOOP.
        CLEAR I_OUT.
      ENDLOOP.
      PERFORM OPTIONS.
                         FORM  OPTIONS                                *
    FORM OPTIONS.
      IF RB2 = 'X'.
        PERFORM FIELDCAT.
        PERFORM OUTPUT.
      ELSE.
        IF RB1 = 'X'.
          PERFORM HEADINGS.
          PERFORM DLOAD.
        ELSE.
          IF RB3 = 'X'.
            PERFORM HEADINGS.
            PERFORM DLOAD.
            PERFORM FIELDCAT.
            PERFORM OUTPUT.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDFORM.                    "OPTIONS
                         FORM  HEADINGS                               *
    FORM HEADINGS.
      I_HEADING-TEXT1 = 'MATNR'.
      I_HEADING-TEXT2 = 'WERKS'.
      I_HEADING-TEXT3 = 'LVORM'.
      I_HEADING-TEXT4 = 'DISPO'.
      I_HEADING-TEXT5 = 'MBRSH'.
      I_HEADING-TEXT6 = 'MEINS'.
      I_HEADING-TEXT7 = 'MATKL'.
      I_HEADING-TEXT8 = 'VKORG'.
      I_HEADING-TEXT9 = 'VTWEG'.
      I_HEADING-TEXT10 = 'SPRAS'.
      I_HEADING-TEXT11 = 'MAKTX'.
      I_HEADING-TEXT12 = 'LGORT'.
      I_HEADING-TEXT13 = 'LABST'.
      I_HEADING-TEXT14 = 'EBELN'.
      I_HEADING-TEXT15 = 'EBELP'.
      I_HEADING-TEXT16 = 'VBELN'.
      I_HEADING-TEXT17 = 'POSNR'.
      APPEND I_HEADING.
    ENDFORM.                    "HEADINGS
                         FORM  DLOAD                                  *
    FORM DLOAD.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          FILENAME              = 'C:\MATSTK.XLS'
          FILETYPE              = 'DAT'
          WRITE_FIELD_SEPARATOR = 'X'
        TABLES
          DATA_TAB              = I_HEADING
        EXCEPTIONS
          FILE_WRITE_ERROR      = 1.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          FILENAME              = 'C:\MATSTK.XLS'
          FILETYPE              = 'DAT'
          APPEND                = 'X'
          WRITE_FIELD_SEPARATOR = 'X'
        TABLES
          DATA_TAB              = I_OUT.
    ENDFORM.                    "DLOAD
                              FORM  FIELDCAT                          *
    FORM FIELDCAT.
      V_FIELDCAT-COL_POS = '1'.
      V_FIELDCAT-FIELDNAME     = 'MATNR'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
      V_FIELDCAT-HOTSPOT = 'X'.
      V_FIELDCAT-REF_FIELDNAME = 'MATNR'.
      V_FIELDCAT-REF_TABNAME   = 'MARC'.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
      V_FIELDCAT-COL_POS = '2'.
      V_FIELDCAT-FIELDNAME     = 'WERKS'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
      V_FIELDCAT-REF_FIELDNAME = 'WERKS'.
      V_FIELDCAT-REF_TABNAME   = 'MARC'.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
      V_FIELDCAT-COL_POS = '3'.
      V_FIELDCAT-FIELDNAME     = 'LVORM'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
      V_FIELDCAT-REF_FIELDNAME = 'LVORM'.
      V_FIELDCAT-REF_TABNAME   = 'MARC'.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
      V_FIELDCAT-COL_POS = '4'.
      V_FIELDCAT-FIELDNAME     = 'DISPO'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
      V_FIELDCAT-REF_FIELDNAME = 'DISPO'.
      V_FIELDCAT-REF_TABNAME   = 'MARC'.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
      V_FIELDCAT-COL_POS = '5'.
      V_FIELDCAT-FIELDNAME     = 'MBRSH'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
      V_FIELDCAT-REF_FIELDNAME = 'MBRSH'.
      V_FIELDCAT-REF_TABNAME   = 'MARA'.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
      V_FIELDCAT-COL_POS = '6'.
      V_FIELDCAT-FIELDNAME     = 'MEINS'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
      V_FIELDCAT-REF_FIELDNAME = 'MEINS'.
      V_FIELDCAT-REF_TABNAME   = 'MARA'.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
      V_FIELDCAT-COL_POS = '7'.
      V_FIELDCAT-FIELDNAME     = 'MATKL'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
      V_FIELDCAT-REF_FIELDNAME = 'MATKL'.
      V_FIELDCAT-REF_TABNAME   = 'MARA'.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
      V_FIELDCAT-COL_POS = '8'.
      V_FIELDCAT-FIELDNAME     = 'VKORG'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
      V_FIELDCAT-REF_FIELDNAME = 'VKORG'.
      V_FIELDCAT-REF_TABNAME   = 'MVKE'.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
      V_FIELDCAT-COL_POS = '9'.
      V_FIELDCAT-FIELDNAME     = 'VTWEG'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
      V_FIELDCAT-REF_FIELDNAME = 'VTWEG'.
      V_FIELDCAT-REF_TABNAME   = 'MVKE'.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
      V_FIELDCAT-COL_POS = '10'.
      V_FIELDCAT-FIELDNAME     = 'SPRAS'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
      V_FIELDCAT-REF_FIELDNAME = 'SPRAS'.
      V_FIELDCAT-REF_TABNAME   = 'MAKT'.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
      V_FIELDCAT-COL_POS = '11'.
      V_FIELDCAT-FIELDNAME     = 'MAKTX'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
      V_FIELDCAT-REF_FIELDNAME = 'MAKTX'.
      V_FIELDCAT-REF_TABNAME   = 'MAKT'.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
      V_FIELDCAT-COL_POS = '12'.
      V_FIELDCAT-FIELDNAME     = 'LGORT'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
    V_FIELDCAT-REF_FIELDNAME = 'LGORT'.
    V_FIELDCAT-REF_TABNAME   = 'MARD'.
      V_FIELDCAT-SELTEXT_L = 'STRG LOCT'.
      V_FIELDCAT-OUTPUTLEN = 10.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
      V_FIELDCAT-COL_POS = '13'.
      V_FIELDCAT-FIELDNAME     = 'LABST'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
      V_FIELDCAT-SELTEXT_M = 'STOCK'.
      V_FIELDCAT-OUTPUTLEN = 15.
    V_FIELDCAT-REF_FIELDNAME = 'LABST'.
    V_FIELDCAT-REF_TABNAME   = 'MARD'.
      V_FIELDCAT-DO_SUM = 'X'.
      V_LAYOUT-TOTALS_TEXT = 'TOTAL STOCK:'.
      V_FIELDCAT-HOTSPOT = 'X'.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
      V_FIELDCAT-COL_POS = '14'.
      V_FIELDCAT-FIELDNAME     = 'EBELN'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
      V_FIELDCAT-HOTSPOT = 'X'.
      V_FIELDCAT-REF_FIELDNAME = 'EBELN'.
      V_FIELDCAT-REF_TABNAME   = 'EKPO'.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
      V_FIELDCAT-COL_POS = '15'.
      V_FIELDCAT-FIELDNAME     = 'EBELP'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
      V_FIELDCAT-REF_FIELDNAME = 'EBELP'.
      V_FIELDCAT-REF_TABNAME   = 'EKPO'.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
      V_FIELDCAT-COL_POS = '16'.
      V_FIELDCAT-FIELDNAME     = 'VBELN'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
      V_FIELDCAT-HOTSPOT = 'X'.
      V_FIELDCAT-REF_FIELDNAME = 'VBELN'.
      V_FIELDCAT-REF_TABNAME   = 'VBAP'.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
      V_FIELDCAT-COL_POS = '17'.
      V_FIELDCAT-FIELDNAME     = 'POSNR'.
      V_FIELDCAT-TABNAME = 'I_OUT'.
      V_FIELDCAT-REF_FIELDNAME = 'POSNR'.
      V_FIELDCAT-REF_TABNAME   = 'VBAP'.
      APPEND V_FIELDCAT TO VT_FIELDCAT1.
      CLEAR  V_FIELDCAT.
    ENDFORM.                      "FIELDCAT
                              FORM  OUTPUT                            *
    FORM OUTPUT.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM      = SY-REPID
          I_CALLBACK_TOP_OF_PAGE  = 'TOP-OF-PAGE'
          I_GRID_TITLE = 'CLICK ON MATERIAL/PURDOC/SALESDOC FOR DETAILS'
          I_CALLBACK_USER_COMMAND = 'DISPLAYDETAILS'
          IS_LAYOUT               = V_LAYOUT
          IT_FIELDCAT             = VT_FIELDCAT1
        TABLES
          T_OUTTAB                = I_OUT.
      IF SY-SUBRC <> 0.
      ENDIF.
    ENDFORM.                    "OUTPUT
                            FORM  TOP-OF-PAGE                         *
    FORM TOP-OF-PAGE.
      DATA: T_HEADER TYPE SLIS_T_LISTHEADER,
            WA_HEADER TYPE SLIS_LISTHEADER.
      WA_HEADER-TYP = 'H'.
      WA_HEADER-INFO = 'REPORT FOR : '.
      APPEND WA_HEADER TO T_HEADER.
      CLEAR WA_HEADER.
      WA_HEADER-TYP = 'S'.
      WA_HEADER-INFO = 'MATERIAL DETAILS'.
      APPEND WA_HEADER TO T_HEADER.
      CLEAR WA_HEADER.
      WA_HEADER-TYP = 'S'.
      WA_HEADER-INFO = 'PURCHASE ORDER DETAILS'.
      APPEND WA_HEADER TO T_HEADER.
      CLEAR WA_HEADER.
      WA_HEADER-TYP = 'S'.
      WA_HEADER-INFO = 'SALES ORDER DETAILS'.
      APPEND WA_HEADER TO T_HEADER.
      CLEAR WA_HEADER.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          I_LOGO             = 'GEAR'
          IT_LIST_COMMENTARY = T_HEADER.
    ENDFORM.                    "TOP-OF-PAGE
    *&                       FORM  DISPLAYDETAILS                          *
    FORM DISPLAYDETAILS USING UCOMM LIKE SY-UCOMM
          SELFIELD TYPE SLIS_SELFIELD.
      IF SELFIELD-FIELDNAME = 'EBELN'.
        IF UCOMM = '&IC1'.
          READ TABLE I_OUT INDEX SELFIELD-TABINDEX.
          PERFORM PORECDNG.
          CLEAR BDCDATA[].
        ENDIF.
      ELSE.
        IF SELFIELD-FIELDNAME = 'MATNR'.
          IF UCOMM = '&IC1'.
            READ TABLE I_OUT INDEX SELFIELD-TABINDEX.
            PERFORM MMRECDNG.
            CLEAR BDCDATA[].
          ENDIF.
        ELSE.
          IF SELFIELD-FIELDNAME = 'VBELN'.
            IF UCOMM = '&IC1'.
              READ TABLE I_OUT INDEX SELFIELD-TABINDEX.
              PERFORM SALESRECDNG.
              CLEAR BDCDATA[].
            ENDIF.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDFORM.                    "DISPLAYDETAILS
                        FORM PORECDNG                                   *
    FORM PORECDNG.
    perform bdc_dynpro      using 'SAPMM06E' '0105'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RM06E-BSTNR'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RM06E-BSTNR'
                                  I_OUT-EBELN.
    perform bdc_dynpro      using 'SAPMM06E' '0120'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RM06E-BSTPO(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=AH'.
    perform bdc_field       using 'RM06E-EBELP'
                                  I_OUT-EBELP.
    perform bdc_field       using 'RM06E-TCSELFLAG(01)'
                                  'X'.
    perform bdc_transaction using 'ME23'.
    ENDFORM.                    "PORECDNG
                        FORM MMRECDNG                                   *
    FORM MMRECDNG.
      PERFORM BDC_DYNPRO      USING 'SAPLMGMM' '0060'.
      PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                    'RMMG1-MATNR'.
      PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                    '/00'.
      PERFORM BDC_FIELD       USING 'RMMG1-MATNR'
                                    I_OUT-MATNR.
      PERFORM BDC_DYNPRO      USING 'SAPLMGMM' '0070'.
      PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                    'MSICHTAUSW-DYTXT(01)'.
      PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                    '=ENTR'.
      PERFORM BDC_FIELD       USING 'MSICHTAUSW-KZSEL(01)'
                                    'X'.
      PERFORM BDC_TRANSACTION USING 'MM03'.
    ENDFORM.                    "MMRECDNG
                        FORM SALESRECDNG                                *
    FORM SALESRECDNG.
      PERFORM BDC_DYNPRO      USING 'SAPMV45A' '0102'.
      PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                    'VBAK-VBELN'.
      PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                    '/00'.
      PERFORM BDC_FIELD       USING 'VBAK-VBELN'
                                    I_OUT-VBELN.
      PERFORM BDC_TRANSACTION USING 'VA03'.
    ENDFORM.                    "SALESRECDNG
                     FORM BDC_TRANSACTION                               *
    FORM BDC_TRANSACTION USING TCODE.
      CALL TRANSACTION TCODE USING BDCDATA MODE 'E'.
    ENDFORM.                    "BDC_TRANSACTION
                           FORM BDC_DYNPRO                              *
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
      CLEAR BDCDATA.
      BDCDATA-PROGRAM = PROGRAM.
      BDCDATA-DYNPRO = DYNPRO.
      BDCDATA-DYNBEGIN = 'X'.
      APPEND BDCDATA.
    ENDFORM.                    "BDC_DYNPRO
                           INSERT FIELD                                  *
    FORM BDC_FIELD USING FNAM FVAL.
      CLEAR BDCDATA.
      BDCDATA-FNAM = FNAM.
      BDCDATA-FVAL = FVAL.
      APPEND BDCDATA.
    ENDFORM.                    "BDC_FIELD
    *&                  FORM  PURCHASEDATA_VALIDATION                      *
    FORM PURCHASEDATA_VALIDATION.
      SELECT EBELN EBELP MATNR
                 FROM EKPO
                 INTO TABLE I_EKPO
                 FOR ALL ENTRIES IN I_MARC
                 WHERE MATNR = I_MARC-MATNR
                 AND EBELN IN S_EBELN
                 AND WERKS EQ P_WERKS.
      IF I_EKPO[] IS INITIAL.
        WRITE:/ 'NO MATCHING DATA IS SELECTED FROM TABLE EKPO'.
        EXIT.
      ENDIF.
      DATA: T_EKPO LIKE I_EKPO OCCURS 0 WITH HEADER LINE.
      T_EKPO[] = I_EKPO[].
      REFRESH I_EKPO.
      FREE I_EKPO.
      LOOP AT T_EKPO.
        SELECT SINGLE EBELN FROM EKKO INTO EKPO-EBELN
        WHERE EBELN = T_EKPO-EBELN.
        IF SY-SUBRC = 0.
          MOVE-CORRESPONDING T_EKPO TO I_EKPO.
          APPEND I_EKPO.
          CLEAR I_EKPO.
        ELSE.
          CONTINUE.
        ENDIF.
      ENDLOOP.
      SORT I_EKPO.
    ENDFORM.                    "PURCHASEDATA_VALIDATION
    *&                  FORM  SALESDATA_VALIDATION                         *
    FORM SALESDATA_VALIDATION.
      SELECT VBELN POSNR MATNR
              FROM VBAP
              INTO CORRESPONDING FIELDS OF TABLE
              I_VBAP FOR ALL ENTRIES IN I_MARC
              WHERE MATNR = I_MARC-MATNR.
      DATA: T_VBAP LIKE I_VBAP OCCURS 0 WITH HEADER LINE.
      T_VBAP[] = I_VBAP[].
      REFRESH I_VBAP.
      FREE I_VBAP.
      LOOP AT T_VBAP.
        SELECT SINGLE VBELN FROM VBAK INTO VBAK-VBELN
        WHERE VBELN = T_VBAP-VBELN.
        IF SY-SUBRC = 0.
          MOVE-CORRESPONDING T_VBAP TO I_VBAP.
          APPEND I_VBAP.
          CLEAR I_VBAP.
        ELSE.
          CONTINUE.
        ENDIF.
      ENDLOOP.
      SORT I_VBAP.
    ENDFORM.                    "SALESDATA_VALIDATION
    ..........................FOr Hierarchy List...................
    REPORT  Zxxxxxxxxxx NO STANDARD PAGE HEADING.
    **********DECLARING TABLES********************************************
    TYPE-POOLS: slis.
    TABLES: EKKO, "PO HEADER
            EKPO. "PO ITEM
    **********DECLARING DATA**********************************************
    DATA: ET_EKKO TYPE EKKO OCCURS 0 WITH HEADER LINE,
          ET_EKPO TYPE EKPO OCCURS 0 WITH HEADER LINE,
          ET_SORT TYPE SLIS_T_SORTINFO_ALV WITH HEADER LINE,
          ET_LAYOUT TYPE SLIS_LAYOUT_ALV,
          ET_KEYINFO TYPE SLIS_KEYINFO_ALV,
          ET_REPID LIKE SY-REPID.
    DATA: ET_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE.
    DATA: ET_EVENTS TYPE SLIS_T_EVENT.
    **********SELECTION CRITERIA****************************************
    SELECTION-SCREEN BEGIN OF BLOCK RAD1 WITH FRAME TITLE TEXT-003.
    SELECT-OPTIONS: S_EBELN FOR ET_EKPO-EBELN OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK RAD1.
    INITIALIZATION.
      ET_KEYINFO-HEADER01 = 'EBELN'.
      ET_KEYINFO-ITEM01   = 'EBELN'.
      ET_SORT-FIELDNAME = 'EBELN'.
      ET_SORT-TABNAME     = '2'.
      ET_SORT-SPOS        = 1.
      ET_SORT-UP         = 'X'.
      ET_SORT-SUBTOT     = 'X'.
      APPEND ET_SORT.
      ET_SORT-FIELDNAME = 'EBELP'.
      ET_SORT-TABNAME     = '2'.
      ET_SORT-SPOS        = 1.
    APPEND ET_SORT.
      ET_FIELDCAT-FIELDNAME   = 'NETWR'.
      ET_FIELDCAT-TABNAME       = '2'.
      ET_FIELDCAT-OUTPUTLEN = 8.
      ET_FIELDCAT-DO_SUM       = 'X'.
      ET_FIELDCAT-HOTSPOT       = 'X'.
      APPEND ET_FIELDCAT.
    START-OF-SELECTION.
      SELECT EBELN BUKRS AEDAT ERNAM FROM EKKO INTO CORRESPONDING
             FIELDS OF TABLE ET_EKKO
             WHERE EBELN IN S_EBELN.
      SELECT * FROM EKPO INTO CORRESPONDING FIELDS
               OF TABLE ET_EKPO FOR ALL ENTRIES IN
               ET_EKKO WHERE EBELN = ET_EKKO-EBELN.
      CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
        EXPORTING
          I_STRUCTURE_NAME_HEADER = 'EKKO'
          I_STRUCTURE_NAME_ITEM   = 'EKPO'
          IS_KEYINFO              = ET_KEYINFO " The structure contains the
                                               " header and item table
                                               " field names which links the
                                               " the two tables(shared key)
          IS_LAYOUT               = ET_LAYOUT
          IT_FIELDCAT             = ET_FIELDCAT[]
          I_TABNAME_HEADER        = '1' " Name of the internal table in the
                                        " program containing the output data
                                        " of the highest hierarchy level
          I_TABNAME_ITEM          = '2' " Name of the internal table in the
                                        " program containing the output data
                                        " of the highest hierarchy level
          IT_EVENTS               = ET_EVENTS[]
          IT_SORT                 = ET_SORT[]
        TABLES
          T_OUTTAB_HEADER         = ET_EKKO " Header table with data to be
                                             " output
          T_OUTTAB_ITEM           = ET_EKPO. " Name of the internal table in
                                             " the program containing the
                                             " output data of the lowest
                                             "hierarchy level.
    Regards,,
    Satya Kumar..

  • Download Hierarchial List ALV  to excel

    Hi all,
    Please provide me the solution on using download button in Hierarchial List ALV to download to excel.The output of excel need to be exacted as the output of ALV (All header and items details).
    Please suggest the solution and sample code ASAP.
    Thanks and Regards.

    Hello,
    Find the code where method set_table_for_first_display of tree object (CL_GUI_ALV_TREE) used in your program,
    and learn  table of tree from there :
    CALL METHOD g_tree->set_table_for_first_display
    EXPORTING
      i_structure_name    = g_structname
      is_hierarchy_header = g_hierarchy_header
    CHANGING
      it_fieldcatalog     = g_fieldcat
      it_outtab           = it_result .   "<-- this table contains hierarchical data
    And than download this table using class CL_GUI_FRONTEND_SERVICES
    and methods FILE_SAVE_DIALOG and GUI_DOWNLOAD or function GUI_DOWNLOAD
    you can find too many of examples in forum.

  • Programs for alv block and hierarchy list

    hi abapers,
    can anyone pls mail me the simple program to get an idea of block and hierarchy list.
    my mail id is <u>[email protected]</u>

    HI
    go through below links
    http://www.sapgenie.com/abap/controls/alvgrid.htm
    http://www.sapfans.com/forums/viewtopic.php?t=58286
    http://www.sapfans.com/forums/viewtopic.php?t=76490
    http://www.sapfans.com/forums/viewtopic.php?t=20591
    http://www.sapfans.com/forums/viewtopic.php?t=66305
    Reward points if help full
    Regards
    Suresh.D

  • Objects hidden (missing) in the Hierarchy list of SE80

    Hi Experts,
    The situation is, I have seen many times in my programs that, out of all the objects declared in the ABAP program some are found missing in the objects hierarchy list. Example, there will be a selection screen delcared and the program is working fine, but in the objects list, either screens node is not shown or if screens tab is shown, the number 1000 screen will be missing. another instannce is, out of the internal tables declared usinf the "data" statment, one or two of them will not be seen under "fields" node. Can any one please tell me why this happens practically when it should not happen ideally.
    Is there any way to make them visible again?
    All the satisfying and justifying answers will be rewarded.
    Thanks & Regrads,
    N.M.S.M.Krishna

    Hello,
    Open the report in se80.
    From menu, choose : Utilities->Update Navigation index
    = Or =
    Right click the report program; from the context menu choose
    Other Functions->Rebuild Object List
    This will regenerate the program object list.
    Cheers,
    Remi

  • ADF SelectOneChoice List Question

    I posted the following message in the Toplink forum and they have suggested I try over here:
    Toplink Essentials List Question
    ==================
    I am new to Toplink Essentials. I am using Toplink Essentials inside of JDeveloper 11g, against Oracle Express and ADF/Trinidad and have used JDeveloper's "Entities from Tables" wizard to reverse engineer my database into Toplink pojo objects. After this I used JDeveloper's wizard to create a JavaServiceFacade and then generate a Data Control.
    After expanding the DataControl (which is mapped to the JavaServiceFacade) I have a method queryEntityFindAll(). Under this method I have serval attributes and then a list which represents a "many-side" of this entitie's relationship with another entity. How do I create a selectOneChoice using this list?
    I've tried expanding queryEntityFindAll() and then dragging the list to a jspx page, setting the Base Data Source to "JavaServiceFacade.queryEntityFindAll.listName and then setting the List Data Source to "ListName : JavaServiceFacade.queryRelatedEntityFindAll". However, when I run the page the only thing that appears on the page is the selectOneChoice label... no drop down component appears on the page... no errors are generated to give any clue as to what my problem may be...
    Although I'm working in JDeveloper, I really believe this is a Toplink Essentials question...
    Please help!

    Thanks for the quick response!
    Using the department / employee example... I'm trying to create a form that allows a user to create a new department. I have dragged the "Department" object (located under queryDepartmentFindAll()) over to my jspx form. A form with corresponding fields is created.
    I notice that no field was created for employeeId. I expand the "Department" object (again, under queryDepartmentFindAll()) and observe that "Employee" is present, as a list (expanding Employee provides access to employee object attributes along with another list entitled departmentList).
    I know that it's unlikely that only one employee would be selected in the creation of a department... but I'm sticking to the example...
    So, I drag the "Employee" (again, under queryDepartmentFindAll()) object over to the newly created form and from the pop-up menu I choose selectOneChoice as the desired component. I run the jspx page, Internet Explorer 7 browser pops up and all labels display on the page, all fields but no selectOneChoice component appears on the screen... the space is there for it but it appears to be invisible. I have checked the Employee table and there is data to be displayed... it's just that I must be missing something...

  • Bookmarks list question

    stupid bookmarks list question. how do you remove a bookmark form the bookmark list?

    On the menubar, Safari > Bookmarks > Show all Bookmarks > right click and select delete.
    Or highlight and hit the delete key.

  • Hierarchial list display

    hi all,
    please send me some programs for hierarchial list display in ALVs.
    thanks in advance,
    hema.

    hi,
    this is used to specify that according to which field u want hierarchy....
    means i want that according to material number i want hierarchical display than i have to pass matnr in this
    and
    key_info-header01 = 'MAT'.
    key_info-item01 = 'MAT'.
    In this we passing field name of header table and item table....
    Now see this example..
    In this i want hierarchy depend on Material and palnt both..
    so my code will be
    TYPE-POOLS : slis.
    TABLES : mseg.
    DATA : BEGIN OF itab_head OCCURS 0,
    mat LIKE mseg-matnr,
    matnr LIKE mseg-matnr,
    werks LIKE mseg-werks,
    END OF itab_head.
    DATA : BEGIN OF itab_item OCCURS 0,
    mat LIKE mseg-matnr,
    matnr LIKE mseg-matnr,
    werks LIKE mseg-werks,
    mblnr LIKE mseg-mblnr,
    menge LIKE mseg-menge,
    END OF itab_item.
    DATA : t_fcat TYPE slis_t_fieldcat_alv,
    key_info TYPE slis_keyinfo_alv,
    t_eve TYPE slis_t_event,
    gt_subtot TYPE slis_t_sortinfo_alv,
    subtot LIKE LINE OF gt_subtot,
    t_listhead TYPE slis_t_listheader,
    st_line TYPE slis_listheader.
    DATA : t_mtdoc LIKE mseg-mblnr.
    SELECT-OPTIONS : mat FOR mseg-matnr.
    INITIALIZATION.
    PERFORM build_cat USING t_fcat.
    PERFORM build_eve.
    START-OF-SELECTION.
    PERFORM get_data.
    PERFORM dis_data.
    *& Form build_cat
    text
    -->TEMP_FCAT text
    FORM build_cat USING temp_fcat TYPE slis_t_fieldcat_alv.
    DATA : wa_fcat TYPE slis_fieldcat_alv.
    wa_fcat-tabname = 'ITAB_HEAD'.
    wa_fcat-fieldname = 'MAT'.
    wa_fcat-seltext_m = 'Material'.
    APPEND wa_fcat TO temp_fcat.
    CLEAR wa_fcat.
    wa_fcat-tabname = 'ITAB_HEAD'.
    wa_fcat-fieldname = 'WERKS'.
    wa_fcat-seltext_m = 'Plant'.
    APPEND wa_fcat TO temp_fcat.
    CLEAR wa_fcat.
    wa_fcat-tabname = 'ITAB_ITEM'.
    wa_fcat-fieldname = 'MBLNR'.
    wa_fcat-seltext_m = 'Material Doc.'.
    APPEND wa_fcat TO temp_fcat.
    CLEAR wa_fcat.
    wa_fcat-tabname = 'ITAB_ITEM'.
    wa_fcat-fieldname = 'MENGE'.
    wa_fcat-seltext_m = 'Quantity'.
    wa_fcat-do_sum = 'Y'.
    APPEND wa_fcat TO temp_fcat.
    CLEAR wa_fcat.
    subtot-spos = 1.
    subtot-fieldname = 'MAT'.
    subtot-tabname = 'ITAB_HEAD'.
    subtot-up = 'X'.
    subtot-group = 'X'.
    subtot-subtot = 'X'.
    subtot-expa = 'X'.
    APPEND subtot TO gt_subtot.
    ENDFORM. "build_cat
    *& Form build_eve
    text
    FORM build_eve.
    DATA : wa_eve TYPE slis_alv_event.
    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
    EXPORTING
    i_list_type = 0
    IMPORTING
    et_events = t_eve
    EXCEPTIONS
    LIST_TYPE_WRONG = 1
    OTHERS = 2
    IF sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM. "build_eve
    *& Form get_data
    text
    FORM get_data.
    SELECT matnr AS mat werks mblnr menge FROM mseg INTO CORRESPONDING FIELDS OF TABLE itab_item
    WHERE matnr IN mat.
    ENDFORM. "get_data
    *& Form dis_data
    text
    FORM dis_data.
    key_info-header01 = 'MAT'.
    key_info-item01 = 'MAT'.
    key_info-header02 = 'WERKS'.
    key_info-item02 = 'WERKS'.
    REFRESH itab_head.
    LOOP AT itab_item.
    ON CHANGE OF itab_item-mat OR itab_item-werks.
    MOVE-CORRESPONDING itab_item TO itab_head.
    APPEND itab_head.
    ENDON.
    ENDLOOP.
    CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
    EXPORTING
    i_callback_program = 'ZALV_PRDS'
    it_fieldcat = t_fcat
    it_sort = gt_subtot
    it_events = t_eve[]
    i_tabname_header = 'ITAB_HEAD'
    i_tabname_item = 'ITAB_ITEM'
    is_keyinfo = key_info
    TABLES
    t_outtab_header = itab_head
    t_outtab_item = itab_item
    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. "dis_data
    cheers,
    madhavi.

  • Library list question

    I just got a new computer, redownloaded iTunes, and imported my music back into it. Somehow I got most, if not all, my songs in my library twice. It is a pain but I can go through and delete them. My question is that some of the songs now have an exclaimation point icon in front of the title of the song. I was unable to find a list of what the icons mean. I am afraid to start deleting the duplicate songs until I know what the exclaimation point means. Anyone know? Sorry if this is already posted out there somewhere. Thanks.

    Hello,
    The exclamation point icon means that the music file was moved from its original location at some point and is no longer there. So the 'duplicate' ones are the old songs, that have the exclamation points, and can be deleted. However, they are not different files. The songs without exclamation points should be the ones that work (if you click on them they should play.) To be safe, I would check to make sure that the songs without exclamation points work and the ones with them don't work before you delete anything. Hope this helps.
    Victoria

  • Value based hierarchy 11g question

    Hi,
    in my BMM i've created a level based hierarchy composed of two levels: TOTAL and Audiologist
    Total level is setted as Grand Total level and doesn't have logical columns.
    At audiologist level insted i drag and drop two logical columns: Audiologist Code and Audiologist Name
    Then i created two keys.
    First Key: Audiologist Code - Use to display: None
    Second Key: Audiologist Code and Audiologist Name - Use to display : YES
    Graphically my hierarchy is as follow:
    Total-----
    Audiologist
    Audiologist Code
    Audiologist Name
    Now i would like that if i drill down Total appear simultaneously two columns: Audiologist Code and Audiologist Name.
    Is it possible? I remember that in 10 it was.
    It's quite urgent.
    Thanks

    Based on my experience of OWB10gR2 the option to create a "Value Based" hierarchy is only enabled if you create an AW based OLAP model. If you want to create a ROLAP model then I do not think this is possible.
    Question is why create a ROLAP model when you could get better performance and more powerful analytical features by using a multidimensional model within an analytic workspace.
    Keith

  • A linked list question.

    So, I believe I understand linked lists for the most part, except for two lines....
        boolean add(Transaction item)
            for (Transaction curr = first; curr != null; curr = curr.next)
                if (curr.part_num == item.part_num)
                    return false;
            Transaction newItem = new Transaction();
            newItem.transcode = item.transcode;
            newItem.description = item.description;
            newItem.part_num = item.part_num;
            newItem.quantity = item.quantity;
            newItem.next = first;
            first.next = newItem;
            return true;
        }first is null, so First.next would be the first available space for actual insertion, and this is why it then puts null as newItem.next (the end of the list), and sticks newItem in first.next?
    Im glad I read that pass by value thing earlier at the Java Ranch place...
    Heres my actual question: When newItem.next = first; is called, it just copies null as the next field, but leaves the null in first alone right? And then it takes first.next and makes newItem copy into that field, thus inserting the first real item in the list?
    Please tell me I made that connection right. :-D
    Thanks!!

    Pictures are worth a hundred words with linked lists. Did you even put a pencil and paper next to your computer while doing this program, so that you could draw what is happening when you get confused?
    If first is null, then the for loop is skipped--because first is assigned to curr and the loop only executes when curr is not equal to null.
    So, this happens:
    newItem = new Transaction()
    int Transcode = 0
    String description = null
    int partNumber = 0
    int quantity = 0
    Tranasaction next = nullThen values are assigned to each field:
    newItem
    int Transcode = 10
    String description = "screw"
    int partNumber = 46
    int quantity = 200
    //freeze execution here:
    Tranasaction next = null (what will happen here??)Your assumption was:
    Transaction first = null
    That means first does not refer to a Transaction object. Therefore, first does not have a description member, a quantity member, etc., and this is what things look like just before newItem.next = first; is executed:
    newItem ----> Transaction
                  int Transcode = 10
                  String description = "screw"
                  int partNumber = 46
                  int quantity = 200
                  Tranasaction next = null
    first ------> nullNow,
    When newItem.next = first; is calledthings change to this:
    newItem ----> Transaction
                  int Transcode = 10
                  String description = "screw"
                  int partNumber = 46
                  int quantity = 200
          /-------Tranasaction next
    first ------> null That isn't what you want. When you add() a Transaction object to the end of your linked list, it's next member should be null. It's the end of the chain, so there is no next.
    And then it takes first.next and makes newItem copy
    into that field, thus inserting the first real item in the
    list?No. first is null so it does not refer to a Transaction object, and therefore there is no next member variable and consequently no such thing as first.next. You need to understand that null and a Transaction object that has 0 for every member are not the same.
    But suppose for a minute that null and a Transaction object with zeros for every field were the same thing, so that first.next existed. If that was the case, then you could assign newItem to first.next. But, then you would be left with this:
    first
    int Transcode = 0
    String description = null
    int partNumber = 0
    int quantity = 0
    Tranasaction next = newItemWould you want the first Transaction object in your LinkedList to be almost entirely empty?
    Instead, if first is null, you want to make first refer to newItem, i.e. you want to do this:
    newItem ----> Transaction
                  int Transcode = 10
                  String description = "screw"
                  int partNumber = 46
                  int quantity = 200
                  Tranasaction next = null
    first ----/   nullThen when the add() method ends, since newItem is a local variable, it will be destroyed leaving you with this:
                  Transaction
                  int Transcode = 10
                  String description = "screw"
                  int partNumber = 46
                  int quantity = 200
                  Tranasaction next = null
    first ----/   null

  • List question

    Is there a statement that will set every item of a list to a certain value? I tried:
    set l to {0,0,0,........................} -- initialize
    set every item of l to 99 -- this does not work though you would think it should?

    You raise an interesting and valid issue with your question.
    However, the answer isn't exaclty what you'll likely want to hear.
    The long and short of it is this: AppleScript doesn't recognize its own object model. Your best option, though not exactly elegant, is a repeat loop.
    set myList to {1, 2, 3, 4}
    set newList to {}
    repeat with m in myList
    set end of newList to 0
    end repeat
    return newList
    All that being said, I've heard a few times over the years that AppleScript is one day supposed to gain many of the features of other more traditional languages. Here's hoping because I'd love to see some of the niceties I'm used to in PHP and VB come to AS.
    15MBPro    

  • How do I come back to the Hierarchy List Display screen?

    Hi Gurus,
    I have designed a report (Hierarchy Sequential List Display).
    I would select a few records from the resulting report (by clicking on checkboxes that i've provided in the report) and perform an event which inturn executes BDC code.
    After executing the event, I am displaying another screen where in I am displaying the result of BDC with Success/Error messages. Now in here when I press the back button it is taking me to the selection-screen.
    How can I get back to the report screen after pressing the back button on the message screen.
    Solution would be rewarded.
    Thanking You,
    Kiran Kumar S

    Hi Anji,
    I am not calling a screen exclusively for my BDC, so whatz happening is the new messages report is getting displayed on the same screen and I am losing the report screen. BDC is not written as a different program and hence I could not use SUBMIT.
    The thing I am doing is SET PF-STATUS 'xxx'. I have defined a GUI for 'xxx'.
    So this is setting GUI and then displaying the error/success messages report on the same screen.
    How do i handle this?
    Regards,
    Kiran

  • Hierarchial list display- multiple line selection

    hi all,
        In my program I have multiple item field records under a header field.When I select some of the item record line and press a button on application tool bar the control should be transferred to a transaction code.
        how can I accomplish this in hierarchial sequential list display.
      The code I used is:
    CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
      EXPORTING
      I_INTERFACE_CHECK              = ' '
       I_CALLBACK_PROGRAM             = GV_PROGNAME
       I_CALLBACK_PF_STATUS_SET       = 'ORDERS'
       I_CALLBACK_USER_COMMAND        = 'USER_COMMAND'
       IS_LAYOUT                      = X_LAYOUT
       IT_FIELDCAT                    = I_FCAT
      IT_EXCLUDING                   =
      IT_SPECIAL_GROUPS              =
       IT_SORT                        = LT_SORT
      IT_FILTER                      =
      IS_SEL_HIDE                    =
      I_SCREEN_START_COLUMN          = 0
      I_SCREEN_START_LINE            = 0
      I_SCREEN_END_COLUMN            = 0
      I_SCREEN_END_LINE              = 0
      I_DEFAULT                      = 'X'
      I_SAVE                         = ' '
      IS_VARIANT                     =
      IT_EVENTS                      =
      IT_EVENT_EXIT                  =
        i_tabname_header               = I_TAB_HEAD
        i_tabname_item                 = I_TAB_ITEM
      I_STRUCTURE_NAME_HEADER        =
      I_STRUCTURE_NAME_ITEM          =
        is_keyinfo                     = IKEYINFO
      IS_PRINT                       =
      IS_REPREP_ID                   =
      I_BYPASSING_BUFFER             =
      I_BUFFER_ACTIVE                =
      IR_SALV_HIERSEQ_ADAPTER        =
      IT_EXCEPT_QINFO                =
      I_SUPPRESS_EMPTY_DATA          = ABAP_FALSE
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER        =
      ES_EXIT_CAUSED_BY_USER         =
      tables
        t_outtab_header                = I_HEADER
        t_outtab_item                  = I_ITEM
    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.                    " ALV_DISPLAY
    form USER_COMMAND USING r_ucomm LIKE sy-ucomm
                 rs_selfield TYPE slis_selfield.
    *at user-command.
    case r_ucomm.
    when 'SEL'.
    *IF sy-lsind = 1 .
        DO.
          CLEAR wa_item-chk.
          READ LINE sy-index FIELD VALUE wa_item-chk.
          IF sy-subrc <> 0.
            EXIT.
          ELSE.
            CHECK wa_item-chk = 'X'.
            IF rs_selfield-tabindex <> '0'. "CHECKS IF A VALID IS SELECTED OR NOT.
            CHECK i_item IS NOT INITIAL.
            READ TABLE i_item INTO wa_item INDEX rs_selfield-tabindex.
           SET PARAMETER ID 'VST' FIELD wa_item-vstel.
           call transaction 'VL03N' and skip first screen.
           endif.
           endif.
           enddo.
    endcase.
    endform.
                Please help me out with a solution.
                          Thanks in advance.

    hi,
    if u want to go to different transactions according to different fields u have selected than there is one field u can check that
    <b>selfield-fieldname</b>
    IF <b>selfield-fieldname</b> = 'VBELN'.
       SET PARAMETER ID 'VF' FIELD itab-vbeln.
      CALL TRANSACTION 'VF03' AND SKIP FIRST SCREEN.
    ELSEIF <b>selfield-fieldname</b> = 'MATNR'.
      SET PARAMETER ID 'MAT' FIELD t_mat.
      CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.
    ENDIF.

  • Java List question

    Dear all,
    My development tool is JDev. 10.1.3.
    I've a session bean which the list contains several fields. The list defined like this:
    List<cell> List1 = new ArrayList(); cell in a cell.java.
    I created List2, List<cell> List2 = new ArrayList(); which the list contents are copied from List1.
    On the jspx, List1 is on the left hand side, it rendered out as a table, user can select the row and click the button "Add item to List2". On the right hand side, List2 allows user input information. User can choose List1 item to List2 repeatly.
    The question is, e.g. List1 and List2 contain A and B items initially. User inputted information in List2 for A item. And then, choose A item from List1 to List2 again. The new selected item carried the information that user input in List2 before.... I don't know why?
    Then, I modified the List2 like this: List<dupcell> List2 = new ArrayList(); and hope the information will not be carried.
    However, it doesn't work..
    Can anyone help me? Please.
    Thanks for any suggeston!
    Regards.

    Sorry, my English is not good...
    my situation like this:
    "List1" defined in a session bean, "shoppingCart.java", like this:
    List<cell> List1 = new ArrayList();
    In the cell.java code, like this:
    public class cell {
    private String id;
    private String type;
    private Number quantity;
    private String remarks;
    public cell() {}
    public cell(Number id) {
    this.Id = id;
    /** defined getter and setter **/
    In a JSF page1, user selected the id and id will be stored in the session bean. e.g. user selected id "A" and "B".
    Then, user click a button and go to JSF page2.
    This button call a function, the List1 copy to List2, like this:
    public String copy_to_new(){
    List2.addAll(Utils.getShoppingCart().getList1());
    return "page2"; //go to JSF page2
    Two lists were created.
    List1 - user select item, move the item to List2.
    List2 - user input the information: type, quantity and remarks. e.g. user inputted information for id "A": type = "small", quantity = 1, remarks = "urgent".
    Now, user click id "A" from List1 to List2.
    On List2, it shows:
    Id Type Quantity Remarks
    A small 1 urgent
    B
    A small 1 urgent <-- new selected row (I don't want this)
    Question: How can I create a new row that it does not carry the previous information, like this:
    Id Type Quantity Remarks
    A small 1 urgent
    B
    A <-- new selected row
    Thank you very much for any helps!!
    Regards.

Maybe you are looking for

  • Time machine hd must be reformatted

    My Seagate Time Machine hd can't be repaired by the Disk Utility. " Disk Utility can't repar this disk. Back up as many of your files as possible, reformat the disk, and restore your backed-up files. If it is the Seagate that must be reformatted, why

  • How to make email come from different address?

    I have my mac email address but and address that is forwarded to my mac account. I would like to respond to my other address and make it look like to comes from that other address do you know if this is possible? if so how do you do it? I know it can

  • Embedded Flash 10 -- when?

    When will Acrobat upgrade to a Flash 10 embedded player? SWF files built with Flash Builder 4 Beta embedded in a PDF show up blank in Acrobat Reader 9.1.3.  Acrobat Reader 9.1.3 embeds a Flash 9 player.  The Flex 4 SDK requires Flash 10. Thanks,   --

  • Need SQl for

    I have Table create table EXAM STUDENT_ID NUMBER, MARKS NUMBER Data for which looks like STUDENT_ID     MARKS 10     100 20     300 30     200 10     600 20     400 30     300 10     500 20     700 30     900 So if I run this query SELECT Student_id,

  • Calendar Repository Manager for CRM Calendar

    Does anyone know of a way to create a Calendar Repository Manager to integrate with a user's CRM calendar? Actually, information on how to connect the Calendar Repository Manager to anything other then Lotus or Exchange would also be helpfull