Printing lists in ABAP without using the standard button

Dear community,
i've got a little problem and I can't fix it on my own.
Some user in our company gave me the instruction to extend an existing SAP Programmm with some defined functionalities.
They want to implement an new button for printing in the gui status and when someone uses the buttons they want to count down a number and print the generated list of the report.
I created also the new button in the gui status with a own functioncode and in the report i implemented an own AT USER-Command event:
**&   Event
AT USER-Command.
  CASE sy-ucomm.
    WHEN 'PRVR'.
      CALL FUNCTION 'PRINT_REPORT'
        EXPORTING
          report = sy-cprog
       EXCEPTIONS
         OTHERS = 99.
When I push my own print button th reports jumps in the At-user-command event.
The window for chosing the print properties will appear immediatly and I cn start printing.
But only the spool-order will only appear when I leave the list-view with the button "back", "exit", or "cancel".
Has anyone an idea why the output appears only when I go back to the selection screen?
Can anybody tell me how to create an printing function to print out the list of an abap-report? I don't wnt to use the normal print-button!
Many thanks in advance.
Michael

Hi Michael,
sy-lsind is the list-id. If you set it to 0 or 1 it jumps (when using BACK)
to the first output-list.
Here a short demo-code to understand it.
Make severeal time doubleclick in the outputline and
look at the changing output.
try it with:
sy-lsind = 1
and
sy-lsind = 1.
REPORT ZGRO_TEST1.
data: dc type i value 1.
START-OF-SELECTION.
  WRITE: / 'List:', dc, 'SY-LSIND:', SY-LSIND.
  HIDE:    SY-LSIND.
AT LINE-SELECTION.
  dc = dc + 1.
sy-lsind = 1.
  WRITE: / 'List:', dc, 'SY-LSIND:', SY-LSIND.
  HIDE:    SY-LSIND.
Hope it helps.
Regards, Dieter

