SD_CUSTOMER_MAINTAIN_ALL  - create customer

Hi All,
I am using SD_CUSTOMER_MAINTAIN_ALL for creating a customer.It is working fine for a single sales area.
But my requirement is to create the same customer for 2 sales area. I am filling knvv structure for the sales area.But as this is a structure i am not able to fill two sales areas.
I tried calling the first SD_CUSTOMER_MAINTAIN_ALL for creating in first sales area and second SD_CUSTOMER_MAINTAIN_ALL changing and creating the second sales area.First call is working , but for the second call it throws an exception that "Key already exists".
Please suggest me how to create a customer for multiple sales areas.I will reward all helpful answers.
Thanks,
Anoop

Hello Anoop
In a current project I am faced with exactly the same requirement. The customer wants the debitor created in all divisions of a sales organisation.
My approach to this is as following:
(1) For creating the debitor I use BAPI_CUSTOMER_CREATEFROMDAT1.
For calling this BAPI you have to provide a reference customer. The new customer is created for the company code and the sales area of the reference customer.
I do not yet commit work meaning that the debitor exists only in the buffer.
(2)
next I call function module SD_CUSTOMER_MAINTAIN_ALL with the next sales area. Important: this function module <b>can access the debitor in the buffer!</b>(3) If I do not get any error from the BAPI and the function module I commit the work.
Result: the debitor is created in 2 sales areas.
The reason why I do not commit after the BAPI call is that the task should be done "all or nothing", i.e. create the debitor in all sales areas or none.
Regards
  Uwe

