on 08-29-2007 3:02 PM
Hi,
I am trying to add a text element to a form by using se71 and got to text elements -> "Change Editor".
From the program I call "WRITE_FORM" function to display the value. I can see that data is extracted but not getting printed on the form.
I am not sure what is wrong as I am new to SAP Form.
What is needed to be done to add a new text element in the form ?
Could someone please help me out with this ?
Thanks very much.
Manish.
Hi Manish,
You need to mention the text element in the write_form
and for each text element you need separate write_form.
This is a preety easy thing .If you are getting stuck at some point please eleborate.
Regards
Vivek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I have added following lines using se71 -> text elements -> "change editor"
/E L_LONG_TEXT
&G_LONG_TEXT&
and in the program, I have got following code:
LOOP AT lit_text INTO lgf_text.
IF l_count > 1.
EXIT.
ENDIF.
CLEAR g_long_text.
g_long_text = lgf_text-tdline.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
window = 'MAIN'
element = 'L_LONG_TEXT'
EXCEPTIONS
window = 1
element = 2.
IF sy-subrc = 1.
window = 'MAIN'.
PERFORM message_window.
ENDIF.
IF sy-subrc = 2.
window = 'MAIN'.
ereignis = 'L_LONG_TEXT'.
PERFORM message_element.
ENDIF.
l_count = l_count + 1.
CLEAR lgf_text.
CLEAR g_long_text.
ENDLOOP.
in debug mode I can see that the value is being populated in the variable g_long_text but not getting printed in the form.
Please let me know if you need more information.
Thank you
Manish.
Hi,
Just after clear g_long_text , Insert:
CALL FUNCTION 'TEXT_SYMBOL_SETVALUE'
EXPORTING
name = 'G_LONG_TEXT'
value = g_long_text.
*
Just before CALL FUNCTION WRITE_FORM
CALL FUNCTION 'TEXT_SYMBOL_SETVALUE'
EXPORTING
name = 'G_LONG_TEXT'
value = g_long_text.
I hope this helps,
Regards
Raju Chitale
new field/value is appearing in the spool file.A separate program reads the spool file and formats it accordingly and displays the form.This program would undergo changes to display the new field/value in the form.
Thanks you
Manish.
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 add text elements to your SAPScript with the following command:
/: INCLUDE 'MYTEXTELEMENT' OBJECT 'TEXT' ID 'ST' LANGUAGE 'EN'
Be sure it exists on the same mandant on the same language in SO10.
Regards
Tamá
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
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.