BAPI_NETWORK_CONF_ADD

Explain the use of BAPI 'BAPI_NETWORK_CONF_ADD'.

Functionality:

Using this method you can enter confirmations for network activities/ activity elements and splits. Goods movements for a confirmation are specified according to the standard logic for retrograde withdrawal and automatic goods receipt for confirmation. 

Note that directly after you call the BAPI a COMMIT WORK is carried out. This means it is not possible to use multiple write confirmation BAPIs in a row and then carry out a single COMMIT WORK only once after the last BAPI. However, if this does occur, the system will terminate the second BAPI because a chain of calls, such as this, is prevented in a technical way by the system. If you do not carry out a COMMIT WORK, you cannot confirm a network you created and released using a BAPI since it does not exist in the database yet. First carry out the COMMIT WORK to write the activity to the database, and then create your confirmations.
 

CALL FUNCTION 'BAPI_NETWORK_CONF_ADD'

EXPORTING

NUMBER =

" POST_WRONG_ENTRIES = 0

" TESTRUN =

" IMPORTING

" RETURN =

TABLES

I_CONFIRMATIONS =

" E_MESSAGE_TABLE =

.
 

use FM 'BAPI_NETWORK_CONF_ADD' to update the Actual date for the activity

Below is the code:

DATA: BEGIN OF I_CONFIRMATION OCCURS 0.

INCLUDE STRUCTURE BAPI_NETWORK_CONF_ADD.

DATA: END OF I_CONFIRMATION.

data: RETURN_MSG like BAPIRET2.

DATA: BEGIN OF MESSAGE_TAB OCCURS 0.

INCLUDE STRUCTURE BAPI_CONF_RETURN.

DATA: END OF MESSAGE_TAB.

data: rnplnr type BAPI_NETWORK_LIST-NETWORK.

I_CONFIRMATION-ACTIVITY = '0010'.

I_CONFIRMATION-PERS_NO = '44106'.

I_CONFIRMATION-WORK_CNTR = 'TESTSBIR'.

I_CONFIRMATION-ACT_TYPE = 'HLABOR'.

I_CONFIRMATION-ACT_WORK = '10'.

append i_confirmation.

rnplnr = '000001000715'.

CALL FUNCTION 'BAPI_NETWORK_CONF_ADD'

EXPORTING

NUMBER = rnplnr

* POST_WRONG_ENTRIES = 0

* TESTRUN =

IMPORTING

RETURN = RETURN_MSG

TABLES

I_CONFIRMATIONS = I_CONFIRMATION

E_MESSAGE_TABLE = MESSAGE_TAB

.

IF RETURN_MSG IS INITIAL.

.

COMMIT WORK.

endif.

PS: In ECC 6.0, the activity was getting confirmed properly but it was not displaying in CN28.  What was needed only was the proper confirmation of the activity.

ABAP Tips

See Also
BAPI_ALM_NOTIF_CREATE - Maintenance Notification

Get help for your ABAP problems
Do you have a ABAP Question?

ABAP Books
ABAP Certification, BAPI, Java, Web Programming, Smart Forms, Sapscripts Reference Books

More ABAP Tips

Best regards,
SAP Basis, ABAP Programming and Other IMG Stuff
http://www.erpgreat.com

All the site contents are Copyright © www.erpgreat.com and the content authors. All rights reserved.
All product names are trademarks of their respective companies.  The site www.erpgreat.com is in no way affiliated with SAP AG. 
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk. 
 The content on this site may not be reproduced or redistributed without the express written permission of 
www.erpgreat.com or the content authors.