Similar Messages

  • How can you backup your iPhone without using the front button?

    My front button doesn't work again. Had this fixed a week ago and it stopped working again.
    So how do I backup the iPhone without being able to close the email account it is in now and get to the Settings without using the front button?

    Restart your iphone by using the power button. After the restart you will be able go to the settings and enable assistive touch!

  • How to invoke the app by touching the screen (without using the home button)

    Kindly  provide the solutions for the following issues
    1.       How to invoke the app by touching the screen (without using the home button)
    2.       Estimated lifespan running an iPad3 continuously 24x7
    awaiting for your valuable response.
    Thanks and regards,
    Sathya.

    1.  You can only invoke an app by touching its icon.
    2.  All depends on what your app does.

  • HT201412 Is there a way to reboot an ipod without using the home button?

    My iPod touch 4th gen is unresponsive and needs a reboot, however the home button doesn't work. How can I reboot it without using the home button?

    To reset the iPod without the hardware buttons,
    - Reset network settings: Settings>General>Reset>Reset Network Settings. You will have to rejoin wifi networks and repair BT devices

  • Why can I not restart or shut down my imac without using the power button?

    why can I not restart or shut down my imac without using the power button?

    Reset the SMC and then try a restart or shutdown from the drop down menus.
    Intel-based Macs: Resetting the System Management Controller (SMC)
    Then if that doesn't work, backup because you have an OS X issue that will require either a repair or reinstall.

  • Can you have PXIe 1062Q turn on without using the power button

    I am using a PXIe-1062Q for a test project that will be inside of a protective case.  The power button to the chassis will be covered by a plate on the protective case that will make it annoying and difficult to power on using the power button on the chassis.  The chassis will be plugged into a trip-lite power strip that is mounted in the case.  Is there any way that I can have the chassis power on when I turn on the power strip?
    Solved!
    Go to Solution.

    I found an alternate route.  Under the BIOS of the controller I changed the AC power Loss settings to TURN on after the AC power is returned.  This allows me to use the power strip in my configuration to control the AC power distributed to the controller.  The following steps will describe how I completed this.
    Power on the PXIe-8115 controller.
    A message will appear on your monitor Press <DEL> to enter SETUP
    Select "delete" (quickly, because you don't have much time before the window disappears and the controller continues to load normally.
    This will open up the BIOS Main Menu
    Select Advanced tab ( use arrow keys to highlight different tabs and selections, select specific setting to change with "enter"
    Select >>Power/Rest Configuration
    Change configuration to power on when AC power is restored.
    The controller can be shut down normally using the start menu and "shut down"
    The chassis's power button is still capable of turning on the power to the controller, but now when I shut off the AC power strip, and then return the power, the chassis controller powers up.

  • Is there any way that you can reset an iPod Touch without using the lock button?

    Okay, so my lock button on my iPod is broken and my iPod is working kind of slow so i was wondering if there is any way that I can reset it without using my lock button?

    this is true assesive touch will not work i have to admit i did try using assessive touch

  • How can I start up my macbook without using the power button ?

    Hi guys,
    I think my macbook's keyboard/trackpad/power have died. I was wondering if there's anyway to start up my macbook without the power button, I was thinking about an external keyboard that would hae a power button on it, I don't know ...
    I have not used my Macbook for the past 4 days and i think it's making me sick ...
    Thanks !

    hey,
    So i bought a G3 keyboard with the power button and i just received it but my macbook still doesn't want to start up.
    It's pretty strange because my macbook was still running when the top case died and I had to unplug it cause i couldn't shut it down so I was sure that buying this keyboard would make it work but it doesn't. I am wondering if it could be from the power button that would be died cause when i push it, it doesn't feel like the one on my macbook . It's pretty hard to explain but could someone tell my how it supposed to be when i push the power button . On my keyboard it just goes down and goes up without doing anything...
    I'm pretty sad cause I haven't used my macbook for weeks and i'm started thinking it will never start up again ...
    Thanks

  • Photosmart Premium C309a. I want to print on CD/DVD without using the templates provided

    In the templates included in the drivers/software, there are only a few variations to use. I want to design the print-layout myself, (a blank CD/DVD), but have so far not found any way to do that. Does anyone know how to do it

    Hi excolprof,
    We only support disc printing with the supplied Easy Photo Print and My Image Garden software.  You are welcome to try using third party programs, but as they are not supported, the only steps I can recommend would be to make sure that hte paper size is set to CD Disc within the software.
    Did this answer your question? Please click the Accept as Solution button so that others may find the answer as well.

  • Is there a way to turn the iPad off without using the power button?

    I have the new iPad air.
    LOVE IT!
    One thing though...I have a folio style cover on it, magnet closure = power off.
    The case does not allow for power button access, and there are times when I wish for a way to power it off without closing that cover.
    Does anybody know if there is a gesture that can power it off?
    If, not, needs to be one.
    Or, perhaps, a desktop "button" that can do that too. It would probably be an app.
    So, there's my question, thanks for any reply anybody can make on this!

    Completely power off? no. But it will automatically to go sleep after a period of time. You can set the period of time, 2, 5, 10, 15 minutes or never. in 'settings, general, autolock'
    Really, you don't need to totally power it down during its normal use. Mine just goes to sleep all the time and works just fine.

  • My iPod touch screen doesn't shut off. The auto lock is set for two mintues, and everything else is working fine. I've noticed it only fails to shut off when in the music screen. How do I get the screen to shut off without using the lock button?

    Please help. This is really annoying and it runs my battery down. My auto lock is set to two minutes. I've checked several times. Thanks.

    Try:                                               
    - iOS: Not responding or does not turn on           
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try another cable       
    - Try on another computer                                                       
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
    Apple Retail Store - Genius Bar                                     

  • Creating an Adobe .pdf file without using the Adobe printer

    Is it possible to create a .pdf file by using Acrobat or Microsoft Word or any other program without using a printer driver? So far, when I remove the Adobe printer, I cannot create a .pdf file, as it is looking for the printer and printer driver. Is it even possible to create a .pdf without using, or having, a PDF printer of any sort? Any help on this issue would be most helpful. Thanks.

    I was trying to find a way to create PDFs without using the Adobe printer, or any PDF printer. I posed this question to see if there was a way to create a PDF without the aid of a printer or not. I mean, I know how to reinstall the Adobe printer, since I had to to see if there was another way to go about creating without using the printer. I am just curious if there is a way to create a PDF file without the aid of the Adobe printer or other PDF printers.

  • How to Print List to spool but skip the print parameter window?

    Dear all,
      I am coding a program for print list into  spool.
    But every times I run the program there must pop up a print parameter window, after I click the 'Continue' button,then the list print to spool.
      Is there some way that I can just run the program and print to spool directly?
                               Thank you for your kindness help~~~
    Message was edited by: jin yan

    Hi,
    If it is a report program then, use this code.
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
      EXPORTING DESTINATION           = 'LP01'
                COPIES                = COUNT
                LIST_NAME             = 'TEST'
                LIST_TEXT             = 'SUBMIT rep... TO SAP-SPOOL'
                IMMEDIATELY           = 'X'
                RELEASE               = 'X'
                NEW_LIST_ID           = 'X'
                EXPIRATION            = DAYS
                LINE_SIZE             = 79
                LINE_COUNT            = 23
                LAYOUT                = 'X_PAPER'
                SAP_COVER_PAGE        = 'X'
                COVER_PAGE            = 'X'
                RECEIVER              = 'SAP*'
                DEPARTMENT            = 'System'
                NO_DIALOG             = 'X'
      IMPORTING OUT_PARAMETERS        = PARAMS
                VALID                 = VALID.
    IF VALID <> SPACE.
      SUBMIT RSTEST00 TO SAP-SPOOL
        SPOOL PARAMETERS PARAMS
        WITHOUT SPOOL DYNPRO.
    ENDIF.
    Hope This Info Helps YOU.
    <i>Reward Points If It Helps YOU.</i>
    Regards,
    Raghav

  • Follow up task without using the action profile

    Hi,
    Is it possible to create the follow up task without using the action profile? If so, please let me know how we can do that?
    as per the requirements, i have to the custom coding that will automatically create follow-on task triggered by status change on the all the transaction type. Please guide me how can we do that.
    Task details (task id, description), I'm reading it from the custom table.
    Thanks for your help.
    Regards,
    Vaibhav

    Thanks Naresh for the response.
    Not sure if I can use the CRMV_EVENT. Even I'm not aware how to use that. Let me tell what i am doing in the logic.
    - implementing the logic in the badi order_save (method - CHECK_BEFORE_SAVE)
    - get the header and item details using the FM CRM_ORDER_READ.
    - get the status of header / item from the output of CRM_ORDER_READ.
    - compare the status with the custom table (having info of hearder type, item type, status, tast id, task description etc)
    - if status is different, create the task using the details from the custom table.
    now i want to write the logic to implement the last step. Do we have any standard FM where I can pass the task ID and it will create the task? Please help.

  • Transfer palm data from PC to Mac without using the M100 - only exporting the data and importing?

    I had an old Palm M100 that I haven't used in a while but I love the palm desktop app - my PC currently runs 4.1.4
    I have a mac powerbook and I loaded 4.2.1
    When I export my calendar and address book data in the .aba and  .dba format from my PC - the Mac palm desktop app doesn't seem to recognize those file formats.
    Are those not standard formats between the two platforms?  It also looks like the Mac desktop app doesn't even recognize importing data from another Palm format?  It just shows the other program formats.
    Also, when importing as CSV or tab-delimeted those are extremely messed up also.
    Any "easy" way to get the data off of my PC and onto my Mac without using the Palm M100 itself?
    Thanks,
    Dave 
    Post relates to: Palm m100

    The suggestion is not accurate, at least with respect to calendar information. I'm in nearly the same situation, and just tried it. (Saving .dba file out of Windows Palm Desktop 4.1.0, importing into Mac Palm Desktop 4.2.1revD.)
    First, the Mac program will not recognize the .dba as an importable format if one selects All Readable Documents.
    Second, if one selects All Documents instead, you get the following error message:
    The file could not be imported.
    In order to import data from Windows Palm Desktop software, export the file in one of these formats: comma (.csv) or tab (.tab) delimited, vCard, or vCal.
    The problem with this is that Windows Palm Desktop 4.1.0 offers only two options for exporting Date Book information:
    1) the whole datebook as a .dba file.
    2) individual calendar items as a vCal.
    So far as I can see, there's no way to Select All so as to export all as a vCal, and no pre-set option to do so.
    Post relates to: Palm m125
    Post relates to: Palm m125

