<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: CALL FUNCTION 'Z_CHECK_EXIT' in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-z-check-exit/m-p/1778528#M335650</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;lt;b&amp;gt;source code for the function module:&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FUNCTION Z_CHECK_EXIT.
*"----------------------------------------------------------------------
*"*"Local interface:
*"  IMPORTING
*"     REFERENCE(USEREXIT) TYPE  CHAR10
*"     REFERENCE(CK1) TYPE  CHAR10
*"     REFERENCE(CK2) TYPE  CHAR10 OPTIONAL
*"     REFERENCE(CK3) TYPE  CHAR10 OPTIONAL
*"     REFERENCE(CK4) TYPE  CHAR10 OPTIONAL
*"     REFERENCE(CK5) TYPE  CHAR10 OPTIONAL
*"  EXPORTING
*"     REFERENCE(EXECUTE) TYPE  CHAR1
*"  TABLES
*"      I_ZA01 STRUCTURE  ZA01
*"----------------------------------------------------------------------

* Initialize:
  CLEAR: EXECUTE.
  REFRESH: I_ZA01.
  CLEAR: ZA01, I_ZA01.

* Null userexit value results in non-execution of user exit.
  IF NOT USEREXIT IS INITIAL.
* start of performance enhancement (BRBU 6/20/02)
     describe table xza01 lines i_lines.
     if I_lines = 0.
         select * from za01 into table xza01.
     endif.

        read table xza01 with key ZZUSEREXIT = USEREXIT
                                         CK1 = CK1
                                         CK2 = CK2
                                         CK3 = CK3
                                         CK4 = CK4
                                         CK5 = CK5.

*   SELECT SINGLE * FROM ZA01 WHERE ZZUSEREXIT = USEREXIT AND
*                                          CK1 = CK1 AND
*                                          CK2 = CK2 AND
*                                          CK3 = CK3 AND
*                                          CK4 = CK4 AND
*                                          CK5 = CK5.
* end of performance enhancement (BRBU 6/20/02)
    IF SY-SUBRC EQ 0.

* Determine if execution restricted to a single userid
      IF xzA01-UNAME IS INITIAL OR xZA01-UNAME = SYST-UNAME.
        EXECUTE = 'X'.
        I_ZA01 = xZA01.
        APPEND I_ZA01.
      ENDIF.
    ENDIF.
  ENDIF.

ENDFUNCTION&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;and This is the way it is called in the program:&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'Z_CHECK_EXIT'
     EXPORTING
          USEREXIT = 'EFNDTAXWAR'
          CK1      = ' '
          CK2      =
          CK3      =
          CK4      =
          CK5      =
     IMPORTING
          EXECUTE  =  EXECUTE
     TABLES
          I_ZA01   =  I_ZA01 .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Dec 2006 09:11:23 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-12-22T09:11:23Z</dc:date>
    <item>
      <title>CALL FUNCTION 'Z_CHECK_EXIT'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-z-check-exit/m-p/1778526#M335648</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How can I use CALL FUNCTION 'Z_CHECK_EXIT' for checking two conditions :&lt;/P&gt;&lt;P&gt;1) The enhancement is to be triggered while creation(va01)/change(va02) of sales orders for Africa fleet card sales only.So check whether va01 or va02.&lt;/P&gt;&lt;P&gt;2) Check whether the sales order type is one from ZSDS,ZSDR,ZSCD and ZSCR.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Dec 2006 08:29:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-z-check-exit/m-p/1778526#M335648</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-22T08:29:05Z</dc:date>
    </item>
    <item>
      <title>Re: CALL FUNCTION 'Z_CHECK_EXIT'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-z-check-exit/m-p/1778527#M335649</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a custom FM. Please send me the sourse code with documentation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Dec 2006 08:30:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-z-check-exit/m-p/1778527#M335649</guid>
      <dc:creator>surya_gupta3</dc:creator>
      <dc:date>2006-12-22T08:30:20Z</dc:date>
    </item>
    <item>
      <title>Re: CALL FUNCTION 'Z_CHECK_EXIT'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-z-check-exit/m-p/1778528#M335650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;lt;b&amp;gt;source code for the function module:&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FUNCTION Z_CHECK_EXIT.
*"----------------------------------------------------------------------
*"*"Local interface:
*"  IMPORTING
*"     REFERENCE(USEREXIT) TYPE  CHAR10
*"     REFERENCE(CK1) TYPE  CHAR10
*"     REFERENCE(CK2) TYPE  CHAR10 OPTIONAL
*"     REFERENCE(CK3) TYPE  CHAR10 OPTIONAL
*"     REFERENCE(CK4) TYPE  CHAR10 OPTIONAL
*"     REFERENCE(CK5) TYPE  CHAR10 OPTIONAL
*"  EXPORTING
*"     REFERENCE(EXECUTE) TYPE  CHAR1
*"  TABLES
*"      I_ZA01 STRUCTURE  ZA01
*"----------------------------------------------------------------------

* Initialize:
  CLEAR: EXECUTE.
  REFRESH: I_ZA01.
  CLEAR: ZA01, I_ZA01.

* Null userexit value results in non-execution of user exit.
  IF NOT USEREXIT IS INITIAL.
* start of performance enhancement (BRBU 6/20/02)
     describe table xza01 lines i_lines.
     if I_lines = 0.
         select * from za01 into table xza01.
     endif.

        read table xza01 with key ZZUSEREXIT = USEREXIT
                                         CK1 = CK1
                                         CK2 = CK2
                                         CK3 = CK3
                                         CK4 = CK4
                                         CK5 = CK5.

*   SELECT SINGLE * FROM ZA01 WHERE ZZUSEREXIT = USEREXIT AND
*                                          CK1 = CK1 AND
*                                          CK2 = CK2 AND
*                                          CK3 = CK3 AND
*                                          CK4 = CK4 AND
*                                          CK5 = CK5.
* end of performance enhancement (BRBU 6/20/02)
    IF SY-SUBRC EQ 0.

* Determine if execution restricted to a single userid
      IF xzA01-UNAME IS INITIAL OR xZA01-UNAME = SYST-UNAME.
        EXECUTE = 'X'.
        I_ZA01 = xZA01.
        APPEND I_ZA01.
      ENDIF.
    ENDIF.
  ENDIF.

ENDFUNCTION&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;and This is the way it is called in the program:&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'Z_CHECK_EXIT'
     EXPORTING
          USEREXIT = 'EFNDTAXWAR'
          CK1      = ' '
          CK2      =
          CK3      =
          CK4      =
          CK5      =
     IMPORTING
          EXECUTE  =  EXECUTE
     TABLES
          I_ZA01   =  I_ZA01 .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Dec 2006 09:11:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-function-z-check-exit/m-p/1778528#M335650</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-22T09:11:23Z</dc:date>
    </item>
  </channel>
</rss>

