cancel
Showing results for 
Search instead for 
Did you mean: 

smartform problem

Former Member
0 Kudos

hi experts,

i have a severe problem in smartforms.

i have data in two tables. one is header table and second one is item table.

i am putting loop on on header and printing the data of item corresponds to that header.

now in header i have customer number. on the first page i have given logo and address on top. then this customer number and then line item.

now if the data is not coming on one page it shud flow to secong but there shud not be logo and address on second page.

if it finishes data on second page then next customer number shud start from 3rd page. here logo and address shud be there.

i can not figure out how i shud adjust the windows and pages.

please help me out. its really very urgent.

Thanks

Azad.

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi azad,

May be you can use SFSY fields.

If you are using a driver program then pass a flag form driver program to smartform on change of header data,if the flag is 'X' then call the logo window if not then do not print it.Dont forget to reset the flag once the operation is done.

Hope it is helpful.

Regards,

Nikhil Moghe

Former Member
0 Kudos

Hey azad ,

COMMAND is a element in smartform which can be used for following purpose :

i. go to next page

ii. get a printer control

iii. change paragraph numbering

iv. set spool settings

let me know if you have any doubts.

Former Member
0 Kudos

Hi azad,

you can try the follwoing logic see if it helps:

i. create two different pages one with the logo suppose it to be PAGE 1 and second for line items only let it be PAGE 2.

now define the PAGE 2 as the next page for PAGE1 and PAGE 2 as next page for PAGE 2.

ii. now you loop on the header table using a LOOP element in smartforms and use an ALTERNATIVE inside it when ever all the line items of the perticular header are complete use an COMMAND with page break calling PAGE1.

so a new page with the new header will be called .

please try this if it helps you. please get back if you face some problems in this.

if it works reward points as suitable.

Former Member
0 Kudos

Hey gaurav,

What exactly the command is.

Former Member
0 Kudos

Command is a command node. I allows you to write abap code inside the form.

If you want a quick and easy solution you could always throw a condition on certain items. Just put a condition that only prints on the first page. The best way to do it, as others have said, would be to make a fist and second (next) page.

Former Member
0 Kudos

create the smartform with two pages. first page with logo and address. second page without logo and address.

in print program, write the ssn function module call for smartform within a loop at itab. itab contains list of customer numbers. loop at each customer number here.

pass only one customr number at a time to the smartform, within the loop.

Former Member
0 Kudos

nO THE PROBLEM IS AS IT IS????

Former Member
0 Kudos

HI,

U can refer most of the scenarios the logos and addresses are displayed in seperate window in different pages.

I think u r using all in one page and one window. Try to call one one window for address and logo and reallign it.

Regards,

Nandha

Reward if it helps