Sales by Divison

hi all,
i want to calculate the Sales by Divison , in which table can i get this.
thanks

Hi,
You can see the sales by division.
If you want to see the sales done at a perticuler division level, then we have a table called VBRP.
In this you can select Division as your selection critieria.
And can get the sales details, for all the invoices wise.
Hope this is clear.
Reward if helpful.
Thanks,
Praveen

Similar Messages

  • Z report logic- Customer open item analysis

    Dear Experts
    Our client is using S_ALR_87012178 report for customer open items due analysis.
    Now,here they also need sales group wise & division wise split up. Sales group from SO, not CMR, since   a single/same customer may have different sales groups for different SOs.
    I tried.. but no other report..satisfying this..
    So, decided to go ahead with a new Z Development , wherein I plan to call in the program to our customized prgram/report &  then to code it, so that sales group & divison are reflected to the corresponding customers.
    Now, the challenge is, most (infact all) of the std credit management reports are customer master based, but this requirement (sales group & division) is transaction 9from SO) based.
    Now, how do we write the logic/join the tables for me to write FSpec, so as to develop  a Z Report.
    Anticipating your guidance/suggestions/help.
    Good day...
    Rgds
    Sumanth.Gururaj

    hi,
    this is to inform you that,
    take the program with RFDOPR10 copy the same program under the name of Z report.
    add these fields in selection screen and keep them mandatory on the selection screen & take logic from these tables and fields
    1. Sales Group - VBAK-VKGRP
    2. Division - VBAK-SPART
    take the program with RFDOPR10 copy the same program under the name of Z report.
    i think so you cannot capture the total functionality of RFDOPR10 which is the extract of plenty of tables.
    finally if it is exectued then entire effort goes invain.
    so my suggestion is catch hold of ABAPER and follow the above.
    note : if sales group wise and division analysis is coming in the same report then it is very to populate the data from the Z report.
    first confirm that.
    if it is coming then go ahead with Z reprot itself
    balajia

  • How to remain the screen data after poping up the message.?

    Hi Experts,
    Case:
    Whe User is creating a sales order, suppose in the screen he had given the sales organization, divison, channel etc.
    Now i have to modify the exit to validate some condition by taking all the data. For ex. loading date, divison etc.
    If that valdiation failed i have to popup a message to user and
    when user clcik the ok, he should be at that screen and  be able to modify the things to validate again.
    Now problem i am facing is, when i am displaying a popup
    message and after clicking ok from user, control of the  is not going back to the last screen with all the data input by the user.
    Please help.

    Hi,
    Suppose you are using a screen 1000 for intaking all these inputs.
    In its PAI put the fields you require within CHAIN....ENDCHAIN.
    Example:
    CHAIN.
    field salesorder module check_salesorder ON INPUT.
    ENDCHAIN.
    Within the module check_salesorder call a subroutine check_salesorder.
    Within subroutine check_salesorder, call the standard SAP function Module POPUP_TO_CONFIRM_STEP.
    This way you can have a popup and stay in the same screen.
    Reward if Helpful.

  • Redetermination of Pricing Procedure? Pls Urgent.

    Dear all,
    When i am creating a Sales order, Based on Org. determination(Sales org. Dist. Channel and Div)system pick up the pricing procedure.
    Now i am changing the Distribution Channel manually at Organization TAB but now system does not redetermine the pricing pricing procedure based on new Sales Area.
    How can i solve it.
    Pls reply
    Thanks
    Jayesh

    Hi,
    In CRM the pricing procedure determining based on the sales area ( divison is option) Doc pricing procedure indicator & customer pricing procedure indicator in the respecive Transaction type & customer master.Once we maintains this combination with the pricing procedure, in the order when ever this combination available than particular pricing procedure will determine, Here you need to           ( T code SPRO ) configurre new distribution channel with the above combination & required pricing procedure in the order.
    hope it helps you
    Regards
    Naren..

  • VDH1 hierarchy

    hierarchy is created by transaction VDH1 in R/3,which is stored in table KNVH
    for the 0customer info object in BW
    Now i have following questions
    1.Can i extrcat this hierarchy as part of standard 0CUSTOMER_LKLS_HIER
       datasource or i need to create custom hierarchy using GS01,Gs02 transactions
    2.if custom data source to be created then under which application component
       it is assigned to & where to replicate it in BW?
    3.hierarchy is based on  the grouping of  customer,sales org,divison together
      how to create such a hierarchy which has three fields ?

    Hi,
    Please check whether you have assigned u have correctly assigned hieracy type to account grp.Also, check whether u have assigned hierachy type to Partner function.
    Thanks,
    pramod

  • Sale Order Problem

    I am facing problem in Sale order , The problem is :-
    Currently the sales orders that have been created before 15th June are running into an issue where it asks for entering the Ship to party for already created orders. The database entry shows the Customer number at the database level, but cannot pull it on to the SAP Screen.
    On the VA02 when i enter the sale order no. it is throwing one information message stating 'PLEASE ENTER SOLD-TO-PARTY'  and they are already maintained in the database.
    What is the reason behind this.

    Hii
    Wheather check error u r getting for some specific material........
    GO to t-code MM02....give here material number...
    then check the Division whather it have been changed or not.
    Here is one workarround available......
    Go to T-code AUT10
    Give the start date 15th June
    and T-code MM01/MM02......dont give any user ID or give the user ID of the person whom u think can might change the data
    Then execute.
    Now system will show wheather Divison (SPART) have been changed or not
    Same you can do with T-code XD01/XD02 for customer.
    Regards
    Shambhu Sarkar

  • Coupon specific discounts are not coming in the sales order

    Hello Experts,
    I have created a internal coupon campaign and assigned discounts to the campaign. We used condition type 1202 to assign the discount values in the campaign.
    In the sales order when i enter the coupon id system fetching the corresponding campaign ID. But , sales order is not fetching the discount condition types mentioned in the campaign.
    Below are the configurations i made.
    1) Copied the condition type 1202 to ZCUI.
    2) Assign this condition type to the condition maintenance group (1200) and keep the condition table as SAP12000
    3) Maintain this condition type to the pricing procedure and assign pricing procedure to the Sales order transaction type.
    4) In the campaign i have maintained the values for the condition type . -- Sales org, distri channel. divison, Product , discount value
    5) I even verified that CNDCRMPRSAP12000 has the records for this campaign.
    Now the question is do i need to do any customization in Campaign determination. I am not using TPM and it is a simple coupon campaign.
    Please suggest me , your help is highly appreciated.
    Regards,
    Deeps.

    Not sure if it works, may be you can check this
    - is your condition type 1202's calculation type field has been defined as "percentage"?
    - the pricing procedure that you are using, does it contain the corresponding condition type 1202 for discount amount?
    - Has the pricing procedure been maintained for your org data in "Determine Pricing Procedure" in spro-> CRM-> Basic Functions -> Pricing -> Determing Pricing Procedure
    Please check this.
    Edited by: Harsh Singal on May 4, 2011 5:53 AM

  • Error throwing while creating sales order

    Dear all,
    While on sales order creation,We have entered order type,sales organization,distribution channel,divison,
    on entering sold to party,presssing enter,error is throwing as
    No customer master record exists for sold-to party
    actually customer master record is already created,
    We need to extend the sales area then only system is allowing to create sales order,
    Is there is any setting missing in configuration ?
    Thanks
    Jeyakanthan

    hi,
    can be done in two ways
    1, only for the paticular customer
    goto XD01 and extend the customer by entering new sales area above
    and the already exisisting sales area in the reference
    2,common distribution channel and common division(this is for all the customer created in that particular sales area)
    IMG>sales and distribution>master data
    regards
    senya

  • Material of different division allowed in the Sales order???/

    Hi here is the issue,
    A Material has been extended for two sales area but has a single division 20 as in standard.But when I create a order with a sales area with a different divison 10 ,the system surprisingly allows the material to be added to that order alotugh the divison of the material is different.
    How can I stop this!!!!

    Hello Sam,
    Customer master is the primary master data in SAP SD. Typically SAP SD functional consultant will have to customize the customer master at least a little bit to suit the requirements of the project. Since this is very standard data and needs to be synced across systems ( For Example ECC CRM ), SAP allows very little customization to the customer master. Nevertheless, SAP allows full customization in the customer master in terms of fields (Hide, show, grey out fields, make fields mandatory etc)and external interfaces ( Interacting with external tax vendors like Vertex etc ) .
    Its been defined per account group , company code and sales area.
    Please refer following links for more info :--
    http://help.sap.com/saphelp_46c/helpdata/en/dd/55f46c545a11d1a7020000e829fd11/content.htm
    http://www.slideshare.net/eddai/sap-accounts-reveivable-customer-master-httpsapdocsinfo
    http://home4sap.com/Blog/2010/09/customer-master-customization-in-sap-sd/
    Customer master -control data tab --> Field VAT reg.no
    Thanks/Rajesh

  • Problem in uploading multiple line items while Creating sales order by BAPI

    Hi experts ,  Im able to create sales order  with one item while using this program, but the problem is  when iam having multiple  items or multiple sales order  , iam not able to createthe line items , though its creating  sales order header , Iam copy pasting my code , please add the additional code to my code to take more than 1 line items ,This is urgent requirement . Points will be rewarded for answers , Thanks in advance
    *& Report  Z_SO_CREATE_BAPI
    REPORT  Z_SO_CREATE_BAPI.
    DATA: i_header TYPE bapisdhd1 occurs 0 with header line.
    DATA: i_details TYPE bapisditm OCCURS 0 WITH HEADER LINE.
    DATA: i_partner TYPE bapiparnr OCCURS 0 WITH HEADER LINE.
    DATA: i_return1 TYPE bapiret2 OCCURS 0 WITH HEADER LINE.
    DATA: i_return2 TYPE bapiret2.
    data : ORDER_HEADER_IN like BAPISDHD1.
    data : ORDER_ITEMS_IN like BAPISDITM occurs 0 with HEADER LINE .
    data : ORDER_ITEMS_INX Like BAPISDITMX occurs 0 with HEADER LINE .
    data : RETURN like BAPIRET2 occurs 0 with header line.
    data : ORDER_PARTNERS like BAPIPARNR occurs 0 with
    header line.
    DATA : ORDER_KEYS LIKE BAPISDKEY OCCURS 0 WITH HEADER
    LiNE.
    data : ORDER_SCHEDULES_IN like BAPISCHDL occurs 0 with
    header line.
    data : ORDER_SCHEDULES_INX like BAPISCHDLX occurs 0 with
    header line.
    data : BEGIN OF TAB OCCURS 0,
           SRNO(4),
            DOC_TYPE like ORDER_HEADER_IN-dOC_TYPE,
            SALES_ORG LIKE ORDER_HEADER_IN-SALES_ORG,
            DISTR_CHAN LIKE ORDER_HEADER_IN-DISTR_CHAN,
            DIVISION like ORDER_HEADER_IN-DIVISION,
           REQ_DATE_H(10),
           PURCH_DATE(10),
           PMNTTRMS LIKE ORDER_HEADER_IN-PMNTTRMS,
           PURCH_NO_C LIKE ORDER_HEADER_IN-PURCH_NO_C,
           ITM_NUMBER like BAPISDITM-ITM_NUMBER,
            MATERIAL   LIKE  ORDER_ITEMS_IN-MATERIAL ,
            PLANT LIKE ORDER_ITEMS_IN-PLANT,
           TARGET_QTY LIKE ORDER_ITEMS_IN-TARGET_QTY,
           ITM_NUMBERX like  ORDER_ITEMS_INX-ITM_NUMBER ,
           MATERIALX   LIKE  ORDER_ITEMS_INX-MATERIAL ,
           CUST_MAT22 LIKE ORDER_ITEMS_IN-CUST_MAT22,
           PLANTX LIKE ORDER_ITEMS_INX-PLANT,
           TARGET_QTYX LIKE ORDER_ITEMS_INX-TARGET_QTY,
           ITM_NUMBER LIKE ORDER_ITEMS_IN-ITM_NUMBER,
           MATERIAL   LIKE  ORDER_ITEMS_IN-MATERIAL ,
            PARTN_ROLE LIKE ORDER_PARTNERS-PARTN_ROLE,
            PARTN_NUMB LIKE ORDER_PARTNERS-PARTN_NUMB,
          END OF TAB.
    DATA: v_vbeln TYPE bapivbeln-vbeln.
    selection-screen begin of block b1 with frame.
    skip 3.
    parameter:p_infile like rlgrap-filename obligatory.
    skip 3.
    selection-screen end  of block b1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_infile.
      PERFORM value_help.
    start-of-selection.
    CALL FUNCTION 'WS_UPLOAD'
      EXPORTING
        filename                     = p_infile
       FILETYPE                      = 'DAT'
      HAS_FIELD_SEPARATOR           = 'X'
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
      CHECK_BOM                     = ' '
      VIRUS_SCAN_PROFILE            =
      NO_AUTH_CHECK                 = ' '
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
      tables
        data_tab                      = tab.
    EXCEPTIONS
      FILE_OPEN_ERROR               = 1
      FILE_READ_ERROR               = 2
      NO_BATCH                      = 3
      GUI_REFUSE_FILETRANSFER       = 4
      INVALID_TYPE                  = 5
      NO_AUTHORITY                  = 6
      UNKNOWN_ERROR                 = 7
      BAD_DATA_FORMAT               = 8
      HEADER_NOT_ALLOWED            = 9
      SEPARATOR_NOT_ALLOWED         = 10
      HEADER_TOO_LONG               = 11
      UNKNOWN_DP_ERROR              = 12
      ACCESS_DENIED                 = 13
      DP_OUT_OF_MEMORY              = 14
      DISK_FULL                     = 15
      DP_TIMEOUT                    = 16
      OTHERS                        = 17
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    **Validation for the Create SO screen
    *AT SELECTION-SCREEN ON BLOCK na_create.
    Loop at Tab.
    i_header-doc_type =  TAB-DOC_TYPE .
    i_header-sales_org = TAB-SALES_ORG.
    i_header-distr_chan = TAB-DISTR_CHAN .
    i_header-division = TAB-DIVISION .
    append i_header.
    *endloop.
    i_partner-partn_role = TAB-PARTN_ROLE .
    i_partner-partn_numb =  TAB-PARTN_NUMB.
    APPEND i_partner.
    i_details-material =  TAB-MATERIAL .
    APPEND i_details.
    endloop.
    *Bapi for Creating SO
                   CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
                     EXPORTING
                     SALESDOCUMENTIN               = v_vbeln
                       order_header_in               = i_header
                     ORDER_HEADER_INX              =
                     SENDER                        =
                     BINARY_RELATIONSHIPTYPE       =
                     INT_NUMBER_ASSIGNMENT         =
                     BEHAVE_WHEN_ERROR             =
                     LOGIC_SWITCH                  =
                     TESTRUN                       =
                     CONVERT                       = ' '
                    IMPORTING
                      SALESDOCUMENT                 = v_vbeln
                     tables
                      RETURN                        = i_return1
                      ORDER_ITEMS_IN                = i_details
                      ORDER_ITEMS_INX               = ORDER_ITEMS_INX
                       order_partners                = i_partner .
                     ORDER_SCHEDULES_IN            =
                     ORDER_SCHEDULES_INX           =
                     ORDER_CONDITIONS_IN           =
                     ORDER_CONDITIONS_INX          =
                     ORDER_CFGS_REF                =
                     ORDER_CFGS_INST               =
                     ORDER_CFGS_PART_OF            =
                     ORDER_CFGS_VALUE              =
                     ORDER_CFGS_BLOB               =
                     ORDER_CFGS_VK                 =
                     ORDER_CFGS_REFINST            =
                     ORDER_CCARD                   =
                     ORDER_TEXT                    =
                     ORDER_KEYS                    =
                     EXTENSIONIN                   =
                     PARTNERADDRESSES              =
    IF NOT v_vbeln IS INITIAL.
    *Bapi Commit Work
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
    WAIT =
    IMPORTING
    return = i_return2
    ELSE.
    CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'
    IMPORTING
    RETURN =
    ENDIF.
    LOOP AT i_return1 .  "INTO wa_return1.
    WRITE:/ i_return1-message.
    ENDLOOP.
    FORM value_help .
      CALL FUNCTION 'DSVAS_DOC_WS_FILENAME_GET_50'
        EXPORTING
          DEF_FILENAME     = ' '
          DEF_PATH         = ' '
          MASK             = ',.,..'
          MODE             = 'O'
          TITLE            = ' '
        IMPORTING
          FILENAME         = p_infile
        EXCEPTIONS
          INV_WINSYS       = 1
          NO_BATCH         = 2
          SELECTION_CANCEL = 3
          SELECTION_ERROR  = 4
          OTHERS           = 5.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    endform.
    txt file data
    order type  salesorg   distch      divison       materialno                  parter role
    TA     PB01     01     00     000000000000000852     WE
    Partner no
    8101000000

    Hi Neerja,
    you can reffer this sample code. It may not be complet soluation for your poblem,
    but you will get some idea.
    *& Report  ZBAPI_SALESORDER_CREATE
    *& Author : Karthik
    REPORT  ZBAPI_SALESORDER_CREATE.
    data : ORDER_HEADER_IN like BAPISDHD1.
    data : ORDER_ITEMS_IN like BAPISDITM occurs 0 with
    header line.
    data : RETURN like BAPIRET2 occurs 0 with header line.
    data : ORDER_PARTNERS like BAPIPARNR occurs 0 with
    header line.
    DATA : ORDER_KEYS LIKE BAPISDKEY OCCURS 0 WITH HEADER
    LINE.
    data : ORDER_SCHEDULES_IN like BAPISCHDL occurs 0 with
    header line.
    data : BEGIN OF TAB OCCURS 0,
            SRNO(4),
            DOC_TYPE like ORDER_HEADER_IN-dOC_TYPE,
            SALES_ORG LIKE ORDER_HEADER_IN-SALES_ORG,
            DISTR_CHAN LIKE ORDER_HEADER_IN-DISTR_CHAN,
            DIVISION like ORDER_HEADER_IN-DIVISION,
           REQ_DATE_H(10),
            PURCH_DATE(10),
            PMNTTRMS LIKE ORDER_HEADER_IN-PMNTTRMS,
            PURCH_NO_C LIKE ORDER_HEADER_IN-PURCH_NO_C,
            ITM_NUMBER like BAPISDITM-ITM_NUMBER,
            CUST_MAT22 LIKE ORDER_ITEMS_IN-CUST_MAT22,
            PLANT LIKE ORDER_ITEMS_IN-PLANT,
            TARGET_QTY LIKE ORDER_ITEMS_IN-TARGET_QTY,
            PARTN_ROLE LIKE ORDER_PARTNERS-PARTN_ROLE,
            PARTN_NUMB LIKE ORDER_PARTNERS-PARTN_NUMB,
          END OF TAB.
    data: itab1 like alsmex_tabline occurs 0 with header
    line.
    DATA: gd_currentrow type i.
    data : PURCHASEORDER like ekko-ebeln.
    Data: tot_rec type i,     "Total Records
         gd_update type i,   "Main Table Increement Counter
         gd_lines type i,    "Success Table increement Counter
         w_textout like t100-text. "VARIABLE TO GET ERRORLOG
    data : begin of it_success occurs 0,
            SALESDOCUMENT LIKE BAPIVBELN-VBELN,  "PROJECT
          end of it_success.
    data : begin of it_error occurs 0,
            srno(4),
            err_msg(73) TYPE c,    "TO RETREIVE ERROR MESSAGES
         end of it_error.
    data : srno(4).
    DATA : SALESDOCUMENT LIKE  BAPIVBELN-VBELN.
    selection-screen begin of block b1 with frame.
    skip 3.
    parameter:p_infile like rlgrap-filename obligatory.
    skip 3.
    selection-screen end  of block b1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_infile.
      PERFORM value_help.
    start-of-selection.
      call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
        EXPORTING
          filename                = p_infile
          i_begin_col             = '1'
          i_begin_row             = '2' "Do not require
    headings
          i_end_col               = '22'
          i_end_row               = '10000'
        TABLES
          intern                  = itab1
        EXCEPTIONS
          inconsistent_parameters = 1
          upload_ole              = 2
          others                  = 3.
      if sy-subrc <> 0.
        message e010(zz) with text-001. "Problem uploading
    Excel Spreadsheet
      endif.
    *perform open_group.
      sort itab1 by row col.
    Get first row retrieved
      read table itab1 index 1.
    Set first row retrieved to current row
      gd_currentrow = itab1-row.
      loop at itab1.
    Reset values for next row
        if itab1-row ne gd_currentrow.
          append tab .
          clear tab.
          gd_currentrow = itab1-row.
        endif.
        SHIFT ITAB1-VALUE LEFT DELETING LEADING SPACE.
        case itab1-col.
          when '0001'.
            TAB-SRNO = itab1-value.
          when '0002'.
            TAB-DOC_TYPE = itab1-value.
          when '0003'.
            TAB-SALES_ORG = itab1-value.
          when '0004'.
            TAB-DISTR_CHAN = itab1-value.
          when '0005'.
            TAB-DIVISION = itab1-value.
         when '0006'.
           TAB-REQ_DATE_H =  itab1-value.
          when '0006'.
            TAB-PURCH_DATE = itab1-value.
          when '0007'.
            TAB-PMNTTRMS = itab1-value.
          when '0008'.
            TAB-PURCH_NO_C = itab1-value.
            when '0009'.
            TAB-ITM_NUMBER = itab1-value.
           when '0010'.
            TAB-CUST_MAT22 = itab1-value.
          when '0011'.
            TAB-PLANT  = itab1-value.
          when '0012'.
            TAB-TARGET_QTY = itab1-value.
          when '0013'.
            TAB-PARTN_ROLE = itab1-value.
          when '0014'.
            TAB-PARTN_NUMB = itab1-value.
        endcase.
      endloop.
      append tab.
      clear tab.
      sort tab by SRNO.
      LOOP AT TAB.
       concatenate tab-REQ_DATE_H+4(4)
    tab-REQ_DATE_H2(2) tab-REQ_DATE_H0(2) into
    tab-REQ_DATE_H.
        concatenate tab-PURCH_DATE+4(4)
    tab-PURCH_DATE2(2) tab-PURCH_DATE0(2) into
    tab-PURCH_DATE.
        SRNO = TAB-SRNO.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
            INPUT  = tab-PARTN_NUMB
          IMPORTING
            OUTPUT = tab-PARTN_NUMB.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
            INPUT  = tab-CUST_MAT22
          IMPORTING
            OUTPUT = tab-CUST_MAT22.
        IF TAB-SRNO = SRNO.
          ORDER_HEADER_IN-DOC_TYPE = TAB-DOC_TYPE.
          ORDER_HEADER_IN-SALES_ORG = TAB-SALES_ORG.
          ORDER_HEADER_IN-DISTR_CHAN = TAB-DISTR_CHAN.
         ORDER_HEADER_IN-REQ_DATE_H = TAB-REQ_DATE_H.
          ORDER_HEADER_IN-PURCH_DATE = TAB-PURCH_DATE.
          ORDER_HEADER_IN-PMNTTRMS = TAB-PMNTTRMS.
          ORDER_HEADER_IN-PURCH_NO_C = TAB-PURCH_NO_C.
          ORDER_HEADER_IN-DIVISION  = tab-DIVISION.
          ORDER_ITEMS_IN-ITM_NUMBER = tab-ITM_NUMBER.
          ORDER_ITEMS_IN-material = TAB-CUST_MAT22.
          ORDER_ITEMS_IN-PLANT      = TAB-PLANT.
          APPEND ORDER_ITEMS_IN.
          ORDER_PARTNERS-PARTN_ROLE = TAB-PARTN_ROLE.
          ORDER_PARTNERS-PARTN_NUMB = TAB-PARTN_NUMB.
          APPEND ORDER_PARTNERS.
          ORDER_SCHEDULES_IN-ITM_NUMBER = tab-ITM_NUMBER.
          ORDER_SCHEDULES_IN-REQ_QTY = tab-TARGET_QTY.
          append ORDER_SCHEDULES_IN.
        ENDIF.
        AT END OF SRNO.
          CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
            EXPORTING
               SALESDOCUMENTIN               =
                 ORDER_HEADER_IN               = ORDER_HEADER_IN
               ORDER_HEADER_INX              =
               SENDER                        =
               BINARY_RELATIONSHIPTYPE       =
               INT_NUMBER_ASSIGNMENT         =
               BEHAVE_WHEN_ERROR             =
               LOGIC_SWITCH                  =
               TESTRUN                       =
               CONVERT                       = ' '
           IMPORTING
             SALESDOCUMENT                 = SALESDOCUMENT
            TABLES
             RETURN                        = RETURN
                 ORDER_ITEMS_IN                = ORDER_ITEMS_IN
               ORDER_ITEMS_INX               =
                 ORDER_PARTNERS                = ORDER_PARTNERS
                 ORDER_SCHEDULES_IN            = ORDER_SCHEDULES_IN
               ORDER_SCHEDULES_INX           =
               ORDER_CONDITIONS_IN           =
               ORDER_CONDITIONS_INX          =
               ORDER_CFGS_REF                =
               ORDER_CFGS_INST               =
               ORDER_CFGS_PART_OF            =
               ORDER_CFGS_VALUE              =
               ORDER_CFGS_BLOB               =
               ORDER_CFGS_VK                 =
               ORDER_CFGS_REFINST            =
               ORDER_CCARD                   =
               ORDER_TEXT                    =
             ORDER_KEYS                    = ORDER_KEYS
               EXTENSIONIN                   =
               PARTNERADDRESSES              =
          IF SALESDOCUMENT <> SPACE.
            commit work.
            ADD 1 TO gd_update.
            it_success-SALESDOCUMENT = SALESDOCUMENT.
            append it_success.
            CLEAR :SALESDOCUMENT,ORDER_HEADER_IN.
            REFRESH : RETURN,ORDER_ITEMS_IN,ORDER_PARTNERS.
          ELSE.
            loop at return.
              it_error-SRNO = tab-SRNO.
              it_error-err_msg = return-MESSAGE .
              Append it_error.
            ENDLOOP.
            CLEAR :SALESDOCUMENT,ORDER_HEADER_IN.
            REFRESH : RETURN,ORDER_ITEMS_IN,ORDER_PARTNERS.
          ENDIF.
        endat.
      endloop.
      DESCRIBE TABLE it_success LINES gd_lines.
      IF gd_lines GT 0.
        Display result report column headings
        PERFORM display_column_headings.
        Display result report
        PERFORM DISPLAY_SUCESS.
      ENDIF.
    IF SUCESS FAILS Display Error Report
      DESCRIBE TABLE it_error LINES gd_lines.
      IF gd_lines GT 0.
        PERFORM errorheadings.
        PERFORM errorreport.
      ENDIF.
    *&      Form  display_column_headings
          text
    FORM display_column_headings.
      WRITE:2 ' Success Report '(014) COLOR COL_POSITIVE.
      SKIP.
      WRITE:2 'The following records inserted
    successfully:'(013).
      WRITE:/ sy-uline(15).
      FORMAT COLOR COL_HEADING.
      WRITE:/      sy-vline,
               (10) 'Sales order'(004), sy-vline.
      WRITE:/ sy-uline(15).
    ENDFORM.                    "display_column_headings
    *Subroutine to display SUCESS REPORT
    FORM DISPLAY_SUCESS.
      FORMAT COLOR COL_NORMAL.
      LOOP AT it_success.
        WRITE:/      sy-vline,
            (10)  it_success-SALESDOCUMENT, sy-vline.
        CLEAR it_success.
      ENDLOOP.
      WRITE:/ sy-uline(15).
      REFRESH: it_success.
      FORMAT COLOR COL_BACKGROUND.
    ENDFORM.                               "
    DISPLAY_REPORT
    *&      Form  errorreport
          text
    FORM errorreport.
      LOOP AT it_error.
        WRITE:/      sy-vline,
                (10) it_error-SRNO, sy-vline,
                 (40) it_error-err_msg, sy-vline.
      ENDLOOP.
      WRITE:/ sy-uline(104).
      REFRESH: it_error.
    endform.                    "errorreport
    *&      Form  ERRORHEADINGS
          text
    FORM ERRORHEADINGS.
      SKIP.
      WRITE:2 ' Error Report '(007) COLOR COL_NEGATIVE.
      SKIP.
      WRITE:2 'The following records failed during
    update:'(008).
      WRITE:/ sy-uline(104).
      FORMAT COLOR COL_HEADING.
      WRITE:/      sy-vline,
              (10) 'ERROR.'(009), sy-vline.
      WRITE:/ sy-uline(104).
      FORMAT COLOR COL_NORMAL.
    ENDFORM.                    "ERRORHEADINGS
    **&      Form  value_help
          text
    -->  p1        text
    <--  p2        text
    FORM value_help .
      CALL FUNCTION 'DSVAS_DOC_WS_FILENAME_GET_50'
        EXPORTING
          DEF_FILENAME     = ' '
          DEF_PATH         = ' '
          MASK             = ',.,..'
          MODE             = 'O'
          TITLE            = ' '
        IMPORTING
          FILENAME         = p_infile
        EXCEPTIONS
          INV_WINSYS       = 1
          NO_BATCH         = 2
          SELECTION_CANCEL = 3
          SELECTION_ERROR  = 4
          OTHERS           = 5.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    endform.                    "value_help
    Regards,
    Amit.

  • Getlist bapi for customer based on sales org, distbtn chnl

    Hi,
        Is there any standard BAPI for customer Getlist , i want to filter based on distribution chanel and sales org and divison.
            Now am using BAPI_CUSTOMER_GETLIST  its showing all customer list i want to filter this based on distribution chanel and sales org and divison.
    Thanks ,
    Arun

    Hi Siva : )
    In VK11 we have a key combination radio button called Country/ Destination Ctr./Plant/TaxClCust/TaxClMat.
    I think it might be a custom key combination (so you might have to create a siliar one for yourself), but basically all I had to enter there was Country = GB, Destination Coutry = GB, plant SORG1 (it's called the same as the sales org and is linked 1-1), tax classification on Customer = 2 (because I want the central setting on the customer to be 2 = ICO, no tax), tax classification on material 1 = full tax goods and enter relevat tax code.
    Hope this helps.
    It worked for me.
    Kind regards,
    Tanja

  • Credit control sales area wise

    Dear Friends,
    Sales organisation model is
    my company is distributor for all manufacturers,  it will take care of credit control
    so  we proposed a sales area  which resembles like this Mumbai -glaxo- pharma,
    Mumbai -Novartis- pharma(sales org-disti chnl-divison) etc.
    this sales areas will contain all customer and materials of glaxo
    some of the stockists are stockists for both glaxo and novartis  so I extend the customer
    to one more sales area
    if I maintain credit control areas w.r.t to sales area wise  what are the implications
    will ready to be happen?
    how can I monitor the total credit for the customer?
    is it necessary to assign a credit control at company code level?
    The process i proposed here is
    I will assign credit control at sales area level
    and I will maintain credit limit details at FD32
    so I can assign credit controls per sales area wise for same customer .
    What are the pros and cons of this process?
    Waiting for replies,
    Thanks

    my dear,
    Here my requirement is i will not assign any credit control area at company code level
    i will assign cca at sales area level only, and it is working fine.
    i need the PROS & CONS when i use like this way.

  • Customer sales area

    Hi,
       When i try to create a sales order for my customer, i leave the initial sales area blank....on the create customer: initial screen.
    I then enter the sold-to-party in the sales order overview screen and then it prompts me to enter my sales area out of a few sales areas existing for my customer. However, it always excludes the sales area which i have set up. Could anyone explain how i can choose my own sales area for the customer?

    Hi Aditya,
    While creating a customer in Transcation Code XD01 give all details in Sales Area.(Sales Org,Dist.Channel & divison) If you want you can give sales office & sales group also.
    When you enter this sold to party in your sales order transaction automatically sales Area for that sold party will be picked.
    In sales order all details about custmer from customer master record.
    Reward if you find suitable answer.
    With Best Regards,
    Gayatri Patil

  • No sales organizations in the list

    When create any sales document error message "Enter a sales organization" appears but no Sales Organization exists in the list. The org. structure is created according to C01_BB_ConfigGuide.
    When editing a business partner in Sold-to-party role, no sales organizations exists in the list too.
    Could anybody help us?

    Thank you.
    I checked the org data and it seems to be all right.
    I have the following org tree:
    1. Company BP for CRM ([ ] permitted for determination, Country=US)
    1.1. Sales Org BP01 ([x] Permitted for determination, [x] Sales Organization, Country=US, Tupel=0101, Postal Code=00000-99999, Region=CA, Divison=01, DistrChannel =01)
    1.2. Sales Org BP02 ([x] Permitted for determination, [x] Sales Organization, Country=DE, Tupel=1101)
    The business partner I use in sales transaction has attrbutes: Country=US, Region=CA, Postal Code: 95630
    The determination rule chooses Sales Org 1.1 as organizational unit but nothing as sales org, distrib channel and division (these fields are empty).
    The log in Organization tab is:
    [ok] |Organizational data determination Sales
    [ok] |Transaction type: TA
    [ok] |Org. data profile: 000000000005
    [ok] |Org. data model det. role: AC10000166
    [ok] |Container: 
    [ok] |Attribute: COUNTRY, Evaluation: US
    [ok] |Attribute: DIVISION, Evaluation:
    [ok] |Attribute: D_CHANNEL, Evaluation:
    [ok] |Attribute: REGION, Evaluation: CA
    [ok] |Attribute: SA_GROUP, Evaluation: 
    [ok] |Attribute: SA_OFFICE, Evaluation:
    [ok] |Attribute: SA_ORG, Evaluation:   
    [ok] |Following organizational units were found:
    [ok] |O 50000041 SO_BP 
    Why did it determine empty SA_ORG, D_CHANNEL and DIVISION attrs?
    Best Regards,
    Sergei
    Message was edited by: SERGEI KUZMIN

  • Segmentation by Sales Office on CRM 7.0

    Hello Gentlemen,
    Hope you guys can help me on this,
    Need to implement a new infoset query for segmentation data on CRM 7.0 Web UI Segmentation applet, beacuse the std. ones do not support customer´s needs.
    The customer needs to make segmentation of partners - sales reps. (BP) by sales office. I believe the best way would be using the assigment of these sales reps. to the sales organization on the PPOMA of CRM, but I cannot use the table "P1000" on 'SQ02' - any ideas or solutions?
    Thanks in advance,
    Regards,
    Daniel Albuquerque

    Hello Anup,
    Great to hear from you, man !
    Thanks for your help on this...your tip really helped but this table does not provide the sales office field, it just goes to Sales organization; distribution channel and divison...I need to go further on this. Another point is that it would be great if I have the sales organization description, not just the ID.
    Well, hope you can help on this, my friend.
    Take Care !
    Daniel Albuquerque

Maybe you are looking for