Maybe you are looking for

  • SQL*PLUS not work in JDeveloper 10.1.3

    The Log message is : Invoking SQL*Plus... F:\oracle\ora92\bin\sqlplus.exe SCOTT@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))(CONNECT_DATA=(SID=W2G))) java.io.IOException: CreateProcess: START.EXE F:\oracle\ora92\bin

  • Error during Po Creation "Purchasing group is wrong"

    Hi All Will Creating PO i am getting following error i.e. " Purchasing group is wrong " when i am double click on the error message it is not showing me any error message following activity i had done 1) Create Purchasing group as "19" (OME4) 2) Assi

  • Using outter joins

    need to create a report based on three tables: emp,dept, and loc. There dept can have null dept and loc and the user wants to see these records; therefore, we need to do an outter join. Also, the user wants to have bind variables so he/she can put an

  • AE CS6 ---- after effects (erreur) impossible de lancer (515) (25§101)

    Hello, When I want to use some 3D options like "camera approach" (approche de camera in french) or " camera stabilization" an error message appear : "after effects (erreur) impossible de lancer (515) (25§101)" and I can't continue. Can you help me pl

  • Final Cut X 10.0.4 - cannot share a movie greater than 15 mins to youtube

    So I just updated to 10.0.4 this morning. Open an existing project that is roughly 19 minutes long, which by the way I previously published to my YouTube account with no problem at all. Now Final Cut will not allow me to publish the video. I get an e