Similar Messages

  • 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.

  • How to create customer By using SD_CUSTOMER_MAINTAIN_ALL function module

    Hello all,
    I want to create customer By passing( T_CUST_HIER_IP - customer no, account group, company code, distribution channel, division, name1, search team, city, country).
    using BAPI or function module I am using SD_CUSTOMER_MAINTAIN_ALL
    LOOP AT T_CUST_HIER_IP INTO W_CUST_HIER_IP.
        MOVE-CORRESPONDING W_CUST_HIER_IP TO W_KNA1.
        MOVE-CORRESPONDING W_CUST_HIER_IP TO W_KNB1.
        MOVE-CORRESPONDING W_CUST_HIER_IP TO W_KNVV.
      CALL FUNCTION 'SD_CUSTOMER_MAINTAIN_ALL'
       EXPORTING
         I_KNA1                              = W_KNA1
         I_KNB1                              = W_KNB1
         I_KNVV                              = W_KNVV.
    ENDLOOP
    But it gives error SALES_AREA_NOT_VALID.

    Hi,
       Check in TVKO and TVTA  master tables, for Sales Area (Sales OrganizationDistribution ChannelDivision) is vaild or not..
       If no entreis availble , it will raise the exception SALES_AREA_NOT_VALID.
    -somesh
    reward points if it is helpful

  • Bapi to  create customer Master

    Dear all,
    As far i know there is no standard bapi to create a customer.  There i s standard fm used her is SD_CUSTOMER_MAINTAIN_ALL. I tried to create customer master using this and making the function module as remote enabled. i tried to created a  zbapi and use this fm inside of this. Please tell me if any idea on this.If any body knows   please help me in this.
    Regards,
    Madhu.

    Dear Alain
    Once again thanks for your reply. I passed customer no to extract data of a customer . But it is not extracting any data .
    I am thinking to fill all the fields of the table by seeing hoe it is extracting the data . can you give me some idea on this .
    DATA: ls_i_main   TYPE cmds_ei_main,
            ls_e_main   TYPE cmds_ei_main,
            lt_custs    TYPE cmds_ei_extern_t,
            ls_cust     TYPE cmds_ei_extern,
            ls_head     TYPE cmds_ei_header,
            ls_instance TYPE cmds_ei_instance.
      CONSTANTS: lc_obj_task TYPE cmd_ei_object_task VALUE 'M'.
      ls_instance-kunnr = '0000100001'.
      ls_head-object_instance = ls_instance.
      ls_head-object_task = lc_obj_task.
      ls_cust-header = ls_head.
      APPEND ls_cust TO lt_custs.
      ls_e_main-customers = lt_custs.
      CALL METHOD cmd_ei_api_extract=>get_data
        EXPORTING
          is_master_data = ls_e_main
        IMPORTING
          es_master_data = ls_i_main.
          "es_error       = pe_error.
    Regards,
    madhu.
    Edited by: madhurao123 on Mar 31, 2010 1:17 PM

  • Need Function Module to create Customer Master

    Hi,
       I need to create customer master data (T-Code: XD01) include the company code data and sales area data.
       Is there any function module that I can use? I tried to use BDC but since the screen is different for each account group, I'm thinking is there any FM that can use so that I do not need to create so much BDC.
    Hope someone can use.
    Thanks.

    hi there...
    Please find below some of the BAPIs, Function Modules and Direct Input Programs for Customer Master.
    RFBIDE00
    BAPI_CUSTOMER_CREATEFROMDATA1
    SD_CUSTOMER_MAINTAIN_ALL
    hope it helps...
    do reward if helpful or get bak if u hav further queries.

  • . bapi to create customer

    Hi All,
    I am having problem finding a right bapi for create a customer.
    I am using "bapi_customer_createfromdata1" to create a customer. Problem is i couldn't find a structure to pass sales org. data as well as partner functions.
    Please help me. Feel free to ask me questions.
    Thanks,
    Diwakar.

    Hi,
    The way is using multiple BAPI's.
    bapi "bapi_customer_createfromdata1" is used to create customer with reference customer number and then send the information to bapi "sd_customer_maintain_all" for changing the the values.
    Still having problem passing parameters.
    When i am sending partner information(knvp) to "sd_customer_maintain_all", it is giving abap dump assertion_failed.
    I tried to debug the program but i couldn't find the error.
    values i passed to bapi sd_customer_maintain_all
    internal table of type <b>fknvp</b>.
    MANDT sy-mandt
    KUNNR st_knvp-kunnr
    VKORG st_knvp-vkorg
    VTWEG st_knvp-vtweg
    SPART st_knvp-spart
    PARVW st_knvp-parvw
    PARZA
    KUNN2 st_knvp-sp_kunnr
    LIFNR
    PERNR
    PARNR
    KNREF
    DEFPA
    Appended line by line to the table.
    Reward points if found helpful....
    Cheers,
    Venkoji Babu.

  • Create customer master

    Hi Gurus,
    I have a requirement to create customer,i have used the following bapis but cudnt help o create.
    but tried all the bapis like :
    /SAPNEA/SMAPI_CUSTOMER_CREATE2
    /SAPNEA/SMAPI_CUSTOMER_CREATE
    BAPI_CUSTOMER_CREATEFROMDATA1
    BAPI_CUSTOMER_CREATEFROMDATA
    SD_CUSTOMER_MAINTAIN_ALL,
    bapi_customer_create,
    these are not suitable for my requiement.
    i have to pass customer,address,control data,shipping and billing details of xd01.
    please help me to sort out this problem.
    thanks & regards,
    sap8752.

    Hi,
    Have u tried this FM
    go for this /SAPNEA/SMAPI_CUSTOMER_CREATE
    CALL FUNCTION 'BAPI_CUSTOMER_CREATEFROMDATA1'
           EXPORTING
                pi_personaldata        = pi_personaldata
                pi_opt_personaldata    = pi_opt_personaldata
                pi_companydata         = pi_companydata
                pi_opt_companydata     = pi_opt_companydata
                pi_consumeren          = pi_consumeren
                pi_copyreference       = pi_copyreference
                pi_credit_control_flag = pi_credit_control
           IMPORTING
                customerno             = customer_code
                return                 = return.
      IF return IS INITIAL.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
             EXPORTING
                  wait = pi_wait_commit.
      ELSE.
        CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
      ENDIF.
    For creation of classification data you can use below one
    'BAPI_OBJCL_CREATE'.

  • Bapi Bdc Combination to create customer

    Dear all,
    I want to create a customer master from external system. What are the standard bapis are there  they re not suitable for my requirement. I approach it in the following way. I did a bdc for xd01 and trying to call it from a rfc fm which i prepared.  But the data that i passes from this fm is not reaching my bdc program. If any body have a good idea on this please share your idea with me .
    1) I created an import parameter in this i created a structure.
    2) the same structure i declare with the same name in bdc report(se38).
    The code in the fm is in this way
    DATA:
        t_cust TYPE zcust_table .(this is the structure name  in my fm import tab)
    EXPORT t_cust TO MEMORY ID 'TABLE'.
    SUBMIT ZBDC_CUSTOMER AND RETURN.
    3) 
    DATA :BEGIN OF zcust OCCURS 100 .
          INCLUDE STRUCTURE zcust_table.
    DATA:END OF ZCUST.
    START-OF-SELECTION.
    IMPORT t_cust  FROM MEMORY ID 'TABLE'.(Thi is my decalration in se38 bdc program.)
    when i executed my fm  the value that given in fm is not reaching my table which i declared in bdc program.
    Regards,
    Madhu.

    Hi,
    Populate all the customer details address details and personal details in KNA1 structure.
    Populate Company code details in KNB1 structure.
    Populate Sales area details in KNVV structure.
    Populate dunning data in KNB5 table.
    Populate Tax data in KNVI table
    In all the structures other than customer number we have to fill all the primary key fields.
    Call the SD_CUSTOMER_MAINTAIN_ALL function module to create customer as below.
    Create Customer in SAP
            CALL FUNCTION 'SD_CUSTOMER_MAINTAIN_ALL'
              EXPORTING
                i_kna1                  = fs_kna1
                i_knb1                  = fs_knb1
                i_knvv                  = fs_knvv
                i_bapiaddr1             = fs_add1
                i_bapiaddr2             = fs_add2
                pi_postflag             = c_true
              IMPORTING
                e_kunnr                 = w_kunnr
              TABLES
                t_xknb5                 = t_knb5
                t_xknvi                 = t_knvi
              EXCEPTIONS
                client_error            = 1
                kna1_incomplete         = 2
                knb1_incomplete         = 3
                knb5_incomplete         = 4
                knvv_incomplete         = 5
                kunnr_not_unique        = 6
                sales_area_not_unique   = 7
                sales_area_not_valid    = 8
                insert_update_conflict  = 9
                number_assignment_error = 10
                number_not_in_range     = 11
                number_range_not_extern = 12
                number_range_not_intern = 13
                account_group_not_valid = 14
                parnr_invalid           = 15
                bank_address_invalid    = 16
                tax_data_not_valid      = 17
                no_authority            = 18
                company_code_not_unique = 19
                dunning_data_not_valid  = 20
                knb1_reference_invalid  = 21
                cam_error               = 22
                OTHERS                  = 23.
    Check sysubrc to know the error .
    Please let me know if you need any further details.
    Regards
    Madhu

  • BAPI create customer with search term 2?

    Hi all,
    I'm looking for a BAPI/FM, which can create customer master record with 'Search term 2' input field. Pls let me know the BAPI/FM name if you know.
    Regards,
    Hung.

    Hello Hung,
    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.
    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

  • How to create Custom error message in SharePoint 2013

    Hi,
    I have created one document library.On uploading the same file SharePoint throws error as"server error.The same file exit".
    But my requirement is not to show the SharePoint default message.I wanted to create custom message and show the pop up for the same file upload.
    Is there any way to create any custom error page or can I manipulate SharePoint default error page?
    Any help?
    Thank you

    Hi,
    You can create an event receiver to set the validation error messages.  One such post to redirect the custom error page is as follows
    https://social.msdn.microsoft.com/Forums/office/en-US/2bc851f6-e04b-4550-b87f-9b874a290482/sharepoint-event-receivers-and-custom-error-messages?forum=sharepointdevelopmentlegacy
    Create custom error page for SharePoint event receiver
    Please mark it answered, if your problem resolved or helpful.

  • I am planning to create custom defined  DSO Object & Info cube

    Hi ,
                     i am planning to create custom defined  DSO Object & Info cube.what ratio i can calculate what is the keyfields & what are the data fields in DSO.How can i calculate.
                     2. how can i create  suitable dimensions, suitable characterstics  for dimensions.what ratio i can decide.
    Thanks,
    chandu.

    Hi Diego Garu,
                               Thanks for your fast response.i
    VBELN     VBAP     2LIS_11_VAITM                                              0DOC_NUMBER
    POSNR     VBAP     2LIS_11_VAITM                                                0S_ORD_ITEM
    KUNNR     VBAK     2LIS_11_VAHDR                                                 0SOLD_TO
    VBELN     VBRP     2LIS_13_VDITM                                                    0BILL_NUM
    FKDAT     VBRK     2LIS_13_VDHDR                                                 0BILL_DATE
    INCO1     VBRK     2LIS_13_VDHDR(INCO1FieldNot Available in Data Source)     0INCOTERMS
    ZTERM     VBRK     2LIS_13_VDHDR(Payment terms field Not Available in Data Source)                                                                                0UCPYTERMS
    NETWR     VBRP     2LIS_13_VDITM                                                           0NETVAL_INV.
                                           here data is coming from the multible tables.that why i am planning to create custom defined data source based on view. here how can i calucate dso is suitable or cube is suitable.
    suppose dso is suitable how can i decide which on is the data field and which one is the key field.
                                        how can i decide how many dimensions are needed here.and which chara are suitable for that dimensions.
    Thanks ,
    chandu.

  • How to Created custom report for Ship not Billed (SD/FI)?

    Hi all,
    I am anticipating  to write some abap reports..Here is one of them..
    Anyone can help  me with writing a Report , how to do 'Custom Report for shipped not Billed(SD/FI)' ..But since I am new to Abap , if you wish to reply, please use a little more detail and simple explanation, step by step so I can understand what is the idea, how it can be acheived...what kind of report should be used , techniques, tables etc...:)
    Appreciate your help!
    Regards,
    Boby

    Hi Boby,
    You need to create custom transaction to achive these results.
    you will have selection-screen ,it would be :
    Date : Here date would be mandatory  - Ranges Option
    Customer  - Optional field - Ranges
    Order #  Sales Order (Optional) Ranges
    Invoice #  - Invoice # (Optional) Ranges
    You will get the data based on ur selection-screen criteria ...
    First you will have customer order details from diffrent table
    VBAK,
    VBAP,
    LIKP
    LIPS
    VBRK,
    VBRP
    KNA1,
    VBFA Tables ( See the my sample program )
    Output would be :
    Customer #   Custome Name    Order #   Delivery #   Invoice #   Netpr, Netquantity ,
    Check the condition  whether invoice table has VBRK-RFBSK  = ''.
    See the my sample program : This is sales report by monthly..
    REPORT ZFDSALES_REPORT no standard page heading
                           message-id zwave.
    Data Declaration Part
    TYPE-POOLS
    type-pools : slis.
    Tables
    tables : VBAK,
             VBAP.
    Internal table for VBAK Table
    data : begin of i_vbak occurs 0,
           vbeln like vbak-vbeln,
           bstnk like vbak-bstnk,
           vdatu like vbak-vdatu,
           end of i_vbak.
    Internal table for VBAP and MATNR
    data : begin of i_vbap occurs 0,
           vbeln like vbap-vbeln,
           matnr like vbap-matnr,
           kdmat like vbap-kdmat,
           kwmeng like vbap-kwmeng,
           netpr like vbap-netpr,
           maktx like makt-maktx,
           end of i_vbap.
    Internal tables
    data : begin of i_sales occurs 0,
           vdatu like vbak-vdatu,
           bstnk like vbak-bstnk,
           matnr like vbap-matnr,
           maktx like makt-maktx,
           kdmat like vbap-kdmat,
           kwmeng like vbap-kwmeng,
           netpr  like vbap-netpr,
           end of i_sales.
    Variable for ALV
    data : v_repid like sy-repid,
           gt_fieldcat    type slis_t_fieldcat_alv.
    Selection-screen
    selection-screen : begin of block blk with frame title text-001.
    select-options : s_vbeln for vbak-vbeln,
                     s_erdat for vbak-erdat,
                     s_ernam for vbak-ernam,
                     s_vdatu for vbak-vdatu obligatory,
                     s_BSTNK for vbak-BSTNK,
                     s_KUNNR for vbak-kunnr,
                     s_matnr for vbap-matnr,
                     s_KDMAT for vbap-KDMAT.
    selection-screen : end of block blk.
    Initilization
    initialization.
      v_repid = sy-repid.
    S T A R T  -  O F  -  S E L E C T I O N ****************
    start-of-selection.
    Get the data from VBAK and VBAP Tables
      perform get_vbak_vbap.
    E N D  -  O F  -  S E L E C T I O N *****************
    end-of-selection.
    Display the data
      perform dispolay_data.
    *&      Form  get_vbak_vbap
          Get the data from VBAK and VBAP Table
    FORM get_vbak_vbap.
    Get the data from VBAK Table
      select vbeln bstnk vdatu from vbak into table i_vbak
                         where vbeln in s_vbeln
                         and   bstnk in s_bstnk
                         and   vdatu in s_vdatu
                         and   kunnr in s_kunnr
                         and   erdat in s_erdat
                         and   ernam in s_ernam.
      if sy-subrc ne 0.
        message e000(zwave) with 'No data found for given selection'.
      endif.
    Get the data from VBAP Table
      select avbeln amatnr akdmat akwmeng a~netpr
             b~maktx into table i_vbap
             from vbap as a inner join makt as b on bmatnr = amatnr
             for all entries in i_vbak
             where a~vbeln in s_vbeln
             and   a~kdmat in s_kdmat
             and   a~abgru = space
             and   a~matnr in s_matnr
             and   a~matnr ne '000000000000009999'
             and   a~matnr ne '000000000000004444'
             and   a~matnr ne '000000000000008888'
             and   a~matnr ne '000000000000001111'
             and   a~werks = '1000'
             and   b~spras = 'E'
             and   a~vbeln = i_vbak-vbeln.
      if sy-subrc ne 0.
        message e000(zwave) with 'No data found for given selection'.
      endif.
      sort i_vbak by vbeln.
      sort i_vbap by vbeln matnr.
      loop at i_vbap.
        read table i_vbak with key vbeln = i_vbap-vbeln
                                binary search.
        if sy-subrc eq 0.
          i_sales-bstnk = i_vbak-bstnk.
          i_sales-vdatu = i_vbak-vdatu.
          i_sales-matnr = i_vbap-matnr.
          i_sales-kdmat = i_vbap-kdmat.
          i_sales-maktx = i_vbap-maktx.
          i_sales-netpr = i_vbap-netpr.
          i_sales-kwmeng = i_vbap-kwmeng.
          append i_sales.
        else.
          continue.
        endif.
        clear : i_sales,
                i_vbap,
                i_vbak.
      endloop.
      sort i_sales by vdatu bstnk matnr.
      refresh : i_vbap,
                i_vbak.
    ENDFORM.                    " get_vbak_vbap
    *&      Form  dispolay_data
          Display the data
    FORM dispolay_data.
    Fill the Fiedlcat
      PERFORM fieldcat_init  using gt_fieldcat[].
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                =
      I_BUFFER_ACTIVE                   = ' '
          I_CALLBACK_PROGRAM                = v_repid
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = ' '
      I_CALLBACK_TOP_OF_PAGE            = ' '
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
      IS_LAYOUT                         =
          IT_FIELDCAT                       = gt_fieldcat[]
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
      IT_EVENTS                         =
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      IT_ALV_GRAPHICS                   =
      IT_ADD_FIELDCAT                   =
      IT_HYPERLINK                      =
      I_HTML_HEIGHT_TOP                 =
      I_HTML_HEIGHT_END                 =
      IT_EXCEPT_QINFO                   =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
        TABLES
          T_OUTTAB                          = i_sales
    EXCEPTIONS
      PROGRAM_ERROR                     = 1
      OTHERS                            = 2
    ENDFORM.                    " dispolay_data
    *&      Form  fieldcat_init
          text
         -->P_GT_FIELDCAT[]  text
    FORM fieldcat_init USING  e01_lt_fieldcat type slis_t_fieldcat_alv.
      DATA: LS_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    Delivery Date
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'VDATU'.
      LS_FIELDCAT-OUTPUTLEN    = 12.
      LS_FIELDCAT-TABNAME    = 'I_SALES'.
      ls_fieldcat-seltext_L = 'Delivery Date'.
      APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
    Purchase Order #Material Description
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'BSTNK'.
      LS_FIELDCAT-OUTPUTLEN    = 25.
      LS_FIELDCAT-TABNAME    = 'I_SALES'.
      ls_fieldcat-seltext_L = 'Purchase Order #'.
      APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
    Material
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-REF_FIELDNAME    = 'MATNR'.
      LS_FIELDCAT-REF_TABNAME    = 'MARA'.
      LS_FIELDCAT-FIELDNAME    = 'MATNR'.
      LS_FIELDCAT-TABNAME    = 'I_SALES'.
      ls_fieldcat-seltext_L = 'Material #'.
      ls_fieldcat-seltext_M = 'Material #'.
      ls_fieldcat-seltext_S = 'Material #'.
      APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
    Material Description
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'MAKTX'.
      LS_FIELDCAT-OUTPUTLEN    = 40.
      LS_FIELDCAT-TABNAME    = 'I_SALES'.
      ls_fieldcat-seltext_L = 'Material Description'.
      APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
    Customer Material #
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'KDMAT'.
      LS_FIELDCAT-OUTPUTLEN    = 35.
      LS_FIELDCAT-TABNAME    = 'I_SALES'.
      ls_fieldcat-seltext_L = 'Customer material no.'.
      APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
    Quantity
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'KWMENG'.
      LS_FIELDCAT-OUTPUTLEN    = 15.
      LS_FIELDCAT-TABNAME    = 'I_SALES'.
      ls_fieldcat-seltext_L = 'Quantity'.
      APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
    Net Price
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'NETPR'.
      LS_FIELDCAT-OUTPUTLEN    = 15.
      LS_FIELDCAT-TABNAME    = 'I_SALES'.
      ls_fieldcat-seltext_L = 'Net Price'.
      APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
    ENDFORM.                    " fieldcat_init
    Reward Points if it is helpful
    Thanks
    Seshu

  • How to create custom cloumns in report

    Hi,
    I want to create custom columns in the reports(columns which are not present in active subject area. Please help.
    Thanks
    Arpita

    Arpita,
    You can create a calculated column using any Field (Presentation Column) in any Presentaion Table.
    Eg: You want to calculate the difference between the Start and End Date of an Activity.
    1. Simply Create a report on the Activities SA (Analytics or Real-time doe not matter here)
    2. Add the required Coumns
    3. To calculate the difference between the Start and End time.
    - add the below fields from Activity
    - Click the 'Fx' icon any field that you would like to display the calculated value in.
    - Replace the existing formula in this field with TIMESTAMPDIFF(SQL_TSI_DAY, Activity."Created Date", Activity."Completed Date") - This is your calculated value
    Activity ID     Subject     Created Date     Completed Date     Difference
    AXXX-IHJ1W     Prepare Proposal     10/31/2011 6:39:43 AM     11/18/2011 4:48:54 AM     18
    For more details, I would suggest you look at the CRM On Demand Bookshelf or click the hlp link in CRM On Demand.
    Hope this helps!
    Thanks,
    Royston

  • How to create custom infotype for training and event management

    hai freinds can any one tell me how to create custom infotype for training and event managment with following fields
    PS No – PA0000-> PERNR
    Name   - PA0001 -> ENAME
    IS PS.No. – PA0001-> PS no. of Immediate Superior
    IS name PA0001 -> ENAME
    thanx in advance
    afzal

    Hi,
    Your question is not clear for me. Since it is a TEM infotype, it could be a PD infotype.
    If you wish to create a PD infotype, use transaction PPCI to create the infotype.
    But before that you need to create a structure HRInnnn (where nnnn is the infotype number) with all the fields relevant for the infotype.
    If you wish to create a PA infotype, use transaction PM01 to create the infotype.
    But before that you may be required to create a strcuture PSnnnn  (where nnnn is the infotype number) with all the fields relevant for the infotype.
    Regards,
    Srini

  • I have Pages 09.  I have created custom templates and want to delete them.  How do I delete a template I have created in Pages 09?

    I have Pages 09.  I have created custom templates and want to delete them.  How do I delete a template I have created in Pages 09?

    Pages stores those you created & saved as templates in (your account) > Library > Application Support > iWork > Pages > Templates > My Templates. The door to the user's Library is hidden in Lion but it is easy to open. In Finder, hold down the Option key while clicking on the Go menu & your users Library will appear about halfway down the list.

Maybe you are looking for