BAPI_NETWORK_MAINTAIN

Hi All ,
I have a requirement where i need to change an existing network.
For that i am trying to use BAPI_NETWORK_MAINTAIN
But not getting any proper inputs to update it, can anyone tell me what are the
possible values to update a network in this BAPI.
Thanks & Regards
Mona

hii
i think for input parameters following link can help you.
[Re: BAPI_NETWORK_MAINTAIN|Error Releasing Network via BAPI_NETWORK_MAINTAIN]
regards
twinkal

Similar Messages

  • BAPI_NETWORK_MAINTAIN released network

    HI all!
    I'm using the BAPI_NETWORK_MAINTAIN to update DURATION_NORMAL and WORK_ACTIVITY in our network.
    It works fine if network is new, but when we release the network and try to update them, the system do not update anything, while doing this operation via transaction works fine.
    LOOP AT it_vals.
            MOVE lt_vals-vornr TO i_activity-activity
            MOVE lt_vals-kstar_k TO i_activity-cost_elem.
            i_activity-duration_normal = ( tot_days * lt_vals-z_durata ) /
            100.
            ADD i_activity-duration_normal TO add_days.
            i_activity-work_activity = ( tot_days * lt_vals-z_lavoro ) /
            100.
            ADD i_activity-work_activity TO add_work.
            MOVE    'X'     TO i_activity_update-activity.
            MOVE    'X'     TO i_activity_update-cost_elem.
            MOVE    'X'     TO i_activity_update-duration_normal.
            MOVE    'X'     TO i_activity_update-work_activity.
            APPEND i_activity.
            APPEND i_activity_update.
          ENDLOOP.  
        CHECK i_activity[] IS NOT INITIAL.
        LOOP AT i_activity.
          CONCATENATE i_activity-network
                      i_activity-activity
                      INTO v_objkey.
          ADD 1 TO l_refnum.
          imethod-objecttype = 'NetworkActivity'.
          imethod-method = 'Update'.
          imethod-refnumber = l_refnum.
          imethod-objectkey = v_objkey.
          APPEND imethod. CLEAR imethod.
        ENDLOOP.
        imethod-method = 'Save'.
        APPEND imethod.
        CLEAR imethod.
        CLEAR e_message_table[].
        CALL FUNCTION 'BAPI_NETWORK_MAINTAIN'
          TABLES
            i_method_project                  = imethod
           i_activity                         = i_activity
           i_activity_update                  = i_activity_update
           e_message_table                   = e_message_table

    Which error(s) do you receive in RETURN and E_MESSAGE_TABLE  ?
    Regards,
    Raymond

  • BAPI_NETWORK_MAINTAIN for UPDATE ACTIVITY-CN 307-You are not authorized to

    Hi all,
    sorry for disturb,
    I have a problem and I don't understand why....
    I use BAPI_NETWORK_MAINTAIN with simple code.
    I have tried with SE37 with the same values and it correctly update the activity. without error messages.
    but with the same values in the program  returns me an error message and it doesn't update the data:
    E CN 307 You are not authorized to change activity or element S11021201 0108
    I have a USER with SAPALL.....
    DATA: i_method_project  LIKE bapi_method_project         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.
      i_method_project-refnumber                     = 000001.
      i_method_project-objecttype                     = 'NETWORKACTIVITY'.
      i_method_project-method                          = 'UPDATE'.
      i_method_project-objectkey                       = 'S110202010108'.
      APPEND i_method_project. CLEAR: i_method_project.
      i_method_project-method                          = 'SAVE'.
      APPEND i_method_project. CLEAR: i_method_project.
      i_activity-network                                     = 'S11020201'.
      i_activity_update-network                        = 'X'.
      i_activity-activity                                       = '0108'.
      i_activity_update-activity                          = 'X'.
      i_activity-control_key                                = 'PS01'.
      i_activity_update-control_key                   = 'X'.
      i_activity-duration_normal                         = 8,5.
      i_activity_update-duration_normal            = 'X'.
      APPEND i_activity. CLEAR: i_activity.
      CALL FUNCTION 'BAPI_NETWORK_MAINTAIN'
        IMPORTING
          return                                 = return
        TABLES
          i_method_project                = i_method_project
          i_activity                             = i_activity
          i_activity_update                = i_activity_update
          e_message_table               = e_message_table.
    thx in advance all
    Regards
    Marco Echino.
    Edited by: Marco Echino on Jun 22, 2011 5:04 PM

    Hello Marco,
                        To get more details you need to debub the both options as in the logic SAP is calling another report "R_BAPI_NETWORK_MAINTAIN" using submit statement inside the FM "BAPI_NETWORK_MAINTAIN".
    And also befor the submit statement they gad used the EXPORT statement to save the data to the SAP memory.
    Inside the Report  BAPI_NETWORK_MAINTAIN" SAP logic is calling the FM "2002_NETWORK_MAINTAIN" for doing the update.
    So if the Export memory content gets changed due to another execution then the returm value may get changed and end up with conflicts.
    So better you need to debub the both scenarios (SE37 & from program call).
    You can knock out the problem you are facing.
    Hope this answers your question.
    Thanks,
    Greetson

  • Err in creating Activit under tab Ext. Process using BAPI_NETWORK_MAINTAIN

    Hi Gurus,
    I need to create activity under tab Ext. Processing for a network and i am planning to use BAPI "BAPI_NETWORK_MAINTAIN" for this purpose. I am able to create activity under "Int. Processing" using this BAPI but got error for "Ext. Processing" tab.
    Below is the code i am doing for ext. processing tab.
    ****to move 3rd activity number for external processing
    itemsg-internal_object_id = '000004000873'.
    activity = '0030'.
    CONCATENATE itemsg-internal_object_id activity INTO v_str.
          MOVE  itemsg-internal_object_id+0(12) TO itactivity-network.
        MOVE '0030' TO itactivity-activity.
        MOVE 'Activity2' TO itactivity-description.
        MOVE 'PS02' TO itactivity-control_key.
        MOVE '5001-KOS-0061' TO itactivity-project_definition.
        MOVE '5001-KOS-0061-BA' TO itactivity-wbs_element.
       MOVE 'AA' TO itactivity-factory_calendar.
       move '2000' to itactivity-DURATION_NORMAL.
       MOVE 'DAY' to itactivity-DURATION_NORMAL_UNIT.
       MOVE '2000' to itactivity-WORK_ACTIVITY.
       MOVE 'Z0004' to itactivity-MILESTONE.
       MOVE 'M3'    to itactivity-UN_WORK.
        MOVE '099' to itactivity-MATL_GROUP.
        MOVE 'PGL' to itactivity-PUR_GROUP.
        APPEND itactivity.
        MOVE '000003' TO itnetmethod-refnumber.
        MOVE 'NETWORKACTIVITY' TO itnetmethod-objecttype.
        MOVE 'CREATE' TO itnetmethod-method.
        MOVE  v_str TO itnetmethod-objectkey.
        APPEND itnetmethod.
        CLEAR  itnetmethod.
    Below is the error message i got when i load this code.
    Enter a time unit, since you have entered either work or actual work
    Termination: Too many errors (more than 10% of methods)
    The order or network could not be saved
    Please help me to resolve this issue.
    Thanks in advance
    Ajay

    Hi,
    1)
    I would suggest declaring a structure of type BAPE_VBAP & BAPE_VBEP...Then move the values instead of using offset..
    Example
    DATA: S_BAPE_VBAP TYPE BAPE_VBAP.
    Populate the Extension structure WITH Order commited flag
    LW_EXT_STRUCTURE-STRUCTURE = C_BAPE_VBAP.
    S_BAPE_VBAP-VBELN = W_VBAP-VBELN.
    S_BAPE_VBAP-POSNR = W_VBAP-POSNR.
    S_BAPE_VBAP-ZZORDCOFL = W_VBAP-ZZ_ORDCOFL.
    LW_EXT_STRUCTURE-VALUEPART1 = S_BAPE_VBAP.
    This will make sure the BAPE_VBAP is extended with the Z fields..
    2)
    You are checking only for abort messages...You are not checking for error messages..
    Instead of this..
    READ TO CHECK THE ERROR AND ABORT MESSAGES DURING BAPI CALL
    READ TABLE LT_RETURN_TAB INTO LW_RETURN_TAB
    WITH KEY TYPE = C_MSGTYP_A
    BINARY SEARCH.
    Have this code..
    LOOP AT LT_RETURN_TAB WHERE TYPE = 'E' OR TYPE = 'A'.
      EXIT.
    ENDLOOP.
    IF SY-SUBRC = 0.
      WRITE: / 'ERROR'.
    ELSE.
      WRITE: / 'SUCCESS'.
    ENDIF.
    This will make sure there are no error messages..Also check the return table for error messages in the debugging mode..
    Thanks,
    Naren

  • Usage of BAPI_NETWORK_MAINTAIN

    Dear All,
        I have a requirement where in I have to delete multiple activities from a network using a Z transaction and then renumber the existing activity numbers.
        For deleting the activities, currently I have used BAPI_NETWORK_MAINTAIN with method u2018DELETEu2019. But for renumbering of the activity numbers I am not
        Sure how to do that.
        When I delete activities using this BAPI, I see that it is just setting the Deletion flag for that activity as u2018Xu201D and the activity number still exist in the database.
        Because of this I understand that I cannot reuse the same activity number. Also in BAPI_NETWORK_MAINTAIN I see that we can update the details for activity
        Using I_ACTIVITY_UPDATE parameter. But even with this I donu2019t think we can change only activity details but not activity number.
       Can anyone tell me how to achieve the functionality of deleting and renumbering for my requirement? Appreciate your quick response on this.
        Please let me know if I am not clear in explaining my requirement.
    Regards
    Priya

    Hi,
    I think sequence is you need to renumber the activity first and then delete that activity. Instead of using BAPI_NETWORK_MAINTAIN, you can use batch input in the Z program or you can create your own BAPI (for renumbering) with batch input inside the BAPI.
    Hope this helps.

  • BAPI_NETWORK_MAINTAIN how to specify link duration in percent ?

    HI,
    I'm trying tu use the BAPI_NETWORK_MAINTAIN to update data about activities.
    I need to create links between activities.
    When the unit of duration of the link to create is WEEKS, DAYS and etc. It works properly :
    I fill table "relation" with :
       -network predecessor, activitye predecessor
       - network successor, activity successor
       - type of relaion (FS for example )
       - duration_relation_unit = WCH for example
    When teh duration is in percent I try the same thing except that
       duration_relation_unit = % 
    but I have the following error message :
    % is not a valid time unit for the duartion of the relationship
    Could you please tell me how to flle relation table in case of  duration_relation in percent ?
    Regards,
    Morgan

    please, i would like to know that number to put in the field:  i_method_project-refnumber
    thx
    Moderator message: please do not post in all upper case.
    Moderator message: please do not post in all upper case.
    Moderator message: please do not post in all upper case.
    Edited by: Thomas Zloch on Apr 7, 2011 1:19 PM
    Edited by: Marco Echino on Apr 7, 2011 1:32 PM

  • Activity relation using bapi bapi_network_maintain

    hi gurus,
    i wrote a upload program to create relation between the activities using the bapi  bapi_networ_maintain .
    I used refnumber  Objecttype                method         object key    
                  000001    NetworkRelation      CREATE        FS0000600001610280
                  000000                                    save
    for i_method_project table
    object key is formed with the combination of
    wa_tab-relation_type wa_tab-net_pd wa_tab-activity_predecessor
                        wa_tab-net_sc wa_tab-activity_successor  INTO w_objkey
    here in my program  objectkey value is obtained from the bellow  values.
                                        wa_tab-relation_type value is 'FS'
                                         wa_tab-net_pd  VALUE is empty  (there is no value for this field in excel sheet)
                                         wa_tab-activity_predecessor value is  ' 000060000161'
                                          wa_tab-net_sc value is empty ((there is no value for this field in excel sheet)
                                            wa_tab-activity_successor   value is ' 0280'
    when i run the program  I am getting the bellow error ..........
    An incorrect object key was entered for object type Relationship
    kindly sugest the solution for my problem.
    thanks in advance,
    padmaja.

    Hi ,
    I think there is some error in the code written as you have mentioned that
    object key is formed with the combination of
    wa_tab-relation_type wa_tab-net_pd wa_tab-activity_predecessor
    wa_tab-net_sc wa_tab-activity_successor INTO w_objkey
    but as per the documentation found for this particular  BAPI ( bapi_network_maintain ) ,
    there should be only 1 object type , and can be a single network .
    Please look into the documentation by opening this BAPI in system and try to write the program as per the rules.
    May your problem get resolved .
    And I suggest you to post this thread to Abap Forum , and there you can get the exact solution.
    Thanks ,
    Dhruv Kumar Malhotra
    Edited by: Dhruv Kumar Malhotra on Aug 4, 2009 8:30 AM

  • Having trouble using BAPI_NETWORK_MAINTAIN using 'NetworkRelation'

    hi there!!
    can anyone help me with my problem..
    i'm currently working with BAPI_NETWORK_MAINTAIN using NetworkRelation as my objecttype to create a relationship with a network.
    here's my code,
    IMethodProject
    Objecttype-NetworkRelation
    Method- Create / Save
    ObjectKey-FS10000158002010000158003010000158(Where10000158 is Network No.)
    Refnumber-000001
    IRelation
    Network_Predecessor-10000158
    Activity_Predecessor-0020
    Network_Successor-10000158
    Activity_Successor-0030
    Relation_Type-FS
    INetwork
    Network-10000158
    i always have the error..
    network not does not exist.
    the order or network could not be saved.
    even if i test the function module 1st,i still encounter errors...
    Activity does not exist in network.
    the order or network could not be saved.
    Edited by: Christian de Leon on Oct 21, 2008 4:43 AM

    hello ,
    u can create or delete any number of activities using bapi_project_maintain,
    u have to fill activity table and along with it method table
    if u create 2 activities u have to have two entreis for creating and one save method in bapi,
    hope this solves ur problem
    regards
    afzal

  • Example code for BAPI_NETWORK_MAINTAIN

    Hi All,
    I need to create a network, network activity and its components using BAPI (BAPI_NETWORK_MAINTAIN).
    Can any one tell me out to find the mandatory tables and its parameters.
    if possible with example code.
    One More question, when i am creating a network, Which network number do i need to pass as objectkey in IMETHOD table ?
    Same number i need to pass in INETWORK table also?
    Do i need to use some existing number or the number will be assigned by system?
    When the BAPI ends with error, i can see error messages in message table.
    if BAPI is success, does it give any messages like success message.
    Thanks,
    Swapna.

    Hi,,
    See the example
    create network ***********
    if not network is initial.
        MOVE '000001' TO itnetmethod-refnumber.
        MOVE 'NETWORK' TO itnetmethod-objecttype.
        MOVE 'CREATE' TO itnetmethod-method.
        MOVE  network TO itnetmethod-objectkey.
        APPEND itnetmethod.
        MOVE '000000' TO itnetmethod-refnumber.
        MOVE ' ' TO itnetmethod-objecttype.
        MOVE 'SAVE' TO itnetmethod-method.
        MOVE  ' ' TO itnetmethod-objectkey.
        APPEND itnetmethod.
        MOVE network TO itnetwork-network.
        MOVE network_type TO itnetwork-network_type.
        MOVE vplant TO itnetwork-plant.
        MOVE 'NEW NETWORK' TO itnetwork-short_text.
        MOVE wbs_element TO itnetwork-wbs_element.
        MOVE '001' TO itnetwork-mrp_controller.
        MOVE project_definition TO itnetwork-project_definition.
        MOVE profile TO itnetwork-profile.
        APPEND itnetwork.
          REFRESH itemsg.
          CALL FUNCTION 'BAPI_NETWORK_MAINTAIN'
       IMPORTING
            RETURN                      =
               TABLES
                  i_method_project            = itnetmethod
                  i_network                   =  itnetwork
            I_NETWORK_UPDATE            =
            I_ACTIVITY                  =
            I_ACTIVITY_UPDATE           =
            I_RELATION                  =
            I_RELATION_UPDATE           =
               e_message_table             = itemsg.
            I_ACTIVITY_ELEMENT          =
            I_ACTIVITY_ELEMENT_UPDATE   =
            I_ACTIVITY_MILESTONE        =
            I_ACTIVITY_MILESTONE_UPDATE =
          IF sy-subrc = 0.
          ENDIF.
        LOOP AT itemsg.
          MOVE : itemsg-method to network_create_error-method,
                 itemsg-object_type to network_create_error-OBJECT_TYPE,
                 itemsg-internal_object_id to
                 network_create_error-INTERNAL_OBJECT_ID,
                 itemsg-external_object_id to
                 network_create_error-EXTERNAL_OBJECT_ID,
                 itemsg-message_id to network_create_error-MESSAGE_ID,
                 itemsg-message_number to
                 network_create_error-MESSAGE_NUMBER,
                 itemsg-message_type to network_create_error-MESSAGE_TYPE,
                 itemsg-message_text to network_create_error-MESSAGE_TEXT.
           append network_create_error.
           clear itemsg.
         endloop.
          COMMIT WORK .
          WAIT UP TO 1 SECONDS.
      endif.  "if not network is initial
    Regards
    Mudit

  • Question on BAPI_NETWORK_MAINTAIN

    Hi All,
    Iam facing a Problem with this bapi BAPI_NETWORK_MAINTAIN .
    I have populated the field activity_successor in the internal table it_relation which we export to Function Module.
    But it is throwing an error stating *Activity 1492 does not exist in the network " " *
    Below is my code :
           wa_method-objecttype   = c_object_type. "Network relation
           wa_method-method       = c_method.        "Create
           wa_method-objectkey    = 'FS00000090445314910000009044531492'.
           wa_method-refnumber    = c_refnumber.    "000001
           APPEND wa_method TO it_method.
          CLEAR wa_method.
          wa_method-objecttype   = ''.
          wa_method-method       = c_method1.  " Save
          wa_method-objectkey    = ''.
          wa_method-refnumber    = ''.
          APPEND wa_method TO it_method.
    populate network table
          wa_network-network       = wa_nrel-o_network.
          APPEND wa_network TO it_network.
         wa_relation-activity_successor           =  wa_nrel-n_act_succ. "Activity successor = 1492
          wa_relation-relation_type                  =  wa_nrel-relation_type. " FS
          wa_relation-duration_relation_unit      =  wa_nrel-duration_relation_unit. " 2
          wa_relation-duration_relation             =  wa_nrel-duration_relation.  " D
          APPEND wa_relation TO it_relation.
    wa_nrel is the work area which holds the data. I have mentioned the data which work area contains in the right corner.
    My network number is 904453 and acitvity number are 1491 and 1492

    from err msg it looks like network number is not passed.
    try passing
    NETWORK_ PREDECESSOR = same network number
    NETWORK_ SUCCESSOR = same network number
    that's how shown in SAP help

  • BAPI_NETWORK_MAINTAIN : CREATE/UPDATE element

    hi
    Is it possible to use BAPI_NETWORK_MAINTAIN for "creating activity element" as well as "updation of activity element" both at a same time.
    As i am getting error in the creation part of element.
    Please do suggest me the way for CREATE/UPDATE element using BAPI_NETWORK_MAINTAIN one time in the program.
    Thanks and Regards
    Ravi Arora

    HI  Ravi
    <b>  Check the documentation in se37 for the bapi:
    BAPI_NETWORK_MAINTAIN </b>
    Clear Explanation is given in the documentation about usage of this BAPI
    Regards Rk

  • Bapi_network_maintain -error handling

    Hi ,
    I am using bapi_network_maintain to create networks. The BAPI is called from portal screens .
    This BAPI internally does the same checks as done in CJ20n.
    =>Test Data -  project which has a Profit center - X. and  X - is locked in the system .
    When BAPI is called to create network for this project the program terminates without dumps .
    If i do a single test in R/3 I get a message E(000)  - error informing that the profit center is locked .
    As this error is not recognized from portal the program terminates . I need to handle this error . Any such error should be properly sent back to the portal. How do i handle this ?
    BAPI- calls a report and in the report there are FM calls which somewhere internally check profit center .
    If i try to catch the error using error_message in the BAPI ... it does not work.
    Any idea how to catch these type of errors?
    Thanks in advance.

    Dear all,
    Anybody give me some idea?
    Thanks,
    Sam

  • Dates issue with BAPI_NETWORK_MAINTAIN

    Dear Frens,
         I have issue with dates in the activities and in the header of network while using BAPI_NETWORK_MAINTAIN. I am creating a new network with the deleted activities of an already
    existing network. The network is being created with the activity early_start_Date and finsh dates as
    sy-datum and the network header has early start dates set to sy-datum.
    While passing values to the table parameter I_ACTIVITY of the BAPI , the dates are as available in the
    existing network. But for unknown reason, The newly created network dates are with the today's date.
    Can any one please let me know the possible reason for this.
    Also every time I create a new network with multiple activities the new network is being created without first activity of the set of activities to be created.
    Here also the table parameter I_ACTIVITY has all the activities that are to be created for new network.
    I appreciate your quick response on this.
    Regards
    Priya

    Hi Lakshmi,
      I was able to solve the problem but not by the answer you gave. I had to write a WAIT up to 3 seconds after commit and that updated the table.Thanks anyways
    Regards,
    Dishant

  • Problem with BAPI_NETWORK_MAINTAIN

    Hello,
           I am try to create network activities using this FM. With external activities i keep getting error message CK 204 "Cost element xxxxxx does not exist".
    I am transferring i_activity-Cost_Elem with leading zeros and the cost element does exist in CSKB.
    (Without the leading 0's i get the error G/L account xxxxxxxx does not exist).
    Does anyone know of a solution?
    PS Note 1277967 should not apply since the prerequisites of this note are not in the system.
    Kind regards
    Solved
    Edited by: Dominic Holdstock on Jul 26, 2011 9:19 PM

    Hi experts !
            Problem solved ! I discovered that I need to set the field CONTROL_KEY of I_ACTIVITY table, with the value PS01(that means "Network - internal processing" - I don´t know if this is the only correct value yet, I will ask for a PS functional consultant in the next week about this).
            Thank you, and best regards.
            Wilson

  • BAPI_NETWORK_MAINTAIN Budget Check

    Hello Experts,
    Does anybody know why this BAPI FM is doing the Budget Check and Determining Costs when I Create the Network Activities for a Project with it?
    All the activities have no price or cost, and I have nu material components in the project.
    This Budget Check takes a lot of minuts, and I really don't need it.
    Thank you.

    Hi
    Network will be created individually but the reading happens as project, WBS, activities and then network. When you upload the activities system will check for budget on WBS element. System may try to read the activities under network first (though they are not created) and thus checks for budget. I am not sure but when I checked up with SAP this is the answer from them.

Maybe you are looking for

  • How to get system time format in time stamp

    Hello All, I have one problem regarding Time stamp. I want system time stamp format in Time control. If my system date/time format change then automatically my time stamp format should also change.If my system Time stamp format is hh:mm:ss AM/PM dd/m

  • How do I get GarageBand files from an older mac onto my iPad 2?

    How do I get GarageBand files from an older mac onto my iPad 2? I can open the GarageBand Documents folder through iTunes while the iPad is sync'd but I can't seem to "add..." any of my old .band folders to the iPad to be able to view those music pro

  • What makes a GT70-0NE not able to be upgraded to WIn 8.1?

    Its on the non-upgradable section for Windows 8.1 Anyone know why or what problems? I was going to update via the anytime upgrade from 8... Seems this rocking laptop has enough for the task. Michael MSI GT70 0NE-276US 9S7-176212-276 Gaming Notebook -

  • Problem in Import PO

    Hi, there is one import po for vendor in europe in currnecy euro for two items. po is completed in following manner: 1) invoice for customs duty payment 2) migo with excise invoice capture 3) excise invoice posting 4) miro fpr vendor now, values in s

  • Auto-preface attachments in mail?

    This is weird, but, is there a way to automatically add a preface to every attachment you send in mail? I'd like to put "mylastname_" before the files I send to people, for instance, teachers or coworkers, so they don't mix up my files from someone e