Application Development 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: 

How to Call SmartForm In Module Pool Programming.

Former Member
0 Kudos

Hi,

        I would like to know that How to Call SmartForm In Module Pool Programming.I have followed the steps of 

  but here it shows an dump of function module name not done,while I have accurately call

        as mentioned.Kindly suggest some ways to how to call smartforms in module pool programming as easy as in webdynpro.

      Also is there any possible ways to create a captcha by simple SAP ABAP Module Programming without using the servlet.

Regards,

Sumit Kharya

5 REPLIES 5

Nick_Y
Discoverer
0 Kudos

Hi Sumit,

Which function module call is generating the dump? SSF_FUNCTION_MODULE_NAME or the function module name returned in parameter FM_NAME?

Regards,

Nick

Former Member
0 Kudos

Written the piece of code to call the smart form from the MPP.




A simple program created by me to call the smart form from the MPP, when the call form button is pressed PAI event will trigger intern trigger the driver program of the smart forms, please look into the program below for your reference.




TABLES : VBAK.

DATA : FNAME TYPE TDSFNAME,

            FNAM TYPE RS38L_FNAM.

DATA : CNTRL TYPE SSFCTRLOP.

call screen 109.

*&---------------------------------------------------------------------*

*&      Module  STATUS_0109  OUTPUT

*&---------------------------------------------------------------------*

*       text

*----------------------------------------------------------------------*

MODULE STATUS_0109 OUTPUT.

SET PF-STATUS 'RETT'.

ENDMODULE.                 " STATUS_0109  OUTPUT




*&---------------------------------------------------------------------*

*&      Module  USER_COMMAND_0109  INPUT

*&---------------------------------------------------------------------*

*       text

*----------------------------------------------------------------------*

MODULE USER_COMMAND_0109 INPUT.

CASE SY-UCOMM.

   WHEN 'BACK' OR 'EXIT' OR 'CANC'.

     LEAVE PROGRAM.

   WHEN 'CALLF'.

     FNAME = 'ZCALLFORM_FROM_MMP'.

     CNTRL-PREVIEW = 'X'.

     CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

       EXPORTING

         FORMNAME                             = FNAME

*       VARIANT                                  = ' '

*       DIRECT_CALL                         = ' '

      IMPORTING

        FM_NAME                                = FNAM

      EXCEPTIONS

        NO_FORM                               = 1

        NO_FUNCTION_MODULE       = 2

        OTHERS                                 = 3

               .

     IF SY-SUBRC <> 0.

* Implement suitable error handling here

     ENDIF.

CALL FUNCTION  FNAM

   EXPORTING

     CONTROL_PARAMETERS          = CNTRL

     VBELN                      = VBAK-VBELN

  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.

ENDCASE.

ENDMODULE.                 " USER_COMMAND_0109  INPUT

2. I think we can't create CAPTCHA from module pool programming but not sure, let me check and get back to soon.

Regards,

Karthik

0 Kudos

Hi Karthik,

         Thanks for the above suggestion,their is a code where we can do the captcha but for that Java servlets are used.and for that some other SAP NETWEAVER Java Product is used.If you find any alternative way,Kindly inform me.

Regards,

Sumit Kharya

former_member203305
Active Contributor
0 Kudos

Hi,

calling a smartform from a modulepool or report is the same.

check the dump that you are getting or explain it to us.

Regards

Miguel

Former Member
0 Kudos

Hi,

       I have solve the problems related calling smartform and then convert invoice into PDF by calling functions :

1) CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

2) Call the function of runtime Dynamic smartform function module.

3) Call the function Convert to OTF to covert first function module invoice into OTF and then Into PDF by refering 'PDF' as type in the call function.

Rest is same as calling of smartform in module pool programming as we have call the smartform in report and driver program.

Regards

Sumit Kharya