Application Development 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: 

regarding ZZZ_TEST2 form-SMARTFORM

Former Member
0 Kudos

hay jeyanthi,

Actually i am trying to execute the sample program which you gave in ur link.

I created the same as ZZZ_TEST2 form and trying to execute using below code. before doing mail or pdf format process i just want to display in print preview.

so i am trying for this.

could you pls guide me...

I am struck up while executing program using this form ZZZ_TEST2. problem here is ...i get error while i try to execute form ZZZ_TEST2, but it activates succesffully,it shows INTERNAL ERROR and ends.

If at all i use that form in program it justs ends normally without generating output or report.

is there any way to debug inthis state or how to solve this problem.

If u need more specfic i can explain..

I will send you my sample code writen in program

<code>DATA: v_form_name TYPE rs38l_fnam,

i_tline TYPE TABLE OF Tline with HEADER LINE.

DATA : w_ctrlop type ssfctrlop,

w_return TYPE ssfcrescl,

w_compop TYPE ssfcompop,

v_len_in LIKE sood-objlen.

DATA:i_otf TYPE itcoo occurs 0 with HEADER LINE.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

FORMNAME = 'ZZZ_TEST2'

  • VARIANT = ' '

  • DIRECT_CALL = ' '

IMPORTING

FM_NAME = v_form_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.

w_ctrlop-getotf = 'X'.

w_ctrlop-no_dialog = 'X'.

w_compop-tdnoprev = 'X'.

CALL FUNCTION v_form_name

EXPORTING

control_parameters = w_ctrlop

output_options = w_compop

user_settings = 'X'

IMPORTING

job_output_info = w_return

EXCEPTIONS

formatting_error = 1

internal_error =2

send_error = 3

user_canceled = 4

OTHERS = 5.

if sy-subrc <> 0.

endif.

</code>

Message was edited by: ambi chan

Message was edited by: ambi chan

1 ACCEPTED SOLUTION

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

Please note that in that program you can even see the output in print preview without using the report.

I used the report because to send the output of the smartform through mail.

First try to see the output in print preview and let me know if it is coming.

For your information, if you press F8 after activating the form,it will generate a function module.After that press F8 ,then again press F8.After that you can see a print window. In that give output device as LOCL, and then click print preview.

Hope it is clear.

Rgds,

J.Jayanthi

5 REPLIES 5

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

Please note that in that program you can even see the output in print preview without using the report.

I used the report because to send the output of the smartform through mail.

First try to see the output in print preview and let me know if it is coming.

For your information, if you press F8 after activating the form,it will generate a function module.After that press F8 ,then again press F8.After that you can see a print window. In that give output device as LOCL, and then click print preview.

Hope it is clear.

Rgds,

J.Jayanthi

0 Kudos

hey,

thanks for your reply.

Yes i tried that it gives me INTERNAL_ERROR with message ID SSFCOMPOSER in TEST FM:RESULT SCREEN.

ambichan.

0 Kudos

Hi,

I am not sure why it occured.

But anyway I am suggesting you to check each node separately and check whether you had given line types in Output options of text element correctly.

Just check the each step in that documentation.

Rgds,

J.Jayanthi

0 Kudos

hey jayanthi,

Somehow i solved the problem to display all the headings and text.

But i can get display all the material details.

I mean records are not fetched and displayed.

why is it..i have given LINE types in Output options of text element too..

should i have to use SECTION node instead of loop node to display the records.?

any ideas...to check and debug.

(I got print preview display but no records are fetched and displayed at main window.)

ambichan

0 Kudos

Hi Ambichan,

Just check for that code, whether your table(both table) is having data.

write break-point before the code and observe whether the internal table have data.

Otherwise increase the up to rows (say up to 60 rows ) like that in the code(program lines).

Hope it helps.

Rgds,

J.Jayanthi