How to update sales order number (KAUFN) characteristic in the profitability segment of the PA document created at the time of service entry sheet confirmation, as a result of shipment cost document

Hi,
We have a scenario wherein we create shipment cost documents against delivery. As a result of shipments fully transferred, a PO for freight vendor is automatically created and a service entry sheet confirmation happens. As a result of service entry sheet confirmation, we have Financial accounting, Controlling and profitability analysis documents created. We have a requirement wherein we need to have the characteristic “sales order number (KAUFN)” populated in the profitability analysis document created as a result of service entry sheet confirmation.
Could someone please advice how could this be attained in COPA. Thanks for your help in advance.
Regards,
Sandeep

Hi Ajay,
Thank you for the quick update.
The document is updated to COPA through OKB9 settings. The profitability segment is updated with fields like customer, product, company code, plant, sales area data, profit center, etc; however the sales order number is missing.
Could you please elaborate further how could FI substitution be implemented to call for the FM COPA_PROFITABILITY_SEGMENT through user exit? Are you recommending the substitution through GGB1? What could be the possible validation to call for the user exit to be implemented?
Regards,
Sandeep Kulkarni

Similar Messages

  • How to update Sales Order status using  BAPI_SALESORDER_CHANGE

    Hi,
    I want to update Sales Order status using BAPI_SALESORDER_CHANGE, this BAPI is called from middle ware, but there is no parameter to pass the status value to this function, please help me how to update sales order status using BAPI only.
    Thanks
    RK

    Hi,
    Can u give me details of what status u would like to update in sales order.
    If we are able to update the status from VA02, Then BAPI will assist for the same.
    Regards.

  • How to get sales order number before saving in VA01 by using parameter

    Hi,
    Please let me know how to get sales order number in transaction VA01 before saving it by using parameter in SU3.
    I tried to set parameter in SU3 "AUN", but it is not working as required, means sales order number is not appearing before saving.
    can you please suggest how to do it?
    Thanks & Regards.
    Rahul Verulkar

    Hi,
    In case of Support project, we get the high severity issues from users and needs to be closed withn 2 hours... so what we do we get the requirement from user and checking the same in production from our id, but we can not save the sales order as we are not authorized to do the same, so in such cases it is required to get the sales order number before saving... where we can guide the users.... but actuallly it is not getting saved in the table until and unless u save it manually. It works like a material master... when u create material master, the material number appears in advance in material number field "MATNR"
    If it is possible can you please suggest step by step to work on parameter in SU3 for sales order number before saving.
    Thanks & regards,
    Rahul Verulkar

  • How to trace sales order number from delivery number, when batch is split

    Hi All,
    I have created a Sales Order and a Outbound Delivery against the sales order.
    While creating the Outbound delivery, I have split the qty in two batches.
    Now when I go in table LIPS, and search on the basis of the Delivery number, I get two rows, one for each batch. But here the sales order LIPS-VGBEL, and Sales order item no (LIPS-VGPOS) is updated only for the 1st batch line item, but is not updated for the second batch line item.
    Please help me so that on the basis of the delivery number, i will be able to find record from tables for sales order for both the line items (i.e. for each batch).
    Immediate help would be appreciated.
    Thanks in Advance.
    Ankush

    Hi,
    I have created delivery against sales order.
    While picking (during delivery PGI), I selected two batches to suffice the delivery qty. Please refer the example quoted below.
    Sales order (SO1) - Material (Mat1) - qty (15 ea)
    Delivery against sales order (Del1) - batch split: batch1 - 10 ea
                                                                         batch2 - 5 ea
    In table LIPS: when I enter delivery number as "Del1" and execute, I get 2 records:
       del no.     Item No.      Material   Qty       Batch no       Sales Order no     Sales Order Item no
    1. DEL1       10              Mat1        10 ea    batch1          SO1                    10
    2. DEL1       20              Mat1         5 ea     batch2         ______                 ____
    Thus in the 2nd record, the Sales order no.(LIPS-VGBEL) and sales order item no. (LIPS-VGPOS) does not get updated.
    I have to develop a report to display the Sales Order number and sales order line item number for each batch of the Delivery for the same item number. Please guide me to know how I can get the same.
    Hope this clarifies the issue faced.
    Regards,
    Ankush

  • How to unlock sales order number after changing its line item statuses.

    hi all,
            my requirement is i am changing the status of the double
           clicked sales order which is showing in ALV grid display
           before that i am locking that sales order using FM
           CALL FUNCTION 'ENQUEUE_EVVBAKE' and for
           changing the status i am using FM
            CALL FUNCTION 'STATUS_CHANGE_EXTERN'
            which doesnt have commit statement inside this FM so
           i have explictly written this commit statement if this FM
           gives SY-SUBRC = 0 but with this statement it unlock my
           sales order because of the commit functionality.
    also this FM is in loop for all line items for that sales order
    please help me with that!!!!

    Hi,
    I have created delivery against sales order.
    While picking (during delivery PGI), I selected two batches to suffice the delivery qty. Please refer the example quoted below.
    Sales order (SO1) - Material (Mat1) - qty (15 ea)
    Delivery against sales order (Del1) - batch split: batch1 - 10 ea
                                                                         batch2 - 5 ea
    In table LIPS: when I enter delivery number as "Del1" and execute, I get 2 records:
       del no.     Item No.      Material   Qty       Batch no       Sales Order no     Sales Order Item no
    1. DEL1       10              Mat1        10 ea    batch1          SO1                    10
    2. DEL1       20              Mat1         5 ea     batch2         ______                 ____
    Thus in the 2nd record, the Sales order no.(LIPS-VGBEL) and sales order item no. (LIPS-VGPOS) does not get updated.
    I have to develop a report to display the Sales Order number and sales order line item number for each batch of the Delivery for the same item number. Please guide me to know how I can get the same.
    Hope this clarifies the issue faced.
    Regards,
    Ankush

  • How to get sales order number when it is created in VA01

    hai experts,
    i have a requirement , when i create a sales order using transaction VA01 and save the transaction number , after saving i want to catch the sales order number and use in some other fucntion moudle, how can i do that  , should i use the events or any other methods to do the same
    regards
    m.a

    You can call you Z function module either from the workflow or from a BADI' where you can access the newly created sales order the BADi name is BADI_SD_V46H0001 and the method that you need to check is
    EXIT_SAPLV46H_003     Customer Function when Creating/Changing Header
    You can even call the FM from workflow too, but aganin for tht you need to create a ZBOR, if at all you are using a standard Business object and you hvae to create a new task and include that new task in the workflow by creating a new background Activity step. which I personally feel that you eed to put some more effort to fix the issue.
    Instead it is simple and sweet to call that function module from the Method which mentioned. where you can acess the sales document number tooo check int he method parameters.

  • How to generate sales order number

    Hai friends,
         In sales order creation, I want to generate a sales order number (i.e., 1 for the first sales order, 2 for the second and so on). This number should be generated successively in background. How it can be done..?

    Hello,
    Yes, I'm struggling to understand what you're after too. You could create a z table to keep track of the number if it's bespoke. Otherwise try these tables: FBN1, NRIV (intervals), T161 (po) TNRO (linked to NRIV).
    Good luck!
    Ash Thomas
    http://www.ashthomas.com
    Sap Abap Developer & Sap Abap Programmer

  • Error using BAPI_BUSPROCESSND_CREATEMULTI, how to get sales order number

    Hi all, i am using the BAPI BAPI_BUSPROCESSND_CREATEMULTI to create a sales order of type ZWEB in CRM. I am using HEADER,  INPUT_FIELDS ,  ITEM ,  CREATED_PROCESS and  RETURN
    tables. In the CREATED_PROCESS i am getting the GUID but no value for object id. and in return table i find the error mesages as "no status object available for unknown object", "A log has been generated for single document", "no status object availabe for unknown object".
    what mistake i am doing? i want to create a sales order in SAP CRM and get the sales order number as the output. am i using correct bapi. many people suggested of using bapi BAPI_BUSPROCESSND_SAVE....i dont know how to use it and what values i should pass to the objects_to_save paramter of this bapi.
    here is my code please help me
    ***TABLES
    DATA: IT_HEADER TYPE TABLE OF BAPIBUS20001_HEADER_INS.
    DATA: IT_INPUT_FIELDS_FILL TYPE TABLE OF BAPIBUS20001_INPUT_FIELDS.
    DATA: IT_ITEM TYPE TABLE OF BAPIBUS20001_ITEM.
    ***WORK AREA
    DATA: WA_INPUT_FIELDS TYPE BAPIBUS20001_INPUT_FIELDS.
    DATA: WA_HEADER TYPE BAPIBUS20001_HEADER_INS.
    DATA: WA_ITEM TYPE BAPIBUS20001_ITEM.
    DATA: IT_EV_GUID_32 TYPE GUID_32.
    DATA: IT_EV_GUID_32_1 TYPE GUID_32.
    CALL FUNCTION 'GUID_CREATE'
      IMPORTING
        EV_GUID_32       = IT_EV_GUID_32.
    WA_HEADER-GUID                      =  IT_EV_GUID_32.
    WA_HEADER-PROCESS_TYPE    =  'ZWEB'.
    WA_HEADER-DESCRIPTION        =  'WEB ORDER'.
    WA_HEADER-CREATED_BY        =  'SAPUSER
    APPEND WA_HEADER TO IT_HEADER.
    WA_INPUT_FIELDS-REF_GUID               =  IT_EV_GUID_32.
    WA_INPUT_FIELDS-REF_KIND               =  'A'.
    WA_INPUT_FIELDS-OBJECTNAME             =  'ORDERADM_H'.
    WA_INPUT_FIELDS-LOGICAL_KEY            =  '1'.
    WA_INPUT_FIELDS-CHANGEABLE             =  ' '.
    WA_INPUT_FIELDS-FIELDNAME              =  'PROCESS_TYPE'.
    APPEND WA_INPUT_FIELDS TO IT_INPUT_FIELDS_FILL.
    WA_INPUT_FIELDS-FIELDNAME              =  'GUID'.
    APPEND WA_INPUT_FIELDS TO IT_INPUT_FIELDS_FILL.
    WA_INPUT_FIELDS-FIELDNAME              =  'DESCRIPTION'.
    APPEND WA_INPUT_FIELDS TO IT_INPUT_FIELDS_FILL.
    WA_INPUT_FIELDS-FIELDNAME              =  'CREATED_BY'.
    APPEND WA_INPUT_FIELDS TO IT_INPUT_FIELDS_FILL.
    REFRESH: CREATED_PROCESS.
    CALL FUNCTION 'GUID_CREATE'
      IMPORTING
        EV_GUID_32       = IT_EV_GUID_32_1.
    WA_ITEM-GUID              =  IT_EV_GUID_32_1.
    WA_ITEM-NUMBER_INT        =  '10'.
    WA_ITEM-ORDERED_PROD      =  '90000000'.
    WA_ITEM-ITM_TYPE          =  'ZTAN'.
    WA_ITEM-MODE              =  'A'.
    APPEND WA_ITEM TO IT_ITEM.
    WA_INPUT_FIELDS-REF_GUID               =  IT_EV_GUID_32_1.
    WA_INPUT_FIELDS-REF_KIND               =  'A'.
    WA_INPUT_FIELDS-OBJECTNAME             =  'ORDERADM_I'.
    WA_INPUT_FIELDS-LOGICAL_KEY            =  '1'.
    WA_INPUT_FIELDS-CHANGEABLE             =  ' '.
    WA_INPUT_FIELDS-FIELDNAME              =  'GUID'.
    APPEND WA_INPUT_FIELDS TO IT_INPUT_FIELDS_FILL.
    WA_INPUT_FIELDS-FIELDNAME              =  'NUMBER_INT'.
    APPEND WA_INPUT_FIELDS TO IT_INPUT_FIELDS_FILL.
    WA_INPUT_FIELDS-FIELDNAME                 =  'ORDERED_PROD'.
    APPEND WA_INPUT_FIELDS TO IT_INPUT_FIELDS_FILL.
    WA_INPUT_FIELDS-FIELDNAME                 =  'ITM_TYPE'.
    APPEND WA_INPUT_FIELDS TO IT_INPUT_FIELDS_FILL.
    REFRESH: created_process.
    CALL FUNCTION 'BAPI_BUSPROCESSND_CREATEMULTI'
    TABLES
      HEADER = IT_HEADER
      INPUT_FIELDS = IT_input_fields_fill
      ITEM = IT_ITEM
      CREATED_PROCESS = CREATED_PROCESS
      RETURN = RETURN.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
       EXPORTING
        WAIT = 'X'
      IMPORTING
        RETURN = RETURN1.
    Edited by: jessica sam on Dec 11, 2008 5:23 AM

    Hi Jessica,
                    I am not able map billing plan details for BAPI_BUSPROCESSND_CREATEMULTI.
    If u done alreay please guide or send program for that.I will be grateful for you.
    Regards,
    Dilip

  • Q60: How to report sales order number against in voice number

    Dear All,
    I have this simple report but need to include the relevant sales order in the column aftero the invoice number.
    I know it is the base doc but do not know how to build it in.............
    SELECT
    t0.docduedate as 'Invoice Date',
    t0.docstatus as 'Open/Closed',
    t0.docnum as 'Invoice Number',
    t0.numatcard as 'Customer Ref. No.',
    t0.u_rbdelivery as 'Tracking Number',
    t0.doctotal as 'Invoice Value',
    t0.cardcode as 'Customer Code',
    t0.cardname as 'Customer Name',
    t0.address2 as 'Delivery Address'
    FROM
    oinv t0
    WHERE
    t0.docstatus = '[%0]' and
    t0.doctype = 'I' and
    left(t0.cardcode,1) = 'K'
    Many thanks for any help.
    Robin

    Hi,
    You have to use following tables to get the data VBRK (Billing Header), VBRP (Billing Item), KNA1, KNB1 and KNVV (Customer Master Tables), VBAK (Sale Order Header) and FPLTC(Payment cards table)
    First pass the input data for example
    Customer reference number into VBRK- KUNNR and Date into VBRK-FKDAT and get the relevant VBLENu2018s for the customer. 
    Pass VBRK-VBELN value into VBRP-VBLEN and get VBRP-AUBEL (Sale order number).
    Pass customer number into KNA1-KUNNR and get KNA1-ADRNR (for fetching the address details for the customer) pass this
    ADRNR into ADRC-ADDRNUMBER And get all the address details of the customer.
    Similarly pass VBRP-AUBEL into VBAK-VBLEN and get VBAK-FPLNR pass this value into FPLTC-FPLNR and get all the card relevant details.
    Hope this helps.
    Revert back in case of clarifications.
    Regards,
    Sharan

  • How to update sales orders using B1WS in SAP 8.8 PL18

    Hello all.
    We are having a problem updating sales orders using Sap Business One Web Service ( B1WS ).
    We are running SBO 8.8 PL18, MS-SQL 2008, and all is fine when using the SBO client.
    But when it comes to updating sales orders through B1WS we just cannot get it to work.
    We can add new orders easily without problems. Updating orders always gives this error:
    \[ORDR.PayDuMonth\]\[line: 0\] , 'Field cannot be updated (ODBC -1029)'
    We have checked and verified multiple times that our setup is correct.
    Also the WDSL files are verified.
    We can update orders just fine using the sboclient.
    And using B1WS we can basically do everything, besides updating.
    We have also tried this on different company db's, so we are quite sure this is not
    something related to some general setting we missed, but who knows?
    We have tried different ways to "assemble" the order before updating, but it always
    ends with the above error.
    Here is an example of one of the tests, where we load an order by docentry,
    increment the quantity of all open lines by '1', and then try to update it.
            protected void Page_Load(object sender, EventArgs e)
                // First we login
                string sessionId = "";
                LoginService.LoginService l_login = new LoginService.LoginService();
                LoginService.LoginDatabaseType l_dbtype = LoginService.LoginDatabaseType.dst_MSSQL2008;
                LoginService.LoginLanguage _lang = LoginService.LoginLanguage.ln_English;
                string _server = "SAP-8_8PL18";
                string _licserver = "SAP-8_8PL18:30000";
                string _db = "my_test_company";
                string _user = "manager";
                string _pass = "********";
                try
                    sessionId = l_login.Login(_server, _db, l_dbtype, true, _user, _pass,
                               _lang, true, _licserver);
                catch (Exception ex)
                    Response.Clear();
                    Response.Write(ex.Message);
                    Response.End();
                if (sessionId == "")
                    Response.Clear();
                    Response.Write("No sessionId");
                    Response.End();
                // We are logged in and have a sessionId
                // Now load a valid open order by docentry
                try
                    OrdersServiceRef.OrdersService orderService = new OrdersServiceRef.OrdersService();
                    orderService.MsgHeaderValue = new OrdersServiceRef.MsgHeader();
                    orderService.MsgHeaderValue.SessionID = sessionId;
                    orderService.MsgHeaderValue.ServiceName = OrdersServiceRef.MsgHeaderServiceName.OrdersService;
                    orderService.MsgHeaderValue.ServiceNameSpecified = true;
                    OrdersServiceRef.DocumentParams docParams = new OrdersServiceRef.DocumentParams();
                    docParams.DocEntry = 31; // Docentry of a known open order
                    docParams.DocEntrySpecified = true;
                    OrdersServiceRef.Document order = orderService.GetByParams(docParams);
                    OrdersServiceRef.DocumentDocumentLine line = null;
                    for (int i = 0; i < order.DocumentLines.Length; i++)
                        line = order.DocumentLines<i>;
                        if (line.LineStatus == OrdersServiceRef.DocumentDocumentLineLineStatus.bost_Open)
                            line.Quantity += 1;
                    orderService.Update(order);
                catch (System.Web.Services.Protocols.SoapException ex)
                    Response.Clear();
                    Response.Write(ex.Message);
                    Response.End();
                catch (Exception ex)
                    Response.Clear();
                    Response.Write(ex.Message);
                    Response.End();
                Response.Clear();
                Response.Write("All OK");
                Response.End();
    I hope that someone has an idea as to why this happens.
    The customer often changes quantity or adds lines on their orders,
    and the only way to solve it so far has been to make a new order and
    close the old one.
    Thanks in advance
    J. Thomsen

    Hi,
    Welcome you post on the forum.
    Have you checked if you only update a specific line instead of a loop?
    Thanks,
    Gordon

  • How to get sales order number based on purchase order

    hi,
    what is the transaction code to find the sales order number based on the purchase order number
    Regards,
    Murali

    Hi,
    Go to Se16 (data browser), see the table VBKD, enter the PO number, if any, execute.
    Prase

  • How toset 2nd sales order number on the status application in Inbound Idocs

    Hi All,
    When processing inbound idocs in sales order we are splitting that idocs into two sales orders so for one sales order we are getting on Apllication with sales order number, But i want display second sales order number same as first one. can any one suggest me any function module for that....
    Regards,
    Sudhakar Reddy.A

    Hi ,
    Thanks for the relies i am writing the code in same FM (EXIT_SAPLVEDA_005) include (ZXVEDU07). this is for error message i wrote .
    Data : wa_e1ed19_E TYPE ty_e1edp19,
           wa_status1 type BDIDOCSTAT.
    if DIDOC_STATUS-status = '51' and DIDOC_STATUS-msgty = 'E' and DIDOC_STATUS-msgno = '382'.
    read table IT_E1EDP19 into wa_e1ed19_E with key idtnr = DIDOC_STATUS-msgv1.
    if sy-subrc = 0.
    wa_status1-docnum   = DIDOC_STATUS-docnum.
    wa_status1-STATUS   = DIDOC_STATUS-STATUS.
    wa_status1-MSGTY    = DIDOC_STATUS-MSGTY.
    wa_status1-MSGV1    = wa_e1ed19_E-idtnr.
    wa_status1-MSGV2   = wa_e1ed19_E-posnr.
    append wa_status1 to DIDOC_STATUS.
    clear wa_status1.
    endif.
    endif.
    Regards,
    Sudhakar Reddy .A

  • How to see Sales Order Number on Back to Back PO

    We are implementing Back to Back to generate a Purchase Order from a Sales Order.
    Everything is working well except I can't find the sales order number on the PO and can't find if for the receipt.
    We want the item when received to be marked for the SO it is for?
    Ideas?
    Jean

    Hi,
    You can get the PO # for corresponding Sales order by using table (OE_DROP_SHIP_SOURCES).
    u can join the po_header_id (OE_DROP_SHIP_SOURCES) with po_header_id (PO_HEADERS_ALL).
    Hope this will help you
    Thanks
    --Sandy.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to update Sales Order Delivery Block while saving Delivery ?

    Hi,
    I have a requirement wherein i need to update sales order delivery block field(VBAK-LIFSK) while saving the delivery for the order.
    Also I need to remove this block while execution of  Backorder Rescheduling program SDV03V02 (Tcode : V_V2),
    Can anybody help me out in this?
    regards,
    Nitin

    HI,
    try using BAPI_SALESORDER_CHANGE
    pass ur vbeln in SALESDOCUMENT
    pass an 'X' to    BAPISDH1-DLV_BLOCK
    and 'X' to        BAPISDH1X-DLV_BLOCK
    Also add the UPDATE task clause, you will want to set the flag only when delivery is being saved, not before that.

  • How to update sale order haeder conditions

    hi
    how to update header conditions using sale order bapi ' create from data 2'.
    regards
    Siva Shanmugam.A.V.

    u can use  'BAPI_SALESORDER_CHANGE'
    and see the following link
    http://abap.wikiprog.com/wiki/BAPI_SALESORDER_CHANGE
    Edited by: krupa jani on Nov 25, 2008 11:15 AM

Maybe you are looking for

  • I use about 2 gigabytes yet it says I have used all 13.4?

    My apps do not add up to the 13.4 gigabytes my iPad has. I have deleted multiple apps and unnecessary things, but to no avail. Why is this happening? I have 12 apps that are no more than 45 megabytes. I can't download anymore apps and the manage stor

  • Sales order error

    Hi All, During creation of sales order I am getting an error as "Version 0 is not definedfor fiscal year 2007". How to eradicate this error? Thanks & regards, Neelam

  • OAS 4.0.8.1 On RH 6.2

    Hi Is there any body can work OAS 4.0.8.1 Redhat 6.2 with SSL Thawte Best kernel parameter ? Thank you all [email protected]

  • Help calculating mailbox size

    Hi, What is the best way to calculate the maximum mailbox size I can give to my users? I know how to set their quotas but I don't know what I can set it to.  Is there a "maximum total of all mailboxes" size that is specified that I can divide by the

  • Download error - Stole a Motorcycle, Earl series 3

    Hi: I purchased this originally on my AppleTV, the whole series downloaded but this episode failed. When I check for downloads in iTunes on my Windows Vista PC the download starts but then failes in the last 0.1Mb with an 8008 error. I have tried; *