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

Dynamic STANDARD TEXT in scripts

Former Member
0 Likes
719

Hi friends,

I have to include standard text in the script corresponding to the company code. For example if company code = 6100, I have to include standard text SD_6100, or else if 2000 I have to include SD_2000. Here I can use IF statement. But If company codes are 20 or 30 then it is difficult to write that many IF statements. And in future if they increased the company codes then we should write one more if statement.So is there any method to include the STANDARD TEXT dynamically.

Sathish Reddy.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
509

Hi

U can use a variable a standard text name:

/: INCLUDE &TEXT& OBJECT TEXT ID ST

And in your program fill the TEXT variable in according to the name convention.

Max

2 REPLIES 2
Read only

Former Member
0 Likes
510

Hi

U can use a variable a standard text name:

/: INCLUDE &TEXT& OBJECT TEXT ID ST

And in your program fill the TEXT variable in according to the name convention.

Max

Read only

Former Member
0 Likes
509

Hi satish ,

create the standard text in tcode SO10 .

now u can create this with respect to company code

/:  case & - bukrs&

/:    when '20'

    text

/:   when '30'
    text for 30 


/:   endcase.

so by doing this u ll trigger the corresponding text for company code .

now to include the std text in your form

just call the standard text IN THAT WINDOW AS ...

/: INCLUDE Z_XXXXX OBJECT TEXT ID ST LANGUAGE EN

remarks,

Dynamically if u want to trigger the standard text u can go for IF end if logic as u stated or a case endcase..

there is no alternate .

regards,

VIjay

Message was edited by:

Vijay k