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

smartforms

Former Member
0 Likes
1,414

hello experts,

I designed a Invoice smartform (not using SAP standard).

I developed executable pgm.(print pgm) for that smartform.

It showing the print preview properly, problem is for printing the smartform only. how can i print it. plz help me. By using NACE or any other way is there?

Regards

Raj

15 REPLIES 15
Read only

Former Member
0 Likes
1,318

Hi

I can't understand which kind of invoice you're speaking about.

So you can use NACE trx to set the parameter to manage it, but it depends on the kind of your document.

Max

Read only

Former Member
0 Likes
1,318

hii

Note down the Spool number and check the status in SP01 or make sure that you are sending to your local printer.

Regards

Naresh

Read only

Former Member
0 Likes
1,318

Hi,

You need to specify the printer in the parameters and also other parmeters in the OUTPUT_OPTIONS parameters.

Regards,

Ravi

Note :Please mark all the helpful answers

Read only

Former Member
0 Likes
1,318

Hi prasad

you have configure your smartform and the printer progrma in the nace transaction for that particulkar output type.

For Invoice you can do it for RD00 output types so that wheren you create a invoice vf03, you can print it.

regards

kishore

Read only

Former Member
0 Likes
1,318

hii

you can do that using NACE .

Note down the Spool number and check the status in SP01 or make sure that you are sending to your local printer.

May be you have not set the <b>PRINT IMMEDIATELY</b> option, because of this it creates the spool and waits.

first set that option and check .

Reward points if helpful

Revert back for more help .

Regards

Naresh

Read only

0 Likes
1,318

HI Naresh

In Mace i replaced my Pgm & form name But still i cont print the form. where can i get the Spool no. i d'not find any spool no.

Can u plz help me.

Thanks & Regards

Raj

Read only

0 Likes
1,318

HI Naresh

In Nace i replaced my Pgm & form name But still i cont print the form. where can i get the Spool no. i can't find any spool no.

Can u plz help me.

Thanks & Regards

Raj

Read only

0 Likes
1,318

Hi Raj,

Please follow this procedure to print it.

Here i am assume invoice is from SD. so, please consider the tcode VF02 or VF03.

First, finish your print (driver or triggering) program and layout as well.

for example..have a look at the standard invoice print program RLB_INVOICE.

Make sure that your print program must have ENTRY routine as follows..

----


  • FORM ENTRY

----


FORM entry USING return_code us_screen.

DATA: lf_retcode TYPE sy-subrc.

CLEAR retcode.

xscreen = us_screen.

PERFORM processing USING us_screen

CHANGING lf_retcode.

IF lf_retcode NE 0.

return_code = 1.

ELSE.

return_code = 0.

ENDIF.

ENDFORM.

Within the PROCESSING form you can write your own code to call and print smartform.

Now, Go to NACE and select the application 'V3' and click on 'output type' button on the toolbar.

You will get a list of output types. Now, you can select RD00 form the list or you can create your own output type.

Then select the desited output type the click on the 'Processing routine' which on the left side and enter details as follows

Program: your print program (driver program or triggring program)

Form routine: ENTRY

Form: leave it blank

SmartForm: your smartform layout name

And also maintain Partner functions as well.

Do not forgot to maintain the Access Sequence as well.

Once you finished allout above, Now, goto VF02 and select any invoice and press enter.

Now, follow the path.

Goto -> Header -> output.

In the output screen..maintain the parameters as follows..

Select the output type to whom you have assigned print program name, layout and press enter. Automatically other cells on that row will be filled with data on that screen.

Now, you have to choose, the processing type..

Select the entry and press 'Further data' button and choose send immediately when saving the application (this is option 4 on the dropdown list)

Then come back the output screen.

Now, select the output type row again and press 'Communication method' button on the top.

You will have to enter Printer Name and no of copies here and also select print immedicately checkbox.

Then finally, Save it. you will see your dream printout.

or you can go to SP01 and excute it. you will see list of spools created for your user id.

Letme know if you have any questions.

Ram

Read only

0 Likes
1,318

Hi Ram..

Thanks for ur reply...

& one more problem i got...

i can export one table data to Smartform through function module( smartform generated Function module).

ex---CALL FUNCTION '/1BCDWB/SF00000001'

TABLES

KTAB = ITAB.

This KTAB i declared in Smartform(smartForm in that FormInterface in that tables --- ktab like kna1)

it is working..but my problem is i want data from kna1,vbrk,vbkd & vbrp tables by using join condition(i know how to joins that tables)...how can i send it to the smartform? & how i can declare that tables in that smartform? (one customer & multiple items)

I hope u can understand my problem..plz help me

Thanks & Regards

Raj

Read only

0 Likes
1,318

Hi Rajendra,

If you want to get data from different tables, you must declare the structure both in Layout as well as in the driver program and also you will have to create a TABLE type.

So, instead of that, just create a driver program and pass the NAST to the function module.

Now, you have NAST record in the layout. So, Create 'Program lines' in the Main window and write your code to fetch the data from those tables based on NAST record.

(Or) you can also write code at Initialization tab in Global definations. This code will be executed before layout is processed.

let me know if you have any questions.

Ram

Read only

0 Likes
1,318

Hi Ram..

Can you plz explane me detail..

For this can i use FORM ENTRY are not?

Thanks & Regards

Raj

Read only

0 Likes
1,318

Hi Raj,

You will have to use FROM ENTRY for this..

Let me know if you got confused about execution process.

regards,

ram.

Read only

Former Member
0 Likes
1,318

Hai Rajendra

CALL FUNCTION 'GET_PRINT_PARAMETERS'

EXPORTING MODE = 'BATCH'

REPORT = 'MYREPORT'

IMPORTING OUT_PARAMETERS = PARAMS

VALID = VALID.

look into this link

http://help.sap.com/saphelp_nw04/helpdata/en/d5/6243ea8a4111d4b605006094192fe3/content.htm

You need to set the USER_SETTINGS perameter in your SmartForm to SPACE

Thanks & regards

Sreenivasulu P

Read only

Former Member
0 Likes
1,318

hII Rajendra ,

In <b>SP01</b>,we can find our spool number and we can print the content of spool request number .

check thisink

<b>http://help.sap.com/saphelp_nw2004s/helpdata/en/d9/4a8efb51ea11d189570000e829fbbd/frameset.htm</b>

Reward points if helpful

Revert back for more help

Regards

Naresh

Read only

Former Member
0 Likes
1,318

Hii Rajendra ,

in your abap program collect all data at once into itab ..then pass that itab to smart form..

and use for all entries for performance issue

Calling SMARTFORMS from your ABAP program.

Collecting all the table data in your program, and pass once to SMARTFORMS

<b>SMARTFORMS

Declare your table type in :-

Global Settings -> Form Interface

Global Definintions -> Global Data

Main Window -> Table -> DATA</b>

chk this program.

REPORT ZSMARTFORM.

TABLES: MKPF.

DATA: FM_NAME TYPE RS38L_FNAM.

DATA: BEGIN OF INT_MKPF OCCURS 0.

INCLUDE STRUCTURE MKPF.

DATA: END OF INT_MKPF.

SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001.

SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR.

MOVE-CORRESPONDING MKPF TO INT_MKPF.

APPEND INT_MKPF.

ENDSELECT.

  • At the end of your program.

  • Passing data to SMARTFORMS

call function 'SSF_FUNCTION_MODULE_NAME'

exporting

formname = 'ZSMARTFORM'

  • VARIANT = ' '

  • DIRECT_CALL = ' '

IMPORTING

FM_NAME = FM_NAME

EXCEPTIONS

NO_FORM = 1

NO_FUNCTION_MODULE = 2

OTHERS = 3.

if sy-subrc <> 0.

WRITE: / 'ERROR 1'.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

endif.

call function FM_NAME

  • 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

GS_MKPF = INT_MKPF

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.

Reward points f helpful

Regards

Naresh