Get VA03 screen after i click on a record

Hello experts,
                   i am working on a report(ALV). in the display i have SALES ORDER FIELD, now what im tyring is that wen i click on sales order number, that particular sales order should open up.
                     how can i do this?

Hi,
chek teh sameple code..see the USER_COMMAND SUBROUTINE.u have to do lile that..
TABLES:     ekko.
type-pools: slis.                                 "ALV Declarations
*Data Declaration
TYPES: BEGIN OF t_ekko,
  ebeln TYPE ekpo-ebeln,
  ebelp TYPE ekpo-ebelp,
  statu TYPE ekpo-statu,
  aedat TYPE ekpo-aedat,
  matnr TYPE ekpo-matnr,
  menge TYPE ekpo-menge,
  meins TYPE ekpo-meins,
  netpr TYPE ekpo-netpr,
  peinh TYPE ekpo-peinh,
END OF t_ekko.
DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
      wa_ekko TYPE t_ekko.
*ALV data declarations
data: fieldcatalog type slis_t_fieldcat_alv with header line,
      gd_tab_group type slis_t_sp_group_alv,
      gd_layout    type slis_layout_alv,
      gd_repid     like sy-repid,
      gt_events     type slis_t_event,
      gd_prntparams type slis_print_alv.
*Start-of-selection.
START-OF-SELECTION.
perform data_retrieval.
perform build_fieldcatalog.
perform build_layout.
perform build_events.
perform build_print_params.
perform display_alv_report.
*&      Form  BUILD_FIELDCATALOG
      Build Fieldcatalog for ALV Report
form build_fieldcatalog.
There are a number of ways to create a fieldcat.
For the purpose of this example i will build the fieldcatalog manualy
by populating the internal table fields individually and then
appending the rows. This method can be the most time consuming but can
also allow you  more control of the final product.
Beware though, you need to ensure that all fields required are
populated. When using some of functionality available via ALV, such as
total. You may need to provide more information than if you were
simply displaying the result
              I.e. Field type may be required in-order for
                   the 'TOTAL' function to work.
  fieldcatalog-fieldname   = 'EBELN'.
  fieldcatalog-seltext_m   = 'Purchase Order'.
  fieldcatalog-col_pos     = 0.
  fieldcatalog-outputlen   = 10.
  fieldcatalog-emphasize   = 'X'.
  fieldcatalog-key         = 'X'.
fieldcatalog-do_sum      = 'X'.
fieldcatalog-no_zero     = 'X'.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.
  fieldcatalog-fieldname   = 'EBELP'.
  fieldcatalog-seltext_m   = 'PO Item'.
  fieldcatalog-col_pos     = 1.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.
  fieldcatalog-fieldname   = 'STATU'.
  fieldcatalog-seltext_m   = 'Status'.
  fieldcatalog-col_pos     = 2.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.
  fieldcatalog-fieldname   = 'AEDAT'.
  fieldcatalog-seltext_m   = 'Item change date'.
  fieldcatalog-col_pos     = 3.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.
  fieldcatalog-fieldname   = 'MATNR'.
  fieldcatalog-seltext_m   = 'Material Number'.
  fieldcatalog-col_pos     = 4.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.
  fieldcatalog-fieldname   = 'MENGE'.
  fieldcatalog-seltext_m   = 'PO quantity'.
  fieldcatalog-col_pos     = 5.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.
  fieldcatalog-fieldname   = 'MEINS'.
  fieldcatalog-seltext_m   = 'Order Unit'.
  fieldcatalog-col_pos     = 6.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.
  fieldcatalog-fieldname   = 'NETPR'.
  fieldcatalog-seltext_m   = 'Net Price'.
  fieldcatalog-col_pos     = 7.
  fieldcatalog-outputlen   = 15.
  fieldcatalog-do_sum      = 'X'.
  fieldcatalog-datatype     = 'CURR'.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.
  fieldcatalog-fieldname   = 'PEINH'.
  fieldcatalog-seltext_m   = 'Price Unit'.
  fieldcatalog-col_pos     = 8.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.
