on 08-14-2007 8:55 PM
Hi,
I have a requirement, in which I have to print various clauses depending on the route in the Custom Invoice forms.For this I was told to create a z-table with 2 fields 1.) route and 2.) Clause. So a single route can have multiple clauses. I have achieved this part of the requirement. My second part is to show the Clause text on the form... the z-table z_rou_cusinv table has daa as follows:-
Route Clause
US04 ZC_CLAUSE1
US04 ZC_CLAUSE3
US05 ZC_CLAUSE1
US05 ZC_CLAUSE3
DE04 ZC_CLAUSE1
DE04 ZC_CLAUSE3
The actual text is stored in SO10 t-code, which is stored as ZC_Clause1 and so on ... How do I display the actual text in the output?
Please help.
Thank You,
SB.
<b>hi SB,</b>
To print the standard text in the print out:
If you are using smartforms to print it please follow the below steps:
<b> Steps to be done
-
</b>
1) Create a text.
2)Change the text type as include text.
3) Text Name -> can be obtained bny double clicking the header of the
standard text
Text Object -> can be obtained bny double clicking the header of the
standard text
Text ID -> can be obtained bny double clicking the header of the
standard text
Language -> can be obtained bny double clicking the header of the
standard text
These are the same parameters which you pass in the function module READ_TEXT explained in the earlier post.
Please try this.
Regards,
<b>Sujith</b>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sujith,
When I dbclick the header of the Include text... I should be able to select the table name and respective field... for e.g (lt_rout_cinv-clause) this should be displayed on the list that is coming up ... I do not see this ... My query is can I add it to the exsisting list??
Since I was unable to achieve my requirement... I did the following:-
1.) Under Program Line node I wrote the logic to get the route.
2.) Since single route can have multiple values so I created a loop on the internal which has all the clause
3.) Under this I created a node of Program lines to get standardtext (Inside which I have written the read_text FM)
4.) Since the value comes in an internal table I created a Loop node on the internal tabel which got populated by the FM read_text.
5.)Created a node of text (type text-element) to display on the output form.
Now my problem is that at step 3.) get_standard_text a syntax error is coming "LS_TDLINE" is not an internal table - the "OCCURS n" specification is missing.18 "
Under Global declaration I have declared
LS_TDLINE TYPE TLINE.
Can you please tell hopw to rectify this syntax error?
data : name like THEAD-TDNAME.
name = WS_ROU_CINV-CLAUSE.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = 'ST'
LANGUAGE = SY-LANGU
NAME = name
OBJECT = 'TEXT'
ARCHIVE_HANDLE = 0
LOCAL_CAT = ' '
IMPORTING
HEADER =
TABLES
LINES = ls_tdline
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.
hi SB,
SO10 transaction is to maintain long texts. A text object will have multiple
text Ids and long texts (paragraphs) mapped to it.
if you need to get the text from a text object, use function module READ_TEXT
using text object name and text id..which will return the text in an internal table.
you can use this internal table to display the data on the screen/form.
sample code:
CALL FUNCTION 'READ_TEXT'
EXPORTING ID = ZHEADER-TDID "Text ID of text
LANGUAGE = ZHEADER-TDSPRAS "Language
NAME = ZHEADER-TDNAME "Name of text
OBJECT = ZHEADER-TDOBJECT "Object of text
IMPORTING HEADER = ZHEADER
TABLES LINES = ITAB
EXCEPTIONS ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6.
ITAB will contain the text after the FM execution..Your z-table contains text
names, which should be used to call the READ_TEXT function module to
get relevant texts.
hope this helps,
Sajan Joseph.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sanjan,
I am working with Smartforms... so I have written the logic to get data in Program line node... then I have created a loop node(because multiple values for the same route) ... inside which I have created a text node and in it I have declared the Text-name as WS_Z_ROU_CINV-CLAUSE... while debugging I see that instead of taking the actual value (i.e. ZC_CLAUSE1) it is writing directly WS_Z_ROU_CINV-CLAUSE ... because of which I unable to get anything on the form ... how should be my node setting ?
Thank You,
SB.
User | Count |
---|---|
84 | |
24 | |
12 | |
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.