Skip to Content
0
Former Member
Mar 02, 2012 at 10:27 AM

Payslip of Two employees coming in same page

61 Views

Dear Freinds,

I have requirement is developing payslip in smartform . I have developed payslip . However iam getting

problem when going for multiple paylsips . i.e if iam running based on pernr iam getting the payslip perfectly however

if iam based on the Personnel Subarea iam getting payslip of two employees paysip in one page only . I should ge the payslip on

each page separately , no two payslips should come in same page.

Iam using the logic data base in mypring program and iam collecting for each pernr all the respective details and append

it to my Internal Table it_final. this iam appednign before end of selection , so for each pernr which is coming from

Get pernr is getting appending to my IT_FINAL.

After The the END-OF-SELECTion iam using th

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = 'ZHR_PAYSLIP'

IMPORTING

fm_name = lv_fm_name

EXCEPTIONS

no_form = 1

no_function_module = 2

OTHERS = 3.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

CALL FUNCTION lv_fm_name

EXPORTING

user_settings = space

control_parameters = ls_cparam

output_options = ls_output

IMPORTING

job_output_info = wa_job_output_info

TABLES

it_final = it_final

EXCEPTIONS

formatting_error = 1

internal_error = 2

send_error = 3

user_canceled = 4

OTHERS = 5.

Coming to my Smart-form i am looping the Main window the with IT_Final to get the multiple payslips ....but iam getting

the problem is every page i can see two different employees coming and getting printed instead in different page . So pleae

could anyone le me how i can control one pernr payslip in one page. However if the payslip of one person data is more and there by

it comes to one and half page , in that case the next payslip i shoould get from third page ( as the 1 and half of second

page is occupied by first pernr).

Please could any one give me some idea how i can only one payslip in one page and as one new pernr comes from the loop of IT_final i

should go to next page only.

Thanks & REgards

Divya