‎2008 Apr 23 2:37 PM
SELECT SINGLE matnr FROM mch1 INTO lv_matnr
WHERE charg = wa_input-charge.
IF sy-subrc NE 0.
CONCATENATE 'Charge' wa_input-charge 'for material' lv_matnr INTO v_text1
SEPARATED BY SPACE.
log-aufnr = wa_input-aufnr.
log-text = v_text1.
log-flag = 'E'.
APPEND log.
CLEAR log.
ENDIF.
im not getting material number into lv_matnr when sy-subrc ne 0.
but i have to show
Charge chargenumber for material materialnumber does not exist.
Plz help me
Edited by: vijay prasad on Apr 23, 2008 3:37 PM
‎2008 Apr 23 2:42 PM
Hi,
Sorry but you will never get the material no with this logic.
because when your select satement fails(sy-subrc <> 0) then how come you will get any material in the field lv_matnr.
You are selecting material and not getting it,when you are not getting material how you will print it.
Just think upon the logic u have written.
Please let me know if u want any more help.
vivekanand
‎2008 Apr 23 2:42 PM
Hi,
Sorry but you will never get the material no with this logic.
because when your select satement fails(sy-subrc <> 0) then how come you will get any material in the field lv_matnr.
You are selecting material and not getting it,when you are not getting material how you will print it.
Just think upon the logic u have written.
Please let me know if u want any more help.
vivekanand