on 05-29-2009 8:51 AM
Hi
I have a smartform in which i am trying to display some longtext.My problem is that i have to draw some extra lines when the longtext does not exist.I tried to verify if the longtext exists using the fm READ_TEXT(and set a flag if exists or not ),but it returns error message "Longtext does not exist" and the whole form crashes when the longtext is not found.
I have to only check if the longtext exists and display it and if it does not exist i have to display another window.How can i suppress that error message that comes from within the FM when the longtext does not exist?
Is there any other method to see if the longtext exists?
thanks
Hi Seba,
In the driver program please call the read_text FM with exceptions . May be that will help you.
1. call to FM read_text with exceptions
if it_texts[] is initial.
v_flag = 'X'.
call FM 'write_form' with another text element.(there write another hardcode texts which you want)
endif.
2. If you only need to output the text, you don't need to used READ_TEXT like in an ABAP program,
just use the INCLUDE command in SAPScript.
It will read the text and output it to your form.
The Syntax is like this:
/: INCLUDE &T166K-TXNAM& OBJECT &T166K-TDOBJECT& ID &T166K-TDID& LANGUAGE &EKKO-SPRAS&
Thanks,
Suma.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
After th FM READ_TEXT
Comment these lines..
IF sy-subrc NE 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
" Draw lines.
ENDIF.
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.