Skip to Content
avatar image
Former Member

bapi

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 .

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Sep 01, 2008 at 05: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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 02, 2008 at 03: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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 02, 2008 at 03:59 AM

    hello

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

    ~hitesh

    Close this thread once your query is solved

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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 .