‎2010 Mar 08 2:11 PM
Hi all,
I am new to abap, actually i am facing some problem in smartforms ,i have created address in smartforms and i want to display this address in report, so that i have copied that function module name and called in my report but there i am getting some error
,where i declared the local variable for data (DATA : FNAME TYPE RS381_FNAM.) in this part it is showing some error.
what is the solution for this.........
Thanks&Regards
kumargowda.
DATA : FNAME TYPE RS381_FNAM.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'SMARTFORM_TRG1'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = 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/SF00000240'
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 =
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.
‎2010 Mar 09 5:02 AM
‎2010 Mar 08 2:34 PM
delete the * before IMPORTING in the first function ...
Edited by: julien schneerberger on Mar 8, 2010 3:34 PM
‎2010 Mar 08 5:50 PM
Hi friend,
what ever u given the hint,i had tried but still i am getting the error in that part.
thanks®ards
kumargowda.
‎2010 Mar 08 6:02 PM
‎2010 Mar 08 6:20 PM
HI
1. Better declare the fname variable in the global declaration part. if you are not using both the Smartforms FM in same perform.
2. Check you are passing the correct address number and type of the address number you are passing is (adrc-addrnumber).
and make sure the node you have created is of type address.
‎2010 Mar 08 2:37 PM
<li>Change the below one from
To
CALL FUNCTION '/1BCDWB/SF00000240'
Thanks
Venkat.OCALL FUNCTION FNAME
‎2010 Mar 08 5:39 PM
Hi venkat,
what ever u have given hint, i had tried but again it is showing error in the the same part.
thanks®ards
kumar gowda.
‎2010 Mar 08 5:49 PM
hi,
try the below manner.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = your smartform name
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
fm_name = function_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3
.
IF sy-subrc eq 0.
CALL FUNCTION function_name
EXPORTING
archive_index = is_archive_index
archive_parameters = is_archive_parameters
control_parameters = is_control_parameters
mail_appl_obj = is_mail_appl_obj
mail_recipient = is_mail_recipient
mail_sender = is_mail_sender
output_options = is_output_options
user_settings = ip_user_settings
*----
IMPORTING
document_output_info =
job_output_info =
job_output_options =
EXCEPTIONS
output_canceled = 1
parameter_error = 2
OTHERS = 3
.
endif.
‎2010 Mar 09 4:52 AM
Hi Kumar,
DATA FNAME TYPE RS381_FNAM
Instead of declaring variable 'FNAME' of type 'RS381_FNAM', declare it with type 'RS38L_FNAM'.
I hope it should work for you.
Cheers
VJ
Edited by: Vishal Jindal on Mar 9, 2010 5:54 AM
‎2010 Mar 09 5:02 AM