on 09-30-2008 6:22 AM
Dear Friends
i am creaing a smartform form for a Purchase Order , where i am to show item text , & material po text
also but i am not getting how to show them , i have tried with Function Module Read_ text but if for any item text is not maintained it throw a error text xxxxxxxxxx code f01 not found in language en .
kindly somebody help me with the elaborated steps
regards
digvijay rai
thanks for all replies
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Irrespective of text is availabale or not in purchase order item, Please select Check box in Text node as No Error if no Text Exists.
Regards
Jana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
i am creaing a smartform form for a Purchase Order , where i am to show item text , & material po text
also but i am not getting how to show them , i have tried with Function Module Read_ text but if for any item text is not maintained it throw a error text xxxxxxxxxx code f01 not found in language en .
kindly somebody help me with the elaborated steps
For above problem
After use FM READ_TEXT ,
if sy-subrc <> 0.
V_text = Space.
Endif.
And display V_text.
Dont use Text module.
Regards
Jana
Hi
Try to like below
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
id = id
language = language
name = name
object = object
ARCHIVE_HANDLE = 0
LOCAL_CAT = ' '
IMPORTING
HEADER = HEADER
TABLES
lines = lines
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
.
after this
if sy-subrc <> 0.
<v_text> = space.
endif.
Regards
Jana
Hi Reddy ,
this is the code ,
DATA : BEGIN OF ITAB OCCURS 0 ,
EBELN LIKE EKPO-EBELN ,
EBELP LIKE EKPO-EBELP ,
END OF ITAB .
DATA : NAME(70) TYPE C .
DATA : BEGIN OF LTEXT OCCURS 0 .
INCLUDE STRUCTURE TLINE .
DATA : END OF LTEXT .
CLEAR : LTEXT , NAME .
CONCATENATE PNO WA_EKPO-EBELP INTO NAME .
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = 'F01'
LANGUAGE = SY-LANGU
NAME = NAME
OBJECT = 'EKPO'
ARCHIVE_HANDLE = 0
LOCAL_CAT = ' '
IMPORTING
HEADER = HTEXT
TABLES
LINES = LTEXT
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.
LOOP AT LTEXT .
IF LTEXT-TDLINE NE '' .
MOVE LTEXT-TDLINE TO DTEXT-TDLINE .
APPEND DTEXT .
ENDIF .
ENDLOOP .
after that i have used the loop ( dtext into wa_text ) now its giving the result but it repeats the same for all items whether its maintained or not .
regards
digvijay
Hi,
after that i have used the loop ( dtext into wa_text ) now its giving the result but it repeats the same for all items whether its maintained or not .
according above statement, after use of READ_TEXT, the text is maintained or not, we able to know.
i think youe calling FM:Read_text in item loop.
so it is checking for every item.
Regards
Jana
Requirement : Need to display the item text in the scripts Tcode me23n.
problem: the below subroutine program which i wrote reads the entire paragraph but when the values transfered to the script, the script variable accepts only one line. can you please help to pass the entire value to scripts.
Actual output
th respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the exchoose warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.D
Displayed output
th respect to the materials. The only warranties for SAP Group products and s
code written in scripts :
DEFINE &VALUE& TYPE STRING(500)
PERFORM ITEMTEXT IN PROGRAM ZDISPLAYINGITEMTEXT
USING &EKKO-EBELN&
USING &EKPO-EBELP&
CHANGING &VALUE&
ENDPERFORM
Item Text : &VALUE&
REPORT ZDISPLAYINGITEMTEXT.
DATA : name type thead-tdname,
p_ebeln TYPE ekko-ebeln, " Purchase order Number
p_ebelp TYPE ekpo-ebelp.
types :strin(450).
data : p_valu type strin.
data : p_valu1 type strin.
data: lines type table of tline with header line.
data: IT_LINE LIKE STANDARD TABLE OF itcsy INITIAL SIZE 0 WITH HEADER LINE,
IT_TEXT1 LIKE STANDARD TABLE OF itcsy INITIAL SIZE 0 WITH HEADER LINE,
W_LINE LIKE IT_LINE.
Types : stri(450).
data f_name type stri.
**
FORM itemtext TABLES i_intab STRUCTURE itcsy
i_outab STRUCTURE itcsy.
*BREAK-POINT.
READ TABLE i_intab INDEX 1.
MOVE i_intab-value TO p_ebeln.
READ TABLE i_intab INDEX 2.
MOVE i_intab-value TO p_ebelp.
*parameters: p_ebeln type ekko-ebeln,
p_ebelp type ekpo-ebelp.
concatenate p_ebeln p_ebelp into name.
call function 'READ_TEXT'
exporting
id = 'F01'
language = sy-langu
name = name
object = 'EKPO'
tables
lines = lines
exceptions
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
others = 8.
loop at lines. " INTO w_line.
BREAK-POINT.
*move w_line to it_text1.
*append it_text1.
*write:/ it_line.
*p_valu = f_name.
*p_valu1 = w_line.
concatenate p_valu lines-tdline into p_valu.
*p_valu = f_name.
endloop.
message p_valu type 'I'.
READ TABLE i_outab INDEX 1.
MOVE p_valu TO i_outab-value.
MODIFY i_outab INDEX sy-tabix.
*loop at lines.
*
write:/ f_name.
*
*endloop.
*
*READ TABLE i_outab INDEX 1.
MOVE lines TO i_outab-value.
MODIFY i_outab INDEX sy-tabix.
endform.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
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.