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

smartform query

Former Member
0 Likes
1,694

Hi Expert,

I got one error message in my print prog. I designed the form as per requirement but in print prog i got the error message that

"unable to interpret "exporting". Possible causes of error: incorrect spelling or comma error."

Anybody will tell me what i can do???

18 REPLIES 18
Read only

Former Member
0 Likes
1,627

Hi Salil,

Double click on the error message it will take you to the place where the error is after this send us what you did at that place.

Regards,

Mukesh Kumar

Read only

former_member480923
Active Contributor
0 Likes
1,627

Hi

The problem lies in the calling process you have used when oyu are calling the Smartform generated FM, please doa syntax check in your print program and identify the cause of the problem ........

Hope this Helps

Anirban

Read only

Former Member
0 Likes
1,627

Hi,

U might have uncommented 'Exporting' statement while calling function module generated by system once u create smart form,without exporting any of the exporting parameters.

for eg :

call function '/1BCDWB/SF00000568'

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

itab = itab

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

So in this case either pass any of the exporting parameters or comment th entire Exporting part of the function.

Read only

0 Likes
1,627

Hi,

In my prog i uncommented the 'exporting' statement. May i make it commented??

Read only

0 Likes
1,627

Hi Salil,

Can you send us your piece of code so that we can see it,not the whole code just the form in which you are using the FM to call the smartform

Read only

0 Likes
1,627

Hi Mukesh,

I m sending the code for calling my fm. Check it & tell me how to proceed :

CALL FUNCTION '/1BCDWB/SF00000104'

  • EXPORTING

  • ARCHIVE_INDEX =

  • ARCHIVE_INDEX_TAB =

  • ARCHIVE_PARAMETERS =

  • CONTROL_PARAMETERS =

  • MAIL_APPL_OBJ =

  • MAIL_RECIPIENT =

  • MAIL_SENDER =

  • OUTPUT_OPTIONS =

  • USER_SETTINGS = 'X'

  • P_EXGRP =

  • P_STDATE =

  • P_ENDDT =

  • IMPORTING

  • DOCUMENT_OUTPUT_INFO =

  • JOB_OUTPUT_INFO =

  • JOB_OUTPUT_OPTIONS =

TABLES

itab = ITAB

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

Read only

0 Likes
1,627

USE LIKE THAT...

election-screen: Begin of block b1 with frame title text-001.

parameters: po_date type VBEP-EDATU default sy-datum,

po_days type i default 30.

selection-screen: end of block b1.

data: g_fm_name type RS38L_FNAM,

g_formname type TDSFNAME value 'ZBHU_SMARTFORM_ASG1_1'.

start-of-selection.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = g_formname

  • VARIANT = ' '

  • DIRECT_CALL = ' '

IMPORTING

FM_NAME = g_fm_name

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 g_fm_name

EXPORTING

  • ARCHIVE_INDEX =

  • ARCHIVE_INDEX_TAB =

  • ARCHIVE_PARAMETERS =

  • CONTROL_PARAMETERS =

  • MAIL_APPL_OBJ =

  • MAIL_RECIPIENT =

  • MAIL_SENDER =

  • OUTPUT_OPTIONS =

  • USER_SETTINGS = 'X'

p_date = po_date

p_days = po_days

  • IMPORTING

  • DOCUMENT_OUTPUT_INFO =

  • JOB_OUTPUT_INFO =

  • JOB_OUTPUT_OPTIONS =

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

Read only

Former Member
0 Likes
1,627

hi,

Pls check the EXPORTING statement is commnted or not?

- SA

Read only

Former Member
0 Likes
1,627

Hi Salil,

This could be because of uncommented Exporting statement and no parameters actually exported. If you dont want to export any parameters then keep Exporting statement as it is (do not uncomment).

Hope this will help you to solve your problem.

Read only

0 Likes
1,627

Hi Amol,

Actually in my prog i m using 3 parameters. Based on these data i m retriving data 4m different database table. So will u tell me that may i make it 'exporting' as commented or uncommented???

Read only

Former Member
0 Likes
1,627

hi

good

in smart from check out with the function module through which you r passing the data into the smartform screen and check out the form interface tab in the smartform screen ,wheather all the data you r passing from print program to smart form is assigned properly or not.

thanks

mrutyun

Read only

Former Member
0 Likes
1,627

Hi,

It is definitely a data definition error.Your data definition in print program and smartforms are different like character in print program numeric in smartform.

If it helps.reward points.

Regards,

Nandha

Read only

0 Likes
1,627

Hi Friends,

i am sending my full coding. plz let me know where i m wrong?

In fm ssf_function_module_name under impoting parameter i have to write my fun module name or just g_fm_name??

Plz tell me in my coding i m write or wrong?? In selection screen having 3 parameters & based on this i m retriving the data 4m diff database table.

