‎2007 Mar 26 12:14 PM
Hi
gurus getting one problem in text upload and viewing the text in report
the tcode for which iam working is qp02
in which the text is in the following format
descrption.
text abcdefghijklmno,....
well know i created a text porgram and was getting problem as it was adding " commas in my text i reomved it by using replace a;; occurances..now i get fine text which gets uploaded fine...problem is my user using using a another report in which they get the data in following way
text-col-1 text-col-2
description text abcdefghijklmno,....
but iam getting it in this way
text-col-1 text-col-2
text abcdefghijklmno,....
iam unable to c the text description.. if in tcode manuallay i give a space before the text then i get all the text properly
text-col-1 text-col-2
description text abcdefghijklmno,....
i did debug it but iam sure there is nothing wrong in my code
regards pls help .
answers will be rewarded point.
‎2007 Mar 26 12:16 PM
hi
use save_text FM
IF TXTLINES[] IS NOT INITIAL.
CLEAR : TNAME, TNAME[].
TBLNO = SYTABIX.
CONCATENATE SY-MANDT 'Q' INT_QP01-PLNNR OPERNO INTO TNAME-TDNAME. " ' ' TBLNO RECNO INTO TNAME.
MOVE TBLNO TO TNAME-TDNAME+21(4).
MOVE RECNO TO TNAME-TDNAME+25(8).
MOVE 'QSS' TO TNAME-TDOBJECT.
MOVE 'QM' TO TNAME-TDID.
MOVE SY-LANGU TO TNAME-TDSPRAS.
APPEND TNAME.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
CLIENT = SY-MANDT
HEADER = TNAME
INSERT = 'X'
SAVEMODE_DIRECT = 'X'
IMPORTING
NEWHEADER = TNAME
TABLES
LINES = TXTLINES
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
OBJECT = 4
OTHERS = 5.
ENDIF.
hi,
it's a combination of values that we give which matches the text name field (which you get once you get into the long text editor).
for eg. if the text name is 999Q5010094900000003 001000000022, then
first 3 digits indicates the client, 4th digit is 'Q', 50100949 is PLNNR, and 00000003 is OPERNO, 0010 is tblno, and 00000022 is recno
this logic is worked out in this code
CONCATENATE SY-MANDT 'Q' INT_QP01-PLNNR OPERNO INTO TNAME- TDNAME.
MOVE TBLNO TO TNAME-TDNAME+21(4).
MOVE RECNO TO TNAME-TDNAME+25(8).
****
declare like this: TBLNO(4) TYPE N, RECNO(8) TYPE N
initialise TBLNO = '0010'. and after that increment by 10 tblno = tblno + 10 and at the end, reset tblno to 0010 itself..
initialise RECNO = '00000000' and after that increment it by 1 at the start of the loop...don't reset it
I think this will help u
‎2007 Mar 26 12:16 PM
hi
use save_text FM
IF TXTLINES[] IS NOT INITIAL.
CLEAR : TNAME, TNAME[].
TBLNO = SYTABIX.
CONCATENATE SY-MANDT 'Q' INT_QP01-PLNNR OPERNO INTO TNAME-TDNAME. " ' ' TBLNO RECNO INTO TNAME.
MOVE TBLNO TO TNAME-TDNAME+21(4).
MOVE RECNO TO TNAME-TDNAME+25(8).
MOVE 'QSS' TO TNAME-TDOBJECT.
MOVE 'QM' TO TNAME-TDID.
MOVE SY-LANGU TO TNAME-TDSPRAS.
APPEND TNAME.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
CLIENT = SY-MANDT
HEADER = TNAME
INSERT = 'X'
SAVEMODE_DIRECT = 'X'
IMPORTING
NEWHEADER = TNAME
TABLES
LINES = TXTLINES
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
OBJECT = 4
OTHERS = 5.
ENDIF.
hi,
it's a combination of values that we give which matches the text name field (which you get once you get into the long text editor).
for eg. if the text name is 999Q5010094900000003 001000000022, then
first 3 digits indicates the client, 4th digit is 'Q', 50100949 is PLNNR, and 00000003 is OPERNO, 0010 is tblno, and 00000022 is recno
this logic is worked out in this code
CONCATENATE SY-MANDT 'Q' INT_QP01-PLNNR OPERNO INTO TNAME- TDNAME.
MOVE TBLNO TO TNAME-TDNAME+21(4).
MOVE RECNO TO TNAME-TDNAME+25(8).
****
declare like this: TBLNO(4) TYPE N, RECNO(8) TYPE N
initialise TBLNO = '0010'. and after that increment by 10 tblno = tblno + 10 and at the end, reset tblno to 0010 itself..
initialise RECNO = '00000000' and after that increment it by 1 at the start of the loop...don't reset it
I think this will help u
‎2007 Mar 26 12:23 PM
Great, that will help, but make sure when calling FM "SAVE_TEXT", to call FM "COMMIT_TEXT" right after, since without your text will probably saved some later or rolled back.
‎2007 Mar 26 12:55 PM
thnks ..that was very knowledgebale answer ..but my problem is not with text uploading ..its uploading fine ..but when iam retiving the text its first line is not getting printed ..when manuallay give space after the first line in tcode qp02 then its properly displayed.
help me in this
regards
‎2007 Mar 30 7:55 AM