cancel
Showing results for 
Search instead for 
Did you mean: 

Smartform with multiple Headers & Respective Item Details and Totals?

Former Member
0 Kudos

Dear All,

Appreciate if anyone clarify my doubt.

My requirement is to develop a smartform for billing with multiple headers & respective items and totals. For more clarity I'm explaining below.

Header Section1

variable1 variable2 variable3 variable4 variable5

variable6 variable7 variable8

variable9 variable10 variable11

Item Details1

s no vebeln verpr col4 col5 col6

total 123.21

total in words -

value 321.21

value 982.98

value some value

footer details

Header Section2

variable1 variable2 variable3 variable4 variable5

variable6 variable7 variable8

variable9 variable10 variable11

Item Details2

s no vebeln verpr col4 col5 col6

total 123.21

total in words -

value 321.21

value 982.98

value some value

footer details

Header Section3

variable1 variable2 variable3 variable4 variable5

variable6 variable7 variable8

variable9 variable10 variable11

Item Details3

s no vebeln verpr col4 col5 col6

total 123.21

total in words -

value 321.21

value 982.98

value some value

footer details

Is this possible using smartforms?

Now they are using a classical report and takes printout in preprinted stationery.

requirement is to develop a smartform for this. there is a selection screen for the print program which accepts billing docs.

Thanks,

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Rajiv,

Actually for your case you don't need a table inside the Main Window.

1.) First Populate all the data(header + item) in an internal table in the print program itself.

2.) Pass this internal table to the smartform.

3.) In the smartform give exact dimensions to the main window.

4.) In the Main Window Use a Loop on this internal table.

5.) Create a template for the header data giving the exact dimensions.

6.) Create another template for the item data giving exact dimensions to the template.

7.) If there is pre-printed text between these templates, insert a text element between these templates. This text element will have nothing just give a paragraph format to it. Go to smartstyle, create a style in which create a paragraph format setting line spacing parameter of this paragraph format of the same size as that of pre-printed text.

8.) Only 1 page is required since Loop statement will print the second record on the second page if the dimension of templates are exact.

9.) Dimensions you can easily measure from the pre-printed form.

<removed by moderator>

Edited by: Thomas Zloch on Mar 6, 2012

Former Member
0 Kudos

Hi,

You need to create a table in main window in your smartform and layout your table base on your requirement and use the event sort and create a variabe for your total, to calculate the total use the Tab calculation in your table in main window.

select the fieldname you want to calculate and the target field is the variable you created for total and set the time after loop and reset = sort criterion = for the field name of your sorting.

hope this can give an idea

regards,

Rodge

Former Member
0 Kudos

Hi,

create three different pages include different header but use the the same variable within body,probably this is not your requirment revert back for any further help.

Thank and regards

Former Member
0 Kudos

Hi,

You need to create a table in your smartform such that it will be looped for different billing documents.

Also, make sure that you create a table inside your Main Window.

You can go through this link if you are new to smartforms.

[http://help.sap.com/saphelp_nw04/helpdata/en/a5/de6838abce021ae10000009b38f842/frameset.htm]

Regards,

Danish.

naimesh_patel
Active Contributor
0 Kudos

I assume that each section (header + item + footer) is for each billing document. You can create a Smartform which can accept one document at a time and generate the output. In your SF, you should have Main node with table. In Header, print the header information. Use the Main section for Items and Footer for Footer information.

In a print program, call these FMs to generate the output. SSF_OPEN, Smart Form FM, SSF_CLOSE.

Pseudo code should be:



*     Get the SF FM name
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

      CALL FUNCTION 'SSF_OPEN'

*    For each billing document
      LOOP AT ITAB. 

*      get data for each billing document

           CALL FUNCTION l_fname   " SSF FM call

      ENDLOOP.

      CALL FUNCTION 'SSF_CLOSE'

Regards,

Naimesh Patel