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

batch for material

Former Member
0 Likes
315

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
281

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

1 REPLY 1
Read only

Former Member
0 Likes
282

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