‎2008 Sep 01 6:30 PM
in the following bapi , im getting the error message ' CX_sy_CONVERSION_no_number'.
the data type of wmarc-webaz is d,
but i can update the number 4 in mm02.
how to solve this.
SELECT SINGLE * FROM marc
INTO w_marc
WHERE matnr = wmbew-matnr
AND werks = wmbew-bwkey.
MOVE w_marc TO wmarc.
wt_headdata-material = wmarc-matnr.
wt_headdata-ind_sector = 'A' .
wt_plantdata-gr_pr_time = 'wmarc-webaz' .
wt_plantdatax-gr_pr_time = 'X' .
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
headdata = wt_headdata
PLANTDATA = wt_plantdata
PLANTDATAX = wt_plantdatax
IMPORTING
return = wt_return
TABLES
returnmessages = wt_returnmessages.
READ TABLE wt_returnmessages
WITH KEY type = 'E' .
IF sy-subrc NE 0 .
COMMIT WORK .
ENDIF .
‎2008 Sep 01 6:34 PM
Hello,
Just remove the quotes like follows:
wt_headdata-material = wmarc-matnr.
wt_headdata-ind_sector = 'A' .
******
wt_plantdata-gr_pr_time = wmarc-webaz ." before removed was 'wmarc-webaz'
******
wt_plantdatax-gr_pr_time = 'X' .
Regards
‎2008 Sep 01 6:34 PM
Hello,
Just remove the quotes like follows:
wt_headdata-material = wmarc-matnr.
wt_headdata-ind_sector = 'A' .
******
wt_plantdata-gr_pr_time = wmarc-webaz ." before removed was 'wmarc-webaz'
******
wt_plantdatax-gr_pr_time = 'X' .
Regards
‎2008 Sep 02 4:48 AM
Hi,
Here is a line from your code. wt_plantdata-gr_pr_time = 'wmarc-webaz' .
Why you have hard coded the work area over there. I think it is a type mistake. Just remove the Quotes ans try.
Also go to BAPI_MATERIAL_SAVEDATA' ans check the field type webaz in PLANTDATA srtucture.
Let me know if you still face the error.
‎2008 Sep 02 4:59 AM
hello
please remove hard code from workarea 'wmarc-webaz' .
~hitesh
Close this thread once your query is solved
‎2008 Sep 02 1:06 PM
hi guys , still it doesnt work
SELECT SINGLE * FROM marc
INTO w_marc
WHERE matnr = wmbew-matnr
AND werks = wmbew-bwkey.
MOVE w_marc TO wmarc.
wmarc-webaz = '10'.
wt_headdata-material = wmarc-matnr.
wt_headdata-ind_sector = 'A' .
wt_plantdata-plant = wmarc-werks .
wt_plantdata-gr_pr_time = wmarc-webaz .
wt_plantdatax-gr_pr_time = 'X' .
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
headdata = wt_headdata
PLANTDATA = wt_plantdata
PLANTDATAX = wt_plantdatax
IMPORTING
return = wt_return
TABLES
returnmessages = wt_returnmessages.
READ TABLE wt_returnmessages
WITH KEY type = 'E' .
IF sy-subrc NE 0 .
COMMIT WORK .
ENDIF .