Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Context variables in scripting

Can you directly use a context variable in a script to compare with or do you always have to copy the data field onto the form?

Specific case:

I want to use the repeat indicator in HEAD_DETAIL of the INVOICE_INTERFACE to show or hide a text field (in a subform obviously).

Former Member replied

Hello Koenraad,

You can use the context variable in the script only when the field has appeared in the Hierarchy tab of Form Layout.

Background: After creating a new variable or using an existing variable in the context node, first the DATA VIEW tab of the layout gets updated. So when you open the layout and click on the DATA VIEW tab, you will be able to see this variable. Then you need to drag this variable from DATA VIEW tab into the Body Page or Master page. When you do this step, the variable comes under Hierarchy tab. Now you can place this variable in a sub form and when you write the script on the sub form you will be able to access the value of this variable.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question