Mass form printing for employees

Hi all,
I have made a smart form for employees and a driver program with logical database pnp. If I give say 10 employees in the selection screen and print the forms, I have to press print button 10 times. Is there any way we can avoid this? We want that print button should be pressed only once and smartforms of all 10 employees should get printed. Please suggest.
Thanks
Ribhu

Jayanthi,
I want to pass the employees to my form from selection screen at runtime. I hope my driver program'll make it clear
REPORT  ZHRPAS0004.
Database Tables
Tables:
pa0000, "Table for Actions
pa0001, " Table for Organisational Assignments
pa0002, " Table for Personal Data
pa0041, " Table for Date Specifications
pernr,  " Logical Pernr
T528T,  " Position Texts
T527X,  " Organizational Units
T510,   " Pay Scale Groups
T500p,  " Personnel Areas
T526,   " Administrators
T522t.  " Forms of Address
infotypes :
0000, " Action
0001, " Organisational Assignments
0002, " Personal Data
0041. " Date Specifications
Declaration of Variables
data : E_PAREA TYPE PERSA,
       E_PCODE LIKE T500P-NAME1,
       E_EMPNAME TYPE EMNAM,
       E_EMPNO TYPE PERSNO,
       E_TERDATE TYPE DATS,
       E_POSIT TYPE T528T-PLSTX,
       E_DATE TYPE SY-DATUM,
       e_ADDFORM TYPE T522T-ATEXT,
       E_ORGUNIT TYPE T527X-ORGTX.
DATA : WS_UCOMM LIKE SY-UCOMM.
data : DAR like pa0041-dar01,
       dat like pa0041-dat01.
data : v_year(4) type c,
       v_mon(2) type c,
       v_date like sy-datum,
       v_date1 like sy-datum.
data : v_formname type tdsfname value 'ZSF_ODR_TER_01',
       v_fmname type rs38l_fnam.
data: i_reclist LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
      i_objpack LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE.
Declaration of Constants
constants : c_x type c value 'X', " Sign
c_pernr(8) type n value '00000000', " Pernr
c_val1(2) type c value '31', " Date Type
c_val2(2) type c value '12', " Date Type
c_val like p0041-dar01 value '01', " Date Type
c_1 like pernr-persg value '1', " Emp Group
c_type like hrp1001-otype value 'S', " Object Type
c_date1 like sy-datum value '18000101', " Date
c_date2 like sy-datum value '99991231', " Date
r_all value 'X'.
Selection Screen
Selection-screen begin of block b2 with frame title text-001.
selection-screen begin of line.
parameter pdf radiobutton group smf.
selection-screen comment 5(20) text-002.
parameter prn radiobutton group smf.
selection-screen comment 40(20) text-003.
selection-screen end of line.
Selection-screen end of block b2.
At selection-screen
At selection-screen.
  perform validate_screen.
Start-of-Selection
start-of-selection.
  perform get_period.
Get PERNR from LDB
get pernr.
rp_provide_from_last p0001 space pnpbegda pnpendda .
rp_provide_from_last p0000 space pnpbegda pnpendda .
rp_provide_from_last p0041 space pnpbegda pnpendda.
Get the form of address
  select single atext from t522t into t522t-atext where anred = p0002-anred and sprsl = sy-langu.
  if sy-subrc = 0.
    E_ADDFORM = t522t-atext.
  endif.
Get the Personnel Area Long Description/Text
select single name1 into t500p-name1 from t500p where persa = p0001-werks.
Get the relevant date from 0041 (date repetitive structure)
do 12 times varying dar from p0041-DAR01 next p0041-DAR02
            varying dat from p0041-dat01 next p0041-dat02.
if dar = 'TD'.
E_TERDATE = dat.
ENDIF.
enddo.
Get the Org Unit Text of the employee.
select single ORGTX from T527X into T527X-ORGTX where ORGEH = p0001-orgeh and SPRSL = sy-langu.
if sy-subrc = 0.
E_ORGUNIT = T527X-ORGTX.
endif.
Get the position text of the employee.
select single PLSTX from T528T into T528T-PLSTX where PLANS = p0001-plans and SPRSL = sy-langu and OTYPE = c_type .
if sy-subrc = 0.
E_POSIT = T528T-PLSTX.
endif.
Assigning the values
E_PAREA = p0001-werks.
E_PCODE = t500p-name1.
E_EMPNAME = p0001-ENAME.
E_EMPNO = p0000-pernr.
E_DATE = SY-DATUM.
Get the values from respective infotypes to print the file          *
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = v_formname
importing
fm_name = v_fmname
exceptions
no_form = 1
no_function_module = 2
others = 3.
call function v_fmname
exporting
   i_PAREA                      = E_PAREA
   i_PCODE                      = E_pcode
   i_EMPNAME                    = E_empname
   i_EMPNO                      = E_empno
   i_TERDATE                    = E_terdate
   i_POSIT                      = E_posit
   i_DATE                       = E_date
   i_ADDFORM                    = E_ADDFORM
   i_ORGUNIT                    = E_orgunit.
