on 06-21-2007 6:15 AM
I've been asked to output the item text of a PO according the language, when there is French text in system, print out directly, if not ,print the English version as well,
i am in the French version of the SAPscript ,and the original code is :
INCLUDE &EKPO-EMATN& OBJECT MATERIAL ID BEST PARAGRAPH TX
then i changed to
INCLUDE &EKPO-EMATN& OBJECT MATERIAL ID BEST PARAGRAPH TX
IF &SAPSCRIPT-SUBRC& ne 0
INCLUDE &EKPO-EMATN& OBJECT MATERIAL ID BEST PARAGRAPH TX LANGUAGE 'E'
ENDIF
after that i opened the scipt debug to track ,it seems too strange that whether SAPSCRIPT-SUBRC equals 0 or not ,the second include command always runs out .
why there is no use of if condition
appreciate your help urgently
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Why you are goin with sy-subrc instead of going with language option. as per anji solution better to check the language and based on that print the output.
i belive you got the point.
Hope this helps you. Reply for queries, shall post the updates.
Regards.
Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
You can use the condition based on the Logon language
for example
/: IF &SY-LANGU& = 'FR' (france)
/: INCLUDE &EKPO-EMATN& OBJECT MATERIAL ID BEST PARAGRAPH TX
/: ELSEIF &SY-LANGU& = 'EN'
/: INCLUDE &EKPO-EMATN& OBJECT MATERIAL ID BEST PARAGRAPH TX
LANGUAGE 'E'
/: ENDIF.
Reward points for useful Answers
Regards
Anji
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Did you give the IF condition as a control command...meaning did you give /:
Also try giving = 4 instead of NE 0
/: IF &SAPSCRIPT-SUBRC& = 4
/:INCLUDE &EKPO-EMATN& OBJECT MATERIAL ID BEST PARAGRAPH TX LANGUAGE 'E'
/:ENDIF
Thanks
Naren
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.