BP Create/change mode

While creating or changing BP, how can I know the mode whether it is creating or changing in PARTNER_UPDATE BADI.
Regards,
Aruna.

Hi Aruna,
Check the code snippet that I had implemented in partner_update badi. I am sure this will be of help to you,
  DATA: ltb_but000_old    TYPE TABLE OF but000,
        ltb_but000_new    TYPE TABLE OF but000,
        lwa_but000        TYPE but000,
        lwa_bus000        TYPE bus000___i.
  DATA: lw_partner_id     TYPE bu_partner.
  REFRESH: ltb_but000_new, ltb_but000_old.
  CLEAR  : ltb_but000_new, ltb_but000_old.
Get the current BP.
  CALL FUNCTION 'BUPA_GENERAL_CALLBACK'
    TABLES
      et_but000_old = ltb_but000_old
      et_but000_new = ltb_but000_new.
Get the first record from the internal table.
  READ TABLE ltb_but000_new INTO lwa_but000 INDEX 1.
  CHECK sy-subrc = 0.
Determine if change or create
Check if the BP already exists and this is a change.
We only want to update the Marketing Attributes
in CREATION mode.
  CLEAR lw_partner_id.
  SELECT SINGLE partner
  INTO   lw_partner_id
  FROM   but000
  WHERE  partner = lwa_but000-partner.
  CHECK sy-subrc <> 0.
In addition , I hope the FM BUP_BUT000_SELECT_SINGLE can also be used to check if the BP is available in database or not thereby you can determine if the BP is in create or change mode.
Best Regards, Adil

