2012 Oct 17 11:31 AM
Hi All,
I am reading a standard text in a program calling READ_TEXT. I want to check a condition for a variable that i am using in the program.
For example,
if variable = 'x'
* fetch data for x
elseif variable = 'y'
* fetch data for y
endif
is it possible to write this condition in a so10 text?
Thanks,
Tabraiz
Hi All,
I am reading a standard text in a program calling READ_TEXT. I want to check a condition for a variable that i am using in the program.
For example,
if variable = 'x'
* fetch data for x
elseif variable = 'y'
* fetch data for y
endif
is it possible to write this condition in a so10 text?
Thanks,
Tabraiz
2012 Oct 17 11:36 AM
Hi Tabraiz,
Can u please explain in details...so we can try to solve ur problem early..
Regards,
Amol
2012 Oct 17 11:44 AM
Hi Amol,
Thanks for the reply.
I have a variable say "v_lang" in my program.
I have some text that I want to fetch based on the value in v_lang.
To be more specific, if v_lang says 'EN' for english, i will pick up english text and if v_lang says 'ES' (spanish), i will pick up spanish text.
Now, I can use one standard text each for EN and ES texts and READ_TEXT them separately by but I have around 10 different texts and I dont want to maintain 10 separate SO10 texts. I just want to know if i can check the condition v_lang inside the SO10 text and fetch the correct text. This way I have to only use ONE SO10 text instead of 10.
Thanks,
Tabraiz
2012 Oct 17 12:14 PM
Hi Tabriz,
You need to maintain the st.text in different language manually in so10.
Then you call it through function module READ_TEXT. Here you pass the language dynamically.
Regards,
Sam
2012 Oct 17 12:21 PM
Hi Tabzaiz,
As per my understanding,
If text is not maintained under SO10 then how can u fetch?
2012 Oct 17 12:25 PM
Hi Tabraiz,
As Far as I know you can not write piece of code in so10 editor.
I have tried too but its not considering the command line from so10 editor.
Rgds,
Sandeep katoch
2012 Oct 17 12:30 PM
Hi Amol,
I was going to maintain the text in SO10. Thanks for the help mate.
Ta,
Tabraiz
2012 Oct 17 12:25 PM
Tabraiz,
You can try the same by putting v_lang as the global parameter in SAP Script.
The sample code in Standard Text is
/: IF &v_lang& EQ 'EN'
PF <Text Line1>
PF <Text Line2>
PF <Text Line3>
/: ELSEIF &v_lang& EQ 'ES'
PF
PF
PF
/: ELSEIF .....
.
.
/: ENDIF
PF is the paragraph format and try to use EQ instead of '=' as sometimes '=' is not taken into consideration. The variable can be in Capital letters like &V_LANG&
Regards,
Hardik Mehta
2012 Oct 17 12:32 PM
Thanks Hardik,
I am reading it in a program, i guess it is not possible in a program.
Thanks,
Tabraiz.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |