Partner function updation

hi,
There is a BDC program for creating an outbound delivery.
it has to update the partner function field and few other fields. it works fine in sap and the shipment is complete.
But in the third party system the shipment is not complete.
the log shows an error message in partner function updation.
The partner fucntion used is 'SP' - Forwarding agent.
sy-subrc for the call transaction statement is coming as 1001.
Can anyone suggest me where the problem can be.

the screen where you enter partner involves Tablecontrol, so you need to take care of the tablecontrol. that is the reason it is giving the error.
Run it foreground mode, and see how it behaving at that particular partners screen.
I suspect it is not identifying the Tablecontrol fields where you insert the partner. it is because of your coding, you didn't handle the table control properly...

Similar Messages

  • Partner function update using CRM_PARTNER_MAINTAIN_SINGLE_OW

    Hi Experts,
    Can some one pls help me with some working code/sample to update a partner function value in CRM Order. I tried the below code but it doesnt seems to be working.
    Appreciate your help on this.
        call function 'CRM_ORDER_READ'
          exporting
            it_header_guid       = lt_guid
            iv_mode              = 'C'
          importing
            et_orderadm_h        = it_orderadm_h
          et_sales             = it_sales
          et_orderadm_i        = it_orderadm_i
          et_orgman            = it_orgman
          et_shipping          = it_shipping
          et_partner           = it_partner
          exceptions
            document_not_found   = 1
            error_occurred       = 2
            document_locked      = 3
            no_change_authority  = 4
            no_display_authority = 5
            no_change_allowed    = 6
            others               = 7.
        if sy-subrc <> 0.
    Implement suitable error handling here
        endif.
          clear wa_orderadm_h.
          read table it_orderadm_h into wa_orderadm_h index 1.
         lv_ref_guid = it_orderadm_h-guid.
          call function 'CRM_PARTNER_GET_CONTROL_INF_OW'
            exporting
              iv_ref_guid          = wa_orderadm_h-guid
              iv_ref_kind          = 'A'
            importing
              es_partner_control   = ls_partner_control
            exceptions
              determination_failed = 1
              others               = 2.
          if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          endif.
          move-corresponding ls_partner_control to es_partner_control.
    Common fields for both create and change *****
          import lv_qplant to lv_werks2 from memory id 'QUOTA_PLANT'.
          select single partner_no
            from crmm_locmap
            into w_partner
           where ext_locno = lv_werks2. "wa_quota_so_items_return-werks2.
    Partner_com parameter
          ls_partner_com-ref_guid = wa_orderadm_h-guid.
          ls_partner_com-ref_kind = 'A'.
          ls_partner_com-partner_no = w_partner.
          ls_partner_com-display_type = 'BP'.
          ls_partner_com-no_type = 'BP'.
    Find whether create or change is required
          read table gt_partner into wa_partner with key partner_fct = '00000035' ref_kind ='A'.
          if sy-subrc eq 0.
            ls_partner_com-kind_of_entry = 'C'.
            ls_partner_com-partner_fct = '00000035'.
            ls_ip_fields-fieldname = 'DISPLAY_TYPE'.
            append ls_ip_fields to lt_ip_fields.
            ls_ip_fields-fieldname = 'KIND_OF_ENTRY'.
            append ls_ip_fields to lt_ip_fields.
            ls_ip_fields-fieldname = 'NO_TYPE'.
            append ls_ip_fields to lt_ip_fields.
            ls_ip_fields-fieldname = 'PARTNER_FCT'.
            append ls_ip_fields to lt_ip_fields.
            ls_ip_fields-fieldname = 'PARTNER_NO'.
            append ls_ip_fields to lt_ip_fields.
            call function 'CRM_PARTNER_MAINTAIN_SINGLE_OW'
              exporting
                iv_ref_guid           = wa_orderadm_h-guid
                iv_ref_kind           = 'A'
                is_partner_com        = ls_partner_com
                iv_populate_mode      = 'X'
                iv_check_partner_only = ' '
                is_partner_control    = es_partner_control
                iv_external_call      = 'X'
              changing
                ct_input_field_names  = lt_ip_fields
              exceptions
                error_occurred        = 1
                others                = 2.
            if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
            endif.

    Reply to an old post but still can be helpful to someone in need
    *& Report  ZUPDATE_TRANSACTION_PF
    REPORT  zupdate_transaction_pf.
    *======================================================================*
    *  Variable declaration for ALV                                        *
    *======================================================================*
    TYPE-POOLS: slis.     " Type pool required for ALV
    TYPES: BEGIN OF gs_output,
              extid             TYPE ib_extid,
              prodid            TYPE comt_product_id,
              msg_type          TYPE bapi_mtype,
              message           TYPE bapi_msg,
              layout            TYPE slis_t_specialcol_alv,
           END OF gs_output.
    DATA: gt_output             TYPE TABLE OF gs_output,
          gs_output             TYPE gs_output,
          gt_fieldcat           TYPE slis_t_fieldcat_alv,
          gt_color_green        TYPE slis_t_specialcol_alv,
          gt_color_red          TYPE slis_t_specialcol_alv,
          gt_color_yellow       TYPE slis_t_specialcol_alv,
          gt_layout             TYPE slis_layout_alv,
          lt_header_guid        TYPE crmt_object_guid_tab,
          ls_header_guid        TYPE crmt_object_guid,
          lt_partner            TYPE crmt_partner_external_wrkt,
          ls_partner            TYPE crmt_partner_external_wrk,
          lt_guid               TYPE crmt_object_guid_tab,
          lt_guid_single        TYPE crmt_object_guid_tab,
          lt_req_obj            TYPE crmt_object_name_tab,
          ls_req_obj            TYPE crmt_object_name,
          lt_partner_update     TYPE crmt_partner_comt,
          lt_partner_com        TYPE crmt_partner_comt,
          ls_partner_com        TYPE crmt_partner_com,
          lt_input_fields       TYPE crmt_input_field_names_tab,
          ls_input_fields       TYPE crmt_input_field_names,
          lv_partner_fct        TYPE crmt_partner_fct,
          lv_partner_no         TYPE bu_partner,
          lv_trans_no           TYPE crmt_object_id_db,
          lt_return             TYPE STANDARD TABLE OF ddshretval,
          ls_return             LIKE LINE OF lt_return,
          lv_guid               TYPE crmt_object_guid.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE block1.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT (36) forpf.
    PARAMETERS: p_pf TYPE comt_partner_fct OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT (36) frombp.
    PARAMETERS: p_frombp TYPE but000-partner  OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT (36) tobp.
    PARAMETERS: p_tobp TYPE but000-partner OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT (36) fortrans.
    SELECT-OPTIONS: p_trans FOR lv_trans_no MATCHCODE OBJECT crm_order_object_id.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE block2.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT (36) fortest.
    PARAMETERS: p_test AS CHECKBOX.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK b2.
    INITIALIZATION.
      fortrans = 'Transaction Number'.
      forpf = 'Partner Function'.
      frombp = 'From Business Partner'.
      tobp = 'To Business Partner'.
      fortest = 'Test Run, Check Only'.
    *======================================================================*
    *  AT SELECTION-SCREEN                                                 *
    *======================================================================*
    AT SELECTION-SCREEN.
      FIELD-SYMBOLS:
        <sscrfields> TYPE sscrfields.
      DATA:
      lv_answer   TYPE char1,
      lt_options  TYPE TABLE OF rfc_db_opt,
      lt_fields   TYPE TABLE OF rfc_db_fld,
      lt_func_det TYPE TABLE OF tab512.
      CHECK sy-ucomm EQ 'ONLI'.
    AT SELECTION-SCREEN ON p_trans.
      CHECK sy-ucomm EQ 'ONLI' OR sy-ucomm EQ 'SJOB'.
      IF p_trans IS INITIAL.
        MESSAGE e398(00) WITH 'Please enter the transaction numbers'.
      ENDIF.
    AT SELECTION-SCREEN ON p_pf.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_pf.
      CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
        EXPORTING
          tabname           = 'CRMC_PARTNER_FT'
          fieldname         = 'PARTNER_FCT'
        TABLES
          return_tab        = lt_return[]
        EXCEPTIONS
          field_not_found   = 1
          no_help_for_field = 2
          inconsistent_help = 3
          no_values_found   = 4
          OTHERS            = 5.
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      IF lt_return[] IS NOT INITIAL.
        READ TABLE lt_return[] INTO ls_return INDEX 1.
        p_pf = ls_return-fieldval.
      ENDIF.
      CHECK sy-ucomm EQ 'ONLI' OR sy-ucomm EQ 'SJOB'.
      IF p_pf IS INITIAL.
        MESSAGE e398(00) WITH 'Please enter the partner function'.
      ENDIF.
    AT SELECTION-SCREEN ON p_frombp.
      CHECK sy-ucomm EQ 'ONLI' OR sy-ucomm EQ 'SJOB'.
      IF p_frombp IS INITIAL.
        MESSAGE e398(00) WITH 'Please enter the business partner id to be changed'.
      ENDIF.
    AT SELECTION-SCREEN ON p_tobp.
      CHECK sy-ucomm EQ 'ONLI' OR sy-ucomm EQ 'SJOB'.
      IF p_tobp IS INITIAL.
        MESSAGE e398(00) WITH 'Please enter the new business partner id'.
      ENDIF.
    *======================================================================*
    *  START-OF-SELECTION                                                  *
    *======================================================================*
    START-OF-SELECTION.
      PERFORM init_alv_col_color.
      PERFORM update_transactions.
    END-OF-SELECTION.
      PERFORM create_report.
    *&      Form  create_fieldcat
    *       text
    FORM create_fieldcat.
      PERFORM add_fld USING: 'EXTID'     'Order ID'        '20' 1,
                             'PRODID'    'Product ID'         '20' 2,
                             'MSG_TYPE'  'MSG Type'            '8'  9,
                             'MESSAGE'   'Message Description' '100' 10.
    ENDFORM.                    "CREATE_FIELDCAT
    *&      Form  add_fld
    *       text
    *      -->P_FIELDNAME  text
    *      -->P_SELTEXT_M  text
    *      -->P_OUTPUTLEN  text
    *      -->P_COL_POS    text
    FORM add_fld USING p_fieldname
                       p_seltext_m
                       p_outputlen
                       p_col_pos.
      DATA: ls_fieldcat TYPE slis_fieldcat_alv.
      CLEAR ls_fieldcat.
      ls_fieldcat-fieldname     = p_fieldname.
      ls_fieldcat-ref_fieldname = p_fieldname.
      ls_fieldcat-seltext_m     = p_seltext_m.
      ls_fieldcat-outputlen     = p_outputlen.
      ls_fieldcat-col_pos       = p_col_pos.
      APPEND ls_fieldcat TO gt_fieldcat.
    ENDFORM.                    "add_fld
    *&      Form  create_report
    *       text
    FORM create_report.
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
        EXPORTING
          text = 'Creating output ...'.
    * Get the field headers into an internal table
      PERFORM create_fieldcat.
      gt_layout-coltab_fieldname = 'LAYOUT'.
      gt_layout-colwidth_optimize = 'X'.
      gt_layout-zebra = ' '.
    * Call ABAP/4 Grid Viewer
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_top_of_page = 'TOP-OF-PAGE'
          i_callback_program     = sy-repid
          it_fieldcat            = gt_fieldcat[]
          is_layout              = gt_layout
        TABLES
          t_outtab               = gt_output  " it_sort = gt_sort
        EXCEPTIONS
          program_error          = 1
          OTHERS                 = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    " create_report
    *&      Form  init_alv_col_color
    *       text
    FORM init_alv_col_color.
    * Red ALV column
      PERFORM add_field_color USING gt_color_red 'MSG_TYPE' '6' '1' '1'.
      PERFORM add_field_color USING gt_color_red 'MESSAGE' '6' '1' '1'.
    * Green ALV column
      PERFORM add_field_color USING gt_color_green 'MSG_TYPE' '5' '1' '1'.
      PERFORM add_field_color USING gt_color_green 'MESSAGE' '5' '1' '1'.
    * Yellow ALV column
      PERFORM add_field_color USING gt_color_yellow 'MSG_TYPE' '3' '1' '1'.
      PERFORM add_field_color USING gt_color_yellow 'MESSAGE' '3' '1' '1'.
    ENDFORM.                    "init_alv_col_color
    *&      Form  add_field_color
    *       text
    *      -->PT_COLOR   text
    *      -->FIELDNAME  text
    *      -->COL        text
    *      -->INT        text
    *      -->INV        text
    FORM add_field_color USING pt_color TYPE slis_t_specialcol_alv
                               fieldname col int inv.
      DATA: ls_color TYPE slis_specialcol_alv.
      ls_color-fieldname = fieldname.
      ls_color-color-col = col.
      ls_color-color-int = int.
      ls_color-color-inv = inv.
      APPEND ls_color TO pt_color.
    ENDFORM.                    "add_field_color
    * Form  TOP-OF-PAGE                                                 *
    * ALV Report Header                                                 *
    FORM top-of-page.
    *ALV Header declarations
      DATA: t_header TYPE slis_t_listheader,
            wa_header TYPE slis_listheader,
            t_line LIKE wa_header-info,
            ld_lines TYPE i,
            ld_linesc(10) TYPE c.
    * Title
      wa_header-typ  = 'H'.
      wa_header-info = 'Data Migration'.
      APPEND wa_header TO t_header.
      CLEAR wa_header.
    * Date
      wa_header-typ  = 'S'.
      wa_header-key = 'Date: '.
      CONCATENATE  sy-datum+6(2) '.'
                   sy-datum+4(2) '.'
                   sy-datum(4) INTO wa_header-info.   "todays date
      APPEND wa_header TO t_header.
      CLEAR: wa_header.
    * Time
      wa_header-typ  = 'S'.
      wa_header-key  = 'Time: '.
      CONCATENATE  sy-uzeit(2) ':'
                   sy-uzeit+2(2) ':'
                   sy-uzeit+4(2) INTO wa_header-info.   "time
      APPEND wa_header TO t_header.
      CLEAR: wa_header.
    * File Path
      wa_header-typ  = 'S'.
      wa_header-key  = 'File Path: '.
      wa_header-info = ''.
      APPEND wa_header TO t_header.
      CLEAR: wa_header.
    * Test Mode
      wa_header-typ  = 'S'.
      wa_header-key  = 'Test Mode: '.
      IF p_test = 'X'.
        wa_header-info = 'Yes'.
      ENDIF.
      APPEND wa_header TO t_header.
      CLEAR: wa_header.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = t_header.
    ENDFORM.                    "top-of-page
    *&      Form  UPDATE_TRANSACTIONS
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM update_transactions .
      SELECT guid INTO TABLE lt_header_guid FROM crmd_orderadm_h WHERE object_id IN p_trans.
      IF sy-subrc EQ 0.
        LOOP AT lt_header_guid INTO ls_header_guid.
          CLEAR: lt_guid, lt_req_obj, lt_partner, lt_input_fields.
          ls_req_obj = 'PARTNER'.
          APPEND ls_req_obj TO lt_req_obj.
          APPEND ls_header_guid TO lt_guid.
          CALL FUNCTION 'CRM_ORDER_READ'
            EXPORTING
              it_header_guid       = lt_guid
              it_requested_objects = lt_req_obj
            IMPORTING
              et_partner           = lt_partner
            EXCEPTIONS
              document_not_found   = 1
              error_occurred       = 2
              document_locked      = 3
              no_change_authority  = 4
              no_display_authority = 5
              no_change_allowed    = 6
              OTHERS               = 7.
          lv_partner_fct = p_pf.
          lv_partner_no = p_frombp.
          SHIFT p_frombp LEFT DELETING LEADING '0'.
          READ TABLE lt_partner INTO ls_partner WITH KEY partner_fct = p_pf partner_no = p_frombp.
          IF sy-subrc EQ 0.
            LOOP AT lt_partner INTO ls_partner WHERE partner_fct = p_pf AND partner_no = p_frombp.
              lv_partner_no = p_tobp.
              CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
                EXPORTING
                  input  = lv_partner_no
                IMPORTING
                  output = lv_partner_no.
              REFRESH lt_input_fields.
              CLEAR   ls_partner_com.
              ls_partner_com-ref_guid     = ls_partner-ref_guid.
              ls_partner_com-ref_kind     = ls_partner-ref_kind.
              ls_partner_com-ref_partner_handle = ls_partner-ref_partner_handle.
              ls_partner_com-kind_of_entry = 'C'.
              ls_partner_com-partner_fct  = ls_partner-partner_fct.
              ls_partner_com-partner_no   = lv_partner_no.
              ls_partner_com-display_type = 'BP'.
              ls_partner_com-no_type      = 'BP'.
              ls_partner_com-ref_partner_no = ls_partner-ref_partner_no.
              ls_partner_com-ref_partner_fct = ls_partner-ref_partner_fct.
              ls_partner_com-ref_no_type     

  • How to update partner functions in customer master

    Hi all,
    I want to update the partner functions for the customer master using transaction code XD02. I created the LSMW by means of recording but it doesn't work because the partner functions for the customer changes.
    for example , certain customers have shipto paty, sold to party , bill to party payer and forwarding agent. some customers wont have all the above mentioned category.they may have only ship to party, sold to paty & bill to party.
    Is there any other alternative way to update the partner functions for the customer. 
    Regards,
    A.Rathinaprakash

    Hi A.Rathinaprakash,
    Please use the FM 'SD_CUSTOMER_MAINTAIN_ALL' to maintain the partner functions in the customer.
    Pass the partner details in the TABLES parameter T_XKNVP.
    Regards
    Chetan

  • Update partner function in KNVP table using FM sd_customer-maintain_all

    Hi All,
    I have to update Partner Function ‘PARVW’  in KNVP table using FM sd_customer_maintain_all.
    I had already created a BDC program for updating which is running successfully.
    But  my requirement is to create a BAPI using FM customermaintain_all.
    Ex:  Tcode VD02
              KUNNR          PARVW             KUNN2
    Old data      123          Z1          70006666
              123          Z2          70007777
    Req. output      123          Z1          70006666
              123          Z1          70007777
    PARVW ‘Z2’  should not exist after updation.
    When updating, I am getting the error message to my inbox as
    “ Error Info...   F2 802: System error in table KNVP ”
    The above error is triggered while committing work after execution of  ‘SD_CUSTOMER_MAINTAIN_ALL’.
    The options I tried while looping at internal table containing kunnr, parvw & kunn2
    CALL FUNCTION 'SD_CUSTOMER_MAINTAIN_ALL'
    EXPORTING
        I_KNA1                              = w_kna1
      I_KNB1                              =
        I_KNVV                              = w_knvv
      I_BAPIADDR1                         =
      I_BAPIADDR2                         =
      I_MAINTAIN_ADDRESS_BY_KNA1          = ' '
      I_KNB1_REFERENCE                    = ' '
      I_FORCE_EXTERNAL_NUMBER_RANGE       = ' '
      I_NO_BANK_MASTER_UPDATE             = ' '
      I_CUSTOMER_IS_CONSUMER              = ' '
      I_RAISE_NO_BTE                      = ' '
        PI_POSTFLAG                         = 'X'
      PI_CAM_CHANGED                      = ' '
      PI_ADD_ON_DATA                      =
      I_FROM_CUSTOMERMASTER               = ' '
    IMPORTING
      E_KUNNR                             =
      O_KNA1                              =
      E_SD_CUST_1321_DONE                 =
    TABLES
      T_XKNAS                             =
      T_XKNBK                             =
      T_XKNB5                             =
      T_XKNEX                             =
      T_XKNVA                             =
      T_XKNVD                             =
      T_XKNVI                             =
      T_XKNVK                             =
      T_XKNVL                             =
        T_XKNVP                             = I_XKNVP
      T_XKNZA                             =
      T_YKNAS                             =
      T_YKNBK                             =
      T_YKNB5                             =
      T_YKNEX                             =
      T_YKNVA                             =
      T_YKNVD                             =
      T_YKNVI                             =
      T_YKNVK                             =
      T_YKNVL                             =
        T_YKNVP                             = i_yknvp ***
      T_YKNZA                             =
      T_UPD_TXT                           =
    EXCEPTIONS
        CLIENT_ERROR                        = 1
      KNA1_INCOMPLETE                     = 2
      KNB1_INCOMPLETE                     = 3
      KNB5_INCOMPLETE                     = 4
      KNVV_INCOMPLETE                     = 5
      KUNNR_NOT_UNIQUE                    = 6
      SALES_AREA_NOT_UNIQUE               = 7
      SALES_AREA_NOT_VALID                = 8
      INSERT_UPDATE_CONFLICT              = 9
      NUMBER_ASSIGNMENT_ERROR             = 10
      NUMBER_NOT_IN_RANGE                 = 11
      NUMBER_RANGE_NOT_EXTERN             = 12
      NUMBER_RANGE_NOT_INTERN             = 13
      ACCOUNT_GROUP_NOT_VALID             = 14
      PARNR_INVALID                       = 15
      BANK_ADDRESS_INVALID                = 16
      TAX_DATA_NOT_VALID                  = 17
      NO_AUTHORITY                        = 18
      COMPANY_CODE_NOT_UNIQUE             = 19
      DUNNING_DATA_NOT_VALID              = 20
      KNB1_REFERENCE_INVALID              = 21
      CAM_ERROR                           = 22
        OTHERS                              = 23.
    IF sy-subrc eq ‘0’.
    Commit work and wait.
    Endif.
    All above tables have a field called ‘KZ’ which has options
    U-update
    D-delete
    I-insert
    E-………(I don’t know)
    Ex: T_XKNVP structure = KNVP Structure + Field ‘KZ’.
    Documentation for this FM is not Available in English or German
    1.  I tried sending Z2  KZ as ‘D’ first &  Z1 with KZ as ‘I’ with business partner of Z2 (KUNN2)
         as single update.
    Ex: T_XKNP table
    KUNNR          PARVW             KUNN2          KZ
    123          Z2          70007777     D
    123          Z1          70007777     I
    2.  I tried it as a separate delete record and insert record i.e calling the FM twice .
    3.  I tried passing table  T_YKNVP with old partner data + TXKNVP table new partner data
    Ex: T_YKNP table
    KUNNR          PARVW             KUNN2          KZ
    123          Z2          70007777     U or space (I tried both one after another)
    4. All combinations for field ‘KZ’  are tried.
    Please help me to overcome this problem.
    I )   I need which parameters are to be passed to FM for updating partner function in KNVP table .
    II)   Do I need to pass structure I_KNA1 or I_KNVV to FM ? (Blank or with values corresponding to   
         partner function ).
    III)  Any sample code which can guide me.
    Even a small hint or clue from you will certainly help me.
    Thanks in Advance.
    AJAX

    i have the same problem. I need to update the partner function PARVW thru a program that i created. I tried to use this FM but it didn't work. Anyone knows another FM that i can use to update the KNVP table?

  • How to update partner function in PO.

    Hi guys,
      Please help me, How to update partner function in PO.(Transaction ME23N),BAPI_PO_CHANGE is not updating this.it gives error like partner roles not change.

    DATA :  li_return         TYPE TABLE OF bapiret2 WITH HEADER LINE,
                 li_popartner    TYPE TABLE OF bapiekkop WITH HEADER LINE,
                 lv_error           TYPE  FLAG  .
    li_popartner-partnerdesc = X1.
      li_popartner-langu       = sy-langu.
      li_popartner-buspartno   = 'vendor1'.
      APPEND li_popartner.
      CALL FUNCTION 'BAPI_PO_CHANGE'
        EXPORTING
          purchaseorder = ebeln
        TABLES
          return        = li_return
          popartner     = li_popartner.
      LOOP AT li_return.
        WRITE / li_return-message.
    Check error
        IF li_return-type = lc_E OR li_return-type = lc_A.
          lv_error = 'X'.
        ENDIF.
      ENDLOOP.
      IF lv_error IS INITIAL.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
      ENDIF.
    Is there any config issues are there And also I am going to pass any values .
    HI,
      How to update the confirmation tab in PO item level.
    I write this code tell me i am going to pass any values or not.
    DATA:
        li_ekes               TYPE STANDARD TABLE OF uekes .
      CALL FUNCTION 'ME_CONFIRMATION_UPDATE'
                          EXPORTING
                            I_EBELN = lwa_z1confirmations-ebeln
                          TABLES
                            XEKES   = li_ekes.
                        IF sy-subrc EQ 0.
                        ENDIF.

  • How to update partner function in ME_PROCESS_PO_CUST

    Hi,
    does anyone know how to update the partner function in PO? transaction ME22N or ME21N.
    I have checked the BADI ME_PROCESS_PO_CUST and there is no way for me to set the partner.. there is a method get_partners but i didn't find a way to set it..
    I cannot just modify the table EKPA since when creating PO, there is no PO number yet.
    Can anyone help? Please.
    Thanks

    Hi Esaki,
    1) Define new field selection in configuration "Define screen layout at Document level"
    2) write code in fieldselection_item_refkeys as follow
    get item data
    if your condition
      ch_key0 = new field selection
    endif
    Hope it can help u.
    Grace

  • Updating partner function when creating customer XD01/XD02

    Hello all, I have the following requirement to do:
    When creating a customer for a certain account group in XD01/XD02, I need to update the partner functions associated to this customer.
    I have tried, the ENHACEMENT  SAPMF02D with function EXIT_SAPMF02D_001, but when changing table content T_KNVP, this content is not taken into account and the values are not stored in DB.
    I have tried too BADI's CUSTOMER_ADD_DATA and CUSTOMER_ADD_DATA_CS, but the content of T_KNVP in CUSTOMER_ADD_DATA cannot be changed.
    I would like to avoid BTE's for now.
    Can someone give me a hand on this?
    Thanks in advance!

    Solution: BAPI CUSTOMER_UPDATE

  • Problem in update PO's partner function using BAPI_PO_CHANGE

    Hi All,
    I have some problem when i try to update PO partner function using BAPI_PO_CHANGE.
    If i update partner function where business partner number is vendor (eg. GS) , it run successfully. But when I try to update partner function where business partner number is personnel number (eg. CS, VW, etc) , it was failed. And BAPI return message is "Please enter a partner role".
    Please advice.
    Thanks

    Hi,
             are you executing BAPI_TRANSACTION_COMMIT after BAPI_PO_CHANGE?
    Check this code for PO update..
    PARAMETERS: p_ebeln LIKE ekko-ebeln.
    DATA: t_poitem LIKE bapimepoitem OCCURS 0 WITH HEADER LINE.
    DATA: t_poitemx LIKE bapimepoitemx OCCURS 0 WITH HEADER LINE.
    DATA: t_return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
    t_poitem-po_item = '00010'.
    t_poitem-net_price = '17.00'.
    APPEND t_poitem.
    t_poitemx-po_item = '00010'.
    t_poitemx-net_price = 'X'.
    t_poitemx-po_itemx = 'X'.
    APPEND t_poitemx.
    CALL FUNCTION 'BAPI_PO_CHANGE'
    EXPORTING
    purchaseorder = p_ebeln
    TABLES
    return = t_return
    poitem = t_poitem
    poitemx = t_poitemx.
    COMMIT WORK.
    <b>Reward points</b>
    Regards

  • Regarding sample code to update partner function using SD_PARTNER_UPDATE

    Hi All,
    Please provide some sample code to update/add partner function using FM 'SD_PARTNER_UPDATE'.
    regards
    Vishnu

    A better option would be to use a break point on this FM while creating a sales order. That way you will know how standard uses this FM.
    Thanks,
    Vikram.M

  • Updating and deleting Partner functions for functional location

    Hi ,
    I am having a requirement of updating and deleting partner function for functional location .
    If anyone can suggest some BAPI or function module for same .
    Thanks n Regards
    Manik

    Hi Fritz,
    Thank you for your response,
    My need is to create a PARTNERS for the FUNCTIONAL LOCATION.
    LET ME DESCRIBE IT.
    WHEN I AM CREATING A FUNCTION LOCATION USING IL01, AS I ENTER A FUNCTIONAL LOCATION AND PRESS ENTER IN THE NEXT SCREEN.
    AND
    I NEED TO ENTER THE PARTNERS FROM THE DROP DROWN MENU  GOTO ->PARTNERS
    WHICH TAKES ME TO THE NEXT SCREEN WHERE I NEED TO FILL THE INFORMATION IN THE TWO FIELDS : FUNCT & PARTNER.
    I need a partner for the functional location that i mentioned above.and i need to upload that information in through Emigall.
    So my query was that can we customize that partner for this functional location and if yes, what should the constraints,
    what are steps required? Do we require a custom service module?
    Regards,
    Robert.

  • Short Dump 'ASSERTION_FAILED' during updating partner Functions

    Hi All,
    I am updating the Partner Functions for the Customers using FM 'SD_CUSTOMER_MAINTAIN_ALL' and passing the partner functions and numbers to the XKNVP structure.
    while running the program in am getting the short dump as ASSERTION_FAILED.
    Detailed Description:
    In the running application program, the ASSERT statement recognized a situation that should not have occurred.
    The runtime error was triggered for one of these reasons:
    - For the checkpoint group specified with the ASSERT statement, the   activation mode is set to "abort".
    - Via a system variant, the activation mode is globally set to "abort" for checkpoint groups in this system.
    - The activation mode is set to "abort" on program level.
    - The ASSERT statement is not assigned to any checkpoint group.
    The Dump is occuring in the method 'get_cvic_cust_to_bp1_line'.
    We have searched for a relevant SAP note but could not find any.
    can any one please help to solve this issue?
    Helpful answer will surely be rewarded.
    Thanks in Advance,
    Asif Ali Khan

    When you are (absolutely) sure you are using this function module in the correct way, only then opening a message for SAP is liable. However, most of the times this happens because not all (or all) parameters are not provided for the FM to work properly, or what ever reason that may be.
    It might be helpful to determine the checkpoint group and have a look at the log in transaction SAAB. This might give you a clue as to where the problems lies.

  • Rule Modeler, Order Routing -  Partner function to update ?

    Hi,
    I have configured order routing in rule modeler based on categories to determine the org unit to which the order should get routed too.
    On execution, the partner function 'SLFN0003 - Support Team' gets changed to the BP for the org unit.
    My question is - I cannot find any link between Order routing and Partner function SLFN0003 - How does the system know that it needs to update this partner fucntion only ?
    If I create my own Z Parnter function, how can I get the order routing to change this partner function type ?
    Any help will be appriciated.
    Thanks,
    Raj

    Solution: Problem solved. Error was the name of the attribute. It has to be POST_CODE1_IB
    and not ZPOST_CODE1_IB.

  • Update partner function before saving Customer (XD01/XD02)

    Hello Experts,
           I need to update my partner function table in Sales Area Data of Customer Master (XD01/XD02)
    before saving the customer. Is there any exit where I can do that.
           I tried using Enhancement SAPMF02D. Exit - EXIT_SAPMF02D_001. Where I modified the table T_KNVP. But, it again defaults to its original value.
    Any help is appreaciated.
    Regards,
    DNP

    I rephrase the question -
    I can do an update after a Customer is created but is it possible to trigger a program everytime after a Customer(XD01/XD02) is being created.
    Regards,
    DNP

  • Scheduled update of partners to site customers (KNVP partner functions)

    Hello all
    We have a need to change customer master partner function so that the definion of the needed changes is done in beforehand but the actual updating of change sis done on a certain time. The reason for this is that the amount of needed changes is huge and the updating of changes should be done at a certain moment.
    Do you know if there is some standard way in SAP to do the update of partners of site customers scheduled?
    Thanks for you help.
    Best regards
    Seija

    Hello all
    There is a transaction/program for "mass activation of planned changes for vendor (RMCHACTB and RSBDCSUB Batch Input: Process All Sessions).  I wonder if the same kind of tool exists also for planned changes for customer.
    We have a need to change customer master partner function so that the definion of the needed changes is done in beforehand but the actual updating of change iis done on a certain time. The reason for this is that the amount of needed changes is huge and the updating of changes should be done at a certain moment.
    Do you know if there is some standard way in SAP to do the update of partners of site customers scheduled?
    Thanks for you help.
    Best regards
    Seija

  • BAPI_EQUI_CHANGE - Update Partner Function

    Hello,
    We are trying to update equipment partner function by using BAPI_EQUI_CHANGE, but its not happening.
    Please provide your valuable inputs on this.
    Thanks,
    Amit.

    Hi,
    I think these will work for your scenario,
    BAPI_BPCONTACT_CHANGE
    SD_SALES_PARTNER_MAINTAIN.
    Regards,
    Ravi shankar

