Skip to Content

Update Z-table when printing a smartform

Hello all,

I have developed a smart form , (with user input from a module pool screen),

my question is , i wanted to insert the data into Z-table only when the user selects Print but not print preview..


is there any function module to achieve this type of requirement..

thanks in advance..

print1.jpg (91.2 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Dec 04, 2017 at 07:55 AM

    Look at standard parameters received by the Smartforms (e.g. control_parameters-preview) and insert the data in a node code or initialization.

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 04, 2017 at 12:12 PM

    In the return values of every smartform there is a structure named JOB_OUTPUT_OPTIONS in it the field TDPREVIEW will contain X if it was sent to preview and nothing if it was sent to printing.

    Add comment
    10|10000 characters needed characters exceeded

    • FYI - our own questions do not appear in the Notifications, only answers and comments to them do (not 100% though). All of our own questions, answers, and blogs can be found in our profile. Click on your picture in the upper right corner, then again on the larger picture in the dropdown. Or use this link: https://people.sap.com/#

  • Dec 05, 2017 at 09:54 AM

    As others have already mentioned you can use the standard Smartform parameters to check if the SF is triggered via "print preview". If not fill the data you want to update in the DB & send it via a self-defined exporting parameter.

    It is the caller who should decide if the data should be updated or not. SF is only an output medium & should not manipulate the data. For you it's easier to do because of you are dealing with a custom driver program (Modulepool)

    BR Suhas

    PS - try to avoid any DB-operations inside the Smartforms!

    Add comment
    10|10000 characters needed characters exceeded