‎2011 Sep 09 3:20 PM
Dear,
sorry, I have a problem.....
1) I perform "BAPI_NETWORK_MANTAIN
2) I perform immediately the BAPI_TRANSACTION_COMMIT with WAIT = 'X' with file RETURN (return file is initial)
3) I perform immediately the BAPINETWORK_COMP_ADD
after point 2)
it is in error..... NETWORK already in elaboration
BAPI_TRANSACTION_COMMIT doesn't work... because it begins the process of the BAPINETWORK_COMP_ADD
but the process of the BAPI_NETWORK_MANTAIN is not ended yet.
I don't want to resolve with " WAIT UP TO 2 SECONDS"
I want to resolve in other normal way.
Best Regards
Marco Echino.
‎2011 Sep 09 5:22 PM
Hi
First perform BAPI_NETWORK_MANTAIN , and check the message.
IF it is success
then perform BAPI_TRANSACTION_COMMIT & perform BAPINETWORK_COMP_ADD.
elseif error occur.
then do bapi_rollback.
perform BAPINETWORK_COMP_ADD.
ENDIF.
Regards,
Raghu
‎2011 Sep 09 4:01 PM
Hi,
SAP uses Export and Import parameters for this BAPI BAPI_NETWORK_MANTAIN.
Please declare the below set variables which are being used for IMPORT and EXPORT and use FREE MEMORY.
DATA i_method_project
LIKE bapi_method_project OCCURS 0 WITH HEADER LINE.
DATA i_network
LIKE bapi_network OCCURS 0 WITH HEADER LINE.
DATA i_network_update
LIKE bapi_network_update OCCURS 0 WITH HEADER LINE.
DATA i_activity
LIKE bapi_network_activity OCCURS 0 WITH HEADER LINE.
DATA i_activity_update
LIKE bapi_network_activity_up OCCURS 0 WITH HEADER LINE.
DATA i_relation
LIKE bapi_network_relation OCCURS 0 WITH HEADER LINE.
DATA i_relation_update
LIKE bapi_network_relation_up OCCURS 0 WITH HEADER LINE.
DATA e_message_table
LIKE bapi_meth_message OCCURS 0 WITH HEADER LINE.
DATA return LIKE bapireturn1.
DATA i_activity_element
LIKE bapi_act_element OCCURS 0 WITH HEADER LINE.
DATA i_activity_element_update
LIKE bapi_act_element_upd OCCURS 0 WITH HEADER LINE.
DATA i_activity_milestone
LIKE bapi_act_milestone OCCURS 0 WITH HEADER LINE.
DATA i_activity_milestone_update
LIKE bapi_act_milestone_upd OCCURS 0 WITH HEADER LINE.
*
FREE: MEMORY ID 'NW_MAIN_I_METHOD_PROJECT',
MEMORY ID 'NW_MAIN_I_NETWORK',
MEMORY ID 'NW_MAIN_I_NETWORK_UPDATE',
MEMORY ID 'NW_MAIN_I_ACTIVITY',
MEMORY ID 'NW_MAIN_I_ACTIVITY_UPDATE',
MEMORY ID 'NW_MAIN_I_RELATION',
MEMORY ID 'NW_MAIN_I_RELATION_UPDATE',
MEMORY ID 'I_ACTIVITY_ELEMENT',
MEMORY ID 'I_ACTIVITY_ELEMENT_UPDATE',
MEMORY ID 'I_ACTIVITY_MILESTONE',
MEMORY ID 'I_ACTIVITY_MILESTONE_UPDATE'.
Shiva
‎2011 Sep 09 5:22 PM
Hi
First perform BAPI_NETWORK_MANTAIN , and check the message.
IF it is success
then perform BAPI_TRANSACTION_COMMIT & perform BAPINETWORK_COMP_ADD.
elseif error occur.
then do bapi_rollback.
perform BAPINETWORK_COMP_ADD.
ENDIF.
Regards,
Raghu
‎2011 Sep 09 5:40 PM
Hi Echino,
Execute this bapi first BAPI_NETWORK_MANTAIN and check the return messages IF it is success then BAPI_TRANSACTION_COMMIT and then BAPI_NETWORK_COMP_ADD.
Regards,
Madhu.
‎2011 Sep 10 5:28 AM
You need to check the success before you commit.
But before commit ends you cannot run the next function module.
I guess you will have to put wait time... to avoid any malfunctioning of the program.
Regards,
Lalit Mohan Gupta.