‎2008 May 07 7:02 AM
Hello Experts,
This is regarding to the user exit problem IN VA01.
we are having a ztable with 3 filds. when ever a sales order is
created then the header text in the sales order text type acceptance number
should be populated into this 3 filds ie 3lines of header text into 3 filds
each line into each field. We have written a code in include MV45AFZZ.
our code is like this..
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = '0001'
language = sy-langu
name = sname "sales doc is given here
object = 'VBBK'
TABLES
lines = tlines.
LOOP AT tlines.
CASE sy-tabix.
WHEN 1.
ztable-field1 = tlines-tdline.
WHEN 2.
ztable-field2 = tlines-tdline.
WHEN 3.
ztable-field3 = tlines-tdline.
ENDLOOP.
UPDATE ztable SET field1= ztable-field1
field2= ztable-field2
field3 = ztable-field3
WHERE vbeln = vbak-vbeln.
ENDIF.
this code is working fine when the user is giving the header text
when creating the order , suppose if he wont
give the header text it is giving the error message while
saving the order like "Text id 103039900.. language EN not found".
so please tell me how to handle this, ie when ever the
user gives the header text then only the
ztable should be populated if the user wont give the text
the sales order should be saved without giving this message , it means we need to
bypass the function module .
please give the answers.
Thank you so much for all the replies.
‎2008 May 07 7:10 AM
You have excluded the exceptions of FM: READ_TEXT. Make sure that you are proceeding with the LOOP AT ... and UPDATE statements only when the sy-subrc eq 0 after call to FM: READ_TEXT.
‎2008 May 07 7:10 AM
You have excluded the exceptions of FM: READ_TEXT. Make sure that you are proceeding with the LOOP AT ... and UPDATE statements only when the sy-subrc eq 0 after call to FM: READ_TEXT.