2008 Jan 10 2:08 PM
In alv list display of the NR19 transaction, how to trigger new page automatically depending of the order type.
By example: a new page every time that change the attending physician.
2008 Jan 11 11:45 AM
Hi Alberto,
the report RNLAPPDL (transaction NR19) does not offer an automatic refresh. Two solution ideas come to my mind:
1. Check to use the Clinical Workplace (NWP1) which offers automatic refresh of views. Depending on the information your users need you may configure a respective view.
2. Enhancing the functionality of RNLAPPDL so that the list is refreshed automatically. In SDN there are some examples for ALV in general how this can be done. Using the SDN search I found
[this thread.|; There is also a code sample in the Wiki https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/autorefreshalv+Program.
One of my development colleagues told me they were using the SAP timer control (CL_GUI_TIMER) in the Clinical Workplace and that you could probably create a little wrapper program which calls RNLAPPDL using a selection variant in respective cycles.
Regards
Claudius
2008 Jan 11 12:50 PM
Hi Claudius,
thank you for your answer. But, I want that at the moment of print, every time that change the attending physician by example, made a page break and print the new attending physician in the new page.
Best Regards,
Alberto.
2008 Jan 11 12:58 PM
Can you describe the whole business process in a little bit more detail? For example when and how often will somebody (or the system in background) print the appointment list? For how many physicians such printouts will be created?
2008 Jan 11 1:08 PM
Hi again,
the printing of the appointment list is done daily and there are approximately 60 physicians from different specialties.
The idea is to give them the list at the start of the clinic to call patients.
Regards,
2008 Jan 11 2:27 PM
Hi Alberto,
as a workaround you could write a small ABAP report which calls the RNLAPPDL report in a loop for all the physicians.
Something like:
" select the right physicians
select * from ngpa into it_ngpa where...
" loop over the selected physicians and start the report
loop at it_ngpa into lwa_ngpa.
" fill the the right parameter values
submit rnlappdl with p_.... = lwa_pernr
......
endloop
This is not tested and I don't have a IS-H system here so I don't know the parameter names of the rnlappdl report.
Kind regards,
Martin Nauta
2008 Jan 11 2:54 PM
In case you would do the printing via background processing there might be also some further options using the background processing and selection variant capabilities.
Also I believe ALV provides some grouping functionality which leads to page-breaks when the list is printed. But this would most likely mean that you had to modify/create your own version of the program. In case this would be an option I recommend searching/using the ABAP forum of SDN. I am sure that there is plenty of information how to implement page-breaks on ALV lists. E.g. I found
Regards
Claudius
2008 Jan 11 6:27 PM
As Claudius suggest you could create a background job (Tx SM37) with 60 steps (= for each physician one) starting the RNLAPPDL report with a variant for a specific physician. This is a bit of initial work but the job can be scheduled to run each (working) day. Possibly an advantage (over the page break solution) is that the result (reportlist) can be directed to different printers so the list don't have to split and distributed manually.
Regards,
Martin
2008 Jan 17 1:16 PM
2008 Jan 17 3:20 PM
You can use variables for the selection screen - especially for the date fields! Check out the documentation for the job definition.
Regards
Claudius
2008 Jan 17 4:25 PM
In SM36 you can create a job and in the startcondition. Here you can define it to "execute it periodically" and how often (e.g. each workingday).
Before you define a job you have to create a variant for your report (NR19 press SAVE button). Here you can enter the constant startvalues (e.g. OU, physician) and the variable startvalues for the parameters (e.g. selectiondate). (In the variant: select the "selectionvariable" checkbox -> button selectionvariables -> select the second icon (in the middle) (dynamic date calculation) and choose a date calculation. This variant has to be used in the jobdefinition.
Martin