SAP for Utilities Discussions
Connect with fellow SAP users to share best practices, troubleshoot challenges, and collaborate on building a sustainable energy future. Join the discussion.
cancel
Showing results for 
Search instead for 
Did you mean: 

Application Form with SAPScript - Open / Close Forms FMs

murtuza_chhatariya
Active Participant
0 Kudos

Hi All,

I want to know where exactly open form, write form, close form FMs are being called in Application Form of PWB. I check form class code but could not find it.

I also checked help and searched online and found that OCL concept which says that if OCL_ACTIVE is set, open close FMs will be called internally for performance improvement.

Can you please clarify what and how this works?

Thanks,

Murtuza

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Murtuza,

Please find my response below :

The application form consists of:

·  Properties/attributes

·  Hierarchy

·  Form (SAPscript, Smart Form, or PDF-based)

·  SAPscript texts (SAPscript)

·  User exit includes

·  User top includes

·  Generated print program


In the user exits, you must carry out form activities (for example, call OPEN/CLOSE_FORM modules) since this can lead to errors in the internal form control.


The following user exit types are available:

Name of user exit

Reference

Call/function

Exit before loop

Form level

The exit is called directly before processing of the entries for a form level. The entries of the following loop are transferred to the interface of the subroutine.

Exit during loop

Form level

The exit is called in the loop of entries of a form level. The global data areas of the form level and the related 1:1 levels are filled with data in this event.

Exit after loop

Form level

The exit is called after the loop over entries of a form level. This is the last activity before the next same level or entry of the next higher form level is processed.

Text exit (SAPscript only)

Text nodes

The exit is called directly before a SAPscript text is printed. The interface of the subroutine contains an indicator (Y_PRINT_TEXT) that shows whether the text is to be printed or not. (Default = Yes)

Start exit

Application form

The exit is called at the start of processing for a form level.

End exit

Application form

The exit is called at the end of processing for a form level.


You can use the Start/End Exit

Exit events are the external parentheses around an application form. In exit events you can carry out initial and final activities per application form.

There are  two user exits that can be used, irrespective of the hierarchy, at the beginning and at the end of the form.

·  Start exit

This exit is processed first when you process the form. At this point, no data has been read and no SAPscript function modules have been called.

·  End exit

This exit is processed last when you process the form. At this point, the whole form has been processed and the SAPscript module CLOSE_FORM has been called.

Hope this helps !!

Regards,

Java

View solution in original post

1 REPLY 1

Former Member
0 Kudos

Hi Murtuza,

Please find my response below :

The application form consists of:

·  Properties/attributes

·  Hierarchy

·  Form (SAPscript, Smart Form, or PDF-based)

·  SAPscript texts (SAPscript)

·  User exit includes

·  User top includes

·  Generated print program


In the user exits, you must carry out form activities (for example, call OPEN/CLOSE_FORM modules) since this can lead to errors in the internal form control.


The following user exit types are available:

Name of user exit

Reference

Call/function

Exit before loop

Form level

The exit is called directly before processing of the entries for a form level. The entries of the following loop are transferred to the interface of the subroutine.

Exit during loop

Form level

The exit is called in the loop of entries of a form level. The global data areas of the form level and the related 1:1 levels are filled with data in this event.

Exit after loop

Form level

The exit is called after the loop over entries of a form level. This is the last activity before the next same level or entry of the next higher form level is processed.

Text exit (SAPscript only)

Text nodes

The exit is called directly before a SAPscript text is printed. The interface of the subroutine contains an indicator (Y_PRINT_TEXT) that shows whether the text is to be printed or not. (Default = Yes)

Start exit

Application form

The exit is called at the start of processing for a form level.

End exit

Application form

The exit is called at the end of processing for a form level.


You can use the Start/End Exit

Exit events are the external parentheses around an application form. In exit events you can carry out initial and final activities per application form.

There are  two user exits that can be used, irrespective of the hierarchy, at the beginning and at the end of the form.

·  Start exit

This exit is processed first when you process the form. At this point, no data has been read and no SAPscript function modules have been called.

·  End exit

This exit is processed last when you process the form. At this point, the whole form has been processed and the SAPscript module CLOSE_FORM has been called.

Hope this helps !!

Regards,

Java