Show normal report or alv report for the radiobutton that was selected

Hello... i'm a begginer on Abap, so I hope to writly espose my question...
I'm trying to modifie an report i have to, when the user choose the values for selection, he also can choose if the output is shown as a normal view or as an alv. I want to do it by using radiobuttons, but I don´t no how to organise my code for the selected radiobutton...
Thanks

Hi,
Copy and paste this code. undestand the logic.
TABLES: vbrp.
TYPE-POOLS: slis.
TYPES: BEGIN OF gs_vbrp,
       vbeln TYPE vbrp-vbeln,  "sales order
       matnr TYPE vbrp-matnr,  "material no
       arktx TYPE vbrp-arktx,  "material description
       ntgew TYPE vbrp-ntgew,  "quantity
       gewei TYPE vbrp-gewei,  "quantity unit
       netwr TYPE vbrp-netwr,  "currency
       werks TYPE vbrp-werks,  "plant
       END OF gs_vbrp.
DATA: it_vbrp TYPE STANDARD TABLE OF gs_vbrp,
      wa_vbrp TYPE gs_vbrp.
DATA: fcat TYPE slis_t_fieldcat_alv,
      wa_fcat TYPE slis_fieldcat_alv.
DATA: lyout TYPE slis_layout_alv,
      event TYPE slis_t_event,
      wa_event TYPE slis_alv_event.
select-options: s_vbeln for vbrp-vbeln.
parameters: p_alv type c radiobutton group AA,
            P_NORMAL TYPE C RADIOBUTTON GROUP AA.
  SELECT vbeln
         matnr
         arktx
         ntgew
         gewei
         netwr
         werks
         FROM vbrp
         INTO TABLE it_vbrp
         FOR ALL ENTRIES IN IT_VBRP
         WHERE vbeln EQ IT_VBRP-VBELN.
IF P_ALV = 'X'.
define imacro.
wa_fcat-fieldname   = &1.
wa_fcat-tabname     = &2.
wa_fcat-reptext_ddic = &3.
wa_fcat-col_pos     = &4.
append wa_fcat to fcat.
clear wa_fcat.
end-of-definition.
imacro 'VBELN'   'it_vbrk' 'PO Document'   '1'.
imacro 'MATNR'   'it_vbrk' 'material no.'       '2'.
imacro 'ARKTX'   'it_vbrk' 'Mat. description'   '3'.
imacro 'NTGEW'   'it_vbrk' 'quantity'        '4'.
imacro 'GEWEI'   'it_vbrk' 'quantity unit'     '5'.
imacro 'NETWR'   'it_vbrk' 'net price'   '6'.
imacro 'WERKS'   'it_vbrk' 'plant'     '7'.
****************DEFINE LAYOUT
lyout-zebra             = 'X'.
lyout-colwidth_optimize = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
  I_INTERFACE_CHECK                 = ' '
  I_BYPASSING_BUFFER                = ' '
  I_BUFFER_ACTIVE                   = ' '
   I_CALLBACK_PROGRAM                = sy-cprog
  I_CALLBACK_PF_STATUS_SET          = ' '
   I_CALLBACK_USER_COMMAND           = 'USER'
  I_CALLBACK_TOP_OF_PAGE            = 'MY NAME'
  I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
  I_CALLBACK_HTML_END_OF_LIST       = ' '
  I_STRUCTURE_NAME                  =
  I_BACKGROUND_ID                   = ' '
   I_GRID_TITLE                      = 'I M THAT'
  I_GRID_SETTINGS                   =
   IS_LAYOUT                         = lyout
   IT_FIELDCAT                       = fcat
  TABLES
    T_OUTTAB                          = IT_VBRP
EXCEPTIONS
   PROGRAM_ERROR                     = 1
   OTHERS                            = 2
ELSE.
LOOP AT IT_VBRP INTO WA_VBRP.
WRITE: /5 WA_VBRP-VBELN, WA_VBRP-MATNR.
ENDLOOP.
ENDIF.
Cheers,
Rudhir

