cancel
Showing results for 
Search instead for 
Did you mean: 

problem in smartforms(urgent)

Former Member
0 Kudos

hi experts,

I have created one smartform and i have one driver program for that smartform.I want to know know how to pass the internal table data from driver program to smartform

thanks

regards,

Ashok.

View Entire Topic
Former Member
0 Kudos

Hi,

Once you execute the smart form u obtain a function module which you have to call in your driver program.

the internal table which u filled in the driver program can be then passed as 'tables' parameter in the function call.

u get the function module name once u generate the form or under the environment menu.

santhosh

Former Member
0 Kudos

hi santhosh,

I did what you said but it does not displays the internal table data.It displays only the hardcoded data.Kindly give me the better solution.

thanks,

regards,

Ashok

Former Member
0 Kudos

Hi Ashok,

You have to declare you internal table in the Form Interface.

Regards,

Manish

Former Member
0 Kudos

hi ashok,

check this sample code

TABLES: KNA1,KNB1.

DATA: BEGIN OF IT_KNA1 OCCURS 0,

KUNNR LIKE KNA1-KUNNR,

BUKRS LIKE KNB1-BUKRS,

NAME1 LIKE KNA1-NAME1,

REGIO LIKE KNA1-REGIO,

LAND1 LIKE KNA1-LAND1,

END OF IT_KNA1.

DATA: V_FNAME TYPE RS38L_FNAM.

selection-screen:begin of block blk1 with frame title text-001.

select-options:s_KUNNR for KNA1-KUNNR.

selection-screen:end of block blk1.

SELECT A~kunNR

B~BUKRS

A~NAME1

A~REGIO

A~LAND1

FROM KNA1 AS A

INNER JOIN KNB1 AS B ON AKUNNR = BKUNNR

INTO TABLE IT_KNA1

WHERE A~KUNNR IN S_KUNNR.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = 'ZP_SMARTFORM1'

  • VARIANT = ' '

  • DIRECT_CALL = ' '

IMPORTING

FM_NAME = V_FNAME

  • 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.

CALL FUNCTION '/1BCDWB/SF00000778'

  • EXPORTING

  • ARCHIVE_INDEX =

  • ARCHIVE_INDEX_TAB =

  • ARCHIVE_PARAMETERS =

  • CONTROL_PARAMETERS =

  • MAIL_APPL_OBJ =

  • MAIL_RECIPIENT =

  • MAIL_SENDER =

  • OUTPUT_OPTIONS =

  • USER_SETTINGS = 'X'

  • IMPORTING

  • DOCUMENT_OUTPUT_INFO =

  • JOB_OUTPUT_INFO =

  • JOB_OUTPUT_OPTIONS =

TABLES

T_KNA1 = IT_KNA1

  • 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.

and in the smartform i hope u r displaying the contents by drag and drop rather than hard coding them and declaring ur internal table in Form Interface

hope this helps,

do reward if it helps,

priya.