Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Problem In production pls help

Former Member
0 Likes
981

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
945

HI Abhi,

Can you show how are you coding for READ_TEXT function in your smartform driver?

Regards,

Ravi

8 REPLIES 8
Read only

Former Member
0 Likes
946

HI Abhi,

Can you show how are you coding for READ_TEXT function in your smartform driver?

Regards,

Ravi

Read only

0 Likes
945

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 .

Read only

0 Likes
945

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

Read only

Former Member
0 Likes
945

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

Read only

Former Member
0 Likes
945

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

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
945

Is you problem solved? If so, please make sure to award points for any helpful answers and mark your post as solved. THanks and welcome to SDN.

Regards,

Rich Heilman

Read only

0 Likes
945

Thanksss a Tonnne Rich ) It was in production that the error came , i was tensed . But thanks to you . Hats Off )

Read only

Former Member
0 Likes
945

Hi,

Uncomments the exceptions & handle within SY-Subrc.

i.e

if sy-subrc = 1.

.logic

endif.

.............

...........