Skip to Content

What's the init within the exit function?

Dear All,

Could you help me to explain me regarding the init within exit function?

I have read already in it's sample: UPFX but i still don't understand :(. And i also read from the documentation, but still don't get the meaning .

Could anybody help me what's the purpose for this init function? Do you have some document explaining for init for exit function ??

Really need your help..

Regards,

Niel .

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 13, 2008 at 01:53 PM

    One more point to note is that the init FM runs only once per execution of the function, while the main FM runs once for every data block.

    Edited by: Mayank Gupta on Jun 13, 2008

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 13, 2008 at 12:25 PM

    Hi,

    When exit function is executed, first it executes init function, then goes to the exact function module.

    Purpose of init is that if we dont have any record as per the level selections, init function generates dummy records, and the exit function will be executed. If init is not there, if there are no exitsting records, exit function wont run at all.

    We generally write all select statements, populate internal tables and read variable values in init funcion and write the original logic in exit funciton.

    Another way is if we have one exit for file upload functionality, the code to browse the file from desktop is written in init and the code to upload it will be written in original function module.

    Bindu

    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.