My coding is as follows:

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

parameters: d_exgrp like j_1iexchdr-exgrp,

d_stdate like J_2ICOMP-START_DT,

d_enddt like J_2ICOMP-END_DT.

selection-screen end of block B1.

data: g_fm_name type rs38l_fnam,

g_formname type tdsfname value 'z_test'.

data: begin of mtab occurs 0,

SERIALNO LIKE J_1IPART1-SERIALNO,

BUDAT LIKE J_2IEXTRCT-BUDAT,

MATNR LIKE J_1IPART1-MATNR,

MENGE LIKE J_1IPART1-MENGE,

EXNUM LIKE J_1IEXCHDR-EXNUM,

NAME1 LIKE LFA1-NAME1,

EXCRG LIKE J_1IEXCHDR-EXCRG,

MBLNR LIKE J_1IPART1-MBLNR,

TOTAL4 LIKE J_2ICOMP-TOTAL4,

AR_NUM LIKE J_2ICOMP-AR_NUM,

TOTAL1 LIKE J_2ICOMP-TOTAL1,

MAKTX LIKE J_1IPART1-MAKTX,

NAME2 LIKE LFA1-NAME2,

TOTAL2 LIKE J_2ICOMP-TOTAL2,

RULES LIKE J_2ICOMP-RULES,

EXDAT LIKE J_1IEXCHDR-EXDAT,

EXCDI LIKE J_1IEXCHDR-EXCDI,

CPUDT LIKE J_1IPART1-CPUDT,

AR_DT LIKE J_2ICOMP-AR_DT,

MJAHR LIKE J_1IPART1-MJAHR,

CHAPID1 LIKE J_2ICOMP-CHAPID1,

NAME3 LIKE LFA1-NAME3,

EXCCD LIKE J_2ICOMP-EXCCD,

ORT01 LIKE LFA1-ORT01,

total3 like j_2icomp-total3,

end of mtab.

*get data

select * from j_1ipart1 into corresponding fields of table mtab where exgrp = d_exgrp.

  • check sy-subrc = 0.

select * from j_1iexchdr into corresponding fields of table mtab.

select * from lfa1 into corresponding fields of table mtab.

*print data

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = g_formname

  • VARIANT = ' '

  • DIRECT_CALL = ' '

IMPORTING

FM_NAME = g_fm_name

  • 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/SF00000104'

EXPORTING

  • ARCHIVE_INDEX =

  • ARCHIVE_INDEX_TAB =

  • ARCHIVE_PARAMETERS =

  • CONTROL_PARAMETERS =

  • MAIL_APPL_OBJ =

  • MAIL_RECIPIENT =

  • MAIL_SENDER =

  • OUTPUT_OPTIONS =

  • USER_SETTINGS = 'X'

  • P_EXGRP =

  • P_STDATE =

  • P_ENDDT =

  • IMPORTING

  • DOCUMENT_OUTPUT_INFO =

  • JOB_OUTPUT_INFO =

  • JOB_OUTPUT_OPTIONS =

  • TABLES

mtab = mtab

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

I m trying to debug it also but after some time i got the error message "form z_test does not exists."

Plz tell me so that i can proceed.

Read only

0 Likes
1,627

Hi Salil

You have commented TABLES in the second FM.

Mtab = mtab is considered as Exporting parameter and not TABLES parameter.

Thats' the reason you have got the error in first case.

Navneeth

Read only

0 Likes
1,627

Hi Navneeth,

If i uncommented the TABLES parameter i got the error message "unable to interpret 'EXPORTING'. Possible causes of error: incorrect spelling or comma error."

So tell me how to proceed??????

Read only

0 Likes
1,627

Hi salil,

If you are not passing anything in the exporting then comment that exporting also.Uncomment tables.

Regards,

Mukesh Kumar

Read only

0 Likes
1,627

Hi Mukesh,

Thank u for ur reply but my prog now become syntactically correct but it is not showing o/p. Will u help me regarding this.

Read only

0 Likes
1,627

Hi Salil,

This is working for my program try to implement it in your program.If you face any problem reply .

DATA: ls_control_param TYPE ssfctrlop.

DATA: ls_composer_param TYPE ssfcompop.

DATA PRINT_OPTS LIKE ITCPO.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = form_name

IMPORTING

fm_name = g_fm_name

EXCEPTIONS

no_form = 1

no_function_module = 2

OTHERS = 3.

ls_control_param-no_dialog = 'X'.

ls_control_param-device = 'PRINTER'.

MOVE-CORRESPONDING print_opts TO ls_composer_param .

CALL FUNCTION g_fm_name

EXPORTING

control_parameters = ls_control_param

output_options = ls_composer_param

user_settings = ' '

EXCEPTIONS

formatting_error = 1

internal_error = 2

send_error = 3

user_canceled = 4

OTHERS = 5.