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

Dump encountered while calling function 'MB_CREATE_MATERIAL_DOCUMENT_UT'

Former Member
0 Likes
2,653

Hi ABAPer,

Below is the Short Dump while posting (101/102 movement type) through "BAPI_GOODSMVT_CREATE_OIL".

Dump is throwing for certain Purchase order not for all the PO's.Please tell me know,if you need some other details.

Mostly dump would happend during 102 posting.

What happened?

The current application program detected a situation which really

should not occur. Therefore, a termination with a short dump was

triggered on purpose by the key word MESSAGE (type X).

Error analysis

Short text of error message:

Material 3000000210 / US01 Column 0001: MSEG-BPMNG not in quantity table

/not consistent

Long text of error message:

Diagnosis

Before the system posts a material document for an HPM/TDP material

(MARA-CMETH = 1 or 2), it performs the following consistency

checks:

o For each unit of measure in the Unit of Measure Group

(MARC-UOMGR), a line item has to be present in the additional

quantity appendix table (Table MSEGO2)

o For each unit of measure in the main core table MSEG that is

not initial a line item, has to be present in the additional

quantity appendix table (Table MSEGO2)

o For each unit of measure in the main core table MSEG that is

not initial a line item, has to be present in the additional

quantity appendix table (Table MSEGO2) and the corresponding

packed format quantities have to be identical.

This way, inconsistent stock level updates can be prevented.

System Response

The system stops processing.

Procedure

If the error is reproducible, contact your system administrator.

Procedure for System Administration

The inconsitency can have several reasons, for example:

o Incorrect postings from external systems using function module

MB_CREATE_GOODS_MOVEMENT

o Handling errors

o Application programming errors

Moderator message - Please respect the 2,500 character maximum when posting. Post only the relevant portions of the dump

Edited by: Rob Burbank on Sep 25, 2009 2:24 PM

2 REPLIES 2
Read only

Clemenss
Active Contributor
0 Likes
1,539

H THILAGARAJ VIJA,

did you already check the listed conditions about units and groups?

Regards,

Clemens

Read only

Former Member
0 Likes
1,539

Thanks Clemens for your response

I'm not doing any conditional checking against units and groups.Can you please tell me how to do ?..pls provide some code,if you have any.

Please see my Function module code

IF meins <> l_t_mseg-meins.

CALL FUNCTION 'ZOIL_QUANTITY_CONVERSION' - This will convert my input quantity to destination quantity(eg:MT to KG)

endif.

  • // Determine whether a positive (101) or negative (102) adjustment is necessary

IF l_running_qty < menge. ("menge is input qunatity from input parameter, Running qty is adjustment quantity))

  • // positive adjustment (101)

l_adjust_qty = menge - l_running_qty.

l_gm_code = '01'.

l_movement_type = '101'.

ELSEIF l_running_qty > menge.

  • // negative adjustment (102)

l_adjust_qty = l_running_qty - menge.

l_gm_code = '06'.

l_movement_type = '102'.

ELSEIF l_running_qty = menge.

  • // No adjustment required

return-id = g_zxmii. return-type = g_i. return-number = '055'.

MESSAGE ID g_zxmii TYPE g_i NUMBER 055 INTO return-message

WITH ebeln ebelp.

APPEND return. EXIT.

ENDIF.

  • Not Adjusting to prevent SAP Short dump if the qty is less than .5

IF l_adjust_qty <= '.5'.

  • // No adjustment required

return-id = g_zxmii. return-type = g_i. return-number = '055'.

MESSAGE ID g_zxmii TYPE g_i NUMBER 055 INTO return-message

WITH ebeln ebelp.

APPEND return. EXIT.

ENDIF.

  • // Fill goods receipt header data

l_s_goodsmvt_header-pstng_date = l_date.

l_s_goodsmvt_header-pstng_time = l_time.

l_s_goodsmvt_header-doc_date = sy-datum.

l_s_goodsmvt_header-pr_uname = sy-uname.

l_goodsmvt_code-gm_code = l_gm_code.

  • // Fill goods receipt item data

l_t_goodsmvt_item-line_id = 1.

l_t_goodsmvt_item-plant = l_t_mseg-werks.

l_t_goodsmvt_item-stge_loc = c_recv. "Generic recv loc for all plants.

l_t_goodsmvt_item-mvt_ind = 'B'.

l_t_goodsmvt_item-move_type = l_movement_type.

l_t_goodsmvt_item-entry_qnt = l_adjust_qty.

l_t_goodsmvt_item-entry_uom = l_t_mseg-meins.

l_t_goodsmvt_item-material = l_t_mseg-matnr.

l_t_goodsmvt_item-batch = l_t_mseg-charg.

l_t_goodsmvt_item-po_number = ebeln.

l_t_goodsmvt_item-po_item = ebelp.

l_t_goodsmvt_item-stck_type = l_wa_batch_stock_types-insmk.

l_t_goodsmvt_item-prod_date = sy-datum.

APPEND l_t_goodsmvt_item.

l_t_goodsmvt_param-line_id = 1.

l_t_goodsmvt_param-calculatemissing = 'X'.

l_t_goodsmvt_param-usedefaultparameters = 'X'.

APPEND l_t_goodsmvt_param.

  • // Perform the goods movement with correct stock type

CALL FUNCTION 'BAPI_GOODSMVT_CREATE_OIL'

EXPORTING

goodsmvt_header = l_s_goodsmvt_header

goodsmvt_code = l_goodsmvt_code

IMPORTING

materialdocument = l_materialdocument

matdocumentyear = l_year

TABLES

goodsmvt_item_01 = l_t_goodsmvt_item

goodsmvt_item_param = l_t_goodsmvt_param

return = l_t_return.

"dump is encountered while callin 'MB_CREATE_MATERIAL_DOCUMENT_UT' which is inside 'BAPI_GOODSMVT_CREATE_OIL'

Please let me know,if you need some other details.....