on 02-24-2007 2:44 PM
Hi,
I have a field in smartform,which has to pick data (long text).
Pick up the data from long text by passing following values. Pick up only 2 lines from long text. Exclude the administrative information from long text
Text Name: 16 digit value. Initial 3 digits are Client (QAVE-MANDANT). Subsequent 12 digits are Inspection lot number along with preceding zeros (QALS- PRUEFLOS). Last digit to be picked up from QAVE-KZART. Concatenate these 3 values and then pass in to field Text name
Language: EN
Text ID: QAVE
Text Object: QPRUEFLOS
I am able to pick data,but I have to exclude the adminstrative data.Please guide me as I am clueless about it.
Thanks
HI,
I presume, you are using read_text to read the long text.
Now loop at the internal table which you get as a result from read_text and move the desired lines into another internal table.
Pass this internal table to smartforms through the TABLES parameter.
Regards
Subramanian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for all the replies.
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 having the quite similar problem but my form is developed using Sapscript. I'm using an 'INCLUDE' command but not sure what to put into the text name as it consists of the 15 digit value.
Text Name : 999999999999999
Language : EN
Text ID : QALS
Text Object : QPRUEFLOS
INCLUDE <???> OBJECT QPRUEFLOS ID QALS LANGUAGE &QALS-SPRACHE& PARAGRAPH ST
What should I put into <???> for the text name? TQ.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Sulaiman
you can use a subroutine for getting values from a function module.
here is the way to do it.
hope this may be helpful for you.
inside the script write these coding lines, this is to call a subroutine inside the script from a report program.
/: PERFORM <form> IN PROGRAM <prog>
/: USING &INVAR1&
......
/: CHANGING &OUTVAR1&
......
/: ENDPERFORM
INVAR1is variable symbol and may be of any of the four SAPscript symbol types.
OUTVAR1is local text symbol and must therefore be character strings.
In the program (zprog which u specified in the subroutine call) of se38 write this.
FORM READ_TEXTS TABLES IN_PAR STRUCTURE ITCSY
OUT_PAR STRUCTURE ITCSY.
Data : v_id type LIKE THEAD-TDID VALUE 0001, (EXAMPLE)
V_LANG LIKE THEAD-TDSPRAS VALUE EN, (EXAMPLE)
V_NAME LIKE THEAD-TDNAME,
V_OBJECT LIKE THEAD-TDOBJECT VALUE VBBK, (Example).
DATA : T_LINES LIKE TABLE OF TLINE WITH HEADER LINE.
READ TABLE IN_PAR WITH KEY 'V_NAME' .
CHECK SY-SUBRC = 0.
V_NAME = IN_PAR-VALUE.
call function 'READ_TEXT'
exporting
CLIENT = SY-MANDT
id = v_id
language = v_lang
name = v_name
object = v_object
ARCHIVE_HANDLE = 0
LOCAL_CAT = ' '
IMPORTING
HEADER = HEADER
tables
lines = t_lines
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8
.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
Read table t_lines index 1.
If sy-subrc eq 0.
OUT_PAR-VALUE = t_lines-tdline..
MODIFY OUT_PAR INDEX SY-TABIX.
endif.
enform.
here it ends.
and for those inputs for header text ,the Id,object and name language, you can give in your won data
Please close the thread if your problem is solved
Reward points if helpful.
Regards
Zarina
Hi,
When you get the values Textname, text id, textobject to the smartform.
call the FM read_text in the programing lines to get the long text in the internal table. Another way to retrieve the long text is to use INCLUDE but for your requirement is better to uses READ_TEXT function module.
Once you get the data in the internal table.
Create table and loop the long text internal table. Now in the table when create a text node, keep a condition on the text node in the conditions column that when sy-tabix = 3. Which means you are skipping two lines (Administrative data).
Procedure:
1. Right click > create-> programming lines.
2. In the Input parameters pass TEXT NAME, TEXT ID, Text Object and Interanal table(itab) and In output paramaeters the Internal table (itab).
3. call function Read_text and pass the values.
4. create a table for Itab.
5. create a text node.
6. Keep a condition on the text node sy-tabix = 3 in the condition tab of the text node.
7. &itab-line&
Br,
Laxmi.Suryadevara
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 are using the FM read_text then you will be getting an internal table as an output of read_text.
To take first 2 rows only do the following.
take this in the table and keep a condition on the table as sy-tabix < = 2.
&wa_text&.
Br,
Laxmi.
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.