Function Module to assign contact person to account

Hello,
is there a standard function module which can be used to create the relationship between existing contact persons to an existing account?
Thank you very much.
Kind regards
Manfred

Hi Manfred,
The simplest call to that BAPI can be done like this:
CALL FUNCTION 'BAPI_BUPR_CONTP_CREATE'
  EXPORTING
    businesspartner = <partner_number>
    contactperson   = <contact_person_number>.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
This will connect a business partner with an existing contact person.
You only need to field the other fields if you want to add more details to that relationship, like default relationship setting, telephone number or email, but that only depends of you purposes.
Kind regards,
Garcia

Similar Messages

  • Function module for assigning BP Number to the Postion ID in org model

    Hi Experts,
    Is there any function module for assigning BP Number to the Postion ID in organizational model.
    The requirement is:
    1)There are some employees which are reporting to a Manager who has a position ID.
    2) Each of these employees should be assigned to the given position ID.
    This can be done by First Locate the BP Record in SAP via the Vantive Person ID  and retrieve the SAP BP Number.
    <b>Then assign the SAP BP Number found to the Position ID.</b>
    My question is <b>Is there any function module for assigning BP Number to the Postion ID .</b>
    Looking forward for reply.
    Thanks & Regards,
    Renju.

    Hi,
       Org. management uses API classe objects with static methods as APIs. You may be able to achieve this using
    CL_CRM_ORGMAN_SERVICES->MAPPING_ORGUNIT_TO_BP
    Reward if helpful!
    Regards,
    Sudipta.

  • How to assign contact person with user id to vendor via upload

    Dear All,
    We have successfully uploaded external business partner (Vendor) from ECC6 to SRM5.0  via BBPGETVD. So vendor is available in PPOMV_BBP.
    Now we would like to assign the contact person with user ID to this vendor so that he can logon to our system and update Bid.
    If we create contact person (employee) via "Manage Business Partner", system provides the option to create contact person and User ID under "Employee for Business Partner".
    But we can create contact person one by one, if our client have 600 vendors from ECC and already transferred to SRM.
    How to rapidly create and assign contact person to all vendors ?
    Who have any ideas for upload via text file or excel sheet please advice me.
    Best Regards,
    Theerat.

    Hello Theerat,
    Try these FM
    BBP_CREATE_CONTACT_PERSON
    BBP_CREATE_CONTACT_USER
    muthu
    Edited by: Muthuraman Govindasamy on Oct 7, 2008 9:16 AM

  • Function module for assigning a HU to delivery

    Function module for assigning a HU in HU managed location to a delivery ??

    Hello,
    In FuGrp HU_BASIC_BAPIS               Basic BAPIs for Hus
    with F’tn BAPI_HU_CREATE  Create handling unit with items
    this creates HU's NOT yet assigned.
    After F'tn BAPI_TRANSACTION_COMMIT
    You can assign the HU via
    F'tn BAPI_HU_CHANGE_HEADER
    using the BAPIHUHEADER fields: PACK_MAT_OBJECT & PACK_MAT_OBJ_KEY.
    Dirk

  • Function module was assigned to 4tmp package

    Hello all,
    I have created XML-DataSource with SOAP Connection in our BW development system.
    In this regard the system created a function module to receive data via XI. This function modul was assigned to the package $tmp and it is not possible to transport this FM into production system.
    When I try to re-assign the package to our designated develop package an error message appears, which says I have to use a package which starts with /BI0/.
    Any idea how can I transport this function module. That would be great.
    Thanks upfront and Best regards,
    Stefanos from Munich/Germany

    hi Stefanos,
    try to transport the datasource/infosource to target system and check if the function module is generated there.
    hope this helps.

  • ABAP program/Function module to assign the roles in SU01

    Hi,
    Is there any ABAP program/function module to assign the roles in SU01. And program/function module which does all teh SU01 related activities.
    Thanks and Regards,
    Rashmi

    Hello,
    Check the function modules that start with BAPI_USER*
    To assign roles :
    BAPI_USER_ACTGROUPS_ASSIGN
    To assign profiles :
    BAPI_USER_PROFILES_ASSIGN
    To change user's metadata (name, settings, ... other SU01 functions) :
    BAPI_USER_CHANGE
    Success.
    Wim

  • Combined reports: activities and contact person related accounts

    Hello,
    I created a combined report that should show following things:
    Appointment data, all Related Users, all Related Contact Persons and the companies which are assigned to the Contact Persons (not the Appointment-related-Company!)
    I combined it by Activities and shared activities area. To get the account information I combined it also with contact person area.
    Now I have following problems:
    1. The accounts are not displayed in the same line as the rest of the informations. They are only under the Activity Informations and I don't know how to link these informations.
    2. One row is user and the second row is contact. If I have an activity with more contacts and more users, I get every contact shown for every user (some kind of douplicates). How can I solve this Problem?
    3. I need this report as a Pivot-Table, grouped by day. When I do this and put contact and user into the measures area I have no possibility to see more than one Contact/user per activity. Is there any way to measure text?

    Can anyone please help in solving this issue..

  • Function Module for getting opportunity linked to accounts

    Hi All,
    Can some one help me in providing the FM that gives the opportunities linked to a business partner(Accounts). I have found that this can be achieved by querying Database tables on CRMD_PARTNER, CRM_ORDERADM_H, CRMD_LINK,BUT000 Tables. This seems to be very complicated joins. Looking for any FM that can help me for this requirement.
    Thanks,
    Eureka

    Hi,
    Since Opportunity is a One Order Object in CRM, you can use the function module CRM_ORDER_READ to read the opportunity. Here you will have all the partners associated to it will be available in the ET_PARTNER table. From there if you need further details then you can query the Business Partner Object and will get the BP details.
    You can use the CRM ORDERMAINTAIN to update a One Order Object.
    Hope this will help.
    Thanks,
    Samantak.

  • CRM Tables or Function Module in SAP CRM related Contract Account ot MPAN no.

    Hi Team,
    Could you please tell me  Any table or Function Module in CRM which is related to Contract Accont or MPAN Number( ISU).
    My Query is- Just I want to confirm that Data are exist in CRM system on the  basis of Contract Account or MPAN Number.
    Regards,
    Arif 

    Hi Mohd,
    Table for Contract Account in CRM is Business Agreement Table CRMM_BUAG & CRMM_BUAG_H
    To get the BP linkage CRMV_BUAG_ATTR
    Regards,
    Naresh

  • Is there any function module to assign Object to Transport request (Task)?

    Hi There,
    My requirement is to assign an object to desired task of the transport request. I found one FM called TR_EXT_INSERT_IN_REQUEST. But it has some limitations.
    Limitations of FM :  TR_EXT_INSERT_IN_REQUEST
    1. It will assign the given object to given Transport request. But not to the task of a transport request. This FM will not allow   assigning objects to the task. It will allow only to request.
    2. Object entry present in transport request table e071. But, I can't find any version in version management. Moreover, the object is not locked under that particular request.
    Can any one let me know, is there any function module to fullfill the requirement without above mentioned limitations?
    Requirement :
    1. Given object should be assigned to given task of TR.
    2. Need FM to activate the Object and object texts.
    3. After assigning to the request, It should show the vesion in version management and object should be locked under particular Task/ Request.
    Your help would be greatly appreciated and <<removed by moderator>> Thanks in advance.
    Have a nice day!!
    Thanks and Regards,
    Neelima. D
    Edited by: kishan P on Jan 5, 2012 2:21 PM

    @ Dear Nabheet & Karuna
    The object is not in local folder. I am aware of the process of assigning the object to request manually.
    I want that to be done automatically. I wont prefer writing BDC for this.
    @ Dear Keshav,
    Thank you for the function module. But TR_INSERT_REQUEST_WITH_TASKS will create a tarnsport request with tasks.
    @ Dear All,
    My requirement is to assign the object to Task automatically. Not creating the request or Task. Task & Request are
    present already.

  • Function module to assign a parent role to a child role

    Hi All,
    Is there any function module that can be used to assign a parent role to a child role.
    I have tried to debug the PFCG transaciton but was not successful in find one.
    Please help me out.
    Thanks,
    Hari.

    Hello Hari
    It would be more logic to create a child role from a parent role yet there may be demands for the other way around. I would like to add that you assign not just a but the parent role since a child role can have only a single parent role.
    The parent role is defined by AGR_DEFINE-PARENT_AGR. Thus, you could try to use the following function modules:
    PRGN_STRU_LOAD_DEFINITION
    PRGN_STRU_SAVE_DEFINITION
    Obviously there are additional steps required in order to create a fully functional child role.
    Regards,
      Uwe

  • Function module for assigned wage types

    Hi experts,
    We need wage type wise count and sum of the amount for each wage type defined in infotype '0008' for the given from and to dates. Is there any function module available for the same.
    Please suggest.
    Regards,
    Kaustubh Kabre.

    Hi,
    <li>I do not look for function module for this case as i know that we can or have to read wage types and corresponding amount in the program. LDB PNP should be given in program attributes.
    REPORT RPABAP06.
    TABLES:PERNR.
    INFOTYPES:0008.
    DATA: BEGIN OF WAGETYPES,
       LGA LIKE P0008-LGA01,
       BET LIKE P0008-BET01,
       ANZ LIKE P0008-ANZ01,
       EIN LIKE P0008-EIN01,
       OPK LIKE P0008-OPK01,
      END OF WAGETYPES.
    DATA:total type P0008-BET01.
    GET PERNR.
    RP_PROVIDE_FROM_LAST P0008 SPACE PN-BEGDA PN-ENDDA.
    DO 20 TIMES VARYING WAGETYPES-LGA FROM P0008-LGA01 NEXT P0008-LGA02
                VARYING WAGETYPES-BET FROM P0008-BET01 NEXT P0008-BET02.
    IF WAGETYPES-LGA IS INITIAL.
    EXIT.
    ELSE.
    TOTAL = TOTAL + WAGETYPES-BET.
    WRITE: / WAGETYPES-LGA, WAGETYPES-BET.
    ENDIF.
    ENDDO.
    WRITE TOTAL.
    Thanks
    Venkat.O

  • Any Standard Functional Module to create 1008 Infotype its Account Assign.

    Hi
    can any body  pls help me to know any standard FM to create 1008  Account Assignment  ?
    dont want to go for BDC for this....
    Points will be there for right answers for sure.
    Regards
    Meeta Nair

    Hi 
    Txs for your response but,  am looking a Standard FM which will ask for position id and then create its account assign infotype 1008.
    pls help on this points will be there for sure.
    Regards
    Meeta

  • Function Module to assign product into Campaign

    Hi All,
    Could you please tell me which FM can be used to assign product to campaign?
    I have already created Campaign programmatically using FM MKT_ELEMENT_CREATE.
    Regards,
    Sagar

    Solved!

  • Create Contact Person via BAPI / CMD_EI_API (TCode VAP1)

    Hi everybody,
    I have to develop a function module, which has to be called from an external application (java). This function module should, create contact persons for customers (like Transaction VAP1 does).
    I did not find any function module or bapi for this, but I found class CMD_EI_API, which seems to possibly help me. Unfortunately, there is no documentation for this class.
    Could anyone help me getting the contact person's addresses into the system? Just hustle me into the right direction and I will walk by myself
    Thank you very much
    Ralf
    Edit: The contact persons addresses have to be maintained for existing customers.
    Edited by: Ralf Wenzel on Feb 21, 2012 12:19 PM

    I have this working.  I wrote a wrapper BAPI.  If inserting a new contact, you need to get a new partner number otherwise it won't work.  There is extra code in this function module that you can remove.  I left it as I used the logic for other customer update BAPIs.
    FUNCTION Z_CUSTOMER_CONTACT.
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(CUST) LIKE  ZCUSTOMER STRUCTURE  ZCUSTOMER
    *"     VALUE(TESTFLAG) LIKE  WDL_FLAG-XFLAG DEFAULT ' '
    *"     VALUE(FBAPI) TYPE  CHAR01 OPTIONAL
    *"     VALUE(CONTACT) LIKE  ZCONTACT STRUCTURE  ZCONTACT
    *"  EXPORTING
    *"     VALUE(CUSTOMERNO) LIKE  BAPIKNA103-CUSTOMER
    *"     VALUE(RETURN) LIKE  BAPIRETURN1 STRUCTURE  BAPIRETURN1
    *"  EXCEPTIONS
    *"      CLIENT_ERROR
    *"      KNA1_INCOMPLETE
    *"      KNB1_INCOMPLETE
    *"      KNB5_INCOMPLETE
    *"      KNVV_INCOMPLETE
    *"      KUNNR_NOT_UNIQUE
    *"      SALES_AREA_NOT_UNIQUE
    *"      SALES_AREA_NOT_VALID
    *"      INSERT_UPDATE_CONFLICT
    *"      NUMBER_ASSIGNMENT_ERROR
    *"      NUMBER_NOT_IN_RANGE
    *"      NUMBER_RANGE_NOT_EXTERN
    *"      NUMBER_RANGE_NOT_INTERN
    *"      ACCOUNT_GROUP_NOT_VALID
    *"      PARNR_INVALID
    *"      BANK_ADDRESS_INVALID
    *"      TAX_DATA_NOT_VALID
    *"      NO_AUTHORITY
    *"      COMPANY_CODE_NOT_UNIQUE
    *"      DUNNING_DATA_NOT_VALID
    *"      KNB1_REFERENCE_INVALID
    *"      CAM_ERROR
       data: wa_header          type cmds_ei_header,
             wa_central_data    type cmds_ei_vmd_central_data,
             wa_central_datax   type cmds_ei_vmd_central_data_xflag,
             wa_address         type bapiad1vl,
             wa_addressx        type bapiad1vlx,
             wa_contact_addr    type bapiad3vl,
             wa_contact_addrx   type BAPIAD3VLX,
             wa_tax_ind_st      type cmds_ei_tax_ind,
             wa_tax_ind         type cmds_ei_cmd_tax_ind,
             wa_bankdetail_st   type cvis_ei_cvi_bankdetail,
             wa_bankdetail      type cvis_ei_bankdetail,
             wa_company_code_st type cmds_ei_company,
             wa_company_code    type cmds_ei_cmd_company,
             wa_functions_st    type cmds_ei_functions,
             wa_functions       type cmds_ei_cmd_functions,
             wa_tcontact        type CVIS_EI_PHONE,
             wa_phone_st        type CVIS_EI_PHONE_STR,
             wa_phone           type CVIS_EI_CVI_PHONE,
             wa_fcontact        type CVIS_EI_FAX,
             wa_fax_st          type CVIS_EI_FAX_STR,
             wa_fax             type CVIS_EI_CVI_FAX,
             wa_econtact        type CVIS_EI_SMTP,
             wa_smtp_st         type CVIS_EI_SMTP_STR,
             wa_smtp            type CVIS_EI_CVI_SMTP,
             wa_sales_data_st   type cmds_ei_sales,
             wa_sales_data      type cmds_ei_cmd_sales,
             wa_customer        type cmds_ei_extern,
             wa_cust_created    type cmds_ei_extern,
             is_customers       type cmds_ei_main,
             es_customers       type cmds_ei_main,
             wa_correct         type cmds_ei_main,
             wa_defective       type cmds_ei_main,
             wa_mes_correct     type cvis_message,
             wa_mes_error       type cvis_message,
             it_contacts        type cmds_ei_contacts_t,
             wa_contacts        type CMDS_EI_CONTACTS,
             messages           type BAPIRET2_T.
       FIELD-SYMBOLS: <bapiret2> type BAPIRET2.
       DATA: STATUS TYPE CHAR20,
             PARNR  LIKE KNVK-PARNR.
       constants: FILLCHAR VALUE '/',
                  gc_objtype_customer TYPE mds_ctrl_object VALUE 'CUSTOMER',
                  gc_insert           TYPE c VALUE 'I',
                  gc_delete           TYPE c VALUE 'D',
                  gc_current_state    TYPE c VALUE 'C',
                  gc_update           TYPE c VALUE 'U',
                  gc_true             TYPE c VALUE 'X',
                  gc_false            TYPE c VALUE ' '.
       include fbgenmac.
    * generate data record
       fbgenmac 'Z_CUSTOMER_CONTACT'.
    * Clear memory variables - needed if run in Test mode
    * Initialization
       CALL METHOD cmd_ei_api=>initialize.
       wa_customer-header-object_instance-kunnr = cust-kunnr.
       wa_customer-header-object_task           = gc_update.
       append wa_customer to is_customers-customers.
       call method CMD_EI_API_EXTRACT=>get_data
         EXPORTING
           is_master_data = is_customers
         IMPORTING
           es_master_data = es_customers
           es_error       = wa_mes_error.
       IF wa_mes_error-is_error is initial.
         STATUS = 'OK'.
         LOOP at es_customers-customers into wa_cust_created.
           wa_company_code = wa_cust_created-company_data.
           IF STATUS = 'OK' and wa_mes_error-is_error is INITIAL.
    *      is_customers = es_customers.
             free: wa_customer, wa_company_code_st,
                   wa_company_code, wa_address, wa_sales_data_st,
                   wa_contacts, wa_contact_addr,
                   wa_sales_data, wa_tax_ind_st, wa_functions,
                   wa_functions_st, wa_correct, wa_mes_correct,
                   wa_defective, wa_mes_error, wa_cust_created,
                   wa_tcontact, wa_phone_st, wa_phone,
                   wa_fcontact, wa_fax_st, wa_fax, wa_econtact,
                   wa_smtp_st, wa_smtp.
             FREE: is_customers.
             IF CONTACT-FIRSTNAME IS NOT INITIAL.
               CALL FUNCTION 'NUMBER_GET_NEXT'
                 EXPORTING
                   nr_range_nr                   = 'AP'
                   object                        = 'PARTNER'
                   QUANTITY                      = '1'
                   SUBOBJECT                     = ' '
    *           TOYEAR                        = '0000'
    **          IGNORE_BUFFER                 = ' '
                 IMPORTING
                   NUMBER                        = PARNR
    *           QUANTITY                      =
    *           RETURNCODE                    =
                EXCEPTIONS
                   INTERVAL_NOT_FOUND            = 1
                   NUMBER_RANGE_NOT_INTERN       = 2
                   OBJECT_NOT_FOUND              = 3
                   QUANTITY_IS_0                 = 4
                   QUANTITY_IS_NOT_1             = 5
                   INTERVAL_OVERFLOW             = 6
                   BUFFER_OVERFLOW               = 7
                   OTHERS                        = 8.
               IF SY-SUBRC = 0.
    * Add partner type 20
                 wa_contacts-task           = gc_insert.
                 wa_contacts-data_key-parnr = PARNR.
                 wa_contacts-data-pafkt     = '20'.
                 wa_contacts-datax-pafkt    = 'X'.
    *        wa_contacts-address_type_1 = ''.
    *        wa_contacts-address_type_2 = ''.
    *        wa_contact_addr-fullname   = CUST-NAME.
                 wa_contact_addr-firstname  = CONTACT-FIRSTNAME.
                 wa_contact_addrx-firstname = 'X'.
                 wa_contact_addr-lastname   = CONTACT-LASTNAME.
                 wa_contact_addrx-lastname  = 'X'.
    * Assign address data directly
                 wa_contacts-address_type_3-task  = gc_insert.
                 wa_contacts-address_type_3-postal-data  = wa_contact_addr.
                 wa_contacts-address_type_3-postal-datax = wa_contact_addrx.
    * e-mail address
                 wa_econtact-task = gc_insert.
                 wa_econtact-data-std_no = 'X'.
                 wa_econtact-data-e_mail = CONTACT-E_MAIL.
    *        wa_econtact-datax-std_no = 'X'.
    *        wa_econtact-datax-e_mail = 'X'.
                 wa_smtp-current_state = ' '.
                 wa_smtp_st-contact = wa_econtact.
                 append wa_smtp_st to wa_smtp-smtp.
                 wa_contacts-address_type_3-communication-smtp = wa_smtp.
    *        wa_contacts-contact_texts  = ''.
                 append wa_contacts to it_contacts.
               ENDIF.
               CALL FUNCTION 'NUMBER_GET_NEXT'
                 EXPORTING
                   nr_range_nr                   = 'AP'
                   object                        = 'PARTNER'
                   QUANTITY                      = '1'
                   SUBOBJECT                     = ' '
    *           TOYEAR                        = '0000'
    **          IGNORE_BUFFER                 = ' '
                 IMPORTING
                   NUMBER                        = PARNR
    *           QUANTITY                      =
    *           RETURNCODE                    =
                EXCEPTIONS
                   INTERVAL_NOT_FOUND            = 1
                   NUMBER_RANGE_NOT_INTERN       = 2
                   OBJECT_NOT_FOUND              = 3
                   QUANTITY_IS_0                 = 4
                   QUANTITY_IS_NOT_1             = 5
                   INTERVAL_OVERFLOW             = 6
                   BUFFER_OVERFLOW               = 7
                   OTHERS                        = 8.
               IF SY-SUBRC = 0.
    * Add partner type 30
                 wa_contacts-data_key-parnr = parnr.
                 wa_contacts-data-pafkt     = '30'.
                 append wa_contacts to it_contacts.
               ENDIF.
    * Assign contacts to customer structure
               wa_customer-central_data-contact-contacts = it_contacts.
    * Set object_task to modify
               wa_customer-header-object_instance-kunnr = cust-kunnr.
               wa_customer-header-object_task = gc_update.
               append wa_customer to is_customers-customers.
               IF FBAPI = 'X'.
    * MAINTAIN_BAPI seems to now work.  Fills in table addr_appl_to_int used in function module
    * ADDR_MEMORY_SAVE line 631.  It should be blank.
                 call method cmd_ei_api=>maintain_bapi
                   EXPORTING
                     iv_test_run              = TESTFLAG
                     iv_collect_messages      = 'X'
                     is_master_data           = is_customers
                   IMPORTING
                     es_master_data_correct   = wa_correct
                     es_message_correct       = wa_mes_correct
                     es_master_data_defective = wa_defective
                     es_message_defective     = wa_mes_error.
               ELSE.
                 call method cmd_ei_api=>maintain
                   EXPORTING
                     iv_test_run    = TESTFLAG
                     is_master_data = is_customers
                   IMPORTING
                     es_error       = wa_mes_error.
               ENDIF.
               IF wa_mes_error-is_error is initial.
                 if testflag <> 'X'.
                   commit work and wait.
                   LOOP at wa_correct-customers into wa_cust_created.
                     CUSTOMERNO = wa_cust_created-header-object_instance-kunnr.
                     SY-MSGID = 'F2'.
                     SY-MSGNO = '056'.     " Failure
                     SY-MSGV1 = ''.
                     SY-MSGV2 = ''.
                     SY-MSGV3 = ''.
                     SY-MSGV4 = ''.
                     CALL FUNCTION 'BALW_BAPIRETURN_GET1'
                       EXPORTING
                         TYPE       = 'E'
                         CL         = SY-MSGID
                         NUMBER     = SY-MSGNO
                         PAR1       = SY-MSGV1
                         PAR2       = SY-MSGV2
                         PAR3       = SY-MSGV3
                         PAR4       = SY-MSGV4
    *               LOG_NO     = ' '
    *               LOG_MSG_NO = ' '
                       IMPORTING
                         BAPIRETURN = RETURN.
                   ENDLOOP.
                   CALL FUNCTION 'ADDR_MEMORY_CLEAR'
                     EXPORTING
                       force              = 'X'
                     EXCEPTIONS
                       unsaved_data_exist = 1
                       internal_error     = 2
                       others             = 3.
                 ELSE.
                   ROLLBACK WORK.
                   LOOP at wa_correct-customers into wa_cust_created.
                     CUSTOMERNO = wa_cust_created-header-object_instance-kunnr.
                     SY-MSGID = 'F2'.
                     SY-MSGNO = '035'.
                     SY-MSGV1 = ''.
                     SY-MSGV2 = ''.
                     SY-MSGV3 = ''.
                     SY-MSGV4 = ''.
                     CALL FUNCTION 'BALW_BAPIRETURN_GET1'
                       EXPORTING
                         TYPE       = 'E'
                         CL         = SY-MSGID
                         NUMBER     = SY-MSGNO
                         PAR1       = SY-MSGV1
                         PAR2       = SY-MSGV2
                         PAR3       = SY-MSGV3
                         PAR4       = SY-MSGV4
    *               LOG_NO     = ' '
    *               LOG_MSG_NO = ' '
                       IMPORTING
                         BAPIRETURN = RETURN.
                   ENDLOOP.
                   CALL FUNCTION 'ADDR_MEMORY_CLEAR'
                     EXPORTING
                       force              = 'X'
                     EXCEPTIONS
                       unsaved_data_exist = 1
                       internal_error     = 2
                       others             = 3.
                 ENDIF.
               ELSE.
                 messages = wa_mes_error-messages.
                 LOOP at wa_mes_error-messages assigning <bapiret2>.
                   CUSTOMERNO = CUST-KUNNR.
                   CALL FUNCTION 'BALW_BAPIRETURN_GET1'
                     EXPORTING
                       TYPE       = <bapiret2>-type
                       CL         = <bapiret2>-id
                       NUMBER     = <bapiret2>-number
                       PAR1       = <bapiret2>-message_v1
                       PAR2       = <bapiret2>-message_v2
                       PAR3       = <bapiret2>-message_v3
                       PAR4       = <bapiret2>-message_v4
    *         LOG_NO     = ' '
    *         LOG_MSG_NO = ' '
                     IMPORTING
                       BAPIRETURN = RETURN.
                 ENDLOOP.
               ENDIF.
             ELSE.
               CUSTOMERNO = CUST-KUNNR.
               SY-MSGID = 'F2'.
               SY-MSGNO = '152'.     " Failure
               SY-MSGV1 = CUST-KUNNR.
               SY-MSGV2 = CUST-BUKRS.
               SY-MSGV3 = ''.
               SY-MSGV4 = ''.
               CALL FUNCTION 'BALW_BAPIRETURN_GET1'
                 EXPORTING
                   TYPE       = 'E'
                   CL         = SY-MSGID
                   NUMBER     = SY-MSGNO
                   PAR1       = SY-MSGV1
                   PAR2       = SY-MSGV2
                   PAR3       = SY-MSGV3
                   PAR4       = SY-MSGV4
    *         LOG_NO     = ' '
    *         LOG_MSG_NO = ' '
                 IMPORTING
                   BAPIRETURN = RETURN.
             ENDIF.
           ENDIF.
         ENDLOOP.
       ELSE.
         CUSTOMERNO = CUST-KUNNR.
         SY-MSGID = 'F2'.
         SY-MSGNO = '077'.     " Failure
         SY-MSGV1 = CUST-NAME.
         SY-MSGV2 = ''.
         SY-MSGV3 = ''.
         SY-MSGV4 = ''.
         CALL FUNCTION 'BALW_BAPIRETURN_GET1'
           EXPORTING
             TYPE       = 'E'
             CL         = SY-MSGID
             NUMBER     = SY-MSGNO
             PAR1       = SY-MSGV1
             PAR2       = SY-MSGV2
             PAR3       = SY-MSGV3
             PAR4       = SY-MSGV4
    *         LOG_NO     = ' '
    *         LOG_MSG_NO = ' '
           IMPORTING
             BAPIRETURN = RETURN.
       ENDIF.
    ENDFUNCTION.

