Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

FUNCTION SSF_FUNCTION_MODULE_NAME can not be used good in RFC

Former Member
0 Likes
1,145

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

4 REPLIES 4
Read only

alok_patra
Product and Topic Expert
Product and Topic Expert
0 Likes
1,018

Hi,

Please can you explain what is the error you are getting ? At least sy-subrc value of M_FM ?

Cheers,

Alok

Read only

0 Likes
1,018


Hi ,

   It have no error ,but data is not full. Sy-subrc vae of M_FM is 0.

Read only

alok_patra
Product and Topic Expert
Product and Topic Expert
0 Likes
1,018

Just a trial and error -

write sy-cprog = 'Test' before calling M_FM.

Cheers,

Alok

Read only

0 Likes
1,018

I found it is because  RFC  can not pass table value to smartform ,How to use RFC pass table value to smartform ?