cancel
Showing results for 
Search instead for 
Did you mean: 

creating no. of spool requests based on data

Former Member
0 Kudos

Hi all!

I am preparing a smartform showing the schedule deliveries of purchase orders of all vendors within a specified period. A new spool request is to be generated for each vendor's schedule deliveries. How can I raise a new spool request when the vendor no. is changed? Is it possible? If yes,please suggest.

Edited by: Jayasri P. on Apr 21, 2008 12:31 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

you will have to call the smartform separatley for each vendor

and then set tdnewid = 'X'

Former Member
0 Kudos

Hi Nehal!

I have seen this parameter in exporting parameters of SMARTFORMS-> form interfaces section.Do I mention tdnewid = 'X' in Global definitions or in program?

Former Member
0 Kudos

no only in the program

its already a standard field as you saw in the interface of smartforms

you just have to pass the value

Former Member
0 Kudos

Hi Nehal!

I have maintained this field in the middle of SSF_FUNCTION_MODULE_NAME and fm_name(of type RS38L_FNAM) in my program and I kept these two function modules in a loop of table which has no. of vendors.When I execute this report, only it' s showing data for one vendor,when I come back it's showing data for 2nd vendor , next 3rd vendor. Even though I commented the code tdnewid = 'X',the same output I am getting.Then what's the use of this parameter? can't I get the output with one execution with as many no. of spool requests as the vendors I have in my table without moving back for each vendor?

Former Member
0 Kudos

looks like ur trying print preview.

Try simply printing

and then go check the spool.

Former Member
0 Kudos

Hi Nehal!

Where do I mention tdnewid = 'X' exactly in program? I have writen this line after I called SSF_FUNCTION_MODULE_NAME.It's not generating multiple spool requests.It's not working even I kept it before calling that function module. I have to generate PDF documents from these spool requests .So ,I need individual spool requests for each vendor.

Former Member
0 Kudos

ls_composer-tdnewid = 'X'

CALL FUNCTION functionname

EXPORTING

ARCHIVE_INDEX = TOA_DARA

ARCHIVE_PARAMETERS = ARC_PARAMS

control_parameters = ls_control

output_options = ls_composer

Edited by: Nehal Fonseca on Apr 23, 2008 10:24 AM

Former Member
0 Kudos

Hi Nehal!

I have passed the parameter of type SSFCRESCL in the function module fm_name(i.e. 2nd f.module in my program).But it's throwing a dump when executing saying that parameter of specified type doesn't allow to pass through this function module an it allows only fields of a particular type .What is the type of LS_COMPOSER?

I have declared the variable as : LS_COMPOSER TYPE SSFCRESCL .

LS_COMPOSER-TDNEWID = 'X'.

CALL FUNCTION FM_NAME

Exporting

t_lfa1 = t_lfa1

OUTPUT_OPTIONS = LS_COMPOSER

TABLES

it_ekko =it_ekko

it_ekpo = it_ekpo

it_eket = it_eket.

What's going wrong with this?

Former Member
0 Kudos

ls_composer type SSFCOMPOP,

Former Member
0 Kudos

Thank u Nehal. I am getting individual spool requests now.But I have to select print button as many no. of times as the vendors I have.Can't it be avoided?

Former Member
0 Kudos

yes it can

you have to suppress the print dialogue screen

Former Member
0 Kudos

you have to pass one more parameter to the function call

ls_control type SSFCTRLOP,

ls_control-no_dialog = 'X'.

CALL FUNCTION lv_fm_name

EXPORTING

control_parameters = ls_control

output_options = ls_composer..

...

...

...

Answers (1)

Answers (1)

venkat_o
Active Contributor
0 Kudos

Hi Jayasri, 1. Loop and Call Smartform function module for every Vendor . 2. When you Smartform function module not SSF_FUNCTION* , you will get OUTPUT_OPTIONS exporting parameter. In that u have TDNEWID field. You have to set 'X'. It will generate each time new spool request. Regards, Venkat.O