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

getting error in BADI

Former Member
0 Likes
1,343

hi,

Here is my reqirement:

The SAP sales BOM functionality needs to generate movement types 309/310 rebrands for the component materials and 601 on the header or additized material. This is needed to create the correct financial posting as well as stock movements

When the header MOT of the delivery for PK as well as the item category of the sales BOM header ZTAQ.Business Ad-In ‘LE_SHP_GOODSMOVEMENT’ can be used to trigger the goods movement from the delivery.

for cretetion of materila document i have used the FM

BAPI_GOODSMVT_CREATE .bUT Iam getting an error msg "<b>No additional quantities imported from external application"</b>.Please explain me wht the error is?

Thanks

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
998

Hi,

Instead of BAPI_GOODSMVT_CREATE.Use <b>MB_CREATE_GOODS_MOVEMENT</b>.

The function module provides a general interface for posting goods movements.

Movements performed in the framework of subcontracting (e.g. goods receipt for vendor with reference to subcontract order item or subsequent adjustment of "material to be provided" items) are currently not supported.

In addition, it is assumed that in a goods movement with reference to a reservation, the reservation has already been read. The data of the reservation is to be made available through IMSEG. As of Release 3.0D, it is also possible to only submit the reservation number and item. In this case, the field XRERE of structure IMSEG must be filled with 'X'. If a reversal with reference to a reservation is to be posted - and the XRERE indicator set -, the XSTOB field in the IMSEG structure must be filled with X. In this case, no value is submitted in the IMSEG-BWART field.

As of Release 3.0D, it is possible to have the system suggest the quantity to be posted. This has been implemented for movements with reference to reservations, production orders, and purchase orders. Enter an 'X' in the field IMSEG-XMEVO. The field IMSEG-ERFMG must remain blank.

The system uses either the SY-TCODE or the transaction code that has explicitly been provided in the import parameter CTCOD. You have to make sure that an entry for the transaction is contained in table T158. In addition, you have to maintain the transaction/valid movement type combination in table T158B.

There is no dialog. That is, error handling has to be ensured by the caller. The function module has been designed so that new items can only be added at the end. They cannot be inserted at any other point, because then the correct allocation between IMSEG and EMSEG will be lost (via SY-TABIX). The error messages are returned to the caller via the structure EMKPF or EMSEG. The COMMIT occurs at the caller.

The parameter XALLP controls that the material document can only be generated after all items have been posted. Parameter XALLR controls whether in the case of repeated calls all tables are to be initialized or only the new/corrected items are to be processed. If in the calling program, new items are inserted between existing items, this parameter must be set.

There is also the following option: Items that caused an error in the first call can be omitted when repeating the call. For this purpose, the field XNIBU in table IMSEG must be set.

The structure EMKPF and tables IMSEG and EMSEG are returned. The field IMSEG-BEAKZ indicates when processing of an item was successful. In the field EMSEG-YZEIL, the preliminary line number is contained in the material document. If the document is posted, the line number is contained in field EMSEG-MBLPO of the material document. The field EMKPF-SUBRC indicates where the program found the error.

EMKPF-SUBRC Ereror

-


16 Initialization incorrect

15 Header data incorrect

11 Error when reading material master records per PREFETCH

10 Error when reading material short texts per PREFETCH

08 Allocation of IMSEG to EMSEG incorrect

07 Error when correcting an item

06 Error when creating an item

05 No item generated

04 It is only permitted to post all items; however, there

is at least one incorrect item

03 Error when posting the document

02 Allocation of IMSEG to EMSEG incorrect

01 Allocation of YMBUZ to XMSEG incorrect

Please note that in EMKPF, the message ID, message number, etc. need not necessarily be set. It can also be the case that the system only indicates that an error has occurred. However, the relevant error message can be found in table EMSEG (with reference to the relevant line). For the following EMKPF-SUBRC's, the error messages are contained in table EMSEG: 07, 06, 05, 04.

Regards

3 REPLIES 3
Read only

Former Member
0 Likes
999

Hi,

Instead of BAPI_GOODSMVT_CREATE.Use <b>MB_CREATE_GOODS_MOVEMENT</b>.

The function module provides a general interface for posting goods movements.

Movements performed in the framework of subcontracting (e.g. goods receipt for vendor with reference to subcontract order item or subsequent adjustment of "material to be provided" items) are currently not supported.

In addition, it is assumed that in a goods movement with reference to a reservation, the reservation has already been read. The data of the reservation is to be made available through IMSEG. As of Release 3.0D, it is also possible to only submit the reservation number and item. In this case, the field XRERE of structure IMSEG must be filled with 'X'. If a reversal with reference to a reservation is to be posted - and the XRERE indicator set -, the XSTOB field in the IMSEG structure must be filled with X. In this case, no value is submitted in the IMSEG-BWART field.

As of Release 3.0D, it is possible to have the system suggest the quantity to be posted. This has been implemented for movements with reference to reservations, production orders, and purchase orders. Enter an 'X' in the field IMSEG-XMEVO. The field IMSEG-ERFMG must remain blank.

The system uses either the SY-TCODE or the transaction code that has explicitly been provided in the import parameter CTCOD. You have to make sure that an entry for the transaction is contained in table T158. In addition, you have to maintain the transaction/valid movement type combination in table T158B.

There is no dialog. That is, error handling has to be ensured by the caller. The function module has been designed so that new items can only be added at the end. They cannot be inserted at any other point, because then the correct allocation between IMSEG and EMSEG will be lost (via SY-TABIX). The error messages are returned to the caller via the structure EMKPF or EMSEG. The COMMIT occurs at the caller.

The parameter XALLP controls that the material document can only be generated after all items have been posted. Parameter XALLR controls whether in the case of repeated calls all tables are to be initialized or only the new/corrected items are to be processed. If in the calling program, new items are inserted between existing items, this parameter must be set.

There is also the following option: Items that caused an error in the first call can be omitted when repeating the call. For this purpose, the field XNIBU in table IMSEG must be set.

The structure EMKPF and tables IMSEG and EMSEG are returned. The field IMSEG-BEAKZ indicates when processing of an item was successful. In the field EMSEG-YZEIL, the preliminary line number is contained in the material document. If the document is posted, the line number is contained in field EMSEG-MBLPO of the material document. The field EMKPF-SUBRC indicates where the program found the error.

EMKPF-SUBRC Ereror

-


16 Initialization incorrect

15 Header data incorrect

11 Error when reading material master records per PREFETCH

10 Error when reading material short texts per PREFETCH

08 Allocation of IMSEG to EMSEG incorrect

07 Error when correcting an item

06 Error when creating an item

05 No item generated

04 It is only permitted to post all items; however, there

is at least one incorrect item

03 Error when posting the document

02 Allocation of IMSEG to EMSEG incorrect

01 Allocation of YMBUZ to XMSEG incorrect

Please note that in EMKPF, the message ID, message number, etc. need not necessarily be set. It can also be the case that the system only indicates that an error has occurred. However, the relevant error message can be found in table EMSEG (with reference to the relevant line). For the following EMKPF-SUBRC's, the error messages are contained in table EMSEG: 07, 06, 05, 04.

Regards

Read only

0 Likes
998

Hi SKK,

now also iam getting the same warning msg.Could you help me plz

Thanks

Read only

0 Likes
998

Hi SKK,

As per OSS NOTE # 607156 SAP does not currently support any core

BAPIs for posting goods movements with IS-Oil materials.

Calculating additional quantities in the background is not seen as a

a general solution.

So,better to go with BDC MB11.

Regards