cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamically change the value in standard text

Former Member
0 Kudos

Hi all,

I have created standard text using SO10 transaction. I have included the text id in SAP FORM. My requirement is some text need to change dynamically in the text when printing the form.Is there any way to do it.

Thanks

Suadrsana

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

In the Standard text use the & symbol, after reading this Text replace this & symbol with the text

Regards

Sudheer

former_member196280
Active Contributor
0 Kudos

To change the contents of standard text dynamically..

Ex: in SO10 define your text like this

/: NAME &VBAK-ERNAM&

Call this standard text inside your form...

regards,

Sairam

SuhaSaha
Advisor
Advisor
0 Kudos

Hi Sudarsana,

Lets suppose u ve created a Std. Text (SO10).

ZTEXT --> Name : &V_NAME&, where &V_NAME& is a dynamic text.

U can get the values of &V_NAME& from the SAP Form.

Hope this answers ur qn. Please offer some points.

Suhas ...

Former Member
0 Kudos

Hi ,

I have created text Z_TEXT1 in SO10.The Z_TEXT1 contains tex below like.

Hai <Name>

dgsgsghsckjdscdfegfhdegfhdgf

sggfdgsfdgfhgsfhg

Thanks

XXXXXXXX

The text is above contain in standard text Z_TEXT1.

This name will dynamically change when processing the form.name value

coming from some table. name will be diffrent each time.

I think now you understand the issue.

Thanks

Sudarsana

Former Member
0 Kudos

In the SAPScript you use INCLUDE Z_TEXT1 OBJECT TEXT ID ST, and then in the standard text you have something like:

Hai &ZTABLE-FIRST_NAME&

dgsgsghsckjdscdfegfhdegfhdgf

sggfdgsfdgfhgsfhg

Thanks

XXXXXXXX

and then &ZTABLE-FIRST_NAME& will get whatever value is in ZTABLE-FIRST_NAME when you execute the SAPScript.

SuhaSaha
Advisor
Advisor
0 Kudos

Hi .. Here is the solution ...


Hi &V_NAME& 
.............................
Thanks
XXXXXXXX

U need to get the value of

V_NAME

from the SF.

If u have the value of the variable in an internal table, then


LOOP AT ITAB INTO WA.
  V_NAME = WA-NAME.
ENDLOOP.

I think this will be useful.

Suhas

Message was edited by:

Suhas Saha

Former Member
0 Kudos

create a seperate standard text and put the condition in the form.based on condition call the corresponding standard text..

Regards,

Sai