*&      Form  validate_screen
      Validation on the screen
FORM validate_screen .
clear sy-index.
  loop at pnppernr.
  endloop.
  if sy-index GT 1.
    message 'Enter only one personal number' type 'E'.
  endif.
  if pnppernr-low is initial.
    message 'enter a personal number' type 'E'.
  endif.
ENDFORM.                    " validate_screen
*&      Form  get_period
      Validation on Period
FORM get_period .
clear: v_year,v_mon, v_date, v_date1.
  v_year = sy-datum+0(4).
  v_mon = sy-datum+4(2).
  if pnptimr1 = c_x. " Current Date
    pnpbegda = sy-datum.
    pnpendda = sy-datum.
  elseif pnptimr2 = c_x. " Current Month
    concatenate v_year v_mon c_val into v_date.
    concatenate v_year v_mon c_val1 into v_date1.
    pnpbegda = v_date.
    pnpendda = v_date1.
  elseif pnptimr3 = c_x. " Current Year
    concatenate v_year c_val c_val into v_date.
    concatenate v_year c_val2 c_val1 into v_date1.
    pnpbegda = v_date.
    pnpendda = v_date1.
  elseif pnptimr4 = c_x. " Upto Today
    pnpbegda = c_date1.
    pnpendda = sy-datum.
  elseif pnptimr5 = c_x. " From Today
    pnpbegda = sy-datum.
    pnpendda = c_date2.
  else.
    if ( pnpbegda is initial and pnpendda is initial ).
      pnpbegda = c_date1.
      pnpendda = c_date2.
    elseif pnpbegda is initial and not pnpendda is initial.
      pnpbegda = c_date1.
      pnpendda = pnpendda.
    elseif not ( pnpbegda is initial and pnpendda is initial ).
      pnpbegda = pnpbegda.
      pnpendda = pnpendda.
    endif.
  endif.
ENDFORM.                    " get_period

