2016 Feb 15 8:37 AM
Dear Experts,
I want to change smartform to PDF file , but i found JOB_OUTPUT_INFO can not returen correct data ,i want to know if SAP can not support this function in RFC?
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'ZSMT105_HCM_PDF'
IMPORTING
FM_NAME = M_FM
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.
clear :JOB_OUTPUT_INFO.
CALL FUNCTION M_FM
EXPORTING
CONTROL_PARAMETERS = PCTRL
OUTPUT_OPTIONS = OUTOP
IMPORTING
JOB_OUTPUT_INFO = JOB_OUTPUT_INFO
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.
Best Regards,
Merry
Dear Experts,
I want to change smartform to PDF file , but i found JOB_OUTPUT_INFO can not returen correct data ,i want to know if SAP can not support this function in RFC?
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'ZSMT105_HCM_PDF'
IMPORTING
FM_NAME = M_FM
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.
clear :JOB_OUTPUT_INFO.
CALL FUNCTION M_FM
EXPORTING
CONTROL_PARAMETERS = PCTRL
OUTPUT_OPTIONS = OUTOP
IMPORTING
JOB_OUTPUT_INFO = JOB_OUTPUT_INFO
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.
Best Regards,
Merry
2016 Feb 15 8:49 AM
Hi,
Please can you explain what is the error you are getting ? At least sy-subrc value of M_FM ?
Cheers,
Alok
2016 Feb 15 8:58 AM
Hi ,
It have no error ,but data is not full. Sy-subrc vae of M_FM is 0.
2016 Feb 15 9:04 AM
Just a trial and error -
write sy-cprog = 'Test' before calling M_FM.
Cheers,
Alok
2016 Feb 16 1:05 AM
I found it is because RFC can not pass table value to smartform ,How to use RFC pass table value to smartform ?
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |