ALV won't display

Hi all,
I'm at internship and have to learn ALV.
The below code won't display anything. Am i doing something worng?
REPORT  ZRE_PRM2_LIST_DISPLAY.
*-- Global data definitions for ALV
*--- ALV Grid instance reference
DATA gr_alvgrid TYPE REF TO cl_gui_alv_grid .
*--- Name of the custom control added on the screen
DATA gc_custom_control_name TYPE scrfname VALUE 'CC_ALV' .
*-- Custom container instance reference
DATA gr_ccontainer TYPE REF TO cl_gui_custom_container .
*-- Field catalog table
DATA gt_fieldcat TYPE lvc_t_fcat .
*-- Layout Structure
DATA gs_layout TYPE lvc_s_layo .
**-- Internal table
DATA gt_list TYPE zprm2_material occurs 0 with header line .
* START OF SELECTION
START-OF-SELECTION .
PERFORM get_data .
PERFORM display_alv .
*&      Form  display ALV
*       Display selected PRM2 data.
FORM display_alv .
  IF gr_alvgrid IS INITIAL .
*---- Creating custom container instance
    CREATE OBJECT GR_CCONTAINER
      EXPORTING
        CONTAINER_NAME              = gc_custom_control_name
      EXCEPTIONS
        CNTL_ERROR                  = 1
        CNTL_SYSTEM_ERROR           = 2
        CREATE_ERROR                = 3
        LIFETIME_ERROR              = 4
        LIFETIME_DYNPRO_DYNPRO_LINK = 5
        others                      = 6
    IF SY-SUBRC <> 0.
     MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CREATE OBJECT GR_ALVGRID
      EXPORTING
        I_PARENT          = gr_ccontainer
      EXCEPTIONS
        ERROR_CNTL_CREATE = 1
        ERROR_CNTL_INIT   = 2
        ERROR_CNTL_LINK   = 3
        ERROR_DP_CREATE   = 4
        others            = 5
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
*----Preparing field catalog
    PERFORM prepare_field_catalog CHANGING gt_fieldcat .
*----Preparing layout structure
    PERFORM prepare_layout CHANGING gs_layout .
    CALL METHOD gr_alvgrid->SET_TABLE_FOR_FIRST_DISPLAY
      EXPORTING
*        I_BUFFER_ACTIVE               =
*        I_BYPASSING_BUFFER            =
*        I_CONSISTENCY_CHECK           =
*        I_STRUCTURE_NAME              = 'zprm2_material'
*        IS_VARIANT                    =
*        I_SAVE                        =
*        I_DEFAULT                     = 'X'
        IS_LAYOUT                     = gs_layout
*        IS_PRINT                      =
*        IT_SPECIAL_GROUPS             =
*        IT_TOOLBAR_EXCLUDING          =
*        IT_HYPERLINK                  =
*        IT_ALV_GRAPHICS               =
*        IT_EXCEPT_QINFO               =
*        IR_SALV_ADAPTER               =
      CHANGING
        IT_OUTTAB                     = gt_list[]
        IT_FIELDCATALOG               = gt_fieldcat
*        IT_SORT                       =
*        IT_FILTER                     =
      EXCEPTIONS
        INVALID_PARAMETER_COMBINATION = 1
        PROGRAM_ERROR                 = 2
        TOO_MANY_LINES                = 3
        others                        = 4
    IF SY-SUBRC <> 0.
     MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
  ENDIF .
ENDFORM .
*&      Form  get_data
*       GET data from prm2 tables.
FORM get_data .
  select * from zprm2_material into gt_list .
    APPEND gt_list .
  ENDSELECT.
ENDFORM .
FORM prepare_field_catalog CHANGING pt_fieldcat TYPE lvc_t_fcat .
  DATA ls_fcat type lvc_s_fcat .
  CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
   EXPORTING
     I_STRUCTURE_NAME             = 'zprm2_material'
    CHANGING
      CT_FIELDCAT                  = pt_fieldcat[]
   EXCEPTIONS
     INCONSISTENT_INTERFACE       = 1
     PROGRAM_ERROR                = 2
     OTHERS                       = 3
  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 .
FORM prepare_layout CHANGING ps_layout TYPE lvc_s_layo .
  ps_layout-zebra = 'X' .
  ps_layout-grid_title = 'PRM2' .
  ps_layout-smalltitle = 'X'.
ENDFORM .

I made these changes:
DATA gr_ccontainer TYPE REF TO cl_gui_dialogbox_container .
so i changed the reference of the container to cl_gui_dialogbox_container, and...
    CREATE OBJECT GR_CCONTAINER
      EXPORTING
        width                       = 1000
       height                      = 250
        top                         = 50
        left                        = 50
        caption                     = 'TEST'
      EXCEPTIONS
        cntl_error                  = 1
        cntl_system_error           = 2
        create_error                = 3
        lifetime_error              = 4
        lifetime_dynpro_dynpro_link = 5.
    IF SY-SUBRC <> 0.
     MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
Changed this method. Now it says that the fieldcatalog is empty.
I just want it to auto create the container. Is it a possibility?

Similar Messages

  • My iPhone 5 won't display smart text options.

    My iPhone 5 won't display smart text. It did when I initially downloaded the new OS, now those options don't appear at all. Did I click something to make them disappear?
    I went into Settings to see if there was a component of it within Messages. I don't see anything.
    Thoughts please.....
    Thanks much
    Ginger

    Awwww......that's it....the dash! I tapped it. Tried to drag it up/down and it didn't move. Now I swiped and it's back!
    So I need to remember to drag up/down and now swipe.....
    Thanks much!
    Ginger

  • ITunes won't display current voice memos from my iPhone 4S. How can I tranfer this data without loosing it?, iTunes won't display current voice memos from my iPhone 4S. How can I tranfer this data without loosing it?

    Please help! My iTunes won't display my voice memos from iPhone 4S when trying to sync data. Files are to large for emailing. I want to back up the files on to my computer.

    JustinV72 wrote:
    How do I get the audiobook onto my iphone without erasing anything?
    You transfer the purchases to the computer you use to sync the iPhone.  You can use a thumb drive or an external HD, etc.  Read this: iTunes for Mac - How to copy purchases between computers:  http://support.apple.com/kb/HT1373

  • Values from alv hierarchical list display

    hi all,
    i need to display sme values from vbak and vbap tables in ALV hierarchical list display.if i click on the sales order of the header, it should directly go to the second screen of transaction VA03 with the sales details displayed..
       i got the parameter id, how can i assign the selected sales order value to this parameter id?...
    regards,
    Hamsa Priya

    Hi,
    Check this example..Marked in bold..
    TYPE-POOLS: slis.
    DATA: BEGIN OF itab OCCURS 0,
            vbeln TYPE vbeln,
            expand,
          END OF itab.
    DATA: BEGIN OF itab1 OCCURS 0,
            vbeln TYPE vbeln,
            posnr TYPE posnr,
            matnr TYPE matnr,
            netpr TYPE netpr,
          END OF itab1.
    DATA: t_fieldcatalog TYPE slis_t_fieldcat_alv.
    DATA: s_fieldcatalog TYPE slis_fieldcat_alv.
    s_fieldcatalog-col_pos = '1'.
    s_fieldcatalog-fieldname = 'VBELN'.
    s_fieldcatalog-tabname   = 'ITAB'.
    s_fieldcatalog-rollname  = 'VBELN'.
    s_fieldcatalog-outputlen = '12'.
    APPEND s_fieldcatalog TO t_fieldcatalog.
    CLEAR: s_fieldcatalog.
    s_fieldcatalog-col_pos = '1'.
    s_fieldcatalog-fieldname = 'VBELN'.
    s_fieldcatalog-tabname   = 'ITAB1'.
    s_fieldcatalog-rollname  = 'VBELN'.
    s_fieldcatalog-outputlen = '12'.
    APPEND s_fieldcatalog TO t_fieldcatalog.
    CLEAR: s_fieldcatalog.
    s_fieldcatalog-col_pos = '2'.
    s_fieldcatalog-fieldname = 'POSNR'.
    s_fieldcatalog-tabname   = 'ITAB1'.
    s_fieldcatalog-rollname  = 'POSNR'.
    APPEND s_fieldcatalog TO t_fieldcatalog.
    CLEAR: s_fieldcatalog.
    s_fieldcatalog-col_pos = '3'.
    s_fieldcatalog-fieldname = 'MATNR'.
    s_fieldcatalog-tabname   = 'ITAB1'.
    s_fieldcatalog-rollname  = 'MATNR'.
    APPEND s_fieldcatalog TO t_fieldcatalog.
    CLEAR: s_fieldcatalog.
    s_fieldcatalog-col_pos = '4'.
    s_fieldcatalog-fieldname = 'NETPR'.
    s_fieldcatalog-tabname   = 'ITAB1'.
    s_fieldcatalog-rollname  = 'NETPR'.
    s_fieldcatalog-do_sum    = 'X'.
    APPEND s_fieldcatalog TO t_fieldcatalog.
    CLEAR: s_fieldcatalog.
    DATA: s_layout TYPE slis_layout_alv.
    s_layout-subtotals_text            = 'SUBTOTAL TEXT'.
    s_layout-key_hotspot = 'X'.
    s_layout-expand_fieldname = 'EXPAND'.
    SELECT vbeln UP TO 100 ROWS
           FROM
           vbak
           INTO TABLE itab
           WHERE vbeln > '0060000040'.
    IF NOT itab[] IS INITIAL.
      SELECT vbeln posnr matnr netpr
             FROM vbap
             INTO TABLE itab1
             FOR ALL ENTRIES IN itab
             WHERE vbeln = itab-vbeln.
    ENDIF.
    DATA: v_repid TYPE syrepid.
    v_repid = sy-repid.
    DATA: s_keyinfo TYPE slis_keyinfo_alv.
    s_keyinfo-header01 = 'VBELN'.
    s_keyinfo-item01   = 'VBELN'.
    CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
         EXPORTING
              i_callback_program      = v_repid
    <b>          i_callback_user_command = 'USER_COMMAND'</b>
              is_layout               = s_layout
              it_fieldcat             = t_fieldcatalog
              i_tabname_header        = 'ITAB'
              i_tabname_item          = 'ITAB1'
              is_keyinfo              = s_keyinfo
         TABLES
              t_outtab_header         = itab
              t_outtab_item           = itab1
         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.
    <b>FORM user_command USING ucomm LIKE sy-ucomm
    selfield TYPE slis_selfield.
      IF ucomm = '&IC1' AND selfield-fieldname = 'VBELN'.
        READ TABLE itab INDEX selfield-tabindex.
        IF sy-subrc = 0.
    document
          SET PARAMETER ID 'AUN' FIELD itab-vbeln.
          CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
        ENDIF.
      ENDIF.
    ENDFORM.</b>
    Thanks,
    Naren

  • ALV report which displays Delivery and Invoice details..by linking vbfa.

    Hi...
    I wants to develop an ALV Report, which displays Delivery details as well as Invoice details for a range of given sale orders.
    For this report I am using Tables : VBAK,VBAP,LIKP,LIPS,VBFA tables .
    Here VBFA is a table for Document flow how to link this with report ??
    Please reply.
    Regards ,
    ASHOK
    Moderator message : Not enough re-search before posting, spec dumping not allowed. Thread locked.
    Edited by: Vinod Kumar on Aug 1, 2011 9:58 AM

    VBFA has VBELV and POSNV can be used to map VBAP (sales order item) i.e.
    VBFA-VBELV = VBAP-VBELN AND
    VBFA-POSNV = VBAP-POSNV
    with VBTYP_N = J Values available in VBFA-VBELN and VBFA-POSNN will be LIPS -VBELN and LIPS-POSNR
    VBTYP_N/ VBTYP_V = J stands for delivery and C stands for order
    Nitesh

  • I updated to iOS 7 and now some of my apps won't display in landscape mode and they did before the update. Any ideas on how to fix it?

    I updated to iOS 7 and now some of my apps won't display in landscape mode and they did before the update. Any ideas on how to fix it?

    This could be from having restrictions enabled. Icons completely disappear when "restricted"

  • IMac 2.66 Radeon HD 2600 Pro: some Excel files won't display in ppt decks

    Running Leopard 10.5.8 and MS Office 2004
    Two iMac (8.1) 2.66 GHz with ATI Radeon HD 2600 Pro video won't display some Excel files in PowerPoint decks, but iMac 1.83 GHz Core Duo will display o.k. as will MacBook Pro, MacBook, etc. Installing a trial version of Office 2008, both iMac 2.66 GHz display the PowerPoint files o.k.
    I could downgrade the users to Intel iMac 1.83 GHz, or buy two copies of Office 2008 and support them, neither of which is a great solution.
    Looking for a simple fix or workaround on what seems to be a video card issue. Don't seem to see this problem or a fix on the ATI site. I've googled this but haven't run into a similar issue.

    Well, Office 2008 is only $110 USD at http://www.amazon.com/Microsoft-Office-2008-Home-Student/dp/B000X86ZAS/ref=sr11?ie=UTF8&s=software&qid=1251560959&sr=8-1
    That seems the least expensive solution to me.

  • ITunes won't play music and won't display some of my album art.

    iTunes won't play music and won't display some of my album art. I'll click play but the song wont play and some of my album art doesnt appear anymore. When I go on iTunes music store non of the pictures will appear it will just be black where a picture should be. What can i do to fix all of this?????

    I am having the exact same problem and have been trying to solve it for a couple of weeks. So far I havent found a soulution. But if you get one can you please let me know? Good Luck

  • Difficulty using a projector. I have a MBP 17" and am running 10.6.8. Often I need to make a Powerpoint or other presentation  at a client and I want to connect my computer to their projector. Either it won't display on the projector at all. HELP!

    Difficulty using a projector. I have a MBP 17" and am running 10.6.8. Often I need to make a Powerpoint or other presentation  at a client and I want to connect my computer to their projector. Either it won't display on the projector at all. Once it displayed but the presentation mode was on the big screen and the presentation I wanted to show was on my MBP screen. I have the adapter( white ones) to attached to the projector cables.  I am so frsutrated...it looks so silly not to have a computer work during a presentation..
    Another problem one the rare occasion that it shows on the screen is that the presentation does show just my desk top.  Any ideas?
    Thanks !

    You often have to turn off Mirroring to be able to set the second "screen"s resolution to something reasonable. When you do, the two screens become an "Exceeded Desktop" joined along one edge, and the Arrange pane in displays prefs can allow you to specify what edge. Initially, it will show a vacant extension of the built-in screen's desktop.
    The mouse moves freely across that shared edge, and can allow you to drag the presentation window across to the the projector screen and re-size it to fit.

  • Private Photos App - pictures not displaying This app was working fine, then suddenly it won`t display any of the photos.

    This app was working fine, then suddenly it won't display any of the photos. One day the photos were there, gone the next. It still shows how many photos are there but just shows a white screen. I can't export anything to the photo album. Adding photos to existing folders yields the same result, only white screen displayed. However, I can create new albums and add photos to those without issue. Does anybody know how to recover the "missing" photo"  I was going to try reinstalling the app but it's no longer available in the iTunes App Store. Thanks, Tracy

    1, you can't at the moment, though with iOS 5 in the Autumn, from http://www.apple.com/ios/ios5/features.html#photos :
    Even organize your photos in albums — right on your device
    2, by removing it from you synced from and re-syncing. Only photos taken with the iPad, copied to it via the camera connection kit, or saved from emails/websites etc can be deleted directly on the iPad (either via the trashcan icon in the top right corner if viewing the photo in full screen, or via the icon of the box with the arrow coming out of it in thumbnail view)
    3, the location of the photos that you synced to the iPad should be listed on the iPad's Photos tab when connected to your computer's iTunes.
    4, you can copy the photos from your iPad to your computer : http://support.apple.com/kb/HT4083 . You should also be able to delete them from the iPad as part of the transfer process to your computer, and it's then your choice whether to add them to your sync photo list so as to copy them back to the iPad. Copying them to your computer would allow you to organise them into folders and therefore be able to sync them back into separate albums.
    5, I don't use Dropbox either. There are some third-party browser apps in the iTunes App Store that allow you to download pages so that you can view them when offline e.g. Atomic Web (the whole page is saved within Atomic Web, it doesn't place a photo into the Photos app)
    6, deleting content should help. If you remove an app from your iPad then you also remove the content that it's got on the iPad - so if you then decide to reinstall it back onto the iPad then you will need to manually add back any content that you want in it. None of the Apple built-in apps (including Photos) can be removed from the iPad

  • Database field won't display

    I'm new to Crystal Reports in .NET but I do have my 1st report working except for one field that I'm trying to use in a sub report.  It's in my database fields just like the other field for the sub report.  I can see data for both fields in the Browse Data.  One field and it's heading display just fine but I can't see the other one anywhere.  The field heading that's created when I drag it into the Detail area won't display in the report either.  I've tried deleting the field and readding it but nothing helps.  As far as I know I've done nothing to suppress this field from printing.  I REALLY need to get this working.  Thanks for your help.

    Hello Paul,
    I recommend to post this query to the [.NET Development - Crystal Reports|SAP Crystal Reports, version for Visual Studio; forum.
    That forum is monitored by qualified technicians and you will get a faster response there.
    Also, all Crystal Reports .NET Development queries remain in one place and thus can
    be easily searched in one place.
    Thanks a lot,
    Falk

  • HP Photosmart Plus B210a all-in-one won't display any networks in the list.

    Hi, I recently purchased a HP Photosmart Plus all in one printer and I've been having trouble with it from day one.
    First off, it won't connect wirelessly.
    It won't display any networks in the list when searched for, it won't take my network details when I manually input them and it won't take any static IP address I've tried from other suggestions.
    Secondly, the print quality is very bad. Streaks and fading are occuring and after using up 70% of my ink trying to sort it out through troubleshooting it's still bad.
    It's extremely important for me to be able to have web access using the printer as all members of my household use it and it'll get fustrating having to car laptops and computers around to print.
    Can anybody help at all?

    Top line says "The wireless radio is not functioning. Contact HP support"
    I take this as a very bad sign and needs replacing?
    The tests I done produce streaks, fading and lines. I printed off two photos, one from a memory card and one from a scan. The memory card produced heavy blocked lines of color and the scan was just dull.
    I'm using a Wanadoo Wireless Livebox and Windows 7 64 Bit
    One other question... is this like a brilliant printer for photos mainly? I'm a Graphics design student and although my final prints are made from home I would like accurate and decent printouts for my portfolios. Should I keep this or go for another one with similar features and better print quality?

  • Over half my albums in iPhoto won't display the enlarged photo. How can I correct this?

    Over half my albums in iPhoto won't display the enlarged photo. How can I correct this?

    There are several possible causes for the Black Screen issue
    1. Permissions in the Library: Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Include the option to check and repair permissions.
    2. Minor Database corruption: Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild.
    3. A Damaged Photo: Select one of the affected photos in the iPhoto Window and right click on it. From the resulting menu select 'Show File (or 'Show Original File' if that's available). (On iPhoto 11 this option is under the File -> Reveal in Finder.) Will the file open in Preview? If not then the file is damaged. Time to restore from your back up.
    4. A corrupted iPhoto Cache: Trash the com.apple.iPhoto folder from HD/Users/Your Name/ Library/ Caches...
    5. A corrupted preference file: Trash the com.apple.iPhoto.plist file from the HD/Users/ Your Name / library / preferences folder. (Remember you'll need to reset your User options afterwards. These include minor settings like the window colour and so on. Note: If you've moved your library you'll need to point iPhoto at it again.)
    If none of these help: As a Test:
    Hold down the option (or alt) key key and launch iPhoto. From the resulting menu select 'Create Library'
    Import a few pics into this new, blank library. Is the Problem repeated there?

  • Updated to iOS 7.1.1 newsfeed in Facebook won't display?

    Updated to iOS 7.1.1 this morning and the newsfeed in Facebook won't display, instead it's find a friend page! How do I fix this please?

    Contact your carrier

  • Layered text and graphic in Word won't display when converted to PDF

    I have several simple shapes with text layered in front in my Word document. After they are converted to PDF using Acrobat XI, only the shape will display. I can tell the text is still there, because I can use my cursor tool to select it, but it won't display visually. It looks like it isn't there but it really is. One bit of text is even an internal link, and the link still works but I can't see the text I'm clicking on.
    If anyone has any suggestions I'd appreciate it.
    Thank you,

    Hi Lori - this was perfect! It was an issue with the layers being misordered. I used the Edit Text & Images tool listed under Tools > Content Editing, found the layers, then by right-clicking I was able to bring the text to the front and it all looks great now.
    I would like to know why this happened, or if not why, how I could make sure it doesn't happen again. If there's a check box or other setting I could use to remove this problem that would be fantastic.
    Thank you so much for pointing me in the right direction!
    -Scott

Maybe you are looking for

  • JFileChooser Save as Dialog

    I use a JFileChooser to have the user determine where to save a file. My problem is that the "File Name:" text field gets filled with the file path. I would much rather this box be left blank, so the user doesn't have to delete the file path in order

  • Error 27 when trying to export final project

    I'm working on a brand new macbook Pro 15inch, 16gb ram and using FCP X 10.1.1 but when I go to export my project (25gb) I am getting an error 27 msg a couple of minutes into the export.  Can you please tell me what the cause may be and how to rectif

  • IDOCS: Inbound non-SAP system

    Hi The outbound idocs works fine. I want to create an inbound goods receipt/movement idoc. Should i rather write RFC to update the SAP system from a non-SAP system ?

  • Logical Partition.

    Hello All, I have a lil knowledge about logical partition. Could you please send me some document related to logical partition? Where and how it can be used in BW? Thanks.

  • Best RAW Image Processing for Canon Digital Rebel XT - PS Elements 6??

    I'm new to RAW image processing and image editing. I just bought a Canon digital Rebel XT. It comes with Canon Digital Professional 2.1 software. I also have Aperture upgraded to 1.5.6, which I have tried on JPEGs from an earlier digital camera that