Similar Messages

  • Seperate Adobe Form printing for each order

    Hi,
    I have a scenario where i need to print Adobe Form for each order.
    Right now i am handling this from print program(Executable) by looping at the Adobe form FM for each order.
    So it will print seperate Adobe form for each order with corresponding Header & Item Data.
    To get next order i need to hit on right & last arrows etc...
    So right now i am handling it through Print Program.
    Is there any way it can be handled directly at Adobe Form level.
    By passing all orders to Adobe FM at a time (Intsead of looping) and handling Adobe Form printing for each order at Adobe Form level itself!
    Thanks in advance.
    Thanks,
    Kumar.

    simple,
    create one new program  not driver program . Then u have to call that FORM
    1.Get all the data created during the dates.
    split the data into , based on the date ranges.
    2.
    loop at itab1.
    perform open_form
                write_form
                close_form
    endloop.
    loop at itab2.
    endloop.
    1) I need to print the form automatically when an Order is created.<b>---->COnfig</b>
    2) Every June 15th and Dec 15th I need to print the form for that Order
    automatically with some other data.
    <b>---> what ? what u split ?</b>
    *--Similarly I need to trigger the form in this way automatically for all Orders.
    <b>---> Config+ABAP</b>
    How can I trigger the Form automaticall for the above requirement
    Regards
    Prabhu

  • Automatic Generation of form Printing for an Order

    Hi,
    In an Order one line itme dates are like this <b>from 29.03.2007 to 29.03.2008</b>.
    Here year is splitted into 2 parts. One is <b>1st of Jan to 30th June</b>, second one is <b>1st July to 31st Dec</b>.
               So that my requirement is like this.
    1) I need to print the form automatically when an Order is created.
    2) Every <b>June 15th</b> and <b>Dec 15th</b>  I need to print the form for that Order
        automatically with some other data.
    *--Similarly I need to trigger the form in this way automatically for all Orders.
    How can I trigger the Form automaticall for the above requirement.
    Regards,
    Balavardhan.K

    simple,
    create one new program  not driver program . Then u have to call that FORM
    1.Get all the data created during the dates.
    split the data into , based on the date ranges.
    2.
    loop at itab1.
    perform open_form
                write_form
                close_form
    endloop.
    loop at itab2.
    endloop.
    1) I need to print the form automatically when an Order is created.<b>---->COnfig</b>
    2) Every June 15th and Dec 15th I need to print the form for that Order
    automatically with some other data.
    <b>---> what ? what u split ?</b>
    *--Similarly I need to trigger the form in this way automatically for all Orders.
    <b>---> Config+ABAP</b>
    How can I trigger the Form automaticall for the above requirement
    Regards
    Prabhu

  • Its ........ form printing for MIGO

    Hello gurus,
                      I have developed one form goods receipt note for MM in ECC 6.0.its copy of standard ,its working fine in testing client
                     but after transporting the request in production i am getting this error
                     Output could not be displayed (it may not be complete)
                                   Message no. VN069
                All objects are transported in Production.

    Hello,
    A similar kind of issue and hope, the below link may be helpful for you.
    Output Could Not Be displayed(It may be complete) Smartforms error
    Regards,
    Selva K.

  • We have a requirement to print the w2 forms for employees using java application, how can i implement this. Please give some suggestion.

    We have a requirement to print the w2 forms for employees using java application, how can i implement this. Please give some suggestion.

    Anyone any ideas to help please?

  • Need to create a mass upload program for appraisal document creation for multiple employee in abap hr

    Hi Expertise,
    I need to create a mass upload program for appraisal document creation for manager and his multiple employee
    at a time using tcode appcreate.
    Please help me out.
    Best regards,
    Priyaranjan

    Hi,
    I have done appraisal document creation for bulk using txt file.
    this fm used for single for creation in standard tcode (phap_prepare):  'WZ_HRHAP_0DOC_WZ01_START'.
    So create ztcode  usinh this fm for single form then record BDC for this tcode and called this tcode in that bdc for bulk creation .
    While recording for single I have used manual option instead of automatic .

  • Printing same Smartfom using single click on PRINT for many employee no.

    Hi All,
    This is my first question that i'm posting in the forum, hope u dont disappont me.
    We made a smart form for HR-pay slip. It is working fine for one employee, but when a range of employees are selected it asks a print preview screen each time for every single employee. We managed to get rid of the pop up print preview screen but still on clicking PRINT, it prints first emp. smart form, then back (F3), and again print for second emp. HR people need to run this for hundreds of employee and cannot click print for each one of them.
    So, all I wanted was that somehow on clicking PRINT the very first time it shall print for all the range of employees given.
    Step.1.Get pernr.
    Call SSFfunction module name for smartform ZHR_PAYSLIP
    go back to (Step.1) picking the next pernr given while execution

    Hi Vivek,
    Thanks for your response, now i feel a member of the forum.
    I am just a beginner in Smartforms.
    Ur reply made me realise that i had not used SSF Open N SSF Close FM.
    the fraction of the code is:
    ========================================
    GET pernr.
    CALL FUNCTION 'HR_READ_INFOTYPE'.
    PERFORM process_pernr                                     "VKIK032705
        USING pernr-pernr pn-paper pn-permo payty payid bondt mc_incl
          pnpabkrs[] subrc.
    IF exp_frm EQ false.
         CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
             EXPORTING
               formname             = 'ZHR_PAYSLIP'IMPORTING
              fm_name                  = formname
         control-no_dialog = 'X'.
           control-PREVIEW = 'X'.
             output_options-tdnoprint = 'X'.
             output_options-tdnoprev = 'X'.
             output_options-tdimmed = 'X'.
             output_options-tdiexit = 'X'.
         CALL FUNCTION formname
             EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
            CONTROL_PARAMETERS         = control
       NO_DIALOG                 =
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
            OUTPUT_OPTIONS             = output_options
      'output_options added by himanshu 6.12.2006
            USER_SETTINGS              = ' '
               v_amount                   = v_amount
    IMPORTING
      DOCUMENT_OUTPUT_INFO       =
      JOB_OUTPUT_INFO            =
      JOB_OUTPUT_OPTIONS         =
    ENDIF.
    ===========================================
    so u see as i have embedded the Call SSF FM stmnt. it executes the smartform for one pernr (personnel no.) and when it fetches the next pernr in the stmnt. GET PERNR, it executes the smartform again.
    Is there a way when the smartform can call itself so that the output is successive and i dont have to press back button each time to see the payslip of the next personnel no.
    Also plz advise where shall I use the SSF_Open and SSF_Close FMs.

  • Fillable form fields for an Employee Performance Review ?

    So i've designed our Employee Perfomance Review in InDesign, exported the PDF and created form fields in Acrobat 9. The goal is to have a PDF that contains fillable form fields for our yearly reviews that can be filled out, saved, and re-opened and edited again in Adobe Reader. They will need to be edited by several people from different computers.
    The problem i'm running into is this: Each employee will have at least two supervisors contributing to their reviews. So, this form needs to be able to be edited by one person and saved, then forwarded to the next person who would in turn add their comments. The second reviewer would then save their information, send it back to the first reviewer, who would finalize the document, save it digitally and print it out so we would have a hard copy.
    The main goal is to have a document that can be passed back and forth and remain editable.
    I can use the Distribute Form option in Acrobat, but this information needs to be accessable by the completer of the form and HR only, and not myself. Using Distribute form would require HR to purchase a version of Acrobat to distribute the forms and access the information...either that or they would have to use my computer to distribute the form and recieve responses.This still doesn't solve my main problem. From everything I have seen, the distributed forms can only be submitted, and not saved or passed around.
    If the PDF is sent out as an attachment, it can be filled out and printed to PDF to save it digitally, but it can't be edited again in Reader.
    I'm looking for a way to utilize Acrobat for this, and not resort to using Word or some other program. The reason we upgraded to Acrobat 9 in the first place was because we thought it would make this process work. Any help or advice would be appreciated.
    Thanks,
    aaardvrk

    Thanks. It looks like we're covered under 15.12.3(b) since this document will only be distributed to about 10 supervisors. I interpret this to mean that we can use this document as many times as we like as long as the total number of Users (supervisors) doesn't exceed 500.
    "For any unique Extended Documnent, you may either (a)... ; or (b) Deploy such Extended Document to no more than five hundred (500) unique recipients without limits on the number of times you may extract information from such Extended Document returned to you filled-in by such Recipients."
    Thanks again.

  • Adobe Form - Print page at the end for every record of a Z table with Text

    Hello friends, I am facing a challenging here and I need to develop the following below. Mind you, I don't have much exposure/experience with Adobe Forms
    Scenario: Standard REAL ESTATE Contract Form
    I have a Z table containing RENTAL OBJECTS, in my case 3 records and I want, at the end of the form print one page like below to each record that i have in my Z table.
    "Dear Z-field1 one, regarding your contract for Z-field2, Address Z-field3, blah blah blah"
    In essence, print a page for each one of them at the end, with the text above using the fields from the z table.
    I searched the forum and couldn't find any thing like it.
    If someone can help it would be much appreciated.
    Thanks, Marco

    Hi Marco,
    You must be having the ztable fields in the context or in the data heirarchy of the adobe form.
    Assume that your main form is on the page1.
    Create a table bound to ztable with 3 rows in it and make it invisible on the form.
    Below the form create 3 pages page2, page3 and page4.
    Create a ISR text display and on the initialise event write the code such as:
    this.rawValue = data.page1.Table2.Row1.Cell1.rawValue;
    Create as many ISR texts as you want and initialize it using the above method.
    Page1
    form
    Page2
    Row1 values
    Page3
    Row2 Values
    Page4
    Row3 Values
    Hope this helps.

  • Multiple print for pdf form retains the value from previous!

    Hello All,
    We have developed Adobe Print Forms for our business requirements.
    When we try to print these forms from the direct transaction, it prints fine. But when we try to select multiple forms to be printed with one transaction, the pdf form generated has data from all the selection!
    Eg: Form printed properly for Delivery Note through transaction VL02N.
    The same form when we try to print for multiple deliveries from transaction VL71, i retains the data and prints one huge form having all delivery data!!
    Please help us out in this issue and let us know what is tha we are missing in this process!
    Thanks a lot for your time and help.
    Gaurav

    Hi ,
    i think that the problems comes form the data you give to the form, do you make a refresh of internal table before populated them ...
    regards

  • Need to create a mass upload program for appraisal document creation for multiple employee

    Hi Expertise,
    I need to create a mass upload program for appraisal document creation for manager and his multiple employee
    at a time using tcode appcreate.
    Please help me out.
    Best regards,
    Priyaranjan

    Hi Priyaranjan,
    I think you can take the abap'ers help in creating the program. But u need to provide them the exact functionality and the required specifications in creating the appraisal document.
    Even tcode also u can get it prepared by Abap'ers.
    Thanks and Regards
    Balaji

  • R12 Check Printing for Suppliers Created for Employee Payments

    Hi,
    We have some suppliers that are created to to pay employees.
    Problem we are finding is:The address printed on Check (i.e. Payee address) is coming from HRMS, and not from Payables.
    E.g. Say Address set at employee level is London Address, and the address for the supplier site created for the same employee is Washington address, then the address printed on check is London Address.
    We want to print Washington address.
    Our requirement is that we may have multiple sites created for different purposes, for the same employee-supplier; and would like to print the address from Supplier site on the cheque.
    Has anyone faced this problem before?
    Any help / inputs in this regard would be appreciated!
    PS: We are on R12 RUP3.
    Best regards,
    Anand

    Hi ssuhasar
    Thanks for your reply.
    While creating the Supplier for Employee type, we are not checking either of the checkbox for 'Home' or 'Office'.
    I.e. We are creating a supplier site as 'Business advances' which is neither Home nor Office.
    At Financial Options Level, we tried keeping it as 'Home' or 'Office', but still the effect is same. i.e. it is printing the Employee Address only, and not the address for the supplier site .
    Also, I could not found the flag for Payment address - Home or office (neither at employee - maintain enter, Nor at supplier level).
    I also re-checked that the Address on Supplier Site level is still Washington Address, not the London address.
    Best regards,
    Anand

  • SAP Vendor Master Communication Details for SMART FORM Printing.

    Hi
    Could you please advice Functional module to extract SAP Vendor Master Communication Details for SMART FORM Printing.
    Thanks in Advance.
    Regards
    Ravi

    Hi Ravi,
    I don't know about a function module, but the vendor master table LFA1 has a field ADRNR pointing to the general address table with the fields for e.g. language and to the tables ADR2 for phone numbers, ADR3 for fax numbers and ADR6 for e-mail addresses.
    BR
    Raf

  • Mass update the OTL rotation plan for employees

    Hi All,
    I am trying to find a way to mass update the rotation plan for employees .I could not find any API or easy way to do it.
    Do we have any easy way to do it.
    Thanks

    If you cannot find an API, why don't you try one of the data-load tools.
    http://www.dataload.com/
    Cheers,
    Vignesh

  • Japan page format for legal form printing

    Dear Experts,
    I have an issue where I need to identify which page/spool format to be used for JP legal form printing that use 4 quadron forms.
    Program name : RPCEADJ0
    if spool format is X_24_80_JP, how do i know if this is 4 quadron forms format?
    TQ

    Hi,
    Thanks for you reply.
    I cannot control left and right margin in PDF. Also, it is a PDF file so eventhough somehow you are able to change left and right margin, the content does not adjust itself to fit the legal page (as it does in word or excel).
    Let me know if there is any other option.
    Thanks,
    RS

Maybe you are looking for

  • GR/IR Reporting

    Hello, Are there any reporting options for GR/IR. SPecifically a report that shows all items that have been cleared? Thanks, Justin

  • How many times can you burn a song to CD?

    Once you've downloaded a song from iTunes, is there a limit to how many times you can then burn it to a CD? Dell   Windows XP   Dell   Windows XP  

  • No High-End Recording into SB Live Val

    I am recording from radio into SB Li've Value by connecting a cable from the headphone jack of stereo into the mic input of the SB Li've (going into "line in" results in too low volume). The recording works great. The resulting playback of the record

  • [Solved?] No adapter status changes, or battery readings, in DEs

    Update: by some magic, probably a relevant package upgrade, it began to work as it should as of my last login. I have a Thinkpad R60. Battery meters for XFCE, KDE, and Gnome show the battery at 100%, with the AC adapter plugged in, regardless of whet

  • Security update 2014-002 won't install, stuck on gray Software update screen

    My mac mini has been trying to install this security update the past week.  It asks for me to restart, when I do it gets stuck on a Software Updater page or gray screen.  The only way I can proceed is the shut the computer down by manually holding do