cancel
Showing results for 
Search instead for 
Did you mean: 

Payslip of Two employees coming in same page

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Create a COMMAND line in you table and check the option for GOTO NEW PAGE.

Answers (3)

Answers (3)

Former Member
0 Kudos

Divya try to use

AT NEW PERNR.

new-page (condition) like this.

Former Member
0 Kudos

Hi,

Please go through this link.

[http://help.sap.com/saphelp_nw70/helpdata/en/70/e17a37dec511d3b575006094192fe3/content.htm]

Regards,

Danish.

praveen_reddy2
Active Participant
0 Kudos

Hi,

Use the 'SSF_FUNCTION_MODULE_NAME' in between in Get pernr & End-of-selection.

Get pernr.

Pass Workarea-pernr in below FM.

call 'SSF_FUNCTION_MODULE_NAME'

End-of-selection.

Hope it helps.

Regards,

PraVeen.