2006 Jun 06 2:26 PM
I created a smartform. It call the FM read_text to check if text exists or not. Only if the text exist it goes to the next node to print it ,
If the text exist the form works fine .
If the text doesnt exist , during delivery issue output it throws an error text id 'ggg' lan 'e' doesnt exixt . Is there any way i can supress this year and use the FM else how can i know if text exist or not . This prob came in production , its very urgent . Pls help
2006 Jun 06 2:28 PM
HI Abhi,
Can you show how are you coding for READ_TEXT function in your smartform driver?
Regards,
Ravi
I created a smartform. It call the FM read_text to check if text exists or not. Only if the text exist it goes to the next node to print it ,
If the text exist the form works fine .
If the text doesnt exist , during delivery issue output it throws an error text id 'ggg' lan 'e' doesnt exixt . Is there any way i can supress this year and use the FM else how can i know if text exist or not . This prob came in production , its very urgent . Pls help
2006 Jun 06 2:28 PM
HI Abhi,
Can you show how are you coding for READ_TEXT function in your smartform driver?
Regards,
Ravi
2006 Jun 06 2:33 PM
I have included a Program Lines Node in the smartform.
clear txt_line.
*
*is_dlv_delnote-hd_gen-deliv_numb.
*
*DATA: TNAME LIKE THEAD-TDNAME.
tname = is_dlv_delnote-hd_gen-deliv_numb.
flag = 1.
call function 'READ_TEXT'
exporting
CLIENT = SY-MANDT
id = 'Z901'
language = 'E'
name = tname
object = 'VBBK'
ARCHIVE_HANDLE = 0
LOCAL_CAT = ' '
IMPORTING
HEADER =
tables
lines = txt_line
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.
if txt_line is initial.
flag = 0.
endif.
I dont want the error message to popup even if there is no text for that object . Is it possible ?
After this node , i check the falg . If its 1 then only the nodes "booking Number ' and value gets printed .
2006 Jun 06 2:36 PM
Please uncomment your exceptions in the call to the function module. This will allow the function module to pass the error thru exceptions instead of a regular message.
data: lines type table of TLINE with header line.
call function 'READ_TEXT'
exporting
* CLIENT = SY-MANDT
id = 'Z001'
language = sy-langu
name = '3215'
object = 'ZPT_DET'
* ARCHIVE_HANDLE = 0
* LOCAL_CAT = ' '
* IMPORTING
* HEADER =
tables
lines = lines
<b> EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8</b>
.
Regards,
Rich Heilman
2006 Jun 06 2:39 PM
Hi Abhimanyu,
In smartforms, you have the checkbox option to select 'No error if no text exists'.
So, just select it, if the text is there, then it will be printed otherwise it wont give any error.
Regards,
Ram
2006 Jun 06 2:42 PM
HI
GOOD
CAN YOU GIVE ME SOME CODE OF THIS
during delivery issue output it throws an error text id 'ggg' lan 'e' doesnt exixt .
I CANT ABLE TO UNDERSTAND THIS LINE.
THANKS
MRUTYUN
2006 Jun 06 3:14 PM
2006 Jun 06 3:20 PM
Thanksss a Tonnne Rich ) It was in production that the error came , i was tensed . But thanks to you . Hats Off )
2006 Jun 06 3:18 PM
Hi,
Uncomments the exceptions & handle within SY-Subrc.
i.e
if sy-subrc = 1.
.logic
endif.
.............
...........