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: 

smart forms

Former Member
0 Kudos
87

How can i integrating the Smart Form into the application?

1 ACCEPTED SOLUTION

Former Member
0 Kudos
55

Hi,

tried this out.

1. In the Form Builder call the function Environment Name of the function module and use STRG-Y and STRG-C to copy its name.

2. In the data retrieval program define a variable of type rs281_fnam for the name of the generated function module:

data fm_name type rs38l_fnam.

You can call the Smart Form in other parts of the application program as well. However, in this case you must make sure that the system can access the data to be passed from that place. We recommend to encapsulate the data retrieval in a function module as well.

3. If desired, you can call the function module SSF_FIELD_LIST. It returns a list of the form parameters actually used in the form. You can use this information to limit data selection, if necessary.

4. Call function module SSF_FUNCTION_MODULE_NAME. It returns the name of the generated function module:

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

FORMNAME = '<form name>'

IMPORTING

FM_NAME = fm_name

EXCEPTIONS

NO_FORM = 1

NO_FUNCTION_MODULE = 2

OTHERS = 3.

IF SY-SUBRC <> 0.

<error handling>

ENDIF.

5. Call the generated function module. To do this, use the Insert statement function for CALL FUNCTION in the ABAP Editor and use the name you copied in step 1. (to avoid having to copy all interface parameters manually). Then replace the function module name with the variable fm_name defined in step 2.

CALL FUNCTION fm_name

EXPORTING

  • ARCHIVE_INDEX =

  • ARCHIVE_PARAMETERS =

  • CONTROL_PARAMETERS =

  • MAIL_APPL_OBJ =

  • MAIL_RECIPIENT =

  • MAIL_SENDER =

  • OUTPUT_OPTIONS =

  • USER_SETTINGS = 'X'

G_CARRID = <variable>

G_CONNID = <variable>

G_FLDATE = <variable>

  • IMPORTING

  • DOCUMENT_OUTPUT_INFO =

  • JOB_OUTPUT_INFO =

  • JOB_OUTPUT_OPTIONS =

TABLES

GT_SBOOK = <internal table>

EXCEPTIONS

FORMATTING_ERROR = 1

INTERNAL_ERROR = 2

SEND_ERROR = 3

USER_CANCELED = 4

OTHERS = 5.

IF SY-SUBRC <> 0.

<error handling>

ENDIF.

In this example, three variables and an internal table are passed. The parameters G_CARRID, G_CONNID, G_FLDATA, and GT_SBOOK have been defined before in the form interface.

6. In the interface pass all data you want to transfer to the form.

2 REPLIES 2

Former Member
0 Kudos
55

hi Chintan,

Welcome to <b>SDN</b>

there r two ways to do it

one is with the printprogram

call this print program into your application

2nd one is using print work bench

as far i know these r the two ways to do it

if u need further info regarding either of them just let me know

Regards,

Naveen

Former Member
0 Kudos
56

Hi,

tried this out.

1. In the Form Builder call the function Environment Name of the function module and use STRG-Y and STRG-C to copy its name.

2. In the data retrieval program define a variable of type rs281_fnam for the name of the generated function module:

data fm_name type rs38l_fnam.

You can call the Smart Form in other parts of the application program as well. However, in this case you must make sure that the system can access the data to be passed from that place. We recommend to encapsulate the data retrieval in a function module as well.

3. If desired, you can call the function module SSF_FIELD_LIST. It returns a list of the form parameters actually used in the form. You can use this information to limit data selection, if necessary.

4. Call function module SSF_FUNCTION_MODULE_NAME. It returns the name of the generated function module:

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

FORMNAME = '<form name>'

IMPORTING

FM_NAME = fm_name

EXCEPTIONS

NO_FORM = 1

NO_FUNCTION_MODULE = 2

OTHERS = 3.

IF SY-SUBRC <> 0.

<error handling>

ENDIF.

5. Call the generated function module. To do this, use the Insert statement function for CALL FUNCTION in the ABAP Editor and use the name you copied in step 1. (to avoid having to copy all interface parameters manually). Then replace the function module name with the variable fm_name defined in step 2.

CALL FUNCTION fm_name

EXPORTING

  • ARCHIVE_INDEX =

  • ARCHIVE_PARAMETERS =

  • CONTROL_PARAMETERS =

  • MAIL_APPL_OBJ =

  • MAIL_RECIPIENT =

  • MAIL_SENDER =

  • OUTPUT_OPTIONS =

  • USER_SETTINGS = 'X'

G_CARRID = <variable>

G_CONNID = <variable>

G_FLDATE = <variable>

  • IMPORTING

  • DOCUMENT_OUTPUT_INFO =

  • JOB_OUTPUT_INFO =

  • JOB_OUTPUT_OPTIONS =

TABLES

GT_SBOOK = <internal table>

EXCEPTIONS

FORMATTING_ERROR = 1

INTERNAL_ERROR = 2

SEND_ERROR = 3

USER_CANCELED = 4

OTHERS = 5.

IF SY-SUBRC <> 0.

<error handling>

ENDIF.

In this example, three variables and an internal table are passed. The parameters G_CARRID, G_CONNID, G_FLDATA, and GT_SBOOK have been defined before in the form interface.

6. In the interface pass all data you want to transfer to the form.