on 03-05-2010 7:20 AM
Hi ,
Please post your code .
Let me know if any concerns....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
CALL FUNCTION '/1BCDWB/SF00000033'. *<<<<<<<<<<<<<*
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING....
This must be a typo....You're not really doing the call FM before you get the FM name for the form, right?
The answers are correct, I think....first we get the function module name for the form name and then we call that FM to output the form.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
First check form ZSMARTTEST is activated properly.Then get FM name related to FORM using ENVORMENT-> FM NAME menu in
SMARTFORMS transaction.
then in the code.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZSMARTTEST'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = 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.
use pattern button in se38 and place the FM name in call function so that you will get import / export parameters.
then replace FM name with variable fm_name like mentioned below.
call function fm_name .
"Exporting
" salary = g_salary
TABLES
ITAB1 = ITAB1
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.
Regards,
shanmugavel Chandrasekaran
Edited by: shanmugavel chandrasekaran on Mar 5, 2010 12:16 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi shanmugavel as per your answer i have changed my code and stilll having the same error.
1) i have now activated the smartform also
2) the table used in form interface is : itab like EKPO and not itab1.
new code i am using is :
Tables ekpo.
data :fm_name TYPE rs38l_fnam.
Data: itab like ekpo occurs 0 with header line.
select * into table itab from ekpo.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZSMARTTEST'
* VARIANT = ' '
* DIRECT_CALL = ' '
IMPORTING
FM_NAME = 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 fm_name " '/1BCDWB/SF00000034'
* 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.
ENDIF.
call function fm_name " --->here dont mention FM name
"Exporting
" salary = g_salary
TABLES
ITAB1 = ITAB1
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
Chang it .
call function fm_name --->Here Dont mention the Function module no
"Exporting
" salary = g_salary
TABLES
ITAB1 = ITAB1
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
I think your calling the smartforms generated function module in this way
CALL FUNCTION '/1BCDWB/SF00000033'.
Am i right ?
Try this ....
Call the amsrtform generated function module with the variable that contains the function module name
in this way
CALL FUNCTION fm_name.
Because of smartform generated function module will be vary in dev QTY & Production
Let me know if any concerns......
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi lokserverna.....
yes that is the name of functin module from smartform.i have changed the whole program :
REPORT ZTESTSMART.
Tables ekpo.
data :fm_name TYPE rs38l_fnam.
fm_name = '/1BCDWB/SF00000033'.
Data: itab1 like ekpo occurs 0 with header line.
select * into table itab1 from ekpo.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZSMARTTEST'
* VARIANT = ' '
* DIRECT_CALL = ' '
IMPORTING
FM_NAME = 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 fm_name " ' /1BCDWB/SF00000033'
"Exporting
" salary = g_salary
TABLES
ITAB1 = ITAB1
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.
still the same error
Hi ,
Check the underline text over here
REPORT ZTESTSMART.
Tables ekpo.
data :fm_name TYPE rs38l_fnam.
fm_name = '/1BCDWB/SF00000033'. " Dont assign this with hard code (Remove this and try it )
Data: itab1 like ekpo occurs 0 with header line.
select * into table itab1 from ekpo.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZSMARTTEST'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = 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 fm_name " ' /1BCDWB/SF00000033'
"Exporting
" salary = g_salary
TABLES
ITAB1 = ITAB1
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.
Hi ,
As per your CODE last posting
call function fm_name " ' /1BCDWB/SF00000033'
"Exporting
" salary = g_salary
TABLES
ITAB1 = ITAB1
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.
your are passing the ITAB1 to smartform
Check that internal table is defined in the smartform are not
other wise comment that TABLE Parameter
TABLES
ITAB1 = ITAB1
Hope you resolve your issue
Let me know if any concerns....
my program is :
REPORT ZTESTSMART.
Tables ekpo.
data :fm_name TYPE rs38l_fnam.
Data: itab1 like ekpo occurs 0 with header line.
select * into table itab1 from ekpo.
CALL FUNCTION '/1BCDWB/SF00000033'.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZSMARTTEST'
* VARIANT = ' '
* DIRECT_CALL = ' '
IMPORTING
FM_NAME = 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/SF00000033'
"Exporting
" salary = g_salary
TABLES
ITAB1 = ITAB1
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use this way
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZSMARTTEST'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = 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 fm_name " ' /1BCDWB/SF00000033'
"Exporting
" salary = g_salary
TABLES
ITAB1 = ITAB1
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.
Thanks
Chinni
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.