2012 Jul 03 8:06 AM
Hi Expert,
I have written one query with some variable and i am taking that variable into my message to display the message.When the message is displaying there are some zeros are display with matnr filed
Note: In the below concatenate statement the field WA_LIPS-MATNR is displaying with zeros in the output.
select single matnr
werks
lgort
charg
from mchb_charg into wa_mchb where matnr = wa_lips-matnr
and werks = wa_lips-werks
and lgort = wa_lips-lgort
and charg = wa_lips-charg
and matnr = wa_lips-matnr.
IF LV_XCHPF eq 'X' AND wa_mchb-charg is initial.
CONCATENATE 'Batch #' wa_lips-charg 'does not exit for material' wa_lips-matnr 'in storage location' wa_lips-lgort '&Plant' wa_lips-werks into LV_MESSAGE SEPARATED BY SPACE.
MESSAGE LV_MESSAGE TYPE 'E'.
ENDIF.
endif.
Regards,
Addu
2012 Jul 03 8:29 AM
You could :
- Convert MATNR with a WRITE statement to a character work area (or a call to conversion exit like CONVERSION_EXIT_MATN1_OUTPUT, check domain MATNR definition)
WRITE wa_lips-matnr TP wa_matnr_c.
CONCATENATE 'Batch #' wa_lips-charg 'does not exit for material' wa_matnr_c 'in storage location' wa_lips-lgort '&Plant' wa_lips-werks
INTO lv_message SEPARATED BY SPACE.
- Create a message in a customer class with parameters
* SE91 : ZCLASS 999 "Batch &1 doesn''t exist for material &2 in storage location &3 Plant &4.
MESSAGE e999(zclass) WITH wa_lips-charg wa_lips-matnr wa_lips-lgort wa_lips-werks.
Regards,
Raymond
2012 Jul 03 8:16 AM
Dear,
You can use the FM CONVERSION_EXIT_ALPHA_OUTPUT on the WA_LIPS-MATNR value to delete the leading zeroes.
Regards
Davis
2012 Jul 03 8:29 AM
You could :
- Convert MATNR with a WRITE statement to a character work area (or a call to conversion exit like CONVERSION_EXIT_MATN1_OUTPUT, check domain MATNR definition)
WRITE wa_lips-matnr TP wa_matnr_c.
CONCATENATE 'Batch #' wa_lips-charg 'does not exit for material' wa_matnr_c 'in storage location' wa_lips-lgort '&Plant' wa_lips-werks
INTO lv_message SEPARATED BY SPACE.
- Create a message in a customer class with parameters
* SE91 : ZCLASS 999 "Batch &1 doesn''t exist for material &2 in storage location &3 Plant &4.
MESSAGE e999(zclass) WITH wa_lips-charg wa_lips-matnr wa_lips-lgort wa_lips-werks.
Regards,
Raymond