Skip to Content
author's profile photo Former Member
Former Member

Issue in displaying 2 or 3 smartform pages with same data

Hi All

I have some unusual requirement.

Depending on specific customer fied value i have to to display 2 or 3 copies in print preview.

My invoice data will never flow out of 1 page since we have used corresponding split for it that helps data will be limited to 1 page.

So the invoice form currently is of one page.

Now if some specific customer fied is X , there should be 2 pages in print preview with same data but with difference of some specifc harcoded text.

If this specific customer field is blank, there should be 3 pages in print preview with exactly same data but with difference only some specifc harcoded text.

It will be like : '###### page 1 '

'yyyyyyy page 2'

'zzzzzz page 3'

and other data in all these pages will be same.

Please help how can i achieve this requirement.

Thanks.

Add a comment
10|10000 characters needed characters exceeded

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 31, 2012 at 08:42 AM

    Hi Ujj,

    Do follow below process code,

    call function 'SSF_OPEN'
    exporting

    user_settings = 'X'.

    loop at itab into wa. "if you are passing single record, then no need of loop directly pass WA and check the condition(i.e. Customer flag).

    1st perview

    perform call_smartform.

    if cust_flag = 'X'.

    2nd perview

    *your hardcoding and passing to smartform layout

    perform call_smartform. "Call smartform function module in the subroutine

    else.

    2nd perview

    *your 2nd print harding coding and passing to smartform layout

    3rd perview

    *your 3rd harding coding and passing to smartform layout

    endif.

    endloop.

    **Call below Function module for closing your smartforms

    call function 'SSF_CLOSE'

    * IMPORTING
    * JOB_OUTPUT_INFO =
    exceptions
    formatting_error = 1
    internal_error = 2
    send_error = 3
    others = 4.
    if sy-subrc <> 0.
    message id sy-msgid type sy-msgty number sy-msgno
    with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    endif.

    hope it will work for ur requirement.

    Thanks,

    Regards,

    Praveen Reddy

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 31, 2012 at 07:51 AM

    There can be different solutions.

    solution 1. You can call smartforms two / three times and send different harcoded text in different call.

    solution 2. You can send data to smart form so that It can be display in two or three pages depending on the data sent.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 31, 2012 at 07:51 AM

    hi,

    inside the smartforms inside pages put these conditons. it will work.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 31, 2012 at 07:53 AM

    you can define smartform with 2 and 3 pages in program you can validate your condtion and call the smartform.

    hope it helps,

    Vinoth

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 07, 2013 at 01:56 PM

    Thanks a lot the issue is solved now.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.