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

reg: Smart forms

Former Member
0 Likes
1,075

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,032

Use RS38L_FNAM instead of RS381_FNAM

Thanks

Chinni

9 REPLIES 9
Read only

former_member770378
Active Participant
0 Likes
1,032

delete the * before IMPORTING in the first function ...

Edited by: julien schneerberger on Mar 8, 2010 3:34 PM

Read only

0 Likes
1,032

Hi friend,

what ever u given the hint,i had tried but still i am getting the error in that part.

thanks&regards

kumargowda.

Read only

0 Likes
1,032

what kind of error that you are getting.

Read only

0 Likes
1,032

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.

Read only

venkat_o
Active Contributor
0 Likes
1,032

<li>Change the below one from

CALL FUNCTION '/1BCDWB/SF00000240'
To
CALL FUNCTION FNAME
Thanks Venkat.O

Read only

Former Member
0 Likes
1,032

Hi venkat,

what ever u have given hint, i had tried but again it is showing error in the the same part.

thanks&regards

kumar gowda.

Read only

Former Member
0 Likes
1,032

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.

Read only

Former Member
0 Likes
1,032

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

Read only

Former Member
0 Likes
1,033

Use RS38L_FNAM instead of RS381_FNAM

Thanks

Chinni