cancel
Showing results for 
Search instead for 
Did you mean: 

Each page of SF into separate PDF.

Former Member
0 Kudos

Hi Experts,

I am creating a Payslip in SMARTFORMS and i am also getting the output of SF (payslip of multiple employees) into single PDF file.

But requirement is that....

"Payslip of each Employee should print on each PDF file".

Somebody Please help me out..

Thanks in Advance,,

Ankur

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

After getting the Smartform print preview go to menu and click on List there u can see print command which generates a spool number, take tht spool number and excecute program RSTXPDF4 and give your spool number in the selction screen will give to PDF formate of your SF.

Hope this helps you

Cheers!!

Former Member
0 Kudos

Hi Balu,

I am already getting an output of SF into PDF,but the problem is that when i will run a payslip for more than 1 employee i should get separate PDF for both the employee.

Please let me clear how to do..

Thanks.

Ankur

vamshi_mohan
Participant
0 Kudos

Hi Ankur,

Just insert the logic of pdf conversion at end each table line being executed in the loop instead of after the 'ENDLOOP'.

This will do the job.

Regards.

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi ankur,

Call the function module generated by the smartform ( ' /B ....').

Donot call the function module fm_name.

Regards,

Sravanthi

messier31
Active Contributor
0 Kudos

Try setting SSFCOMPOP-TDNEWID = 'X' of OUTPUT_OPTIONS export parameter.

Enjoy SAP.

Pankaj Singh.

Former Member
0 Kudos

Hello Everybody,

I am using a loop to get the o/p of SF into separate PDF.

Following is the coding..

In IT_HEAD,their is i/p`s for SF..and i am getting an O/P of SF properly.but i am not getting data in OTF form.

i.e. In T_OTF_FROM_FM, no data is coming.

plz anybody help me out ..

loop at it_head.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

FORMNAME = 'ZPAY'

  • VARIANT = ' '

  • DIRECT_CALL = ' '

IMPORTING

FM_NAME = 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.

W_CPARAM-NO_DIALOG = 'X'.

W_CPARAM-PREVIEW = SPACE.

W_CPARAM-GETOTF = 'X'.

W_OUTOPTIONS-TDDEST = 'LP01'.

CALL FUNCTION FM_NAME

EXPORTING

  • ARCHIVE_INDEX =

  • ARCHIVE_INDEX_TAB =

  • ARCHIVE_PARAMETERS =

CONTROL_PARAMETERS = W_CPARAM

  • MAIL_APPL_OBJ =

  • MAIL_RECIPIENT =

  • MAIL_SENDER =

OUTPUT_OPTIONS = W_OUTOPTIONS

  • USER_SETTINGS = 'X'

START = SDATE

END = EDATE

P_NO = IT_HEAD-PERNR

P_AREA = IT_HEAD-WERKS

C_CODE = IT_HEAD-BUKRS

P_SUBAREA = IT_HEAD-BTRTL

  • IMPORTING

  • DOCUMENT_OUTPUT_INFO =

JOB_OUTPUT_INFO = T_OTF_FROM_FM

  • JOB_OUTPUT_OPTIONS =

TABLES

IT_ABS = IT_ABS

EXCEPTIONS

FORMATTING_ERROR = 1

INTERNAL_ERROR = 2

SEND_ERROR = 3

USER_CANCELED = 4

OTHERS = 5

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

T_OTF[] = T_OTF_FROM_FM-OTFDATA[].

BREAK-POINT.

Thanks,

Ankur

Former Member
0 Kudos

Refer:

[http://help.sap.com/saphelp_nw04/helpdata/en/27/67443cc0063415e10000000a11405a/content.htm]

[http://www.admanus.de/int/index.php?site=nl-03-2007-3]