2009 Nov 10 8:56 AM
In my sap script, i am using a standard text. Now I need to maintain this standard text for 2 languages.
I have created two standard text with name name ZCPQM_INSPECTION_RESULT and maintained differerent values for language EN and FR in SO10.
In script, i have to write it as
INCLUDE ZCPQM_INSPECTION_RESULT OBJECT TEXT ID ST LANGUAGE &lv_langu&.
Now I am not sure wher eto declare the variable lv_langu. Please help
2009 Nov 10 9:12 AM
Hi Niti
Do like this put if condition in script editor and chk the languagae for eg
if languaga eq 'E'.
text1. write incluude syntax here
else .
text2
And check in debugging whether the form is getting the language correctrly or not by activating the debugger..
2009 Nov 10 9:06 AM
Hi Niti,
Do this way,
/: INCLUDE TESTTEXT OBJECT TEXT ID ST LANGUAGE &NAST-SPRAS&
this will include a SO10 Standard text "TESTTEXT" in the corresponding lagnuage in your form.
in SAP-Script you can not use statements like call funtion: edit_text, read_text, save_text, commit_text, delete_text.
to do so you need to jump off to an external perform like following:
/: Perform edit_text in program YSD_PERFORM
/: USING &NAST-SPRAS&
/: CHANGING &VARIABLE&
/: ENDPERFORM
Regards
Abhii...
2009 Nov 10 9:12 AM
Hi Niti
Do like this put if condition in script editor and chk the languagae for eg
if languaga eq 'E'.
text1. write incluude syntax here
else .
text2
And check in debugging whether the form is getting the language correctrly or not by activating the debugger..
2009 Nov 10 11:18 AM
Thanks for all your ans . but still I am stuck.
i have writeen the code like below
/: IF SY-LANGU = 'E'
/: INCLUDE ZCPQM_INSPECTION_RESULT OBJECT TEXT ID ST
/: ELSE IF SY-LANGU = 'F'
/: INCLUDE ZCPQM_INSPECTION_RESULT_FR OBJECT TEXT ID ST
pls correct me if i am doing wrong anywhere.
2009 Nov 10 11:47 AM
Hi
Chk whether your sy-langu is getting in Script...Otherwise do like this nast-spras eq ;E; else.
something.
2009 Nov 10 12:00 PM
do like this I think it will work.if u hav any queries let me knw
/: IF SY-LANGU = 'E'
/: INCLUDE ZCPQM_INSPECTION_RESULT OBJECT TEXT ID ST language E
/: ELSE IF SY-LANGU = 'F'
/: INCLUDE ZCPQM_INSPECTION_RESULT_FR OBJECT TEXT ID ST langauage F
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |