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

smart forms

Former Member
0 Likes
724

Hi,

Can you please explain how to upload the data in smart forms.Case is, I have to get the value of document number for a particular g/l account and where to write the conditions,declarations,constants.

7 REPLIES 7
Read only

Former Member
0 Likes
698

u have to make the driver program or that where u capture all the require value in interna table ....

and rpint the smartform.

paas this internal table to smartform and display value a ur required format.

attech smartform and driver programm to output type.

Read only

Former Member
Read only

dani_mn
Active Contributor
0 Likes
698

Hi,

you have to pass the values form the calling program. then you can use them in smartforms.

Declare variables in 'FORM INTERFACE'. and pass these from calling program.

in function module.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
       EXPORTING
            formname           = 'ZWA_FI_AG'
       IMPORTING
            fm_name            = fm_name
       EXCEPTIONS
            no_form            = 1
            no_function_module = 2
            OTHERS             = 3.

  IF sy-subrc <> 0.
*   <error handling>
  ENDIF.

  CALL FUNCTION fm_name

    TABLES

      itab_post                     = itab_post.

Regards,

Wasim Ahmed

Read only

Former Member
0 Likes
698

Hi Amit,

You have to select the value of the document number from the database table in an internal table in the print program.In that print program you will have to call your smartform.

In the form you have to create windows for displaying the values.There is condition tab in the smartform window there you can put the conditions.In types tab of the smartform you can declare all your types and the internal table.Constants you can declare in the global definitions.

Read only

Former Member
0 Likes
698

Hi,

what are all I have to do in print program

Read only

0 Likes
698

You have to do one two things in the print program.

1.Select the record from the database tables to the internal table.

2.Call smartform and pass your internal tables in the tables parameter of the internal table.

The rest will be done in the smartforms.

Check the code.

SELECT matnr

INTO CORRESPONDING FIELDS OF TABLE i_mseg

FROM mseg

WHERE mblnr = wa_mkpf-mblnr.

DATA : g_fm_name TYPE rs38l_fnam,

g_form TYPE tdsfname VALUE 'ZPRINT',

g_output TYPE ssfcompop,

g_control TYPE ssfctrlop.

LOOP AT i_mseg INTO wa_mseg.

*Calling Smartform

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = g_form

IMPORTING

fm_name = g_fm_name

EXCEPTIONS

no_form = 1

no_function_module = 2

OTHERS = 3.

CALL FUNCTION g_fm_name

EXPORTING

control_parameters = g_control

output_options = g_output

user_settings = ' '

g_matnr = wa_mseg-matnr

EXCEPTIONS

formatting_error = 1

internal_error = 2

send_error = 3

user_canceled = 4

OTHERS = 5.

endloop.

write this code in the print program.

in the form create a window,in the text element write &wa_mseg-matnr&.

Message was edited by: mukesh kumar

Read only

Former Member
0 Likes
698

hi

1. Select the required data from Table and have it in ITAB.

2. Pass this Itab to the smartform thru SSF_Function_module_name

3.In trhe smartform get this itab by initialing in the Form interface.

4.Display this Itab.