Maybe you are looking for

  • How do I add multiple songs to a Slideshow

    My slideshow is about 2 to 3 songs in length. When adding music I can only figure out how to use one song for the background music. Rather than having the same song play over and over, is there any way I can select 3 songs to play one after the other

  • At the time of confirmation -increase GI quantity

    Hi Gurus, In my cycle - BF indicator is ticked in Routing. I raised production order manually co01 after that in confirmation screen(co11n) or (co15) in goods movement screen when I post goods issue I want to increase some amount om material accordin

  • Receiver RFC Problem

    Hi All, I have a scenario File to RFC. Before it used to work fine until i received a connection error. Basis restarted the adapter using Visual Admin tool. Now the problem is nothing comes through from to the RFC adapter. I am getting no error. In t

  • Data Execution Prevention on Twain Network Scanner

    Hello users I try to scan with a Twain driver to a Lanier scanner. The driver supports Vista. Scanning used to work perfectly on XP. Now under Vista I get the Data Execution Prevention (DEP) message which shuts down the Acrobat 9.0.0 Pro. Scanning wi

  • Discussion service unavailable

    I config oam with webcenter successfully. I wanna config discussion service connection at /em take the following url as reference. http://download.oracle.com/docs/cd/E12839_01/webcenter.1111/e12405/wcadm_services.htm#CHDGAICG I've checked all my step