endform.                    " BUILD_FIELDCATALOG
*&      Form  BUILD_LAYOUT
      Build layout for ALV grid report
form build_layout.
  gd_layout-no_input          = 'X'.
  gd_layout-colwidth_optimize = 'X'.
  gd_layout-totals_text       = 'Totals'(201).
gd_layout-totals_only        = 'X'.
gd_layout-f2code            = 'DISP'.  "Sets fcode for when double
                                        "click(press f2)
gd_layout-zebra             = 'X'.
gd_layout-group_change_edit = 'X'.
gd_layout-header_text       = 'helllllo'.
endform.                    " BUILD_LAYOUT
*&      Form  DISPLAY_ALV_REPORT
      Display report using ALV grid
form display_alv_report.
  gd_repid = sy-repid.
  call function 'REUSE_ALV_GRID_DISPLAY'
       exporting
            i_callback_program      = gd_repid
            i_callback_top_of_page   = 'TOP-OF-PAGE'  "see FORM
            i_callback_user_command = 'USER_COMMAND'
           i_grid_title           = outtext
            is_layout               = gd_layout
            it_fieldcat             = fieldcatalog[]
           it_special_groups       = gd_tabgroup
            it_events               = gt_events 
            is_print                = gd_prntparams 
            i_save                  = 'X'
           is_variant              = z_template
       tables
            t_outtab                = it_ekko
       exceptions
            program_error           = 1
            others                  = 2.
  if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  endif.
endform.                    " DISPLAY_ALV_REPORT
*&      Form  DATA_RETRIEVAL
      Retrieve data form EKPO table and populate itab it_ekko
form data_retrieval.
select ebeln ebelp statu aedat matnr menge meins netpr peinh
up to 10 rows
  from ekpo
  into table it_ekko.
endform.                    " DATA_RETRIEVAL
Form  TOP-OF-PAGE                                                 *
ALV Report Header                                                 *
Form top-of-page.
*ALV Header declarations
data: t_header type slis_t_listheader,
      wa_header type slis_listheader,
      t_line like wa_header-info,
      ld_lines type i,
      ld_linesc(10) type c.
Title
  wa_header-typ  = 'H'.
  wa_header-info = 'EKKO Table Report'.
  append wa_header to t_header.
  clear wa_header.
Date
  wa_header-typ  = 'S'.
  wa_header-key = 'Date: '.
  CONCATENATE  sy-datum+6(2) '.'
               sy-datum+4(2) '.'
               sy-datum(4) INTO wa_header-info.   "todays date
  append wa_header to t_header.
  clear: wa_header.
Total No. of Records Selected
  describe table it_ekko lines ld_lines.
  ld_linesc = ld_lines.
  concatenate 'Total No. of Records Selected: ' ld_linesc
                    into t_line separated by space.
  wa_header-typ  = 'A'.
  wa_header-info = t_line.
  append wa_header to t_header.
  clear: wa_header, t_line.
  call function 'REUSE_ALV_COMMENTARY_WRITE'
       exporting
            it_list_commentary = t_header.
           i_logo             = 'Z_LOGO'.
endform.
      FORM USER_COMMAND                                          *
      --> R_UCOMM                                                *
      --> RS_SELFIELD                                            *
FORM user_command USING r_ucomm LIKE sy-ucomm
                  rs_selfield TYPE slis_selfield.
Check function code
  CASE r_ucomm.
    WHEN '&IC1'.
  Check field clicked on within ALVgrid report
    IF rs_selfield-fieldname = 'EBELN'.
    Read data table, using index of row user clicked on
      READ TABLE it_ekko INTO wa_ekko INDEX rs_selfield-tabindex.
    Set parameter ID for transaction screen field
      SET PARAMETER ID 'BES' FIELD wa_ekko-ebeln.
    Sxecute transaction ME23N, and skip initial data entry screen
      CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
    ENDIF.
  ENDCASE.
