Customer master logic

need logic for:-
if customer master has the tax classification is
available, if the tax classification is coming blank
then if the customer sales org is 1000 and if
the transaction code is XD01/VD01 then the
value in the customer tax classification
against US country  is SIX(6).

IF ( sy-tcode = 'XD01'  OR  sy-tcode = 'VD01' ) AND
     i_knvv-vkorg EQ '1000'.
LOOP AT i_knvi.
IF i_knvi-taxkd IS INITIAL AND
           i_knvi-aland EQ 'US'.
          i_knvi-taxkd = '6'.
          MODIFY i_knvi TRANSPORTING taxkd.
ENDLOOP.

Similar Messages

  • Report to fetch the text information from customer master sales data

    Dear Experts,
    We have come up with a requirement where the business want a report/list of the customers for whom a particular text is not maintained in customer master -sales data.
    There are many Z text id are configured and are maintained in Sales data- extras- text. In addition, business also need some key fields from the customer master such as name, city, delv plant, payment terms, sales off, sales grp etc.
    I could not get any standard table where the text is maintained with the customer numbers. Table STXH can give the customer numbers for a particular text id type but what is maintained against the given text id is not fetched from the table.
    So we need the valuable inputs to realize the requirement.
    As an proposal, we are aiming to develop custom Z report with the FM READ_TEXT to get the text information with the customer no ( object type KNVV and text id ). But for the additional information, what should be the actual logic for fetching the data. say if this FM is used, what should be the sequence of the logic and ideal selection parameters.
    In addition, we aim to use BAPI BAPI_CUSTOMER_GETDETAIL2 to fetch some of the customer ifnormation but many fields are not found in this . can we use some other bapi which can provide the complete general/sales data of customer ( delv plant, sales off, sales grp, custo grp, incoterms, payment terms etc)
    Kindly suggest accordingly.
    Many thanks in advance.

    Hi Dharmendra Kumar,
    I guess the best would be to check in ABAP General forum on the READ_TEXT sequence/ logic etc..
    For customer details, the available BAPIs are:
    BAPI_CUSTOMER_GETDETAIL
    BAPI_CUSTOMER_GETDETAIL1
    BAPI_CUSTOMER_GETDETAIL2
    However, you might have to check classes in SE24 to find any existing classes and its method yo give you all the information of a customer. Also check this thread: [BAPI for customer details like in IDoc DEBMAS;
    Regards,
    Raghu.

  • Customer master report for new and changed customer

    Hi All,
        I want to write a report for customer master, If a new customer is created or if customer is changed the report should get the customer and download it to a flat file.
    There is no proper spec they want customer based on acount group,Here how i can find the customer is  newly created or changed. Change pointer is active.
    in table CDHDR if customer is created the date and object id is there but changed the changed date is not in table kna1.
    Please help me regarding the logic.
    Thanks,
    Arun.

    Dear Arun,
      Please check for the delta entries on the customer master tables in DBTABLOG.
      This table stores all the changes made in database level.
    Regards
    imran.

  • "Partner Determination Steps  for Customer Master" clarification

    Hi,
    Let me clear myself at the outset itself, that I searched SDN for my below mentioned query, however I could not find any answer to my satisfaction....here I am posting again
    In "Partner Determination for Customer Master", the following steps are undertaken -
    Step 1:
    1.a.) Create New Partner Determination Procedure 
    1.b.) For each Partner Determination Procedure, different Partner Functions, which are applicable for that specific determination procedure, are assigned. (along with other properties like if the PF is mandatory, not modifiable )
    Step2:
    "Partner Determination Procedure Assignment", here we assign different Partner Determination Procedure to different Account Groups. In other words, indirectly, we assign the partner functions to account groups. Right? (Please correct me if I am wrong)
    Step3:
    "Partner Function". Here we define new partner functions, (which are used in Step 1...)
    Step4:
    "Account Group- Function Assignment" - Here we assign the Partner Functions to Account Groups
    Now My Question
    (A) Since the Partner Functions are assigned (via partner determination procedure) to account groups in Step 1, then why Partner Functions are assigned AGAIN to account groups in Step 4. What is the significance of this assignment in Step 4.
    (B) Is there is particular sequence of Steps (1 to 5), one should follow when somebody has to create new customer account group and/or new partner function.
    Thanking you all in advance.

    Dear SR
    Leave SAP Partner Determination screen for 2 minutes and first understand the logic
    1. Create the new partner functions
    2. Create the new determination procedure
    3. Link the new  partner functions to the  new determination procedure and add mandatory, non modifiable ,optional creteria
    4. Assign the new  determination procedure to the document type or account group at appropriate level
    This is essence and this is for all  8 levels like CMR,sales doc header,item etc
    Now coming to your qn
    When you define a new account group ( you might be aware account group controls partner functions of CMR) you will say that your  new account group  will carry out patner functions like SP,SH,BP,PY
    That is ACCOUNT GROUPS  function assignment
    Whenever you create a new account group  you will do field selection in OBD2 like suppress optional.reqd etc,create no ranges and assign no ranges and also mainly this activity partner determination
    These are must settings for a new account group
    AG is the german key for sold to party Partner determination procedure
    This is step 1
    Then in next step you will tell AG will carry out such and such partner functions Step 2 like mandatory not modifiable etc
    Step 3 is link the AG to your account group
    Step 4 is partner functions say if you want to create a new partner function say SB special stock partner
    (in concept this is the firststep)
    Step 5 is once again partner function account group  assignment
    So when you create a new partner function you will do step 4 first and step 5 and then 1 and 2 and 3 
    when you create a new account group you will do step 5 and then 1 and 2 and 3
    Hope you understand now
    Partner functions are relatives in your family
    Say in a family we have Father ,mother sister, brother (these 4 partner functions)
    This is called as Happy Family  and this Happy Family  is the Partner determination procedure in SAP
    This Happy Family  is linked to the account group
    So Happy family means there are 4 partner functions
    So whenever you create a CMR in the account group this father.mother,brother,sister will come as default
    Suppose you add another partner function say Uncle
    First you have to create uncle
    Then you have to tell this account group will accept uncle
    Then link the uncle in the happy family that is determination procedure of SAP along with the 4
    Then assign  happy family  to the account group
    Now when you create a CMR along with father.mother,brother,sister  along with that uncle will also come
    Regards
    Raja

  • Impacts in COPA of changing material and customer master data

    Dear experts,
    In my company we are considering following scenario:
    Currently mySAPerp 6.0 is implemented for all modules for the mother company.
    We have developed a new global template where there are significant changes versus the existing system, especially in the SD processes. Material and customer master also change significantly in terms of content in the tables/fields and/or values in the fields.
    The idea was to build the template from scratch in a new machine and roll-out all group affiliates, but now we are considering the possibility of making an evolutionary of the current system and try to stretch it to the processes defined in the global template.
    The scenario we want to analyze is: Keeping same organizational structure in terms of Company code, CO area and Operating Concern in existing SAP client and make an evolutionary of the existing settings to the global template processes.
    The doubts we are having are the following:
    Changing material & customer master data: Impact in COPA
    Option 1: Material master data and customer master data codes are maintained but content in the tables/fields is changed substantially, both in terms of logical content of specific fields and/or the values in the specific fields. We have following examples of changes.
    Case 1: source field in material master changes logical content. E.g. Material master field MVGR1 is currently used for product series (design line) and the content changes to be the Market Segment. The product series will be moved to a classification field. At least 5 other fields are affected by this. How can data in terms of COPA line items be converted so that they are aligned at time of reporting?
    Case 2: the source field is not changed so that the logical content of the field remains but the values change, i.e. for the same concept there will be different codifications. How can data in terms of COPA line items be converted so that they are aligned at time of reporting?
    Case 3: Characteristics where currently the source material master field is a Z field and the derivation is via table look up and where the Z field changes to a classification field. How can you convert the existing COPA line items to ensure that attributes are aligned? Should new characteristics be created or just change the derivation logic of the characteristic?
    Option 2: Material master data and customer data codes are re-created (codification of records is changed), meaning that new material and customer codes will exist and content in tables/fields is changed (as in option 1)
    Case: material and customer codes are changed. How can data in terms of COPA line items be converted so that they are aligned at time of reporting?
    Iu2019ve never phased a similar scenario and I fear that maintaining operating concern while changing source master data and also SD flows (we have new billing types, item categories, sales doc. Types, order reasons) may lead to inconsistencies and problems in COPA.
    I would like to ask you experts if you have come across a similar scenario and if from your experience, it is something feasible to do or there are many risks involved. What can be the impact of this scenario in existing Operating Concern for both option 1 and 2 and what would be the key activities to perform to adapt the existing operating concern. What will be the impact of the needed conversions on P&L reporting?
    Sorry for the long story. I hope you can help me out.
    Thanks and Regards,
    Eric

    Hi,
       First i think you will need to test if it works for new COPA documents created via billing.
      If it works fine then the issue is if you wish to apply these changes to the historical data already posted.
      Normally there are transactions like KE4S where you can repost the billing document to COPA
      However this may not be viable for bulk postings
      You can perform realignment (KEND) but this only works at the PA segment level (table CE4XXXX)
    regards
    Waman

  • Customer Master using Appended structure KNA1

    Hi
    We have to update few ZZ description fields in ZAKNA1, which are not part of user interface in XD01/02/03. The available options are such as LSMW, Batch input require code addition through user exit ZXF04U01/ EXIT_SAPMF02D_001.
    I would like to use BAPI as we have a plan to use web services. Any idea how to extend the BAPI's such as BAPI_CUSTOMER_CHANGEFROMDATA1 or BAPI_CUSTOMER_CREATEFROMDATA1 using best practice?  I donu2019t find any extension structures like other BAPIu2019s have. Without ExtensionIn and ExtensionOut parameters, a BAPI can not be enhanced correct?
    The version we are using is ECC 5.0. Any ideas with customer master BAPI will be greatly appreciated.
    Bala

    Hi Bala,
    Just some general comments without having looked at your specific problem. Since you're on ECC 5.0 you cannot use the new [Enhancement Framework|http://help.sap.com/saphelp_nw2004s/helpdata/EN/94/9cdc40132a8531e10000000a1550b0/frameset.htm], which would make such changes more easy...
    A rather awkward workaround for extending the BAPI's is sometimes to add append structures to an IMPORT parameter of the BAPI. However, this is a rather dangerous and limited approach, because you might get into trouble depending on where the structures are used (i.e. if you add a field, it might cause harm in other programs that use the structure) and you also have to study the source code to see if you even could utilize those additional fields.
    A pretty generic option in lieu of other approaches is to generate a custom wrapper function module around the standard BAPI. Within your custom BAPI you can add the missing fields as parameters, call the standard BAPI and then do the additional updates. The big advantage of such a solution is that
    <ol>
    <li>Your change/additional logic is obvious (not hidden in a customer exit or BAdI, which are often harder to find when troubleshooting or changing functionality)</li>
    <li>Any changes to the standard BAPI will automatically also take effect in your custom BAPI (since you didn't copy the original one); this excludes of course interface changes, but here you anyhow would have to do something...</li>
    </ol>
    Should you have custom fields that are already exposed on the customer maintenance screens via enhancements, then you might want to consider using the wrapper approach, but simply export the additional data to memory, then call the standard BAPI and within the customer/user exits handling the additional fields fill them via an import from memory.
    Cheers, harald

  • Customer Master,for a Vendor, takes wrong Ship-to in Return Delivery

    Hi Everyone,
    Process: Return to vendor based on the standard PO (type NB) with return delivery (type RL).
    Settings Made: A customer master with account group Sold-to created and the code maintained in vendor master and vice versa. In this customer master Ship-to parter is not the same as other partner functions. Say Sold-to = Billed-to = Payer = 1234, but Ship-to = 5678.
    Issue: Whenever a return delivery is created agianst a PO (in VL10D) the system proposes Ship-to customer same as the sold-to 1234 . Delivery is getting processed without any error but the question is why system should propose 1234 as Ship-to which is not defined in the parter functions of Sold-to cusotmer 1234? Instead system should take 5678 as Ship-to which is the only entry in the sold-to cusotmer 1234 available.
    If a sales order is created for this customer, system correctly populates Sold-to (1234) and Ship-to (5678). The issue is only when a return delivery gets created against a standard PO.
    Kindly advise.
    Thanks,
    Hemant

    Hi
    My reply to you is more of logical than SAP
    Normally SP is the most dominant and important party in a sales process
    If you have a different SH in a CMR that means this sold to party tells you rather than delivering goods to me you deliver it to this person
    In standard SAP goods receiving hrs,Taxes,ship to address these are the data taken from a SH in a sales order
    In case of returns the decision to return stocks will be taken only by SP and not the person who receives the goods
    What i am telling is more of logical business process
    That is why the system is proposing likewise
    May be the other experts has give better explanation for this
    Regards
    Raja

  • Customer Master - ADRNR field details.

    Hi SDiens,
    This is regarding Customer Master data.
    Use T-code "SE16" then enter Table Name "KNA1" to see values for any particular Master record for eg. 1000.
    In this you will find some Values in field "ADRNR, MCOD1, MCOD2". whereas if you open the same record with "XD02" you cannot see this values.
    Even I am not entering this vause while creating records using "XD01". Can someone explain where can I see this Values.
    Matter urgent.
    Helpful answers will be rewarded.
    Cheers
    RC

    Hi,
    I looked in to this issue and got this information sto you please go through ADRNR number is the number provided internally by the system.and the remaining 2 fields MCOD1, MCOD2 are there in General data tab.
    Address number
    Internal key for identifying a Business Address Services address.
    For more information about the meaning and use of the address number and the Business Address Services concepts, see the function group SZA0 documentation.
    Business Address Services
    I. General
    You can manage addresses conveniently using a standard function module interface with Business Address Services. There are interfaces for maintenance with or without dialog and an address maintenance transaction.
    Address attributes
    An address in Business Address Services is a complex attribute of a primary object which saves only the reference to the address key. (In certain constellations, controlled redundancy is possible).
    The address management distinguishes between addresses on the basis of time dependency and international formats.
    The database structures allow for the date-dependency of addresses, but all function modules currently use date-independent addresses (the default validity range is 1.1.00001 - 31.12.9999).
    Address types
    Addresses are distinguished according to the application context in which they are used:
    "Normal" addresses (Address type 1): This type of address can either be associated with an application object or be on its own.
    Typical examples are the addresses of organizational units (for example, company code, plant), delivery address, functional location, and so on.
    Such an address is identified in the DB by a 10-digit address number.
    Examples: company code 0001 has address 4711
              customer MIKE has address 5678
    Private addresses of persons (Address type 2): These are addresses which are assigned to exactly one natural person, with extended attributes compared to the normal addresses (title, part of name, etc.) for the person. The person with the address-relevant attributes is an independent object, which is maintained in Business Address Sercices.
    Personal addresses are assigned to exactly one person, and can not be referred to by other application objects. The complete address object (person with address) can have several uses.
    For identification, a 10-digit number for the person and a 10-digit number for the address are required.
    A person (identified by the 10-character address) can have several addresses.
    Example: business partner CHARLY is a natural person and has two addresses:
    a) the first address is identified by person number 1234 and address number 3333.
    b) the second address is identified by person number 1234 and address number 3357.
    Addresses of persons in companies (Address type 3): These are addresses which contain the properties of a person in a company, with attributes such as Department, room number, extension.
    Any normal address (address type 1), but not a private address, can be the company address.
    The address of a person in a company is identified, like a private address by a 10-digit number each for the person and for the address.
    Example: business partner CHARLY (see above) is contact person at business partner SAP_AG with company address 4444; CHARLY's contact person address is identified by person number 1234 (see above) and address number 4444.
    These three address objects constitute an abstract data structure. The function group SZA0 contains function modules for accessing these address types. There are function modules for maintenance (create, change and delete), and to read and to search for each address type. There are also function modules to maintain and read all communication types which are supported by R/3, for each address type.
    Function modules for private addresses begin with the prefix 'ADDR_PERSONAL_', those for addresses of a person in a company begin with 'ADDR_PERS_COMP'. Other function modules which begin with 'ADDR_' are for normal address maintenance, or in some cases, function group management.
    The function modules manage the data structure using a maintenance interface. The underlying tables must not be accessed directly. This could lead to inconsistencies in data structures which contain fields from several tables.
    Address maintenance
    Addresses should be maintained as far as possible using standard dialogs which are available in other function groups.
    Popup, subscreen and full screen dialog techniques are used.
    The parameter transaction SADR can also be used for maintaining normal addresses which do not depend on an application object. These addresses cannot be distributed by ALE.
    For more information, see the SZA1, SZA5 and SZA7 function group documentation.
    For information about address validation see the documentation of function group SZAR.
    If addresses are to be maintained without dialog, or if a user maintenance dialog is necessary for special requirements, addresses can also be maintained directly using the function modules of the function group SZA0. The standard dialogs of the function groups SZA1, SZA5 and SZA7 are also implemented with them.
    Conversion of existing SADR/SADRP addresses
    Most old addresses will be converted for the new central address management (Business Address Services) for Release 4.0.
    From Release 4.5, all SD document addresses (previously SADR), customer addresses (previously only KNA1), supplier addresses (previously only LFA1), business and private addresses of (customer) contact persons (previously SADR) and bank addresses (previously SADR) will also be in Business Address Services (central address management).
    Release notes Central address management for 4.0A and Central address management in Release 4.5 contain detailed information.
    II. Maintenance without dialog (function group SZA0)
    The contents of the function group can be classified as follows: management modules, which either apply to the function group as a whole or ensure correct database storage, address object maintenance (create, change, delete) modules, and address object communications address processing, for example, telephone, fax, or mail addresses.
    Organization
    Local memory:
    Save
    ADDR_MEMORY_SAVE: Saves the local memory contents in the database. All address data changes made since the first call of any function module in the function group are then permanent. Numbers must have been assigned to all addresses and persons before storing.
    Delete
    ADDR_MEMORY_CLEAR: Deletes the local memory contents. All address data changes made since the first call of any function module, or the last local memory save, are discarded. This module should be called after extensive read operations or when returning to the application.
    Number assignment:
    When assigning numbers to addresses or persons, their (first) use must be specified.
    ADDR_NUMBER_GET
    Assigns an address number, i.e. converts a temporary address number (address handle) into a permanent address number which is saved in the database key.
    ADDR_PERSON_NUMBER_GET
    Assigns a person number, i.e. converts a temporary person number (person handle) into a permanent person number which is saved in the database key.
    Where used:
    A permanent address or person number must have been assigned before a (further) use can be entered.
    ADDR_REFERENCE_INSERT
    Inserts a new use in an existing address.
    ADDR_REFERENCE_DELETE
    Deletes a use of an existing address.
    ADDR_PERSON_REFERENCE_INSERT
    Enters another use for an existing person.
    ADDR_PERSON_REFERENCE_DELETE
    Deletes a use for an existing person.
    Applications are also deleted by the normal delete operations when the application passed to the delete modules is not the only one, or most recent one.
    Address object methods
    Read:
    Read address objects
    <Address object>_GET: Reads a (fully qualified) address. All versions of this address are read into local memory, and are subsequently accessible without database access.
    ADDR_PERSONAL_GET_ALL: Reads all private addresses for a person. All versions of this person's private address are read into local memory, and are subsequently accessible without database access.
    Read address object block
    <Address object>_GET_ARRAY: Reads several (fully qualified) addresses. The database and the local memory are read. All address versions read are subsequently in local memory and can be accessed without database access.
    Insert:
    <Address object>_INSERT
    Inserts an address.
    <Address object>_VERSION_INSERT
    Inserts a version of an address.
    ADDR_PERSONAL_COMPLETE_INSERT
    Inserts a private address with full specification of personal and address data, in contrast to ADDR_PERSONAL_INSERT, where the person data already exist.
    ADDR_PERS_COMP_ASSIGN
    Assigns a company address to an existing person, in contrast to ADDR_PERS_COMP_INSERT, where the person is also newly entered.
    Change:
    <Address object>_UPDATE
    Changes an address version. (In particular the standard version, "the" address, is changed.)
    Delete:
    <Address object>_DELETE
    Deletes an address. All existing address versions are deleted.
    <Address object>_VERSION_DELETE
    Deletes one version of an address.
    Search:
    <Address object>_SEARCH
    Searches for addresses, which can be partially qualified (e.g. by attribute value specification). Only the database contents are searched (the local memory should be saved first, under certain circumstances).
    Communication addresses
    Read:
    <Address object>_COMM_GET
    Reads the communication addresses of an address object for a particular communication type. All communications addresses of the specified communication type, for the specified address object are read into local memory, from where they can subsequently accessed without database access.
    Maintain:
    <Address object>_COMM_MAINTAIN
    Maintains the communications addresses of an address object for a particular communications type. Maintenance comprises: create, change and delete. All communications addresses thus maintained can be accessed in local memory without database access.
    III. Maintenance with dialog
    Function groups SZA1, SZA5, SZA6, SZA7 and the parameter transactions SADR and SADP
    --> Overview in the SZA1, SZA5 and SZA7 function group documentation.
    IV. Application examples
    0.  General
        - The function group does not need explicit initialization.
        - Address data changes are only written to the database after
          'ADDR_MEMORY_SAVE' has been called.
        - Before the 'ADDR_MEMORY_SAVE' call, all temporary
          address and person handles must be converted to external
          numbers.
    1.  Read access to normal address (address object 1)
    Selection parameter for a normal address
        data: begin of selection
                include structure addr1_sel.
        data: end of selection.
    Attributes of a normal address
        data: begin of result.
                include structure addr1_val.
        data: end of result.
    Specify selection parameters
        clear selection. "no handle, default nation, today
        selection-addrnumber = t001-adrnr.
    Read normal address
        call function  'ADDR_GET'
             exporting  address_selection = selection
             importing  address_value     = result
             exceptions address_not_exist = 1
                         parameter_error   = 2
                         version_not_exist = 3
                         internal_error    = 4.
        case sy-subrc.
        endcase.
    Result output
        write: / result-name1,
               / result-street, result-house_num1,
               / result-post_code1, result-city1.
    Delete local memory after end of processing
        call function 'ADDR_MEMORY_CLEAR'
             exceptions unsaved_data_exist = 1
                          internal_error     = 2.
        case sy-subrc.
        endcase.
    2.  Search for a normal address (address object 1)
    Search parameters for a normal address
        data: begin of selection
                include structure addr1_find.
        data: end of selection.
    Result table for a normal address search
        data: begin of result occurs 0.
                include structure addr1_val.
        data: end of result.
    Address group table
        data: begin of dummy occurs 0.
                include structure adagroups.
        data: end of dummy.
    Number of addresses found
        address_count like sy-tabix.
    Specify search parameters
        clear selection.
        selection-name1 = 'SAP*'.
        selection-city1 = 'Walldorf'.
    Search for normal address
        call function  'ADDR_SEARCH'
             exporting  search_in_all_groups  = 'X'
                          search_for            = selection
             importing  addresses_found_count = address_count
             tables     search_result         = result
                          address_groups        = dummy
             exceptions parameter_error       = 1
                         internal_error        = 2.
        case sy-subrc.
        endcase.
    Result output
        loop at result.
          write: / result-name1,
                 / result-street, result-house_num1,
                 / result-post_code1, result-city1.
        endloop.
    3.  Bulk processing of normal addresses (address object 1)
    Table of selection parameters for a normal address
        data: begin of selection occurs 20.
                include structure addr1_sel.
        data: end of selection.
    Table of attributes for a normal address
        data: begin of result. occurs 20.
                include structure addr1_val.
        data: end of result.
    Error table
        data: begin of errors occurs 0.
                include structure addr_error.
        data: end of errors.
    Specify selection parameters
        clear selection. "no handle, default nation, today
        selection-addrnumber = t001-adrnr.
        append selection.
        clear selection.
        selection-addrnumber = vbpa-adrnr.
        append selection.
        ... enter further selections in table selection ...
    Read normal address in blocks
        call function  'ADDR_GET_ARRAY'
             tables     address_selection = selection
                         address_value     = result
                         error_table       = errors
             exceptions parameter_error   = 1
                          internal_error    = 2.
        case sy-subrc.
        endcase.
    Result output
        loop at result.
          write: / result-name1,
                 / result-street, result-house_num1,
                 / result-post_code1, result-city1.
        endloop.
    Delete local memory after end of processing
        call function 'ADDR_MEMORY_CLEAR'
             exceptions unsaved_data_exist = 1
                          internal_error     = 2.
        case sy-subrc.
        endcase.
    4.  Create a normal address (address object 1)
    Address number, address handle, address group, address data
        data: address_number like adrc-addrnumber.
        data: address_handle like szad_field-handle.
        data: address_group like addr_ref-addr_group value 'DEBI'.
        data: begin of address_data.
                include structure addr1_data.
        data: end of address_data.
    Use details
        data: begin of usage.
                include structure addr_ref.
        data: end of usage.
    Error table
        data: begin of errors occurs 0.
                include structure addr_error.
        data: end of errors.
    Return codes
        data: rc_insert like szad_field-returncode.
        data: rc_number_get like inri-returncode.
        data: rc_memory_save like sy-subrc.
        data: lv_check_address like szad_field-flag.
    Fill address record and determine temporary address identifier
        address_data   = ...
        address_handle = ...
    Deactivate address check if required
        lv_check_address  =
    Insert address in local memory
        call function  'ADDR_INSERT'
             exporting  address_data    = address_data
                         address_group   = address_group
                         address_handle  = address_handle
                         check_address   = lv_check_address
             importing  address_data    = address_data
                         returncode      = rc_insert
             tables     error_table     = errors
             exceptions address_exists  = 1
                         parameter_error = 2
                         internal_error  = 3.
        case sy-subrc.
          when 0.
            if rc_insert = 'E'.
              Analyze error_table and call special further processing
              because the address has errors and was not created.
                endif.
        endcase.
        ... process other application objects
            or modify Business Address Services
            local memory ...
        ... before saving potential application objects:
    Declare final use to address management
        usage-appl_table = ...
        usage-appl_field = ...
        usage-appl_key   = ...
        usage-addr_group = address_group.
    Assign address number
        call function  'ADDR_NUMBER_GET'
             exporting  address_handle           = address_handle
                          address_reference        = usage
             importing  address_number           = address_number
                          returncode_numberrange   = rc_number_get
             exceptions address_handle_not_exist = 1
                          internal_error           = 2
                         parameter_error          = 3.
        case sy-subrc.
        endcase.
        ... immediately afterwards:
    save local memory after processing
        call function  'ADDR_MEMORY_SAVE'
             exceptions address_number_missing  = 1
                         person_number_missing   = 2
                         internal_error          = 3
                         database_error          = 4
                         reference_missing       = 5.
        case sy-subrc.
        endcase.
    delete local memory
        call function 'ADDR_MEMORY_CLEAR'
             exceptions unsaved_data_exist = 1
                          internal_error     = 2.
        case sy-subrc.
        endcase.
    V. Terms/Glossary
    Address/Person group
    Addresses and persons can be assigned to an address or person group. One address or person can be assigned to several groups (multiple assignment). This allows e.g. the same address to occur as customer and supplier address, and also allows searches to be limited to certain groups, instead of always searching all addresses.
    Logical groups of addresses and persons can be formed.
    The address groups required by applications are established by the application developer in consultation with the SAP Business Address Services. Customers can define their own groups in the customer name range for their own developments.
    Address/Person handle
    Address data are saved in the database and address and person numbers are assigned only when the application data are saved. Application programs must call the appropriate function modules. Business Address Services hold the data in internal tables in the local memory of the function group SZA0. Before saving after creation, addresses or persons are identified by an address or person handle, via which address objects can be accessed until the data are saved in the database.
    The handle of a person, a normal address or a person in a company is determined by the application program.
    The following procedure is recommended for both the address and person handles:
    The first 10 places contain the name of the table in which the address or person is referred to. The next 10 places are used for the name of the field containing the reference, and the application data set key can be written in the remaining 120 places. This can be a temporary key, as the database key is only completed when saving in many application areas.
    In this way the application developer can manage the addresses with the data which he or she is accessing anyway.
    Ambiguities are avoided in complex transactions in which addresses for different applications are kept simultaneously in the same roll area for SZA0 (a serial number may not be sufficient as a handle).
    Communication addresses
    A communication addresse in the central address management is the identification number or address of a communication connection of one of the following communication types: telephone, fax, teletex, telex, SMTP, R/Mail, X.400 or RFC.
    e.g. the complete telephone number (dialling code + telephone number) is the identification of the communication address of type telephone.
    Address/Person number range
    The address and person number range defines the valid external identifications (database key value range) for addresses or persons. For reasons of compatibility, the same number range applies as for 'old' SADR and SADRP addresses. Specifically, address and person numbers are drawn from the same number range. This simplifies the conversion of old SADRF and SADRP addresses.
    Address versions
    The (international) version of an address is an independent address object data set, in which a different display style of an address can be maintained in a code page (e.g. in Japan in Kanji, Katakana or Hiragana).
    These are not independent addresses
    The part of the address object which does not depend on the display style is always in the standard version.
    In customizing (transaction SADV or under Cross-application components -> General application functions -> Address management -> Maintain address version display formats) you can set which other versions, in addition to the normal display style, are to be offered for maintenance.
    Where-used list
    In the where-used list, the application objects in which an address or a person are referred to is recorded. The where-used list is a technical support for the repeated use of addresses or persons in the three address types and therefore refers to the (sub)object address and person.
    Immediately before calling the function module 'ADDR_MEMORY_SAVE', the function modules 'ADDR_NUMBER_GET', or 'ADDR_PERSON_NUMBER_GET' must be called once for every normal address and once for each person (for private addresses and addresses of a person in a company). The (permanent) use of the address or the person in the application must be specified. In exchange the calling program gets the assigned numbers of the addresses and persons for the references in the application data records.
    Then (still before the 'ADDR_MEMORY_SAVE' call), other uses of addresss or persons can be specified via the function modules 'ADDR_REFERENCE_INSERT' or 'ADDR_PERSON_REFERENCE_INSERT' for multiple use.
    This is always possible once the address or person number is assigned.
    At the end of processing, the data must be saved in the database (as for all other address data) with the function module 'ADDR_MEMORY_SAVE'.
    Thanks,
    Sree.Manam
    Edited by: manam narayana on Jun 18, 2008 9:00 AM

  • Payment terms based on specific dist.channel, division and Plant but not from customer master.

    Dear All
    I have a requirement,
    Generally payments terms from customer master will flow to sales order. but here my requirement is to get a different payment terms based on specific distribution channel, division, customer  and plant those are there in sales order but not from customer master. is there any user exit or functional module to fulfill this requirement, or any other suggestion appreciated.
    Thanks,
    Reddy

    This Problem you can solve without user exit too.
    The Customer master data itself can solve the problem.
    You can maitain diffrent Payment Term as per the sales area (Dist.Ch+Div+S.org) of customer master.
    and each sales are wise u can change the plant also.
    You just need to set your logic with the combination of sales are and plant. And need to assign which payment term should determine to sales order.
    If you are rasing sales order with X sales area relavent to that payment term will trigger.
    Hope above logic will work, otherwise you can go with user exit.

  • Problem in Customer Master Upload using LSMW

    Hi,
    I am using LSMW direct input method to upload customer master. I have used ZSOURCE structure as parent structure and for multilple entries like Bank details and contact details i have used other child structure like ZBANK and ZCONTACT. I am using separate flat file for Bank and contact details.
    I have used one common field 'ID' as the first field both on ZSOURCE, ZBANK and ZCONTACT structure to link-up. Thus, i am able to load multiple records for Bank data. But i am unable to get contact details.
    Also, value for Reconciliation account(KNB1-AKONT) and sales group(KNVV-VKGRP) is not passed to screen.
    I have checked 'Generate Read Program','Read Data', 'Generate Conversion Program' and 'Convert Data' step again and again. Upto step 'Display Converted Data', data is converted successfully, but the same field values are not passed to screen.
    Can you pls help me to get the value..

    Hi,
    LSMW will have a Indicator for headr and itam, i do not remember the correct field, but it will have an indicator, check the fields, there will be a single charecter lenght field, that should be the indicator, and using that we can write the logic.
    check that single charecter field, if that is X that means the header record is processed, and do the items.
    and, this is another way, try this out also
    YOu can do this in "Define Source Structures" step,
    the HEADER is defined first,
    then the DETAIL below the HEADER.
    add the fields to the structures.
    Both should have some common key field
    Please take care that the name of the common field is the same.
    Once you do this it is linked. The you have a header and item corresponding to that header. then run the LSMW as you would.
    Re: Table control in LSMW

  • Unable to extract Customer Master data from MDC

    Hello,
    We creating an MDM-XI-ERP2005 Customer scenario. We want to work with all bussiness scenarios (not customizing scenario).
    First I'm trying to extract Customer Master Data from EP 2005 using MDM_CLNT_EXTR.
    I have created a New Variant which properties are:
    Variant: CUSTOMER_TOTAL
    Description: Send all customer data to MDM
    Extraction Object: CUSTOMER_EXTRACT.
    Target System: PI7.
    But, the display jobs shows the following error: Could not determine recipients for message type MDMRECEIPT. Job cancelled after system exception.
    We need to focus the problem. We have done the following ALE configuration.
    SALE transaction:
    In Basic Settings -> Logical Systems -> Define Logical System we have add the following logical systems:
                  EUS100
                  MDM: Master Data Management
                  PI7: Process Integration 7.0
    WE21:
    Transactional RFC -> PI7, IDOC record types SAP Release 4.x
    RFC destination: SAPSLDAPI
    BD64
    New Model -> PFMC
    Add message type: Model iview: PFMC
                                 Sender: EUS100
                                  Receiver: PI7
                                 Message Type: DEBMDM
    WE20 transaction shows:
    Partner profiles -> Partner Type LS (logical system)
                        PI7: Outbound parmtrs. DEBMDM, SYNCH.
    Any idea will be very helpful,
    Thanks in advance
    Marta.
    Edited by: Marta Sánchez on Jul 9, 2008 12:34 PM

    Sorry because I made a mistake in my previous message. ALE seems to be correctly configured. I'll try to update correctly my current situation:
    In WE02 I can see al IDOCs that I'm trying to send to XI. All them have the IDoc Status = 3 (Data Passed to Port OK) instead of 12 Status Dispatch OK :(. So, It seems an tRFC error.
    SM58 shows me more trails: "Basic type 'DEBMDM06' is unknown"
    before that I have done the following steps at SAP ERP:
        1. WE21: I have created a PI7 port with 700PI70CLNT RFC.
        2. SM59: I have checked successfully 700PI70CLNT RFC connection.
        3. WE20: I have created a PI7 Partner Type LS with the following inbound and outbound parameters: DEBMDM and MDMRECEIPT.
        4. BD64: I have created a Distribution Model with DEBMDM and MDMRECEIPT message types.
    and at SAP PI:
         5.IDX: Port: SAPEUS. Client: 111. RFC Destination: PI7.
         6. technical and business system for sender SAP system(System Landscape Directory)...
    - Maybe some of the previous steps is not correct....
    - Is RFC Destination = PI7 is correct in step #5?
    - Is also necessary to configure more steps in PI system like RFC destinations or Transactional port?
    - I have read that is neccessary to check that the option "transfer idoc immediately" in we20. How?
    Please any idea will be very helpful.......
    Thank you!
    Best regards,
    Marta.

  • Customer Master Address and Outputs

    I have maintained two address es in my customer master, The Street address and a PO box. I want the delivery Note out put to print the street address on it and the Invoice out put to print the PO BOX.
    Currently my Delivery Note is showing the PO BOX which is a problem since my client can not ship to a PO BOX, and we do not want to maintain another ship to partner with the same customer number.
    Is there a way to fix this or an OSS note on this?

    Hello,
    As i understood correctly, The delivery Output now should print the STREET instead of POBOX number , This is a change in the Logic.
    Just  Pick the customer Number from the Customer of delivery from LIKP-KUNNR and fetch the STREET from KNA1-KUNNR
    In the KNA1 table you will get the ADRNR, then goto ADRC to get the STREET details
    In the same way fetch the POBOX from Payer of Billing document
    Hope it is clear,
    regards,
    santosh

  • Generate outbound idoc for Customer Master

    Hi Developers,
    I have requirement to generate outbound IDOC for Customer Master Data. I need to send customer master data through an Outbound IDOC. Can we generate an outbound DEBMAS06 idoc? Can someone help me finding a solution to this problem?
    Thanks in advance for helping.
    Regards,
    Gajendra

    Hi,
    If you have done all the required settings (logical system, partner profiles, distribution model), then either transaction BD10 / BD14 will help you generate the IDOC.
    If you want to send the idocs automatically, then you will to configure some program.
    Unlike transaction data, Master data IDOCS are not triggered immediately, you will have to do the required configuration in SPRO.
    Transaction SPRO
    SAP Customizing Implementation Guide -->
    SAP Web application Server --> Application Link Enabling --> Modeling and Implementing Business Processes -->
    Master Data distribution --> Replication of Modified Data --> Creating IDOCS from Change Pointers
    Take a look at this thread.
    Re: automatic Idoc outbound
    Regards,
    Ravi
    Note : Please mark the helpful answers
    Message was edited by: Ravikumar Allampallam

  • Delete Customer Master Data OBR2

    Hi
    I'm using LSMW to import data. I would like to delete it afterwards. Transaction OBR2 which is in spro Financial Accounting (New) -> Accounts Receivable And Payable -> Customer Accounts -> Master Data -> Delete Customer master data.
    But it does not delete the sales are segment, it also does not allow me to delete general data if sales segment exists.
    Can anyone please let me know if there is another way around this? Any other way to delete this test data???
    Thanks in advance

    Hi
    Please go through the SAP documentation on how to perform deletion of customer master data.
    This may help you in executing the function correctly.
    <b>Delete Customer Master Data</b>
    In this activity, you delete the master records for customers by using a program. Only use this program in the test phase.
    Note
    The company code for which master records are to be deleted, may not yet be flagged as productive.
    Only master records for accounts which do not have any transaction data may be deleted.
    Requirements
    The general customer master data is only deleted for customers who are not also created as customers in Sales and Distribution.
    Activities
    Delete the master records for the required company codes.
    Additional information
    Refer to the SAPF019 program documentation for further information on the program.
    Deleting Master Data
    Description
    This program deletes master data in Financial Accounting and is designed for preparing the system for productive startup. It deletes:
    •     Customer master data
    •     Vendor master data
    •     G/L account master data
    You can run this program in three different ways:
    1. Deleting general master data (in G/L accounts in one chart of accounts)
    2. Deleting master data dependent on company code
    3. Deleting general master data and master data dependent on company code
    For each deletion run, you can specify whether or not the system should take into account the deletion flag in master records ("Delete per deletion flag only"). If it takes into account deletion flags, it uses the following standard logic:
    Option 1: The "All areas" deletion flag must be set.
    Option 2: The "Specified co. code" deletion flag must be set.
    Option 3: It is sufficient to have the "All areas" deletion flag set.
    Note: Deletion blocks are always checked at general data and company code-dependent data level. If there is a block at company code-dependent data level, then the general data is not deleted either. The deletion block takes precedence over the deletion flag.
    General master data in Financial Accounting can also be used in other SAP applications:
    •     Customer master data in Sales and Distribution
    •     Vendor master data in Purchasing
    •     G/L accounts as primary cost elements in Cost Accounting
    The program deletes the following:
    •     Change documents for master data
    •     SAPscript text files
    •     The following data is deleted for customers:
    o     General master data
    o     Bank details
    o     VAT registration numbers
    o     Addresses
    o     Classifications
    o     Credit management: across control areas
    o     Credit management: centrally
    o     Unloading points
    o     Tax indicators
    o     Contact persons
    o     Licenses
    o     Partner function limit
    o     Shipping data
    o     Master data in the company code
    o     Dunning data
    o     Linked data
    •     The following data is deleted for vendors:
    o     General master data
    o     Bank details
    o     Contact persons
    o     VAT registration numbers
    o     Addresses
    o     Classifications
    o     Master data in the company code
    o     Dunning data
    o     Linked data
    •     The following data is deleted for G/L accounts:
    o     General master data in the chart of accounts
    o     Names in the chart of accounts
    o     Key word list in the chart of accounts
    o     Master data in the company code
    o     Sample accounts, if selected
    For customer and vendor contact persons, the addresses are not determined from central address management until the actual runtime. Therefore differences can arise as to the number of addresses in the detail log between the test run and the update run.
    Automatic worklists for customers and vendors are also deleted with the general master data. Matchcodes are always deleted.
    You may have to fix the number ranges after the program run.
    The system makes changes to the database in the update run only. It will then also write a system log entry for documentation.
    Requirements
    General master data can only be deleted if no other application makes reference to the account. Use the resetting programs from
    •     Sales and Distribution (customer master data)
    •     Purchasing (vendor master data)
    •     Cost Accounting (G/L account master data)
    If you want to delete only general master data, master data dependent on company code cannot have been created in Financial Accounting.
    If you want to delete master data in a test company code, master data dependent on company code cannot have been created in any other company code except the test company code. The productive indicator cannot be set for the company code.
    If a customer or vendor is referenced by another customer or vendor (for example, via fiscal address or alternative payee), you can only delete the referenced master record by deleting the referencing master record at the same time.
    Furthermore, you can only delete master data in Financial Accounting if no transactions have been posted to the corresponding accounts. If there are transaction figures in one of the selected accounts, you have to manually access and run program SAPF020 (reset transaction data from a company code) before you can delete that account.
    Output
    The log lists every table which is processed in the program selection.
    You can also create a detail log for each account type to find out why certain data cannot be deleted. The detail logs show you what other company codes and applications use the data and how customers and vendors are linked to one another.
    Note
    Since deleting or displaying even smaller volumes of data can result in runtime problems, you should run this program as a background job. Currently, the program individually deletes matchcodes for each master record in the database. Several match code IDs refer to each matchcode. This can place a considerable load on the database.
    You cannot delete transaction data in individual accounts.
    Important: The archiving programs in Financial Accounting are designed for the productive system.
    If you are running this deletion program for the first time, then you must start program SAPF047 before deletion in order to generate link information.
    I hope this may be of help to you
    Good Luck
    Hari

  • Updating customer master using billing

    Hi ,
    Let let me tell the business scenario
    if you purchase something in supermarket, lifestyle etc
    based on the amount u buy (say 2000,3000) they will give u points
    say for 2000 - 5 points for 3000 - 10 points
    so the first field is card type ie - master card, golden card, silver card etc
    second field is card points - no. of points
    see in business scenario, say after getting some points at one stage , customer can redeeme the points he got on the whole
    ie he can get cash discount based on his points at certain stage
    now my 50 points will be redeemed and next time i will have 0 points
    now other fields are points redeemed, poiints in balance
    now i got this screen working in customer master
    data will be updated in ztable
    now in billing , we have to write a user exit through which , we can update this points based on the amount of billing
    ie updating customer master from billing user exit
    can anyone tell what exit i have to use, what logic i have to write , and how to create project and all
    Thanks,
    Ratna

    Hi,
    User Exits are nothing but Customizing the SAP Standard prog. with out changing the exiting functionality.
    Option, prepared by SAP to extend delivered standard-programs without modification of the original program at the customer. For potential customer requirements, which are not part of the standard, SAP installs blank containers, which can be filled with own functionalities by the customer. Customer-Exits are administered by SAP .
    T-Codes are
    SMOD - To find a Enahancement/User Exits
    CMOD - To Create Enhancement/Project.
    Follow the steps
    1. Go to CMOD there you have to give the project name that project name should get from your Functional people, or if you know no problem.
    2. Click on Create button it will asks save it local or Package.
    3. In Enhancements it will give the All Exits Names then double click on your exit
    4. It will take you into a Functional Module nothing but your Exit.
    in that Exit you will find Include Program i.e. Eg: ZXQSMU01 where you are going to implement your logic.
    5. Double Click on the Include program it will asks create object click enter
    it will creates there you can write your logic save it local or any package and Activate it.
    6. You need not to pass any values from Functional module/Exit to Include program that import/export values automatically program will access, you don't bother directly you can access the import/export etc. values in the program.
    Finally your Exit and Project also Activate it. then check your requirement reached or not.
    Following Exit try it.
    1. V60F0001 - SD Billing plan (customer enhancement) diff. to billing
    2. V60A0001 -  Customer functions in the billing document
    3. V46H0001 - SD Customer functions for resource-related billing 
    4. V05I0001  -  User exits for billing index   ETC...
         May be try these you can get or goto SMOD press F4 it will give a popup window there short text bill execute then you will get a list of exits check those.
    if any clarifications reply me.
    Regards
    Ganesh

