Application Development 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: 

how to create local variables?

Former Member
0 Kudos

hi im new using ecatt,

i need to declare a local variable then used with some abap commands and then use it in the TCD.

any general tips?

how to create local vars?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello,

You can create the local variable as show below in the parameter section :

V_LOGTEXT Log text V

Here type V is variable type.

Also please remember that the parameter of type I (IMPORT) and E (EXPORT) cannot be used in the ABAP... ENDABAP section of the eCATT script. Only parameter of type V (VARIABLE) is visible in the ABAP ... ENDABAP.

So what you can do is assign the import or export parameter to a local variable and use it in the ABAP ... ENDABAP section.

Hope i have answered your question.

Thanks and Best regards,

Ajay

2 REPLIES 2

qianchen
Advisor
Advisor
0 Kudos

Hi,

Please refer to the screen shot in the link here, so that you can understand the terminologies I will use:[Test Script Editor|http://help.sap.com/saphelp_nw70/helpdata/EN/39/2f333bf40bc633e10000000a114084/content.htm]

In the parameter list, choose the button 'Append Parameter'

In the newly created line, please input the name of your parameter, description, Parmeter Value can be left empty, maintain 'V' (by default it is 'V') in the field View, input the data type your parameter should take.

Now you should have a local parameter.

Former Member
0 Kudos

Hello,

You can create the local variable as show below in the parameter section :

V_LOGTEXT Log text V

Here type V is variable type.

Also please remember that the parameter of type I (IMPORT) and E (EXPORT) cannot be used in the ABAP... ENDABAP section of the eCATT script. Only parameter of type V (VARIABLE) is visible in the ABAP ... ENDABAP.

So what you can do is assign the import or export parameter to a local variable and use it in the ABAP ... ENDABAP section.

Hope i have answered your question.

Thanks and Best regards,

Ajay