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.
Serkan AKKAVAK
Computer Engineer
ABAP Developer & SAP MM SD Consultant
Contact : serkurumsal@yandex.com
Social Plugin