‎2009 Mar 18 4:20 AM
Hi,
I am using the following function module.it's throwing exception occured no_record_found.what shall i do?
CALL FUNCTION 'CSSF_STPOB_READ'
EXPORTING
estlty = wa_temp-stlty
estlnr = wa_temp-stlnr
edatuv = wa_temp-datuv
estlkn = wa_temp-stlkn
estlal = wa_temp-stlal
IMPORTING
ASTPOB = i_stpob
EXCEPTIONS
NO_RECORD_FOUND = 1
OTHERS = 2
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
‎2009 Mar 18 4:24 AM
Hi Murali,
Just uncomment this code:
EXCEPTIONS
NO_RECORD_FOUND = 1
OTHERS = 2
.
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
and then check why this FM is throwing the exception 'NO_RECORD_FOUND'.
Regards,
Prakash Pandey
‎2009 Mar 18 4:26 AM
In your program handle exception, uncomment the EXCEPTION in your code & handle it with messages .
CALL FUNCTION 'CSSF_STPOB_READ'
EXPORTING
estlty = wa_temp-stlty
estlnr = wa_temp-stlnr
edatuv = wa_temp-datuv
estlkn = wa_temp-stlkn
estlal = wa_temp-stlal
IMPORTING
ASTPOB = i_stpob
EXCEPTIONS
NO_RECORD_FOUND = 1
OTHERS = 2
.
IF sy-subrc 0.
" Message in case exception occurs
ENDIF.
‎2009 Mar 18 4:49 AM
Hi Murali,
Getting Exception is should really not be the issue because there is no output values for the Input that you have provided.
Try running the Function module through SE37 and you will get the same exception. I guess you can Ignore it.
if you are sure that it should have returned some value when you execute the FM then better start debug the code
Regards
Shital
‎2009 Mar 18 5:24 AM
hi,
when i uncomment the code in the above function module,it's throwing rc '1' and message showing is "no active tab exists for sapapo/matkey/".
1.what is the solution to avoid this?
2. can i skip printing the message?
‎2009 Mar 18 5:32 AM
Hi,
Just uncomment the exceptions part so that your program will not dump but remove the message display:
CALL FUNCTION 'CSSF_STPOB_READ'
EXPORTING
estlty = wa_temp-stlty
estlnr = wa_temp-stlnr
edatuv = wa_temp-datuv
estlkn = wa_temp-stlkn
estlal = wa_temp-stlal
IMPORTING
ASTPOB = i_stpob
EXCEPTIONS
NO_RECORD_FOUND = 1
OTHERS = 2.
IF sy-subrc EQ 0.
" do processing
ENDIF.
Regards.
‎2009 Mar 18 8:36 AM
hi,
I am using the above function module to get the valid to date of BOM.even though my exception error problem has been resolved,now my problem is that :
when i change the material to new material, I want to consider only which are valid.but the function module is throwing an error "No active nametab exists for /SAPAPO/MATKEY".so, the valid to date for new material is '0000000'.
plz help me in solving the above error or else is there any way to find valid to date of BOM?
murali.c
Edited by: murali ch on Mar 18, 2009 12:04 PM