Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Scripts -ITCSY ?

Former Member
0 Likes
1,253

what is ITCSY Structure ? y r u using this ?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
958

Hi

ITCSY is a table which stores the program symbol and text symbol name and value..

It is useful to print the progam and text symbols in scripts.

We can use this in subroutines of sceripts..

ex:

The example defines a subroutine FORM CALLED_FROM_SAPSCRIPT

in the ABAP ZDEMO_SAPSCRIPT_PERFORM . This subroutine is

called from the SapScript form when the respective element

/E PERFORM_ABAP

is executed. The syntax of the call is like

/: PERFORM CALLED_FROM_SAPSCRIPT IN PROGRAM zsapscriptexits

/: USING &invar1&

/: USING &invar2&

...

/: CHANGING &outvar1&

/: CHANGING &outvar2&

...

/: ENDPERFORM

The subroutine must be defined in the ABAP/4 report as

follows:

FORM form TABLES IN_TAB STRUCTURE ITCSY

OUT_TAB STRUCTURE ITCSY.

...

ENDFORM.

thnx

sravani

Plz reward if useful

6 REPLIES 6
Read only

Former Member
0 Likes
958

Hi

In order to write a routine in a program i mean to say that u want to add some customized fields in ur script and u can define a perform endperform in ur text editor and once perform is declared you have to write a coding in the report and you can retrieve the data's as per your requirement.In order to do the coding in the report we have to declare this ITCSY structure.

Thanks and Regards

Arun Joseph

Read only

Former Member
0 Likes
959

Hi

ITCSY is a table which stores the program symbol and text symbol name and value..

It is useful to print the progam and text symbols in scripts.

We can use this in subroutines of sceripts..

ex:

The example defines a subroutine FORM CALLED_FROM_SAPSCRIPT

in the ABAP ZDEMO_SAPSCRIPT_PERFORM . This subroutine is

called from the SapScript form when the respective element

/E PERFORM_ABAP

is executed. The syntax of the call is like

/: PERFORM CALLED_FROM_SAPSCRIPT IN PROGRAM zsapscriptexits

/: USING &invar1&

/: USING &invar2&

...

/: CHANGING &outvar1&

/: CHANGING &outvar2&

...

/: ENDPERFORM

The subroutine must be defined in the ABAP/4 report as

follows:

FORM form TABLES IN_TAB STRUCTURE ITCSY

OUT_TAB STRUCTURE ITCSY.

...

ENDFORM.

thnx

sravani

Plz reward if useful

Read only

Former Member
0 Likes
958

ITCSY is a structure which act as interface between script and driver program

Read only

Former Member
0 Likes
958

Hi Spart

ITCSY is the structure having fields FNAM FVAL mainly we use these here

Without modifying print program of any Standard SAP script layout, we've to go for ITCSY structure. i.e. u've to create seperate Editor program(se38) to define this.

eg. Form ITCSY

....

endform.

For this, u've to give respective code in script-window level

eg. Perform ITCSY in program <zprgname>

...

endperform.

And u can've clarity once u find any scenario.If u want, i'll send u one business requirement, which uses ITCSY structure.

If u find it helps, reward me plz.

Thanks

Suren

Read only

Former Member
0 Likes
958

Hi,

1. This structure ITSCSY

(which is actually of type ITCSY)

2. is usually used in SAPSCRIPT (SE71)

while calling EXTERNAL SUBROUTINES.

3. the DEFINITION of this

FORM,

contains two parameters, IN and OUT,

which are of tuype ITCSY

4. These internal tables, then , contain

the

VARIABLENAME, AND VARIABLE VALUE,

which is passed using PERFORM.

You can call a Routine in any program in SAPScript.

For eg: if you have a subroutine named ADD_INCOME in a program ZSHAIL_BASIC, you can call the subroutine in SAPScript as follows:

/: PERFORM ADD_INCOME IN PROGRAM ZSHAIL_BASIC

/: USING &var1&

/: CHANGING &var2&

/: ENDPERFORM.

Here the input parameter to the subroutine is var1 and the value returned by the subroutine is var2.

In the program ZSHAIL_BASIC, you have to call the subroutine as

FORM ADD_INCOME TABLES IN_TAB STRUCTURE ITCSY OUT_TAB STRUCTURE ITCSY.

ENDFORM.

IN_TAB is a structure of type ITCSY,which has 2 components, NAME and value.

So in the program, var1(which is sent from SAPScript) , will be stored as IN_TAB-NAME and its value will be in IN_TAB-VALUE. You can utilise the IN_TAB-VALUE and after performing the required operations, the return value should be assigned to table OUT_TAB.

This value can thus be obtained in var2 specified in SAPScript.

Refer

https://forums.sdn.sap.com/click.jspa?searchID=11491102&messageID=1538230

Regards

Kiran Sure

Read only

Former Member
0 Likes
958

Hi Spart,

You can use the PERFORM command to call an ABAP subroutine (form) from any program, subject to the normal ABAP runtime authorization checking. You can use such calls to subroutines for carrying out calculations, for obtaining data from the database that is needed at display or print time, for formatting data, and so on.

PERFORM commands, like all control commands, are executed when a document is formatted for display or printing. Communication between a subroutine that you call and the document is by way of symbols whose values are set in the subroutine.

The system does not execute the PERFORM command within SAPscript replace modules, such as TEXT_SYMBOL_REPLACE or TEXT_INCLUDE_REPLACE. The replace modules can only replace symbol values or resolve include texts, but not interpret SAPscript control commands.

Syntax in a form window:

/: PERFORM <form> IN PROGRAM <prog>

/: USING &INVAR1&

/: USING &INVAR2&

......

/: CHANGING &OUTVAR1&

/: CHANGING &OUTVAR2&

......

/: ENDPERFORM

INVAR1 and INVAR2 are variable symbols and may be of any of the four SAPscript symbol types.

OUTVAR1 and OUTVAR2 are local text symbols and must therefore be character strings.

The ABAP subroutine called via the command line stated above must be defined in the ABAP report prog as follows:

FORM <form> TABLES IN_TAB STRUCTURE ITCSY

OUT_TAB STRUCTURE ITCSY.

...

ENDFORM.

if found helpfull do reward.

Regards.

Eshwar.