ENDFORM.
*&      Form  BUILD_EVENTS
      Build events table
form build_events.
  data: ls_event type slis_alv_event.
  call function 'REUSE_ALV_EVENTS_GET'
       exporting
            i_list_type = 0
       importing
            et_events   = gt_events[].
  read table gt_events with key name =  slis_ev_end_of_page
                           into ls_event.
  if sy-subrc = 0.
    move 'END_OF_PAGE' to ls_event-form.
    append ls_event to gt_events.
  endif.
    read table gt_events with key name =  slis_ev_end_of_list
                           into ls_event.
  if sy-subrc = 0.
    move 'END_OF_LIST' to ls_event-form.
    append ls_event to gt_events.
  endif.
endform.                    " BUILD_EVENTS
*&      Form  BUILD_PRINT_PARAMS
      Setup print parameters
form build_print_params.
  gd_prntparams-reserve_lines = '3'.   "Lines reserved for footer
  gd_prntparams-no_coverpage = 'X'.
endform.                    " BUILD_PRINT_PARAMS
*&      Form  END_OF_PAGE
form END_OF_PAGE.
  data: listwidth type i,
        ld_pagepos(10) type c,
        ld_page(10)    type c.
  write: sy-uline(50).
  skip.
  write:/40 'Page:', sy-pagno .
endform.
*&      Form  END_OF_LIST
form END_OF_LIST.
  data: listwidth type i,
        ld_pagepos(10) type c,
        ld_page(10)    type c.
  skip.
  write:/40 'Page:', sy-pagno .
endform.
Reward points if u find useful.
Regards,
Nagaraj

Similar Messages

  • I was trying to upgrade and all that seems to happen is I get a verification screen after I click on the "upgrade now" button?

    I was trying to upgrade and all that seems to happen is I get a verification screen after I click on the "upgrade now" button? I've tried it a couple of times but it seems to be in a constant loop.

    Hi John,
    I'm sorry that you're having trouble purchasing your upgrade. What are you trying to upgrade to? I've checked your account, and didn't see any stalled orders.
    Have you tried logging in to Adobe.com from a different web browser?
    Best,
    Sara

  • Thinkpad X300 with windows xp sp2 gets blue screen after standby.

    We have a Thinkpad X300 (with windows xp sp2) gets blue screen after standby. I mean after you close the lid then open it. Anyone has see this kind of behave before?
    Thanks,

    I have found the solution to this problem - hope you are still watching the thread.
    Express install in parallels seems to be the culprit. Do a custom install instead and set your own virtual hard disk size. I set mine to 12 Gb (12000 Mb)and made it a fixed size instead of "growing" or whatever the heck parallels calls it. I also chose shared network instead of "bridged" (I read that someone else had identified this as part of the problem).
    After making those changes it worked like a charm.

  • Again getting black screen after Exiting Safe Mode in Windows 8 as suggested by hp

    I'm again getting black screen after entering safe mode after upgrade to Windows and exiting from safe mode but after exiting my laptop display was of 8.b but after some time it again went back to same black screen problem .I disabled Intel and amd hd 86graphics driver in safe mode.please help .

    Hi there ,
    Thank you for visiting the HP Support Forums and Welcome! I have looked into the issue you are having with your display Turning Black after entering Safe Mode.  I found a document for you called Troubleshooting Black Screen Displays with No Error Messages During Startup or Boot. It would be very helpful for me to know what has been done already so that I can narrow down what troubleshooting would be best for you. You mentioned in your post "again". Is it an intermittent issue? Please follow these provided troubleshooting steps, re-post with the results of the steps in the document, and any other troubleshooting steps you had tried and the results. Have a great day!

  • Why am i getting error -43 after mix down on audio recording?

    why am i getting error -43 after mix down on audio recording?

    to where are you trying to mix down the file? a -43 is a file not found error

  • I have iphoto 9.2.1 and it will not load. The loading screen after I click on the app keeps circling. Can anyone help Please?

    I have iphoto 9.2.1 and it will not load. After I click on the app it opens but the screen continousley tries to load. Please Help

    Option 1
    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. Choose to Rebuild iPhoto Library Database from automatic backup.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one. .
    Regards
    TD

  • Getting black screen after trying installing windows 7 using bootcamp

    I downloaded ISO for windows 7 ultimate 64 bit and after using boot camp and partitioning my hardware the computer re stared as expected but then i get the black screen saying "Press any key" and i think its becuase windows 7 can not boot up what can i do to fix it.
    I also tried downloading different ISO versions but it didn't work.
    I Have a mid 2012 mc book pro 13 inch

    The hatter wrote:
    A Mac Pro (not a notebook) should be 95% fine w/o. A notebook like MacBook Pro is not "Mac Pro" which are 65 lbs. So don't confuse us iwth Mac Pro and MacBook Pro.
    On Mac Pro you have to pull all the other drives but the one you will install on - that means no external drives etc,
    Sorry I don't get your post? And was it a reply to my or the OP?
    Should be 95% fine w/o??? What does that mean?

  • Getting Blue Screen after OS Update.

    Dear All...
    Iam Having 10.5.1 MAc X. I started a OS update to 10.5.8 and it provided me as a file. I started installing the File. After installing the File, it prompted me to make a restart. On restart, iam getting a Blue screen and the process is running... and no login screen is appearing..
    Not sure is that installing in the background or any other problem.
    Please assist.

    http://discussions.apple.com/ann.jspa?annID=495

  • When video taping on my ipad mini, I sometimes get a yellow rectangular box at the top of the screen after which I can't record when I tap the record button.

    I do a lot of video taping on my ipad mini. Sometimes after I stop & try to start recording again, I get a yellow rectangular box at the top of the screen and can't record. If I keep taping the yellow box it disappears & I can video, but I've missed some taping time. I know there were some letters in the box,but I've never written down what they were.

    The letters are AE/AF lock. If memory serves me well it's auto exposure/ auto focus lock. Practice with the camera in photo mode. Hold your finger on the item you want to focus on, a rectangle will appear, keep holding your finger on the screen till the rectangle enlarges twice. AE/AF should appear, the item should be in focus and stop going in and out of focus. Tap the screen to get rid of AE/AF.

  • Not getting login screen after up dating to 10.5.6 from 10.5.5

    It seems as if the system is trying to finish boot up but all I get is the propeller spinning then the screen blinks subtle 2 shades of blue then nothing. (blink , blink, blink, etc.) But if I restart with the Leopard install disc inserted and holding down the "D" key it seems to boot up OK.

    Carolyn Samit wrote:
    HI,
    Try booting while holding down the Option key. That will open The Startup Manager which allows you to choose the startup volume available to your Mac. Select Macintosh 10.5.6 and click restart.
    If that doesn't work, try checking the hard disk for errors.
    Restart your Mac while holding down the C key, pressing the power button and inserting your install disk all at the same time. An Installer window will open, but do not proceed with any installations. Instead, from the Menu Bar, select Utilities > Disk Utility. In the Disk Utility window click First Aid, and then click Verify. If Disk Utility reports errors, click Repair. When Disk Utility is finished, from the Menu Bar, select Utilities/Startup Disk. Select MacintoshHD 10.x.x and click Restart.
    Carolyn
    Thank you Carolyn
    I ended up pressing the S key instead of the C key (to early in the morning) with the install disc already inserted. This got me to the install window where I selected verify /repair from the menu bar (found nothing wrong). So, I selected start up disc and it restarted just fine. woo hoo
    Thanks again
    Joe

  • Get login screen after I logged in

    When i Login i get the standard background screen and after that a blue one, it stays a few minutes this way and after that i get the login screen again.
    I tried to safeboot but I get redirected to the login screen again.
    Anyone got a solution for this, =S
    zeemeeuw

    This has been mentioned in some of the other threads about this issue, but an Archive and Install from your Leopard Installer DVD will solve this problem.
    I had the same problem and was unable to login to my main working account. All the admin and the other accounts were all okay.
    I did an archive and install, plus installed the updates (huge combo updater) and all is well again. Yeah it is a pain, but this is the first system reinstall since I originally installed Leopard.
    Just make sure to run the Disk Utility Repair Disk before you do this.
    Message was edited by: Zac.

  • IPhone 6 plus getting white screen after unlock. Why ?

    my iPhone 6plus gets a white screen with the black Apple logo once I unlock. It will last for a few seconds. is this a hardware problem? What should I do?

    Try to reset your phone, click the sleep button and home button.

  • Macbook just getting grey screen after Itunes update

    I have a macbook that won't boot up. It was updating some software, Itunes included and required a restart. Well, it never restarted, just a grey screen. Is this a known issue? I know my macbook is just out of warranty (of course). Is apple doing anything about this or is this just my computer? Please help, I'm freaking out!

    A grey screen (no Apple logo) on startup, be it after an update or not is typically an indication of hardware failure on the machine. It's possible that the update "broke" a startup file, which would prevent you from booting into the OS but typically if that were the case the machine would get further into the startup sequence.
    Do you have access to the system restore discs that came with your computer? If so, put the first one in, restart the computer and hold the "option" key. Are you presented with icon(s) that look like a HD or CD-ROM?

  • Why do I see a white screen after right-clicking a link & asking to open page in a new tab?

    As the question states, the tab that opens is a completely white screen absent of text and/or graphics. This condition occurs whether I open a link from a Web site (CNN.com) or when clicking on a link within an email (Outlook 2007).
    Full text & graphics are displayed if I select "Open link in a new window" when opening a Web link but e-mail does not provide that option.

    Hi
    You can try these checks on your client's system... looks like some browser issue..
    I am assuming you are running on same IE versions on both the systems..
    1. Try to open in some other browser( mozilla or chrome...) and see if it works..
    2. Check this microsoft link also.
       http://support.microsoft.com/kb/308260
    Hope this helps...

  • Ipad mirroring on Apple TV getting black screen after os upgrade to 7.0.3

    Ipad mirroring works in 7.0.2. After upgrading to 7.0.3, on mirroring the screen goes black. Do we need to upgrade Apple TV or is this something else?

    I have the same problem since my upgrade to iOS 8. black screen, no mirroring. It worked perfect until the latest iOS 7 version on my iPad 2

