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

bapi

Former Member
0 Likes
605

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 .

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
554

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

4 REPLIES 4
Read only

Former Member
0 Likes
555

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

Read only

Former Member
0 Likes
554

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.

Read only

Former Member
0 Likes
554

hello

please remove hard code from workarea 'wmarc-webaz' .

~hitesh

Close this thread once your query is solved

Read only

0 Likes
554

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 .