on 02-17-2013 8:13 AM
DEAR ALL,
I have a requirement to make payslip for an employe and I have successfully done that but the problem is when i run the SM in print preview mode
nd i click on next page button payslip of next employee doesnt appear and i have to go back(F3) again and enter the local device to see the payslip of another employee.
What should I do so that all the smartforms should get printed at once and I can see them via pushing a button NEXT PAGE or LAST PAGE or PREVIOUS PAGE .
Thanx in ADVANCE.
Regards.
Hello, you can also see the thread.....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HELLO,
I M DONE WITH PAYSLIP,
THANKS FOR YOUR VALUEABLE SUGGESTIONS
REGARDS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
I need help with the mass printing of Payslip. I am calling the smart form FM in START OF SELECTION, in GET PERNR.. I have a work area which contains PERNR personal details and I have an internal table with the payroll details.
I ma facing issue with the mass printing, same as Girish mentioned in his post. I was to see payslips of all employees in a single print preview, but here I have to go back and next PERNR's payslip is displayed.
This is urgent.. Please suggest..!!
Hi Gurav,
Employee list in internal table.
data: GV_SSFCTRLOP type SSFCTRLOP,
DATA: LV_VAR TYPE C DEFAULT VALUE 'X'.
Loop at IT_EMP into Wa_emp.
At Frist.
GV_SSFCTRLOP-NO_OPEN = 'X' .
GV_SSFCTRLOP-NO_CLOSE = ' '.
CLEAR : LV_VAR.
endat.
IF LV_VAR = 'X'.
GV_SSFCTRLOP-NO_OPEN = 'X' .
GV_SSFCTRLOP-NO_CLOSE = 'X '.
ENDIF.
At LAST.
GV_SSFCTRLOP-NO_OPEN = ' ' .
GV_SSFCTRLOP-NO_CLOSE = 'X '.
endat.
Call Smartform Function module Here.
IN THIS FUNCTION MODULE U PASS CONTROL PARMS.
clear: WA_emp.
LV_VAR = 'X'.
endloop.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Gaurav,
Everytime you are executing your smartform it's generating a function module with all the details. So, It's not clear how you are inputing all employes inside the smartform.
It will be better if you call the smartform from a driver program through SSF_FUNCTION_MODULE_NAME and pass the device and employee table . Hopefully you will get your desire result.
* At the end of your program.
* Passing data to SMARTFORMS
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = 'ZSMARTFORM'
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
if sy-subrc <> 0.
WRITE: / 'ERROR 1'.
endif.
call function FM_NAME
TABLES
GS_MKPF = INT_EMPLOYEE
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.
Thanks,
Abhijt
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Abijit,
I m calling smartform from driver program, still not working,
i m calling it before end of selection
here is code
Regards.
FORM SMARTFORM .
"GETTING FUN MODULE NAME FROM SMARTFORM
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = p_form
IMPORTING
fm_name = fm_name.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
"CALLING SMARTFORM
CALL FUNCTION FM_NAME
EXPORTING
ITABH = ITABH
ITABB = ITABB
gd_attachment_name = gd_attachment_name
RUNDATE = RUNDATE.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
hello,
if you use 2 internal table then use loop. for your help, i post my one code..follow it.
SELECT * from vbak into TABLE it_vbak WHERE VBELN EQ VBELN .
if sy-subrc EQ 0.
select * from vbap INTO TABLE it_vbap FOR ALL ENTRIES IN it_vbak
WHERE vbeln = it_vbak-vbeln.
endif.
*
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'ZSMARTFORM_IMP1'
* 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.
loop at it_vbak into wa_vbak.
refresh:it_vbak_temp,
it_vbap_temp.
it_vbak_temp[] = it_vbak[].
it_vbap_temp[] = it_vbap[].
DELETE it_vbak_temp WHERE vbeln NE wa_vbak-vbeln.
DELETE it_vbap_temp WHERE vbeln NE wa_vbak-vbeln.
CALL FUNCTION FM_NAME
EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = CONTROL
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
OUTPUT_OPTIONS = OUTPUT_OPTIONS
USER_SETTINGS = ' '
* IMPORTING
* DOCUMENT_OUTPUT_INFO =
* JOB_OUTPUT_INFO =
* JOB_OUTPUT_OPTIONS =
TABLES
VBAK = it_vbak_temp[]
VBAP = it_vbap_temp[]
* 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.
endloop.
endform.
Thanks
Sabyasachi
Hello,
Have you passed the control parameter in the function module. I could not see that you have populated any control parameter tables (SSFCTRLOP & ssfcompop) where you can pass the parameters like below.
Pass the control parameters and o/P options as :
DATA : dl_cparam TYPE ssfctrlop,
dl_ outop TYPE ssfcompop.
dl_cparam-no_dialog = 'X'.
dl_cparam-preview = 'X'.
dl_cparam-device = 'PRINTER'.
dl_outop-tdnewid = 'X'.
dl_outop-tddest = 'LP01'. " <--- printer
Thanks,
Abhijt
DEAR KARFORMA,
NOW I PASSED MY INTERNAL TABLES THROUGH TABLES BUT STILL SAME PROBS.
REGARDS,
HERE IS MY CODE
"GETTING FUN MODULE NAME FROM SMARTFORM
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = p_form
* VARIANT = ' '
* DIRECT_CALL = ' '
IMPORTING
FM_NAME = fm_name
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3
.
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ENDIF.
"CALLING SMARTFORM
CALL FUNCTION FM_NAME
EXPORTING
CONTROL_PARAMETERS = wa_ssfctrlop
OUTPUT_OPTIONS = wa_output_options
USER_SETTINGS = 'X'
RUNDATE = RUNDATE
GD_ATTACHMENT_NAME = GD_ATTACHMENT_NAME
IMPORTING
JOB_OUTPUT_INFO = wa_job_output_infO
JOB_OUTPUT_OPTIONS = wa_job_output_options
TABLES
ITABH = ITABH
ITABB = ITABB2
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
.
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ENDIF.
hello,
use ssf_open fm and ssf_close fm. after SSF_OPEN use call function fm_name. this fm_name will found in SSF_FUNCTION_MODULE_NAME........
reg
Sabyasachi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.