on 05-19-2011 3:39 PM
Hi experts;
Its my first message on this forum, hope I'll be well come.
my question is how to check that a text is not found in sapscript without display it.
I use &SAPSCRIPT-SUBRC&.
my source code is:
/: INCLUDE &VBDKA-TDNAME& OBJECT VBBK ID ZDTM LANGUAGE &VBDKA-SPRAS& " I dont want to display it
/: IF &SAPSCRIPT-SUBRC& ' 0'
Performance DTM réalisée
/: ENDIF
I want that if the text existes I show text "Performance DTM réalisée", else show blank
and I don't want to modifie the program associated.
thanks advance.
Edited by: Mohamed Bachir KADRI on May 19, 2011 4:40 PM
Call subroutine created in a new subroutine pool which will get the text object details and returns the existence of the text object and include it ( /: PERFORM <form> IN PROGRAM <prog>... )just before the IF condition. Based on the returned valued you can display the needed text.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I´m not sure, but do you have forgotten the operand?
/: IF &SAPSCRIPT-SUBRC& ' 0'
/: IF &SAPSCRIPT-SUBRC& = '0'
Regards,
Christian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If you use INCLUDE statement in script editor, it will always display the text on output layout. The functioning of the INCLUDE is same READ_TEXT function module.
Anyway, you have to either write a perform routine in script editor or you can call READ_TEXT fm in your print prgm. if you finds it through FM (Means sy-subrc = 0 in print prgm),, put a TEXT (Whatever you have to) in a variable and print on layout.
Regards,
Lokesh
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.