Maybe you are looking for

  • 320N Freezes when trying to transfer data over wifi

    I have the 320N and I am very frusterated.  I would just take it back, but I bought it brand new on Amazon.com, meaning I will have to pay shipping because I threw out the box and the return shipping form for RMA's!  I don't even know if Amazon will

  • Backup failed with Error: (-50) Creating Directory

    Repeats ad nauseum. This is backing up to a second internal drive that is an exact duplicate (in terms of HD model and size). Does anyone know what Error -50 means? Lack of permissions? Invalid name (doesn't seem like it)? 8/30/08 9:06:37 AM /System/

  • How do you have a long video in the timeline and then save it as separate parts?

    I'm looking to record playthroughs of video games and putting them on youtube. So what I would be doing is recording about 2 hours of footage. I'm trying to find out how to cut that 2  hours of footage up into 10 minute clips, and then save each indi

  • Word 2007 and Excel Chart - Merging

    I am in the process of creating a Benefit Statement in Word 2007 and using the  mail merge features to import my data from Excel. The only issue I am having is trying to create a pie chart at the bottom of the statement. Any assistance or advice woul

  • Partial Payment - Invoice Reference Problem

    Dear All Experts, Iam working on a Cash flow Report wherein I need to display Cashinflows and Outflows period wise.I have a small problem in Invoice Refrence(REBZG) when partial payments done. My problem is whenever partial payment is made for an inv