Skip to Content

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

Assigning a Value to a Text Symbol: DEFINE

Hi all,

I am printing some text in the form. The text is in the database table and is retrieved. say the field name is fld06 in the table ztfin. Previously it is code as &zfin-fld06& in the form edotir. Now my requiremnet is to dispay some other text where ever I have to print ztfin-fld06. I have used the define statement in this way :

/: DEFINE &ztfin-fld06& = 'Data Fattura'

But when I look at the output the text is not replaced nor it is realised while I am debugging. Can anyone tellme where I am going wrong ?

Regards,

Varun.

Message was edited by: varun sonu

Tags:
Former Member
Former Member replied

hi

chk this out

<b>DEFINE: Value assignment to text symbols

Text symbols receive their value through an explicit assignment. This assignment can be made interactively in the editor via the menu options Include &#61614;&#61472;&#61614;&#61472;Symbols &#61614;&#61472;&#61614;&#61472;Text. This lists all the text symbols of a text module, as well as those of the allocated layout set.

The contents defined in this way are lost if the transaction is exited. To continue printing the text module, you would have to enter the symbol values again.The DEFINE command allows you to anchor this value assignment firmly in the text, to also have it available when you next call up the text. Furthermore, you can allocate another value to a text symbol in

the course of the text.

Syntax:

/: DEFINE &symbolname& = ‘value’

Example:

/: DEFINE &re& = ‘Your correspondence of 3/17/94’

Example:

/: DEFINE &symbol1& = ‘xxxxxxx’

/: DEFINE &symbol2& = ‘yyy&symbol1&’

/: DEFINE &symbol1& = ‘zzzzzzz’

Result: &symbol2& &#61614;&#61472;yyyzzzzzzz

The assigned value may have a maximum of 60 characters. It can also contain further symbols. When a symbol is defined using the control command DEFINE, symbols which occur in the value are not immediately replaced by their value. They are only replaced when the target symbol is output. If the operator := is used in the DEFINE statement, all symbols which occur in the value which is to be assigned are immediately replaced by their current values. The resulting character string is only then assigned to the target symbol when all occurring symbols have been replaced. The length of the value is limited to 80 characters. The target symbol must be a text symbol, as at present.

Syntax:

/: DEFINE &symbolname& := ‘value’</b>

<i>u can also write a perform...endperform to change the value of a field to ur required text.</i>

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question