Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9129

Re: How to create an Automatic Report for an Output Type

$
0
0

Hi Jose,

 

Create a Z-report of type I(Include) and in the report create a form routine as given below,

 

FORM entry_form USING ent_retco ent_screen.


DATA: l_druvo     LIKE t166k-druvo,      "Indicator: Print Operation

         retcode     LIKE sy-subrc,     "Returncode

         xscreen(1TYPE c,            "Output on printer or screen

         l_druvo_org LIKE t166k-druvo,

         fm_sform    TYPE rs38l_fnam,

         wa_cntrl    LIKE ssfctrlop.

 

   CLEAR: wa_cntrl.

 

   CLEAR: retcode.

   xscreen = ent_screen.

 

   IF nast-aende EQ space.

     l_druvo = '1'.

   ELSE.

     l_druvo = '2'.

   ENDIF.

 

   CLEAR: l_druvo_org.

 

   l_druvo_org = l_druvo.

 

* Get function module for smart form

   IF tnapr-sform    IS INITIAL AND

      tnapr-funcname IS INITIAL.

     EXIT.

   ENDIF.

 

*   Get function module name of Smart Form

   IF tnapr-funcname IS INITIAL.

     CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

       EXPORTING

         formname           = tnapr-sform

*       VARIANT            = ' '

*       DIRECT_CALL        = ' '

       IMPORTING

         fm_name            = fm_sform

       EXCEPTIONS

         no_form            = 1

         no_function_module = 2

         OTHERS             = 3.

 

...

 

add your code for smartform as per in your Z report. 

 


ENDFORM.

 

 

Now in the transaction NACE, for a particular output type for which you have to attach your smartform, add the following details,

 

PROGRAM: Your Zreport(Type I that you have created )

FORM ROUTINE: entry_form

PDF/Smartforms: Your smartform name

 

 

 

Regards,

Tushar


Viewing all articles
Browse latest Browse all 9129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>