cancel
Showing results for 
Search instead for 
Did you mean: 

Query on SAP-scripts

Former Member
0 Kudos

Hi friends

What's the functionality of 'CONTROL_FORM' function module in SAP-scripts.

Thanks

Suren

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

By using the control_form function the control command can be passed from the print program to the Form by exporting parameters of the function.

Reward.

Answers (2)

Answers (2)

former_member210123
Active Participant
0 Kudos

http://help.sap.com/saphelp_40b/helpdata/en/d1/80318f454211d189710000e8322d00/content.htm

SAPscript control commands can be carried out with CONTROL_FORM. The command should be specified without the paragraph format '/:' in the parameter COMMAND.

Former Member
0 Kudos

Hi

CONTROL_FORM function

The CONTROL_FORM function module alows you to create SapScript control statements from within

an APAB program.

Syntax:

CALL FUNCTION 'CONTROL_FORM'

EXPORTING

command =

  • EXCEPTIONS

  • UNOPENED = 1

  • UNSTARTED = 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.

Example:

Protecting the text element ITEM_LINE

CALL FUNCTION 'CONTROL_FORM'

EXPORTING

COMMAND = 'PROTECT'.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

TEXELEMENT = 'ITEM_LINE'.

CALL FUNCTION 'CONTROL_FORM'

EXPORTING

COMMAND = 'ENDPROTECT'.