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

Similar Messages

  • After adding fields on KNA1 using append structure, not null dn't work

    Hello, all.
    let me ask you something.
    after adding fields on standard table 'KNA1' using append structure, not null , default value doesn't work.
    when I check table using data object check(utilities > data object > check),  the report says like this.
    Fld name  Position Data Type     Length Decimals Not null  Default
    MANDT    1            VARCHAR2 9                           X           '000'
    KUNNR    2            VARCHAR2 30                         X            ' '
    LAND1    3            VARCHAR2 9                           X            ' '
    ZMBRN   178        VARCHAR2 30                          X            ' '
    ZKUNNR 179        VARCHAR2 30      
    ZSEQ     180         VARCHAR2 12      
    fields ZKUNNR, ZSEQ  doesn't check not null, default.
    Any advice will help.
    thank in advance.

    Using 'initial values' check at SE11, I can explicitly make a filed not null.
    but when I use append structure, there is no way for checking 'initial values' check at SE11.
    thanks anyway.

  • URGENT:Creating customer master using Sd_Customer_Maintain_all

    hello all ,
    I am creating customer master using SD_Customer_Maintain_All.I will be thankful if somebody Can  tell me how to pass data to this function module.Better if somebody can provide code.
    Thanks.
    Sandeep.

    hello all ,
    I am creating customer master using SD_Customer_Maintain_All.I will be thankful if somebody Can  tell me how to pass data to this function module.Better if somebody can provide code.
    Thanks.
    Sandeep.

  • To load customer master using bapi

    HI GUYS ,
    DOES ANYONE HAVE A SAMPLE CODE TO LOAD THE CUSTOER MASTER  DATA USING BAPIS.

    Hi Nishanth,
    TO LOAD THE CUSTOER MASTER DATA USING BAPIS.
    In case you wish to read the customer data you can use the following BAPI, it retrieves the Customer Master (Company Code) Data and the General Data in Customer Master.
    CUSTOMER_READ
    You need to pass the Customer Number and the Company Code. See the example given below.
    REPORT ZEX_CUSTOMERREAD .
    Parameters: p_bukrs like KNB1-BUKRS,
                p_kunnr like KNA1-KUNNR.
    Data: ty_kna1 type kna1,
          ty_knb1 type knb1.
    Data: int_kna1 like ty_kna1,
          int_knb1 like ty_knb1.
    CALL FUNCTION 'CUSTOMER_READ'
      EXPORTING
        I_BUKRS         = p_bukrs
        I_KUNNR         = p_kunnr
    IMPORTING
       E_KNA1          = int_Kna1
       E_KNB1          = int_knb1
    EXCEPTIONS
       NOT_FOUND       = 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.
    thanks
    karthik

  • Creation of Customer master using CLASS( 'MAINTAIN_BAPI')..

    I am creating customer master by class 'MAINTAIN_BAPI'.  So all fields are sucessfully created except the field 'Remarks / Comments' on customer..Please suggest for the same as far as posiible..
    << Moderator message - Everyone's problem is important. But the answers in the forum are provided by volunteers. Please do not ask for help quickly. >>
    Edited by: Rob Burbank on Jul 18, 2011 10:06 AM

    Hi Yogesh,
    Hi,
    sorry to reply after the message closure.
    Maybe you will read it.
    SD_CUSTOMER_MAINTAIN_ALL is used in standard during the maintenance of a consumer using the standard customer master data transaction XD01 & XD02.
    It is not intended to be used out of the transaction and in no case it should be used out of its original context. Due to the specificity of the function module, out of the original context we may face limitations and data inconsistencies.
    For the maintenance of customers, there is NO BAPI and NO direct function module.
    There are some functions modules like the one above where the name is looking nice. But these should not be used.
    BAPI_CUSTOMER_CREATEFROMDATA1 is part of them. This one uses SD_CUSTOMER_MAINTAIN_ALL, so the above remark is still valid. Moreover, this BAPI is to be used only from process  SAP Product Catalog. Out of it and due to its limitation, a lot of troubles are expected.
    Sorry.
    Below ECC 2005 (6.00), the only solution was batch input and DEBMAS idocs. See [note 384462|https://service.sap.com/sap/support/notes/384462]
    Starting with ECC 2005 (6.00) and above: a synchronisation tool has been introduce. See class CMD_EI_API and VMD_EI_API
    Hope this helps.
    BR
    Alain

  • Upload partner functions to customer master using LSMW

    Dear Friends,
    I'm trying to uplaod customer partner functions data through LSMW. I have tried to upload the data using recording method in LSMW(Tr. code: XD02).
    As per the business requirement, I need to upload multiple number(For example: 10 records) of SP(Sold to) partners to a single customer.
    While executing session, instead of adding all 10 records of partner functions, only the last record(i.e 10th records) is adding in the customer master.
    Your response will be highly appraciated.
    Regards
    Satish

    Hi Satish,
    You can't use XD02 to upload multiple partner functions by recording the transaction. It will not create multiple entries, always it will replace the existing ones with the new entry. you need to use the standard BI program or Idoc method do the same.
    I know the scenarios for the vendors it didnot work in that way for me at that time I used Standard BI method to create the multiple partner associations.

  • Classification View in customer master using lsmw

    Hi folks,
    I have a requirement regarding conversion method that is fields regarding classification view in customer master needed to be populated r created in through xd01 transaction this should be done using lsmw tool,if tried with standard method and bapi method ,can any one tell how to do whether it is bapi r standard method plz dont suggest recording method,even it is idoc method k r can any tell me which function module exists fr this ,POINTS will be awrded for answers .

    Try FM : SD_CUSTOMER_MAINTAIN_ALL
    Thanks
    Seshu

  • F4 Help in Customer Master using Dropdown Box

    Dear All,
    I am using BAPI_CUSTOMER_CREATEFROMDATA1 for customer master creation.
    I have a requirement from customer that he wants a drop down for Sales Organization, Distribution Channel, Division and for other necessary fields, data should come from R/3.
    Please tell me how to achieve it? How I get these master data from R/3 so that I can populate it on the corresponding dropdowns? is there any standard BAPI exist for it??
    Please help.
    Thanks in Advance

    Hi,
      Is the search help custom or standard? If custom then use the search help exit provided in the search help. If standard copy it into a custom one and make use of the search help exit.

  • Data transper for customer master using BAPI

    I am trying to upload the customer master data from flat file to SAP tables using BAPI Customer.CreateFromData1. But not all of the fields are availble in this BAPI. Few of the important fields are absent e.g incoterms, account signment group of customer..it picks up default value from ref cust.....Is there any other way to load it......
    Thanks and regards,
    Tushar

    Look at OSS [Note 390045 - Usage of BAPI_CUSTOMER_* of function group V02D|https://service.sap.com/sap/support/notes/390045]
    you can only do this using ALE or Batch Input
    So use [ALE|https://www.sdn.sap.com/irj/sdn/advancedsearch?query=createcustomerALE&cat=sdn_all] or [BDC|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=createcustomerBDC&adv=false&sortby=cm_rnd_rankvalue]. (dixit SAP)
    Regards

  • Change Customer Master using CMD_EI_API MAINTAIN_BAPI Method

    Hi Experts,
    I am using CMD_EI_API=>MAINTAIN_BAPI method for Creating Customer through Custom program. The Creation of Customer Master is working fine.
    I have another requirement i need to perform the following for the Customer Change
    1 . Delete all Phone , Fax and SMTP entries from the table and create a new entries for Customer.
    2 . Delete a Contact Person based on the information from the legacy system.
    I am facing problem in the above two issues
    ADR2, ADR3 and ADR6 entries are retrieved for customer.
    this values are populated and passed to the method with Task as 'D' - delete.
    there is no error message  from the Method. when i call commit statement
    1 . the address details are not getting deleted in the tables
    2. if a contact person is deleted then i am getting a short dump while commit.
    Please help me if you know the details of MAINTAIN_BAPI method whic can be used for the Deletion purpose.
    Thanks,
    Shrikanth R

    Hi Experts
    I'm having the same problem it looks like the method maintain_bapi does not commit the new values, I debuged it and found a call to a badi lr_badi_update but I could not find information about it.
    Any help will be appreciate
    Leo

  • 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

  • Enhancement customer master using BPMDSD

    I need to enhance Customer master XD01 using transaction code BPMDSD using badi how z its possible

    Hi,
       business Add-In CUSTOMER_ADD_DATA 
    business Add-In CUSTOMER_ADD_DATA_CS
    <b>Reward points</b>
    Regards

  • Why is customer master used in STO?

    Dear Experts,
    what is the process of using customer master in STO  4th step only?(intra company with sd without billing)
    thanks in advance
    regards
    shiva.

    hi
            while doing STO with shipping receiving plant can be  treated as a customer to supplying plant.that's the reason and in Customer also maintained sales area ie sales org,distribution channel and division.
    Regards,
    M.B.Raju.

  • No change log is created when updating the customer master using LSMW

    Hi Gurus,
         I am a bit confused on why no change log is created when I use the LSMW to update the customer master. What I update is the customer partner of the customers. For example I have a sold-to 1000 then a customer representative (Z3) 50001, now when I use the LSMW to change the customer representative to 50002 it is correctly updated however no change log is found if you check for the changes on that specific customer. This is a bother for me since I want to send all the customer changes through IDOC and the processing needs to access the change log.
    Thank you.

    Hello,
    What process are you using object, BAPI, etc.
    Regards
    Waza

  • Customer Master using LSMW standard batch

    Hi All,
              I am uploading the customer master data using LSMW standard batch input method. When i process the session created using this i am getting an error that input data that "No batch input data for screen SAPMF02D 0310". This is happening when it reachs the sales area screen. All the remaining screens are processed correctly.
    Please help me in this regards,
    Thanks & Regards,
    Sudheera

    Hi,
       Refer
    https://forums.sdn.sap.com/click.jspa?searchID=9408057&messageID=4828875
    Regards
    Kiran Sure

Maybe you are looking for