Maybe you are looking for

  • Caller ID not working on Blackberry bold 9900

    Hi All, It seems that even though I have all the contacts listed in my Addressbook, Somehow the Contact name doesnot display during an incoming call. Call Lists though seem to identify the contact. I read some of the forums about Content protection.

  • Weblogic 10.3.0 : Loosing a stateless session bean in the bean pool

    Hi, We have a strange situation where we loose a Stateless SessionBean in a Bean Pool in Weblogic 10.3.0 Since we only have one bean in the pool, this effectively hangs all incoming calls. We do not want more than one instance in the pool because of

  • Hibernation problem due to NI variable engine

    Hello,  I posted a problem some month ago that discribed a problem with hibernation since I'd installed LabView8. The proble is still there. I hibernate my laptop and the longer I wait for waking up the machine again the longer it takes to wake up. I

  • Dr Watson Errors on Printing.

    Hello, I am getting Dr. Watson errors when I attempt to print or even go into printer setup. This happens on both reports and forms. It does not matter what report I use. It is VERY consistant. The printer is an HP and other applications have no prob

  • Where can get Illustrator CS3 Trial?

    I just re-installed XP but lost my Illy CS3 disk! I've got a record of my valid serial and was hoping to find a trial online and just enter my number. Unfortunately I can't find CS3 anywhere - only CS4. Using a CS3 Suite disk and installing just AI w