on 01-02-2008 6:14 AM
Hii
i wanna to display long text for vendor debit note
may i know what are the possibilities to bring the long text
regards
Jaipal
hi,
i assuming you want to display long text with the help of smartform.
if i am right, then in standard transaction where you are able to see long text on that screen means on long text screen
go to attributes->header
there you will get the text id ,text name for that text.
there text id is concntenation of no feilds that you can trace by searching value of text id thru tr ST05. there u can derive feild names.
After you are able to find out feild names ask fuctional consultant for logic to get those feilds.
concantenate those feilds into new feilds pass this new feild to fm "READ TEXT" as text id in return this fm willl give the long text in table T-LINE .
pass this table to smartform.
in sf loop at this table and print.
hope its useful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jaipal,
Which long text you want to display either header text or item text.
Regards,
Kalyan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Write u r whole text in Standard Text SO10 and call that in the where Req.
Regds,
Suresh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
U want to display it in a script or smartform???
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 use the Strutcure TLINE
Check the below sample
code&----
*& Report ZREADTEXTTEST *
*& *
&----
*& *
*& *
&----
REPORT ZMATERAILDESCRIPTION .
tables: ekpo,MAKT.
TYPE-POOLS: slis.
DATA: thread LIKE thead.
DATA: l_index LIKE sy-tabix.
DATA: BEGIN OF INT_OUT OCCURS 0,
MATNR LIKE EKPO-MATNR,
MAKTX LIKE MAKT-MAKTX,
TDLINE LIKE TLINE-TDLINE,
WERKS LIKE EKPO-WERKS,
END OF INT_OUT.
DATA: BEGIN OF INT_OUT_new OCCURS 0,
MATNR LIKE MAKT-MATNR,
MAKTX LIKE MAKT-MAKTX,
TDLINE LIKE TLINE-TDLINE,
tline like tline occurs 0,
WERKS LIKE EKPO-WERKS,
END OF INT_OUT_new.
DATA: it_tlines LIKE tline OCCURS 10 WITH HEADER LINE.
**************************
****ALV list definintion
*************************
DATA: ws_cat TYPE slis_fieldcat_alv ,
int_cat TYPE slis_t_fieldcat_alv WITH HEADER LINE.
DATA: g_container TYPE scrfname VALUE 'BCALV_GRID_DEMO_0100_CONT1',
g_custom_container TYPE REF TO cl_gui_custom_container.
*****************
*selection-screen
*****************
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECTION-SCREEN SKIP 2.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 25(20) text-001.
**PARAMETERS: S_MATNR LIKE MAKT-MATNR obligatory.
*
SELECT-OPTIONS: S_MATNR FOR MAKT-MATNR .
SELECTION-SCREEN END OF LINE.
*SELECTION-SCREEN BEGIN OF LINE.
*SELECTION-SCREEN COMMENT 25(20) text-002.
**PARAMETERS:p_ebeln LIKE ekko-ebeln obligatory.
*SELECT-OPTIONS: S_WERKS FOR EKPO-WERKS OBLIGATORY.
*SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK b1.
START-OF-SELECTION.
PERFORM get_data.
PERFORM field_catalog.
PERFORM display_data.
END-OF-SELECTION.
*FORM GET_DATA.
form get_data.
DATA: l_index LIKE sy-tabix.
*SELECT
a~matnr
a~werks
b~maktx FROM ekpo AS a
INNER JOIN makt AS b
ON bmatnr = amatnr
INTO CORRESPONDING FIELDS OF TABLE int_out
WHERE
o a~matnr = s_matnr and
a~werks IN s_werks.
*To Fetch Data From Makt.
SELECT MATNR MAKTX FROM MAKT INTO CORRESPONDING FIELDS OF TABLE
int_out WHERE MAKT~MATNR IN S_MATNR.
LOOP AT int_out.
l_index = sy-tabix.
read table int_out_new with key matnr = int_out-matnr.
int_out_new-matnr = int_out-matnr.
int_out_new-maktx = int_out-maktx.
*
thread-tdname = int_out-matnr.
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = 'BEST'
language = sy-langu
name = thread-tdname
object = 'MATERIAL'
TABLES
lines = it_tlines
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8.
*Loop on it_tlines where long text is coming .
loop at it_tlines.
IF sy-subrc = 0.
int_out_new-tdline = it_tlines-tdline.
append int_out_new.
clear int_out_new.
clear int_out_new-tdline.
ENDIF.
endloop.
delete adjacent duplicates from INT_OUT .
append int_out_new.
ENDLOOP.
Field Catalog
***MATERIAL NO no
int_cat-tabname = 'INT_OUT_NEW'.
int_cat-fieldname = 'MATNR'.
int_cat-reptext_ddic = 'MATERIAL NO'.
APPEND int_cat .
*material Short Description
int_cat-tabname = 'INT_OUT_NEW'.
int_cat-fieldname = 'MAKTX'.
int_cat-reptext_ddic = 'MATERIAL SHORT DESCRIPTION'.
int_cat-datatype = 'CHAR'.
int_cat-outputlen = '45'.
APPEND int_cat .
*
o Material Long Description
int_cat-tabname = 'INT_OUT_NEW'.
int_cat-fieldname = 'TDLINE'.
int_cat-reptext_ddic = 'MATERIAL LONG DESCRIPTION'.
int_cat-datatype = 'CHAR'.
int_cat-outputlen = '200'.
APPEND int_cat .
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = sy-repid
it_fieldcat = int_cat[]
TABLES
t_outtab = int_out_NEW
EXCEPTIONS
program_error = 1
OTHERS = 2.
ENDFORM. "display_data[/code]
Regards
Pavan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
79 | |
9 | |
9 | |
7 | |
7 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.