cancel
Showing results for 
Search instead for 
Did you mean: 

USEREXIT

Former Member
0 Kudos

hello dudes

can anyone guide me how to create the user exits becz i created a smartform how can i go with the user exit in the include program so that when the transaction is execulted the control should lead to smartfomr printing

Thanks in advanse

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Naveen,

In the include collect all the inputs which you need to pass to the smartform as inputs. Get the smartform funtion module name and call the FM passing these inputs.

For eg:

sf_formname = 'Z_QM_CERTIFICATE_RAJ'.

CALL FUNCTION <b>'SSF_FUNCTION_MODULE_NAME'</b>

EXPORTING

formname = sf_formname

IMPORTING

fm_name = sf_fm_name

EXCEPTIONS

no_form = 1

no_function_module = 2

OTHERS = 3.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

CALL FUNCTION <b>sf_fm_name</b>

EXPORTING

control_parameters = control_parameters

output_options = output_options

dl_docno = dl_docno

IMPORTING

document_output_info = document_output_info

job_output_info = job_output_info

job_output_options = job_output_options

TABLES

itab = itab

itab1 = itab1

EXCEPTIONS

formatting_error = 1

internal_error = 2

send_error = 3

user_canceled = 4

OTHERS = 5.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

Regards,

Raj

Former Member
0 Kudos

ya Raj

thaks alot for the guidance

i appreciate if u can guide me the same thing with userexits

can u tell me from starting how to proceed becz i donno anything about userexits that is the main problem

k let us start now i started, i defined one include program then what shoudl i do with userexit to get the code which i stated above

thanks alot raj

Former Member
0 Kudos

Hi Naveen,

You will not create userexits, instead you will make use ofuserexits provided by SAP for the transactions, to achieve your own processing to be done while the standard flow of transaction is executed.

Refer this link to know the available userexits for a given transaction.

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/abap/abap-code-samples/userexits%20in%20a%20transaction.doc">Userexits for a given transaction</a>

Regards,

Raj

Former Member
0 Kudos

Hey Raj,

thanks alot for ur reply

but here my doubt is i am very much confused how these user exits r used in the include program and when the related transaciton is executed how the smartform printed and how the funcation modele created by activating the smartform will work

becz i saw some program

----


  • User Exit-Include Z_REG_VEH_TAX_EXIT

----


&----


*& USER_EXIT_DURING_LICENCE

&----


*& Use this form e.g. to prepare the data for the printing or

*& to perform summations

*& This exit is processed DURING a form_level-loop

*& X_INDEX denotes the current entry in the associated table

&----


*& <--> X_LICENCE

&----


FORM user_exit_during_licence

USING

x_licence TYPE g_type_str_licence

value(x_index) TYPE sy-tabix.

IF wa_receiver-type = '1'. "person

gw_address_type = '2'.

ELSE.

gw_address_type = '1'.

ENDIF.

SELECT SINGLE descr FROM zta_brandt

INTO gv_vehbrandtxt

WHERE vehbrand = wa_vehicle-vehbrand

AND spras = 'N'.

...........................

how they were getting this in the include program n they were not using the function modele created by the smartform at all in this program

k please can u guide me in this aspect

i am very much thankful to u raj