Similar Messages

  • My Ipod has been stolen and I need to get the seriel number for the ipod that was linked to my itunes, it was an 7th gen nano

    Does anybody know how to find the seriel number for my ipod Nano that got stolen, But to find it through Itunes because it was added and synced with my account

    - If you previously turned on FIndMyiPod on the iPod in Settings>iCloud and wifi is on and connected go to iCloud: Find My iPhone, sign in and go to FIndMyiPhone. If the iPod has been restored it will never show up.
    - You can also wipe/erase the iPod and have the iPod play a sound via iCloud.
    - If not shown, then you will have to use the old fashioned way, like if you lost a wallet or purse.
    - Change the passwords for all accounts used on the iPod and report to police
    - There is no way to prevent someone from restoring the iPod (it erases it) using it.
    - Apple will do nothing without a court order                         
    Reporting a lost or stolen Apple product                                        
    - iOS: How to find the serial number, IMEI, MEID, CDN, and ICCID number

  • HT1711 IF I download a CD of I have onto the computer and iTunes pops up to hear it. Cn I save it to my computer. Will iTunes charge me for the music that was on my CD?

    I inserted a CD and it opened in iTunes. If I want to save that music to my computer to play later must I save in the music library.Will I be charged by iTunes?? I am new to this. Thanks

    You can import cds to your computer.
    Click import.
    It is free.

  • It seems I'm getting over charged for the things that I purchased

    Like everytime I buy am thing on the iTunes Store I get double or tripe charged for of why is that

    Welcome to the Apple Community.
    Select the content which is causing a problem and use the 'Report a problem' button in Your Purchase History on your computer.
    Currently, if your purchase happens to be your most recent purchase you will not be redirected to the report form, in this case use the report a problem option from the invoice that was emailed to you.

  • Normal report and ALV report, where exactly both are differs?

    For Normal report and ALV report, where exactly both are differs, I mean from which part the process / coding will differ, pls le me know..?
    Akshitha.

    Hi Akshitha,
    In Normal reports we use formatting techniques to display the report list. We define heading and size everything to display report list. But where as in alv we need not to use any formating there are some function modules which will automatically display output list in LIST  and GRID format.
    In Normal report we cannot make changes to the output list where in ALV report we can change the ALV output display dynamically. You can find lots of options for  the ALV list such as you can download output list into Excel sheet and Sorting options Acending and decending order in ALV but in normal report We need to write syntax in the report to display output list in sorting order.  The ALV report is very easy way to display the output compared to Ordinary report.
    Check below some links which will help you to understand about ALV. If you know about Normal report you can campare by userself the difference.
    Simple ALV report
    http://www.sapgenie.com/abap/controls/alvgrid.htm
    http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox
    ALV
    1. Please give me general info on ALV.
    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 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
    2. How do I program double click in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=11601
    http://www.sapfans.com/forums/viewtopic.php?t=23010
    3. How do I add subtotals (I have problem to add them)...
    http://www.sapfans.com/forums/viewtopic.php?t=20386
    http://www.sapfans.com/forums/viewtopic.php?t=85191
    http://www.sapfans.com/forums/viewtopic.php?t=88401
    http://www.sapfans.com/forums/viewtopic.php?t=17335
    4. How to add list heading like top-of-page in ABAP lists?
    http://www.sapfans.com/forums/viewtopic.php?t=58775
    http://www.sapfans.com/forums/viewtopic.php?t=60550
    http://www.sapfans.com/forums/viewtopic.php?t=16629
    5. How to print page number / total number of pages X/XX in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
    6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
    http://www.sapfans.com/forums/viewtopic.php?t=64320
    http://www.sapfans.com/forums/viewtopic.php?t=44477
    7. How can I set the cell color in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=52107
    8. How do I print a logo/graphics in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=81149
    http://www.sapfans.com/forums/viewtopic.php?t=35498
    http://www.sapfans.com/forums/viewtopic.php?t=5013
    9. How do I create and use input-enabled fields in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=84933
    http://www.sapfans.com/forums/viewtopic.php?t=69878
    10. How can I use ALV for reports that are going to be run in background?
    http://www.sapfans.com/forums/viewtopic.php?t=83243
    http://www.sapfans.com/forums/viewtopic.php?t=19224
    11. How can I display an icon in ALV? (Common requirement is traffic light icon).
    http://www.sapfans.com/forums/viewtopic.php?t=79424
    http://www.sapfans.com/forums/viewtopic.php?t=24512
    12. How can I display a checkbox in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=88376
    http://www.sapfans.com/forums/viewtopic.php?t=40968
    http://www.sapfans.com/forums/viewtopic.php?t=6919
    Go thru these programs they may help u to try on some hands on
    ALV Demo program
    BCALV_DEMO_HTML
    BCALV_FULLSCREEN_DEMO ALV Demo: Fullscreen Mode
    BCALV_FULLSCREEN_DEMO_CLASSIC ALV demo: Fullscreen mode
    BCALV_GRID_DEMO Simple ALV Control Call Demo Program
    BCALV_TREE_DEMO Demo for ALV tree control
    BCALV_TREE_SIMPLE_DEMO
    BC_ALV_DEMO_HTML_D0100
    <b>Please Reward if useful<b>
    Regards,
    sunil kairam.

  • Dashboard based on Crystal Report's Latest instances for the logged in user

    Hi,
    I am trying design a dashboard based on LiveOffice-crystal report's latest instance for the logged in user. Also there is row level security in the universe on which the crystal reports is created.
    In the live office connection i have selected 'latest instance by current user' in the refresh option and published the dashboard to InfoView.
    when i open the dashboard in InfoView , i find the row level restrictions being applied for different users. But the data retrived is always on-demand data and not based on the latest instance of the logged in users.
    Can anyone throw some light on this issue.
    Thanks

    Hi,
    I am trying design a dashboard based on LiveOffice-crystal report's latest instance for the logged in user. Also there is row level security in the universe on which the crystal reports is created.
    In the live office connection i have selected 'latest instance by current user' in the refresh option and published the dashboard to InfoView.
    when i open the dashboard in InfoView , i find the row level restrictions being applied for different users. But the data retrived is always on-demand data and not based on the latest instance of the logged in users.
    Can anyone throw some light on this issue.
    Thanks

  • Generating Excel Report from Outlook 2013 for the meetings attended/ accepted

    Hello Team,
    Could you please advise how do I Generate Excel Report from Outlook 2013 for the meetings I attended/ accepted. Also I do I check or figure out the time I spent attending meeting.
    Please help to answer me ASAP.
    Thank you
    Preet

    Hi Preet,
    As far as I know, no features in Office client can generate Excel workbook from Outlook. But we can implement this requirement by macros. If you want to receive more information, I suggest you post this issue on MSDN forum.
    http://social.msdn.microsoft.com/Forums/en-US/home
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share
    their knowledge or learn from your interaction with us. Thank you for your understanding.
    Best regards,
    Greta Ge
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • REP-1352: The fonts specified for this report cannot be found for the char

    We have migrated all our character reports to oracle 10g - sun solaris machines.
    Now, these reports give us an error....
    REP-1352: The fonts specified for this report cannot be found for the character set specified by NLS_LANG
    Does anyone have suggestions.
    desformat - DELIMITED
    mode - character
    Thanks

    Hi,
    Did you check this DocId:203781.1. I think it will help you problem.
    Moreover does your X-server or vnc server on HP work fine.
    In the past with HP version 11.0 there was always problem with HP x-server. just check that your x-server is runinig will ex. x-clock.
    Cheers,
    Hamdy

  • How to convert an Interactive report to ALV report..please give a example..

    Hi experts,
    How to convert an interactive report to ALV report..plz suggest me an example...
    thanks in advance,
    Varsha.

    hi varsha,
    chk this link.
    http://www.sapdevelopment.co.uk/reporting/alv/alvgrid.htm
    you will get good idea.
    use this FM.
    call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program      = gd_repid
                i_callback_top_of_page   = 'TOP-OF-PAGE' 
                I_callback_user_command = 'USER_COMMAND' 
                is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]      "create a field catlog.
                i_save                  = 'X'
           tables
                t_outtab                = it_tab        "pass the final internal table.
           exceptions
                program_error           = 1
                others                  = 2.
    Regards
    Anver

  • I bought a new ipad and shared my documents in Pages from the old ipad to my cloud, but the only document showing on my new pad is the ones that was not in folders. Have I lost my documents for ever?

    I just bought a new ipad and shared my documents in Pages from the old ipad to my cloud, but the only documents showing on my new pad is the ones that was not in folders. Have I lost my documents for ever?

    Thank you, but after an hour with apple support on the phone we came to the conclusion that the documents are lost... So the lesson is, don't trust icloud as a back up solution! A month worth of work down the drain...

  • Is there an App for the iPad that will show my GPS position on a world map, even if I'm at sea?

    Is there and App for the iPad that will show mu GPS position on a world map, even if I'm at sea?
    Thanks,
    Tomac

    BobTheFisherman wrote:
    GPS will show your position anywhere if your device has unobstructed view of the GPS satellites. The issue is that you must find a maps/charts that include all areas of the sea.
    There is no mobile data connection required to use GPS on land or sea. Once again your issue is the availability of downloadable maps/charts for the areas you will be traveling.
    Sorry, but you can't install an app like NAVIGON on an iPad without 3G cellular data connection:
    copied from NAVIGON app:
    ...can be installed on any iPhone3GS, iPhone4, iPhone4S, iPhone5 or iPad device (the navigation function is only available on the iPad WiFi+3G)
    Can I navigate with my mobile phone?
    Answer:In principle yes. For mobile phones there are both Onboardnavigation solutions and Offboardnavigation solutions.
    The following requirements must be fulfilled:
    •     The software must support the mobile phone. NAVIGON software
          always comes with a compatibility list. The software is guaranteed
          to work only for the mobile phones on this list.
    •     The mobile phone must have a GPS receiver. Many new mobile
           phones come with a built-in GPS receiver. Otherwise you can use
           an external GPS receiver which is connected to the mobile phone
           by cable or Bluetooth.
    •     It should be noted that an offboard solution incurs costs for using
          the mobile phone network to communicate with the provider's server.
    Message was edited by: Ingo2711

  • I have money in my account, and i wanted to purchase gems from a game ( the tribez) but it keeps showing me this message ........." this item is for an appliction that was purchased by a different apple id. to buy this item, with this apple id you must pu

    i have money in my account, and i wanted to purchase gems from a game ( the tribez) but it keeps showing me this message ........." this item is for an appliction that was purchased by a different apple id. to buy this item, with this apple id you must purchase the application. i dont understand the problem and how to pix it, please i need help.

    thanks kiltedTim its working your right it appears as they same game and now i can purchased and buy and item using my new apple id thanks a lot your a great help, Oppps i have one more questioned on it you have any idea how to changed a country regioned that still have a store credit balanced of point .23$ i want to changed it into the japanes store that which i have and itunes card, 

  • An i4 MC603ZA cant upgrade iOS from 4.2.1 to 4.3.2 and show "This device isn't eligible for the requested build"

    An i4 MC603ZA cant upgrade iOS from 4.2.1 to 4.3.2 and show "This device isn't eligible for the requested build"

    Back up your iphone. Erase all content and settings and try to update again. Also on you computer make sure your signed in as the administrator and All antivirus and firewalls are disabled. http://support.apple.com/kb/ts4451

  • Where are the files for the Backups that show up in About This Mac - Storage?

    Where are the files for the Backups that show up in About This Mac - Storage?
    My new Macbook Pro 13 retina has 1TB flash drive. But despite my TimeMachine being in a TimeCapsule my Macintosh HD shows 277 Gb of space has Backups. What is this for? How can I delete it?

    OS X Lion and newer Mac OS X versions create local snapshots in portable Macs if Time Machine is enabled. See > http://pondini.org/TM/30.html
    You don't have to worry about. They are stored in a kind of volume named "MobileBackups", but they appear as stored in your hard drive. To delete them, open System Preferences > Time Machine, and turn off Time Machine. Then, turn it on. However, you don't need to delete them, as they will be deleted when your hard drive gets full

  • I've recently change my Apple ID email so I've recently  went to the App Store to download some apps that I've bought a while ago and none of them are showing. I've also searched for the app and wants me to buy it again.

    I've recently change my Apple ID email so I've recently  went to the App Store to download some apps that I've bought a while ago and none of them are showing. I've also searched for the app and wants me to buy it again.

    Do you remember the old Apple ID and password?  If so try using that.
    Otherwise contact support at the App Store:
    OT

Maybe you are looking for

  • Clarification on RequestManager and Workflow

    I am trying to get a list of documents that are currently "Pending" for approval. The "out of the box" CreateDocumentRequest workflow has been configured to require approval of content uploaded to a target area of the repository. If understood correc

  • How to disable the link to subreports depending upon value

    Hi, We have a table in ssrs reports where we are showing failed, success and cancelled status. for come condition. now for failed we are going to subreports as we are passing some parameter from parent report. but for success and cancelled we don't w

  • How do you extend the reception range on a Time Capsule?

    Live in an older home and looking to extend the wifi range of my Time Capsule.  Any advice?

  • SQL Data Modeler 3.0 EA1 (Data Modeler 3.0 EA1.)

    On the newest release of Data Modeler (3.0.0 Build 649), if I have a relational table with an object type structure, I still cannot pick one of the attributes in the structure to be part of a the primary key for the relational table. Oracle 11gR2 doe

  • Saving "[Converted]" files in InDesign CC 2014

    Creative Cloud installed InDesign CC 2014 for me, which is somehow different from InDesign CC. (I thought the whole reason for having Creative Cloud was to not worry about versions ever again, but I digress). Now, when I open my InDesign files, they