Similar Messages

  • To determine the mode(create/change/display)

    Hi,
    I want to add a piece of logic in IMPL class of an UI component based on which mode am into i.e create,change or display. IS there any class or attribute that gives us this info? thanks!
    Regards,
    Bhanu

    Hi Bhanu,
    Try to use below code you may have to modify it a bit:
    DATA: lr_comp_controller    TYPE REF TO CL_BT120H_C_BSPWDCOMPONEN_IMPL.
    lr_comp_controller ?= me->comp_controller.
    is a create?
      lv_bp_type = lr_comp_controller->is_create( ).
      IF lv_x_save = abap_true.
        ls_button-enabled  = abap_true.
      ELSE.
    eOVP: SAVE & CANCEL should be enabled as soon any AB is switched to edit mode
        IF lv_bp_type IS NOT INITIAL. " Create?
          lv_enabled = abap_true.
        ELSE.
          lr_entity = me->if_bsp_wd_history_state_descr~get_main_entity( ).
          lr_window_controller ?= me->view_manager->get_window_controller( ).
          IF ( lr_entity IS BOUND AND lr_entity->is_locked( ) = abap_true )
          OR   lr_window_controller->gv_object_locked         = abap_true.
            lv_enabled = abap_true.
          ELSE.
            lv_enabled = abap_false.
          ENDIF.
        ENDIF.
    You can try and debug get_buttons method of BP_HEAD/BPHEADOverview. Here SAP has handled all three scenarios you need to implement.
    Let me know if it helps.
    Regards,
    Bhushan

  • Change mode of the excise invoice is showing zero excise values

    H ifriends,
    The change mode of the excise invoice is showing zero excise values.....and the same is reflected in the ARE1
    While creating the excise invoice,its showing BEd/Ed and Shed and after saving,if i check the doc the values are shown aero...
    Thanks
    Sasi

    s

  • P.O Error in Process after copying the existing item in change mode

    Hi All,
    We are in SRM 5.0 Server 550 and SP15 and are using Extended Classic Scenario.
    We are facing a peculiar issue, when an already created P.O (Free text - goods) is changed and a new line item is added either manually or by copying the existing line item and then ordering it, the P.O is going into Error in Process status.
    This is happening only when i am adding a new item (material) to the existing line item (material) but when i am adding a service line item in the change mode to the existing material line item, the P.O is getting ordered without any issue.
    I believe this is SAP bug and raised with SAP for OSS.
    Meanwhile i would be grateful if you can provide any resolution to this issue and provide any OSS note number (If one already exists).
    Regards,
    Teja

    Hi Teja
    it works fine for me.
    old po template..
    taken describe procureemnt - goods
    copy the line item
    changed qty and price
    POs created for both items in one PO since vendors are same?
    what the error message says in the application monitor or rz20 / monitor sc.?
    for me i had a contract in my pld pos.(sc).
    muthu

  • Service accounts for the Workspace Database service permission Error while creating Tabular Mode from PowerPivot

    Hi All,
    Please help me out against this issue. I have spent so much (3 working days) time just figuring out what is the issue and its solution.
    I am learning Tabular Mode and trying to create a mode based on PowerPivot model. I am getting following error message:
    'The PowerPivot workbook could not be imported. The service account for the workspace database server does not have permission to read from the PowerPivot workbook.'
    Here is my infrastructure:
    1. SSAS in Tabular Mode is installed on my Windows 8 Laptop
    2. PowerPivot is also in my laptop
    3. There is only my account (as Admin of course) for SSAS
    Here are my questions:
    1. What is this error and how can I cope with that? A step by step explanation would be highly appreciated :-)
    2. Do I need to change something in Windows settings or in SSAS?
    3. I am confused about my workspace database server as well, Do I have to install SSAS twice; one for development and one for workspace?
     Looking forward for the expert advise.
    Tahir
    Thanks, TA

    Hi,
    I suspect you might have more luck if you try the SSAS forum: http://social.msdn.microsoft.com/Forums/sqlserver/en-US/home?forum=sqlanalysisservices
    Regards
    Jamie
    ObjectStorageHelper<T> – A WinRT utility for Windows 8 |
    http://sqlblog.com/blogs/jamie_thomson/ |
    @jamiet |
    About me

  • Condition Type appear twice in PO Header in Change mode

    Hi Gurus,
    I have done the following steps:
    1. I have created an import PO and added few Freight Conditions in the header, and Customs Condition in Line item
    2. I have booked a customs invoice against the PO. (MIRO posted for Planned Delivery Costs)
    3. Now when I go to the change mode of the PO, then in the header I can see same condition type twice, one with the value maintained earlier and another with value 0.
    Issue:
    I should not be seeing the condition type twice in header.
    Please help me resolve the issue as early as possible.
    Thanks in Advance.
    Regards,
    Ankush

    Hi Ankush,
    Make sure that header conditions are marked as header only and same for item condirions in m/06
    try creating a new PO after making these changes
    Reg
    Dheeraj

  • Delivery Output Type not updated automatically in change mode

    Hello,
    I am dealing with a strange problem.
    If i open delivery to change using VL02N then, output type configured for reissue is updated properly and on save ouput type is getting successfully processed also.
    Now if i open VL03N and then using change mode button on application toolbar i go to change of delivery, then output type is not getting created. The issue was figured out when i tried to open delivery from shipment and then using change button i tried to change and save delivery....
    Expectiing solution from experts.
    Thanks
    Hari

    Hi,
    May be this behaviour is due to the application in which you are opening the delivery. When you open the delivery from shipment, check the transaction code in the screen in system status. If it is VL03N, then it is correct. But if it is VT03N, then it is expected that even in change mode, the output is not triggered.  Pls check this once.
    I tried the same thing in an invoice from where i opened a SO and then went in change mode, and the otuput is getting retriggered.
    I hope teh configuration of your output is correct. Ensure that the Multiple Issuing button is ticked on, if you want yoru output type is to be triggered everytime you go in change mode.

  • Jump from Sales Order to Purchase Order and back again (all in change mode)

    Hi,
    Situation is this:
      - Sales Order is created with 10 items. 4 items are created with connection to Purchase Order.
      - User open Sales Order in change mode
      - User goes to item 20 that has a related Purchase Order
      - User wants to jump to related Purchase Order and make an update here
      - User wants to be able to jump back to Sales Order Item 20 from Purchase Order
    When user jumps to Purchase Order in change mode, then this Purchase Order will also block the same Sales Order, that was open. This can be handled with dequeue and enqueue.
    Problem is that when Purchase Order is saved it will make an update to the Sales Order in the background. When user jumps back to Sales Order then this Sales Order is still open with old data and these data does not reflect data that can have been updated by the Purchase Order.
    Also: When Purchase Order is making updates to the Sales Order then e.g. Message Out Table NAST is automatically updated (insert and delete records). If user then manually updates the Sales Order with old information, then System Dump appears as Sales Order tries to insert NAST records, that have already been inserted or delete NAST records that have already been deleted via the Purchase Order.
    This means that when user jumps back from Purchase Order to Sales Order Item 20 then Sales Order needs to be refreshed with new data after Purchase Order has saved the Sales Order.
    Are there any solution to do this in a standard way (from within SAPMV45A) ?  
    I prefer not to reopen Sales Order using syntax like CALL TRANSACTION.

    Hi,
    Thanks for reply.
    In third party PR gets created automatically but PO gets create manually.So changes get refelect in PR only not in PO.
    Can you give me the solution for completing this task.
    Thanks & Regards
    Jalaj garg

  • Change flag deactivaion for PO output message type during change mode

    Hello All,
    WE are using automatic message output determination functionality for PO output type. This output type has been configured for creation and change mode under Fine tuning.
    Two output type are configured, for example ZAAA is output type for ALE and output type ZBBB for  archiving.
    Here  archiving functionality is used to transfer attachment from ERP system to SUS supplier portal as a pdf file. This is done via enhancement and the attachment transfer is working fine.
    During creation mode both the output types are determined and successfully processed and as a result attachment is transferred to supplier portal which is absolutely correct. In the attachment all PO line item can be seen which works well.
    Now I change the PO and add a new PO line item, system automatically default both the output type for change mode and upon saving both the output type are successfully processed.
    Now here is the problem in change mode only the added PO line item is sent as an attachment to the supplier portal. Here the requirement is see all the PO line items including the once which were newly added.
    Solution is if we uncheck the change flag for output type ZBBB during change mode then all the PO line item can be seen under the new attachment with new version.
    Please let us know how this functionality can be acheived ... is there an user exit available.
    We have a work around where we are running a background job every 3 mins and based on the last successfully processed message for output type ZAAA we are attaching first output type ZBBBfor archiving the changes and then ZAAA for sending the changes along with attachment to Supplier portal.However this solution is a temporary one , we need a concrete solution for this.
    Please advise.
    Thanks,
    Yatin

    Hello All,
    Thanks for the reply,
    But we cannot modify the existing print program as this print program is being used in different countries also.
    We already know a solution that during change mode if we remove the change flag from output type ZBBB then all the PO line items along with the recent changes can be seen under the attachment under supplier portal.
    The question comes now, how do we automate this processu2026 Is there any standard progam or user exit available.
    Manually, if you add a message type ZBBB in ME22N tranasction for creation mode then all PO line item with recent changes get transferred but we need to automate this process for create and change PO transaction.
    Thanks,
    Yatendra

  • Sales Item's Qty is disabled in change mode (VA02) of Sales Order.

    Hi,
    1) We create Sales order (L2) from Service Order(DP90 tcode), system automatically selects 'LABOR HOURS' material, based on actual hours posted for a service order and adds this as 1st line item in Sales Order. When order is saved and we go back to VA02, we find that LABOR HOURS item is disabled, meaning we cannot change Qty but can only change Amount. The item is not billed yet.
    2) If we add 2nd line item with same 'LABOR HOURS'  material in change mode(VA02), Ssave and get back to VA02 again, this item is enabled. We want to make the 1st Line item's qty enabled so users can change the qty before creating billing document.
    Since the 1st line item is created from DP90 tcode, system does not allow us to change the Qty ? Any help is appreciated.
    Niranjan

    Hi Jelena,
    Thanks once again for your time and responding back.
    If you remember, I had mentioned that we are creating Sales order from DP90 tcode. We had created a custom screen(and tcode) called ZWIN where we had provided a button to create Sales order from Service Order using DP90 tcode. In this custom screen, we were calling BDC for DP90 and creating Sales order. On the same custom screen, we had given option where users could enter other materials. For these extra materials added, we were using BAPI 'BAPI_SALESORDER_CHANGE', to add these new materials. Here is how I fixed it.
    1) DP90 would have created sales order with Item 10 for LABOR HOURS.
    2) Then  'BAPI_SALESORDER_CHANGE' would have added any extra materials selected on Custom screen.
    3) While calling this BAPI, I deleted Item 10 with LABOR HOURS and added new Line Item 11 with same LABOR HOURS.
    Now when I get into VA02, I see that LABOR HOURS line is enabled, which means we can change Qty.
    This avoided deleting line item and adding same item in VA02 when there was a change in qty later.
    Thanks again.
    Niranjan

  • How to call structure in query change mode

    Hi Gurus,
    How to call created structure in query change mode?
    Is there any other methods?
    Thanks in advance
    Ramu

    HI Ramu,
    If ur structure is global then it will be available in the left panel in the structure tree, Just drag and drop into the rowns or colums. Make sure that the structure is saved as global.
    Thanks
    Khaja

  • ABAP Access Key for Table change mode MCVKUSR & MCVBAPUSR in SE11

    Dear All,
    I'm using SAP ECC6.0. I want to create a new database table in the dictionary to be used in my programs. I proceed in the following way:
    1.  I run the SE11 transaction
    2.  At the first entry I write the name of the table to be Change created ( Display mode Showing )
    3.  I click on the change button.
    4. It will ask for Access Key
    But then the system asks me an Access Key , where can I get this?
    I have SAP License Key.
    DB Table Name : MCVBAPUSR & MCVKUSR
    Please Let me know
    Thanks in advance,

    Dear ,
    I go to Service market Place site, from SSCR Tab then I have to select a object from the list is TABL.
    and enter the Particular Object & Table Name . Now I got it Access key for Particular Object.
    Thank you for your quick Response.
    Once again Thank u.
    Regards
    Thomas.T
    Edited by: thomas_raja on Jun 5, 2011 6:24 AM

  • WF_EXTSRV: use PDF Form in Change mode in Portal:

    Hai,
    I'am trying to use transaction WF_EXTSRV to generate a task which can be used within the UWL from the portal. The main purpose of this task is to show an exsisting PDF form in change mode. I allready found some nice information from SDN, but not enough to make it all work. I still have still these questions:
    1) How must I setup the required fields within transaction WF_EXTSRV when I want to generate for example this url:
    http://abc.abc.nl:51800/webdynpro/dispatcher/sap.com/pcui_gp~isr/IsrForm?SCENARIO=SPEG&MODE=CHANGE&NOTIF_NO=000600000003
    2) How must a then setup transaction SWFVISU? Which apllication and package name.
    I hope some can help me.
    Greetings,
    Remco

    Hi,
    When do you get this error ... "No scenario specified". ???
    I mean did you try creating an iview for IsrForm Java WD application sending the Scenario name as parameter?
    Betn us,
    Why dont you try the parameter IFV='P' for IsrFormApprove Java WD application itself. Get to know more about this parameter in these threads...
    Re: Buttons for ISR_APPROVE & ISR_PROCESS appearing in Workflow
    https://forums.sdn.sap.com/click.jspa?searchID=165819&messageID=1268222
    Regards,
    <i><b>Raja Sekhar</b></i>

  • How to verify when i change mode in form of standard?

    To All
             I want to know that how to coding if I change mode on screen Incoming Payment from "Add" mode to "OK" mode. I develop it using vb.net to catch event. This post I want to insert button into standard screen by in first time I created button but I disable it but I click "Last Data Record" in menu bar system will change to "OK" immediately. I want to know coding catch changing mode. example code as below

    Try
                If pVal.FormType = 170 And pVal.EventType <> SAPbouiCOM.BoEventTypes.et_FORM_UNLOAD And pVal.Before_Action = False Then
                    If pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_LOAD And pVal.Before_Action = False Then
                     Then
                        oForm = SBO_Application.Forms.Item(FormUID)
                        oItem = oForm.Items.Add("btnPrint", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
                        'Set Size and Location
                        oItem.Top = 432
                        oItem.Left = 160
                        oItem.Width = 60
                        oItem.Height = 22
                        oButton = oItem.Specific
                        oButton.Caption = "Print"
                        SBO_Application.MessageBox("Button was added")
                    End If
                End If
            Catch ex As Exception
                MsgBox(Err.Description)
            End Try

  • Unable to switch Central System Administration into Change Mode

    Hi,
    I am bit rusty on the Solution Manager - Central System Administration.
    While experimenting with my Solman system I did the following.
    1. Logged into Solman and started transaction Solution_Manager
    2. Switched to the Solution that has been configured and then followed Operations Setup->Solution Monitoring -> System Administration -> Central System Administration for <My System> (here my system is the system I wish to monitor).
    3. After following the navigation to the selected item as described in step 2, I selected the menu items Session Components->Complete.
    4. After this action of selecting the Complete session from the menu, my Central System Administration for <My System> is continuously showing Display Mode.
    I am unable to switch back the system to Change Mode.
    Am I missing something ? What needs to be done ?
    Regards,
    Siddhesh

    Siddhesh Ghag wrote:>
    >
    > 3. After following the navigation to the selected item as described in step 2, I selected the menu items Session Components->Complete.
    >
    > Regards,
    > Siddhesh
    This was the wrong step. By setting the Session Component to "Complete", no further changes are allowed (and you receive a pop-up).
    The procedure to reopen the session component is not documented for customers. Please create a customer message on SV-SMG-MON-CSA, open the service connection and provide logon information.
    You might state my name in the message, I will then assist the message processor.
    Best regards,
    Ruediger Stoecker

Maybe you are looking for

  • How many RAMs can i install into my macbook pro-13 inches?

    I'm considering to buy RAMs for my mac, originally there are two 2GB RAMs installed,is there only 2 plugs? Do i need to replace the original RAM or i can just add the new RAM into my mac?

  • Using Right-justified and left zero-filled condition in message mapping of

    Hi, My Interface is outbound Interface. Suppose source field named 'MobNumber' is mapped with Target field named 'MobileNumber'.Condition is AS IS(Right-justified and left zero-filled). How should i do this mapping? Thanks, Sanghamitra

  • Hiding subform in adobe form through javascript.

    Hi guys, I wanted to hide a subform through javascript. i want to make it visible only when the page no = 3. what is the syantax of javascript to do this. thanks in advance

  • ESXi Management not working with SG500 LAG

    I am setting up a 3 host ESXi cluster. I am using a pair of stacked SG500-28 switches for switching redundancy. Each host has 8 NICs. 4 to each switch. I have successfully setup a 3 NIC LAG with 1 path to one switch and 2 paths to the other. These LA

  • Simulate Mouse Click using AppleScript

    I want to simulate a mouse click using AppleScript. I used click button of window command but unfortunately it only simulates a half click in the sense that you see the button highlighted but the action is not activated. I used a command key function