2007 Nov 08 12:43 AM
Hi gurus,
I am working on this 'BAPI_GOODSMVT_CREATE' for Goods Issue, but my return statement returns this error message <b>"You have entered an external value"</b>. Can you please tell me where I am wrong.
loop at it_input_file.
move: v_doc_date to GOODSMVT_HEADER-DOC_DATE,
v_pos_date to GOODSMVT_HEADER-pstng_date,
syst-uname to GOODSMVT_HEADER-pr_uname.
move: '03' to GOODSMVT_CODE-GM_CODE.
move: it_input_file-matnr to GOODSMVT_ITEM-material,
it_input_file-werks to GOODSMVT_ITEM-plant,
it_input_file-st_loc to GOODSMVT_ITEM-stge_loc,
it_input_file-batch to GOODSMVT_ITEM-batch,
it_input_file-uoe_qty to GOODSMVT_ITEM-entry_qnt,
c_mov_type2 to GOODSMVT_ITEM-move_type,
it_input_file-account to GOODSMVT_ITEM-costcenter,
it_input_file-uoe_uom to GOODSMVT_ITEM-entry_uom,
it_input_file-amount to GOODSMVT_ITEM-AMOUNT_LC,
' ' to GOODSMVT_ITEM-MVT_IND.
'X' to GOODSMVT_ITEM-NO_MORE_GR.
append goodsmvt_item.
move 1 to goodmvt_serialnumber-MATDOC_ITM.
append goodmvt_serialnumber.
move: 1 to goodsmvt_item_cwm-MATDOC_ITM,
it_input_file-uoe_qty to goodsmvt_item_cwm-QUANTITY_PME,
it_input_file-uoe_uom to goodsmvt_item_cwm-BASE_UOM_PME.
append goodsmvt_item_cwm.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
GOODSMVT_HEADER = GOODSMVT_HEADER
GOODSMVT_CODE = GOODSMVT_CODE
IMPORTING
GOODSMVT_HEADRET = GOODSMVT_HEADRET
MATERIALDOCUMENT = MATERIALDOCUMENT
MATDOCUMENTYEAR = MATDOCUMENTYEAR
TABLES
GOODSMVT_ITEM = GOODSMVT_ITEM
GOODSMVT_SERIALNUMBER = goodmvt_serialnumber
RETURN = RETURN
GOODSMVT_ITEM_CWM = goodsmvt_item_cwm.
if NOT return is initial.
LOOP AT return INTO ls_return.
if ls_return-type = 'E' OR
ls_return-type = 'A' OR
ls_return-type = 'X'.
move: it_input_file-matnr to it_bapi_errlog-matnr,
it_input_file-werks to it_bapi_errlog-werks,
it_input_file-st_loc to it_bapi_errlog-st_loc,
it_input_file-seq_num to it_bapi_errlog-seq_num,
ls_return-message to it_bapi_errlog-msg_text.
append it_bapi_errlog.
clear it_bapi_errlog.
endif.
ENDLOOP.
else.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
IMPORTING
RETURN = return2.
move: materialdocument to it_bapi_suclog-mblnr,
it_input_file-matnr to it_bapi_suclog-matnr,
it_input_file-werks to it_bapi_suclog-werks,
it_input_file-st_loc to it_bapi_suclog-st_loc,
it_input_file-seq_num to it_bapi_suclog-seq_num,
ls_return-message to it_bapi_suclog-msg_text.
append it_bapi_suclog.
clear it_bapi_suclog.
endif.
clear: GOODSMVT_HEADER, GOODSMVT_ITEM, goodmvt_serialnumber, RETURN, goodsmvt_item_cwm.
refresh: GOODSMVT_ITEM, goodmvt_serialnumber, RETURN, goodsmvt_item_cwm.
endloop.
endif.
Thanks
Rajeev
2007 Nov 08 12:52 AM
Hi Rajeev,
Have you checked the long text of the message as what it is saying.
Regards,
Atish
2007 Nov 08 12:52 AM
Hi Rajeev,
Have you checked the long text of the message as what it is saying.
Regards,
Atish
2007 Nov 08 1:26 AM
Thanks for the reply Atsish, this is what I am getting in the error message <b>" You have entered an external value"</b>
Thanks
Rajeev
2007 Nov 08 1:30 AM
Hi Rajeev,
Near the message you generally get a question mark. When you click on the same you get the long text assigned to that message. Is there any long text with the same.
Regards,
Atish
2007 Nov 08 1:39 AM
Hi Atish,
I am new to ABAP so I am not sure whether this is what you are asking or not. but this what I am getting....
1 E /CWM/MM 074 You have entered an external value
Thanks
Rajeev
2007 Nov 08 1:58 AM
Hi Rajeev,
Will tell you how to look at long text.
Go to SE93. Give message class as /CWM/MM and message number as 074.
Now select the message displayed and click on the long text.
Here you will see more about the error details. Below are those details
According to this you might have entered external value in the item. Do not pass that value. Ask your functional consultant he might be able to help you in this.
Short Text
You have entered an external value
Diagnosis
It is not possible to enter an external value during the goods issue.
System Response
The system terminates processing.
Procedure
Delete the external value from the item.
Regards,
Atish
2007 Nov 08 2:04 AM
Hey thanks a lot for Atish, but I asked my functional guy and he told me that he is able able to post the data with the same information as he has given me, well can you tell me what kind of external value it can be.
Thanks
Rajeev