Maybe you are looking for

  • Windows Vista Home Premium 64bit - Not syncing media

    I'm migrating myself from an HP laptop that will sync my Centro contact/addresses/media etc.  The HP runs XP Pro.  I'm moving to a Sony which runs  Windows Vista Home.  And I am able to sync most everything but the media.  None of my pictures/video o

  • My iPod Touch 4th generation's screen is still white. Could somebody please help me?

    My iPod touch currently has iOS 5.1.1. When I was about to use my iPod touch for music yesterday (05/30/12), I saw my iPod touch's screen was pure blank. The only sound my iPod touch makes is the voice control and there were no open apps. Also, there

  • N500 4233 NOTEBOOK no wifi after reinstalli​ng vista

    Today morning i've format my system and reinstall windows vista on my N500 notebook, after trying windows 7 (it was too slow so...) but now i can't get my WIFI work! tried everything from drivers to power managment, the switch in the front, the BIOS

  • Convert to AS 3.0

    hi , what this my AS2.0 code in AS3.0 ? //----------------------------------------------------------AS 2.0 var rb=400; var lb=0; var bb=370; var tb=0; function onMouseDown():Void var xm:Number = _xmouse; var ym:Number = _ymouse; if( xm >= rb){ xm = r

  • Mac and S3 Mail Trash and Sent items separated

    Hi Guys, I recently moved away from my iPhone and am trialing a Galaxy S3. After a lot of difficulty, I set up my .mac email on the S3 and all seemed to be working well. But Mail on my Mac now has separate Sent and Trash Folders under iCloud, which o