on 03-24-2009 1:21 PM
Hi,
I want to see the contents of Object VBBK.
What data should I pass to fn. module 'READ_TEXT' to see its contents.
For ex:--
id -- 0002
language -- EN
name --- ???
object -- VBBK.
But, am pretty confused about 'name' parameter? What value should I pass to 'name'???
Thanks,
Shivaa........
check this sample code .
TYPES: BEGIN OF ST_VBRK.
INCLUDE STRUCTURE VBRK.
TYPES: END OF ST_VBRK.
TYPES: BEGIN OF ST_STXH.
INCLUDE STRUCTURE STXH.
TYPES: END OF ST_STXH.
TYPES: BEGIN OF ST_LINE .
INCLUDE STRUCTURE TLINE.
TYPES: END OF ST_LINE.
DATA : BEGIN OF ST_HEAD .
INCLUDE STRUCTURE THEAD.
DATA : END OF ST_HEAD.
IST_STXH TYPE STANDARD TABLE OF ST_STXH, " internal table for header text table
WA_STXH TYPE ST_STXH,
IST_LINE TYPE STANDARD TABLE OF ST_LINE, " internal table for text line items
WA_LINE TYPE ST_LINE,
IST_VBRK TYPE STANDARD TABLE OF ST_VBRK, " internal table for vbrk table
WA_VBRK TYPE ST_VBRK,
parametres: p_vbeln type vbrk-vbeln.
SELECT * FROM VBRK
INTO TABLE IST_VBRK FOR ALL ENTRIES IN IST_BSEG
WHERE VBELN = p_VBELN.
LOOP AT IST_VBRK INTO WA_VBRK.
SELECT SINGLE * FROM STXH
INTO WA_STXH
WHERE TDOBJECT = 'VBBK'
AND TDNAME = WA_VBRK-VBELN
AND TDID = '0002'.
IF SY-SUBRC = 0 .
APPEND WA_STXH TO IST_STXH.
ENDIF.
ENDLOOP.
LOOP AT IST_STXH INTO WA_STXH.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = '0002'
LANGUAGE = SY-LANGU
NAME = WA_STXH-TDNAME
OBJECT = 'VBBK'
ARCHIVE_HANDLE = 0
LOCAL_CAT = ' '
IMPORTING
HEADER = ST_HEAD
TABLES
LINES = IST_LINE
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8
.
DELETE IST_LINE WHERE TDLINE IS INITIAL.
LOOP AT IST_LINE INTO WA_LINE.
MOVE WA_STXH-TDNAME TO IST_LINE_COPY-VBELN.
MOVE WA_LINE-TDLINE TO IST_LINE_COPY-TEXT.
CONDENSE:IST_LINE_COPY-VBELN , IST_LINE_COPY-TEXT.
APPEND IST_LINE_COPY.
ENDLOOP.
check the flow by proper debugging.
Regds
Sachhi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shiva,
Name is the number for which ur taking the Print say for example Invoice u will be giving the billing Document Number.
Regards,
Vijaya Lakshmi.T
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
for VBBK -
NAME IS SALES ORDER.
IF U WANT TO SEE FROM WHERE IT IS COMING THEN GOTO
va02--
there is onetab called TEXT
doubleclick on that u will get details.
like
Text Name 0180000133
Language EN
Text ID 0001 Form Header
Text Object VBBK Sales Header texts
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Follow the below description:
id -- Text ID
language -- Language
name -- Sales Order Number
object -- VBBK.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shiva,
You are right. With FM: READ_TEXT you can see its contents.
You have only to call the FM with the right parameters.
I willl give an example of it.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
id = '0001'
language = 'EN'
name = '0010000002'
object = 'VBBK'
ARCHIVE_HANDLE = 0
LOCAL_CAT = ' '
IMPORTING
HEADER =
tables
lines = it_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.
The value of parameter can be the invoicenumer, or the po-number
sometimes for positions the invoicenumber concatentaed with the posnr.
like 0010000002000010.
hope this helps.
Gr., Frank
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
TDOBJECT VBBK
TDNAME 0000255562 here name is your sales order number
TDID 0012
TDSPRAS DE
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
when you are in the transaction where the text is being inserted, make sure you are in the text-editor. you can do that with the button for detail when you are writing text.
within that screen in the menu GO TO you chose for HEADER. there you get al the information you need for that specific text.
Greetings,
Guido
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Keep a breakpoint in READ_TEXT function module and execute the transaction by writing some text. There you can see all parameters you needed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
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.