Sales document number not appearing in Work Item.

Hello gurus,
     I have created a WorkFlow for approval of Sales order. My problem is, the sales document number is not appearing in the WorkItem for user decision task. I am passing container variable the sales document number in the Parameter1 of the User Decision task of the work flow. Value is populated correctly in the container variable for sales document number, but fails to appear in the work item content in SBWP.
     Please suggest a solution.
Regards,
Dnyanesh.

Hello All,
     Thanks for your reply.
I am passing the value of sales document number in parameter 1 of the standard task for approval as below.
But in my Business Workplace I do not get the Sales document number. Below is the screenshot.
Regards,
Dnyanesh.

Similar Messages

  • Sales document number not updated in FI document

    Hi,
    Whenever invoice creates in FI through billing document, system will not update sales document number in FI document(Invoice). Please confirm if there is any way to update sales document number in FI document because  I want to create dunning notices on sales order basis.
    Request immediate help.
    Thanks in advance.

    Hi,
    In the standard system,  FI postings will be updated with FI document numbers only.  If you want to see respective billing document number in customer ledger, go to FBL5N, select 'Change Layout' icon and move billing document number from 'hidden fields' to display fields list and see.
    Regds
    Sarma BH

  • Invoice/billing document Number  not appearing on sales order document flow

    Dear all,
    After saving the sales order invoice when i check in va02 sales order document flow invoice number is not generating

    Really something is wrong in your configuration.  When your delivery status shows Being Processed, I could see subsequent two documents, viz.Confirmation of Service and GD doc reference as complete.
    Can you let me know how many line items that delivery contains?  The reason for this query is normally, for stock item, we see Material Document reference and for non-stock item, we see Confirmation of service.  But in your case, I could see both.  From your VBFA table screen shot, I could see two different material document references.
    G. Lakshmipathi

  • Sales order Number not appearing in CO-PA report painter

    Hi
    I have prepared profitability report through report painter through t-codes KE34 and KE31-
    Characteristics I have chosen is Sales order No/Plant/sales organization/product and customer-
    In the report Sales order Number is not appearing?
    We are able to see plant number/sales organization no/product no and customer no-
    Where I have committed mistake
    Thanks in advance
    joseph david

    HI,
    In order for you to see Characteristics in KE34 form definition, they have to be defined as 'Segment level' in KEQ3, as also metioned by Christian. However, it is not advisable to define 'Sales order #' as a Segment level, considering that 'Sales order #', changes frequently and also owing to performance issues with huge number of Segment level records which gets created in the course of time.
    If you want to report based on Sales order, then please consider using line item form/report KE94/KE91 or check if KE24 is sufficient.
    Hope this helps.

  • Sales order number not appears  in account assignment tab

    Hi,
    User raised PO for third party and account assignment category.But ,Sales order number  and its item not appear in account assignment tab.
    Can anybody help me.
    Lucky.

    Hi Lucky,
    Z Account assignment is not in standard SAP it is customized, u have to check the settings in SPRO->MM->PURCHASING->ACCT ASSIGNMENT-> ITEM CATEGORIES as well u have to know why this is customized, since there is deviation from standard i'm really not able to locate the issue. this is purely based on the requirement done, if it is as per standard SAP sales order number will definitely show in acct assingment tab view.
    Thanks for your inputs on this issue.
    Regards
    Rang

  • Free item reference document number not populated in MIGO item screen

    Hi
    I have a requirement where in I would need to populate the reference document number in the MIGO item when I am cancelling a goods receipt in case of free items.
    In standard SAP system we know that it would only be populated when GRbased IV is ticked in PO but in free item PO this is not ticked . So was enquiring if any body knows how we could populate the reference document number at GR cancellation in MIGO item level for free items .

    Hi,
    If you mean the field MSEG-SMBLN, then it is always populated at cancellation, no matter the GR-based IV flag.
    BR
    Raf

  • Sales order number  not copied to documents in accounting

    Dear all,
    I have created normal sales order ,delivery and billing and creation of excise billing invoice which i do for the sales  which happens directly from factory.
    now go to VF02, and click on 'accounting overview '  click on accounting document .Here sales order number (COBL-KDAUF) is not copied. where as accounting document generated for excise invoice sales order number is appearing .
    The same is the case with  STO through SD route ....
    kindly suggest . 
    thanks,
    Shankar

    Dear Shankar
    As you would be aware, four Accounting Documents would be generated for one billing document viz
    -  Accounting Document for Customer Debit
    -  Profit Center
    -  Controlling Document
    -  Profitability Analysis
    Of the above four documents, in which you have seen.  You can see the order reference in Profitability Analysis. 
    thanks
    G. Lakshmipathi

  • Credit Card number entered CRM sales order is not appearing in R3 Sales ord

    Hi,
    We are entering our Sales orders in CRM which are gtting replicated to SAP R3,In the credit card scenario ,In some sales orders entered in CRM,where the Credit card numer has been entered,In some cases,the card numer is not appearing in R3 Sales order either in the overview screen or Payment card tab,due to ehich most of the times these cards fail authorization .
    Kindly let me know as to what could be the reasons as to why the card numer seen in CRM is not appearing in SAP R3,sales order?
    Appreciate your help on this.
    Regards
    Mohammed Roshan

    Hi All,
    Looking forward to your valuable inputs on this as to  how and why Credit Card number entered CRM sales order iwould not appear in R3 Sales order?
    Regards
    Mohammed Roshan

  • 'Find' function does not appear to work in TextEdit on .txt documents

    Most of the time the 'Find' function on the TextEdit application does not appear to work on .txt documents.  I have verified this by using Find on words that I know are in a document, and it cannot find them.  I've tried different options on the 'Find' function without success.  This appears to have started with version 10.6.8.  Has anyone else had this problem since upgrading to 10.6.8?

    Thanks -- but I swear it worked fine prior to either the 10.6.7 or 10.6.8 updates and now it doesn't.  I'll just keep experimenting and playing around with it and see if I can get it to work.  Maybe the new Lion O.S. coming out will fix it, although I'm not going to rush -- I made the mistake of putting Snow Leopard on right after it came out and had problems with some programs not working properly anymore (like Pro Tools, for example).  Always a good idea to hold off until most of the bugs get fixed. 

  • Sales Document type not defined

    Hi
    I am working on an interface. Design is like below
    Purchase Order->File Adapter->XI (BPM)->RFC Adapter->Sales Order in R/3
    When I am trying to cretae a sales document in R/3, I am getting a message back from R/3 saying 'Sales Document is not defined'. But when Checked in R/3, that sales document type is existing. I don't see any Mapping execption in monitoring, but I am receiveing this message back from R/3
    Any feedback will be highly appreciate.
    Cheers
    Rajiv P

    Hi
    Well initially it was a value-mapping problem. It is possible to debug a BAPI/RFC from XI. If it is possible, the please advise me of the procedure. My XI is working fine but I am getting a message back from R/3 as below. Any feedback will be highly appreciated
    <?xml version="1.0" encoding="UTF-8" ?>
    - <rfc:BAPI_SALESORDER_PROXY_CREATE.Response xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
      <E_SALESDOCUMENT_EX />
      <E_STATUS>E</E_STATUS>
    - <RETURN>
    - <item>
      <TYPE>S</TYPE>
      <ID>V4</ID>
      <NUMBER>233</NUMBER>
      <MESSAGE>SALES_HEADER_IN has been processed successfully</MESSAGE>
      <LOG_NO />
      <LOG_MSG_NO>000000</LOG_MSG_NO>
      <MESSAGE_V1>VBAKKOM</MESSAGE_V1>
      <MESSAGE_V2 />
      <MESSAGE_V3 />
      <MESSAGE_V4 />
      <PARAMETER>SALES_HEADER_IN</PARAMETER>
      <ROW>0</ROW>
      <FIELD />
      <SYSTEM>UD1CLNT010</SYSTEM>
      </item>
    - <item>
      <TYPE>E</TYPE>
      <ID>V1</ID>
      <NUMBER>384</NUMBER>
      <MESSAGE>Sales unit ****** is not defined for item 000000</MESSAGE>
      <LOG_NO />
      <LOG_MSG_NO>000000</LOG_MSG_NO>
      <MESSAGE_V1>******</MESSAGE_V1>
      <MESSAGE_V2>000000</MESSAGE_V2>
      <MESSAGE_V3 />
      <MESSAGE_V4 />
      <PARAMETER>SALES_ITEM_IN</PARAMETER>
      <ROW>1</ROW>
      <FIELD />
      <SYSTEM>UD1CLNT010</SYSTEM>
      </item>
    - <item>
      <TYPE>E</TYPE>
      <ID>V4</ID>
      <NUMBER>248</NUMBER>
      <MESSAGE>Error in SALES_ITEM_IN 000001</MESSAGE>
      <LOG_NO />
      <LOG_MSG_NO>000000</LOG_MSG_NO>
      <MESSAGE_V1>VBAPKOM</MESSAGE_V1>
      <MESSAGE_V2>000001</MESSAGE_V2>
      <MESSAGE_V3 />
      <MESSAGE_V4 />
      <PARAMETER>SALES_ITEM_IN</PARAMETER>
      <ROW>1</ROW>
      <FIELD />
      <SYSTEM>UD1CLNT010</SYSTEM>
      </item>
    - <item>
      <TYPE>E</TYPE>
      <ID>V4</ID>
      <NUMBER>219</NUMBER>
      <MESSAGE>Sales document was not changed</MESSAGE>
      <LOG_NO />
      <LOG_MSG_NO>000000</LOG_MSG_NO>
      <MESSAGE_V1 />
      <MESSAGE_V2>000001</MESSAGE_V2>
      <MESSAGE_V3 />
      <MESSAGE_V4 />
      <PARAMETER />
      <ROW>0</ROW>
      <FIELD />
      <SYSTEM>UD1CLNT010</SYSTEM>
      </item>
    - <item>
      <TYPE>E</TYPE>
      <ID>C_</ID>
      <NUMBER>005</NUMBER>
      <MESSAGE>The object references could not be written to the CRMKEY</MESSAGE>
      <LOG_NO />
      <LOG_MSG_NO>000000</LOG_MSG_NO>
      <MESSAGE_V1 />
      <MESSAGE_V2 />
      <MESSAGE_V3 />
      <MESSAGE_V4 />
      <PARAMETER />
      <ROW>0</ROW>
      <FIELD />
      <SYSTEM>UD1CLNT010</SYSTEM>
      </item>
      </RETURN>
      <TI_EXTENSIONIN />
      <TI_ORDER_CCARD />
      <TI_ORDER_CFGS_BLOB />
      <TI_ORDER_CFGS_INST />
      <TI_ORDER_CFGS_PART_OF />
      <TI_ORDER_CFGS_REF />
      <TI_ORDER_CFGS_REFINST />
      <TI_ORDER_CFGS_VALUE />
      <TI_ORDER_CFGS_VK />
    - <TI_ORDER_CONDITIONS_IN>
    - <item>
      <ITM_NUMBER>000001</ITM_NUMBER>
      <COND_ST_NO>000</COND_ST_NO>
      <COND_COUNT>00</COND_COUNT>
      <COND_TYPE>EDI1</COND_TYPE>
      <COND_VALUE>57.600000000</COND_VALUE>
      <CURRENCY>AUD</CURRENCY>
      <COND_UNIT />
      <COND_P_UNT>1</COND_P_UNT>
      <CURR_ISO />
      <CD_UNT_ISO />
      <REFOBJTYPE />
      <REFOBJKEY />
      <REFLOGSYS />
      <APPLICATIO />

  • Custom master data for Sales Document Number

    Is it possible to create master data for "sales document number" as a custom field and/or table in R/3?  We have a need to record the "end user" customer of an order but this data may be updated a long time after the order and sale is complete.  IT seems that loading to BW/BI may be simpler if this is treated as document attributes rather than transactional data since no delta will be trigger by changes to this field.  Does anyone have experience with this approach?

    Hi,
    it is possible to create attributes for this InfoObject. Add the Attributes you need in BW. You can use the attributes even if the sales doc is line item dimension of your cube.
    On Sourcesystem side you have to create a generic extractor in SBIW. I think a table view on VBAK or VBAP may fullfill your needs. Of course the tables are not the smallest ones but maybe u can use the timestamp to implement a generic delta. Check whether the timestamp is set when the 'end user' is set. Not every change in the sales document leads to an entry in the delta queue of logistic, but the timestamp should be set.
    After that replicate the datasource to BI and connect it to the attributes of 0SALES_DOC
    I had a similar enhancement at one customer reading the actual transport routes to the sales documents and it worked fine.
    Hope that helps
    Christoph Vortkamp

  • Sales document was not changed BAPI

    Hi Experts,
            Am trying to upload sales documents using BAPI_SALESDOCU_CREATEFROMDATA1, but am getting an error like "sales document was not changed". here is my sample code. Thanks in Advance.
    TYPE-POOLS : TRUXS.
    types : BEGIN OF TY_file,
    auart TYPE auart,
    vkorg TYPE vkorg , "
    vtweg TYPE vtweg ,
    spart TYPE spart ,
    KUNNR  TYPE kunnr ,
    KUNNR1  TYPE kunnr ,
    matnr TYPE matnr  ,
    dzmeng TYPE dzmeng  ,
    WERKS_d TYPE werks_d ,
    END OF TY_file.
    *TYPES : tt_file TYPE STANDARD TABLE OF ty_file.
    data : it_file TYPE TABLE OF TY_FILE,
                   wa_file TYPE TY_file.
    PARAMETERs : p_file TYPE IBIPPARMS-PATH.
    at SELECTION-SCREEN on VALUE-REQUEST FOR p_file.
       PERFORM browse_file.
       START-OF-SELECTION.
       PERFORM LOAD_FLAT_FILE.
       PERFORM CALL_BAPI_CREATE.
    FORM browse_file .
    CALL FUNCTION 'F4_FILENAME'
      IMPORTING
        FILE_NAME           = p_file
    ENDFORM.                    " browse_file
    FORM LOAD_FLAT_FILE .
       DATA : LT_RAW TYPE TRUXS_T_TEXT_DATA.
       CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
         EXPORTING
           I_FIELD_SEPERATOR          = 'X'
          I_LINE_HEADER              = 'X'
           I_TAB_RAW_DATA             = LT_RAW
           I_FILENAME                 = P_FILE
         TABLES
           I_TAB_CONVERTED_DATA       = IT_FILE
        EXCEPTIONS
          CONVERSION_FAILED          = 1
          OTHERS                     = 2
       IF SY-SUBRC = 0.
         MESSAGE 'UPLOADED' TYPE 'I'.
           ENDIF.
    ENDFORM.                    " LOAD_FLAT_FILE
    FORM CALL_BAPI_CREATE .
    DATA: v_vbeln            LIKE vbak-vbeln.
    DATA: header             LIKE bapisdhead1.
    DATA: headerx            LIKE bapisdhead1x.
    DATA: item               LIKE bapisditem  OCCURS 0 WITH HEADER LINE.
    DATA: itemx              LIKE bapisditemx OCCURS 0 WITH HEADER LINE.
    DATA: partner            LIKE bapipartnr  OCCURS 0 WITH HEADER LINE.
    DATA: return             LIKE bapiret2    OCCURS 0 WITH HEADER LINE.
    DATA: lt_schedules_inx   TYPE STANDARD TABLE OF bapischdlx
                              WITH HEADER LINE.
    DATA: lt_schedules_in    TYPE STANDARD TABLE OF bapischdl
                              WITH HEADER LINE.
    LOOP AT IT_FILE INTO WA_FILE.
       header-doc_type = WA_FILE-auart.
       headerx-doc_type = 'X'.
       header-sales_org = WA_FILE-vkorg.
       headerx-sales_org = 'X'.
       header-distr_chan  = WA_FILE-vtweg.
       headerx-distr_chan = 'X'.
       header-division = WA_FILE-spart.
       headerx-division = 'X'.
       headerx-updateflag = 'I'.             " flag for create a new document
       partner-partn_role = 'AG'.
       partner-partn_numb = WA_fILE-KUNNR.
       APPEND partner.
       partner-partn_role = 'WE'.
       partner-partn_numb = WA_fILE-KUNNR1.
       APPEND partner.
       itemx-updateflag = ''.
       item-itm_number = '000010'.
       itemx-itm_number = 'X'.
       item-material = WA_FILE-matnr.
       itemx-material = 'X'.
       item-plant    = WA_FILE-WERKS_d.
       itemx-plant   = 'X'.
       item-target_qty = WA_fILE-dzmeng.
       itemx-target_qty = 'X'.
       APPEND item.
       APPEND itemx.
       lt_schedules_in-itm_number = '000010'.
       lt_schedules_in-sched_line = '0001'.
       lt_schedules_in-req_qty    = WA_FILE-DZmeng.
       APPEND lt_schedules_in.
       lt_schedules_inx-itm_number  = '000010'.
       lt_schedules_inx-sched_line  = '0001'.
       lt_schedules_inx-updateflag  = 'X'.
       lt_schedules_inx-req_qty     = 'X'.
       APPEND lt_schedules_inx.
       CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA1'
            EXPORTING
                 sales_header_in     = header
                 sales_header_inx    = headerx
            IMPORTING
                 salesdocument_ex    = v_vbeln
            TABLES
                 return              = return
                 sales_items_in      = item
                 sales_items_inx     = itemx
                 sales_schedules_in  = lt_schedules_in
                 sales_schedules_inx = lt_schedules_inx
                 sales_partners      = partner.
    *  LOOP AT return WHERE type = 'E' OR type = 'A'.
    *    EXIT.
    WRITE : / RETURN-NUMBER, RETURN-TYPE, RETURN-MESSAGE.
    *  ENDLOOP.
    *  IF sy-subrc = 0.
    *    WRITE: / 'Error in creating document'.
    *  ELSE.
    *    COMMIT WORK AND WAIT.
    *    WRITE: / 'Document ', v_vbeln, ' created'.
    *  ENDIF.
    *  LOOP AT RETURN.
    *WRITE : / RETURN-NUMBER, RETURN-TYPE, RETURN-MESSAGE.
       ENDLOOP.
       END

    Hi Experts,
            Am trying to upload sales documents using BAPI_SALESDOCU_CREATEFROMDATA1, but am getting an error like "sales document was not changed". here is my sample code. Thanks in Advance.
    TYPE-POOLS : TRUXS.
    types : BEGIN OF TY_file,
    auart TYPE auart,
    vkorg TYPE vkorg , "
    vtweg TYPE vtweg ,
    spart TYPE spart ,
    KUNNR  TYPE kunnr ,
    KUNNR1  TYPE kunnr ,
    matnr TYPE matnr  ,
    dzmeng TYPE dzmeng  ,
    WERKS_d TYPE werks_d ,
    END OF TY_file.
    *TYPES : tt_file TYPE STANDARD TABLE OF ty_file.
    data : it_file TYPE TABLE OF TY_FILE,
                   wa_file TYPE TY_file.
    PARAMETERs : p_file TYPE IBIPPARMS-PATH.
    at SELECTION-SCREEN on VALUE-REQUEST FOR p_file.
       PERFORM browse_file.
       START-OF-SELECTION.
       PERFORM LOAD_FLAT_FILE.
       PERFORM CALL_BAPI_CREATE.
    FORM browse_file .
    CALL FUNCTION 'F4_FILENAME'
      IMPORTING
        FILE_NAME           = p_file
    ENDFORM.                    " browse_file
    FORM LOAD_FLAT_FILE .
       DATA : LT_RAW TYPE TRUXS_T_TEXT_DATA.
       CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
         EXPORTING
           I_FIELD_SEPERATOR          = 'X'
          I_LINE_HEADER              = 'X'
           I_TAB_RAW_DATA             = LT_RAW
           I_FILENAME                 = P_FILE
         TABLES
           I_TAB_CONVERTED_DATA       = IT_FILE
        EXCEPTIONS
          CONVERSION_FAILED          = 1
          OTHERS                     = 2
       IF SY-SUBRC = 0.
         MESSAGE 'UPLOADED' TYPE 'I'.
           ENDIF.
    ENDFORM.                    " LOAD_FLAT_FILE
    FORM CALL_BAPI_CREATE .
    DATA: v_vbeln            LIKE vbak-vbeln.
    DATA: header             LIKE bapisdhead1.
    DATA: headerx            LIKE bapisdhead1x.
    DATA: item               LIKE bapisditem  OCCURS 0 WITH HEADER LINE.
    DATA: itemx              LIKE bapisditemx OCCURS 0 WITH HEADER LINE.
    DATA: partner            LIKE bapipartnr  OCCURS 0 WITH HEADER LINE.
    DATA: return             LIKE bapiret2    OCCURS 0 WITH HEADER LINE.
    DATA: lt_schedules_inx   TYPE STANDARD TABLE OF bapischdlx
                              WITH HEADER LINE.
    DATA: lt_schedules_in    TYPE STANDARD TABLE OF bapischdl
                              WITH HEADER LINE.
    LOOP AT IT_FILE INTO WA_FILE.
       header-doc_type = WA_FILE-auart.
       headerx-doc_type = 'X'.
       header-sales_org = WA_FILE-vkorg.
       headerx-sales_org = 'X'.
       header-distr_chan  = WA_FILE-vtweg.
       headerx-distr_chan = 'X'.
       header-division = WA_FILE-spart.
       headerx-division = 'X'.
       headerx-updateflag = 'I'.             " flag for create a new document
       partner-partn_role = 'AG'.
       partner-partn_numb = WA_fILE-KUNNR.
       APPEND partner.
       partner-partn_role = 'WE'.
       partner-partn_numb = WA_fILE-KUNNR1.
       APPEND partner.
       itemx-updateflag = ''.
       item-itm_number = '000010'.
       itemx-itm_number = 'X'.
       item-material = WA_FILE-matnr.
       itemx-material = 'X'.
       item-plant    = WA_FILE-WERKS_d.
       itemx-plant   = 'X'.
       item-target_qty = WA_fILE-dzmeng.
       itemx-target_qty = 'X'.
       APPEND item.
       APPEND itemx.
       lt_schedules_in-itm_number = '000010'.
       lt_schedules_in-sched_line = '0001'.
       lt_schedules_in-req_qty    = WA_FILE-DZmeng.
       APPEND lt_schedules_in.
       lt_schedules_inx-itm_number  = '000010'.
       lt_schedules_inx-sched_line  = '0001'.
       lt_schedules_inx-updateflag  = 'X'.
       lt_schedules_inx-req_qty     = 'X'.
       APPEND lt_schedules_inx.
       CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA1'
            EXPORTING
                 sales_header_in     = header
                 sales_header_inx    = headerx
            IMPORTING
                 salesdocument_ex    = v_vbeln
            TABLES
                 return              = return
                 sales_items_in      = item
                 sales_items_inx     = itemx
                 sales_schedules_in  = lt_schedules_in
                 sales_schedules_inx = lt_schedules_inx
                 sales_partners      = partner.
    *  LOOP AT return WHERE type = 'E' OR type = 'A'.
    *    EXIT.
    WRITE : / RETURN-NUMBER, RETURN-TYPE, RETURN-MESSAGE.
    *  ENDLOOP.
    *  IF sy-subrc = 0.
    *    WRITE: / 'Error in creating document'.
    *  ELSE.
    *    COMMIT WORK AND WAIT.
    *    WRITE: / 'Document ', v_vbeln, ' created'.
    *  ENDIF.
    *  LOOP AT RETURN.
    *WRITE : / RETURN-NUMBER, RETURN-TYPE, RETURN-MESSAGE.
       ENDLOOP.
       END

  • Sales Document number in FBL5N

    Hi Friends,
    In FBL5N (customer line item report) there is a field "Sales Document" Field Name "VBEL2". But the accounting document which is generated in FBL5N for billing document from SD in not populating the sales order number in this field, this field is blank.
    this field is getting populated for down payments with relevant sales document number and not for invoice document.
    Our client wants the sales order number to be reported in customer line item report for their tracking.
    Can any one please suggest how this can be achieved.
    Thanks & Regards

    You can map Sales Order number to either 'Assignment' or 'Reference' fields in accounting document using Copy control function in SD. Please use transaction VTFA, this needs to be maintained for combinations of billing type and sales document type. Please ensure these fields are not currently used in your system for other information.
    Following fields can be mapped to 'Assignment' or 'Reference'.
    A Purchase order number
    B Sales order number
    C Delivery number
    D External delivery number
    E Current billing document number
    F External delivery no. if available, otherwise delivery no.
    If you currently use 'Assignment' or 'Reference' fields for other details, you can use user exit EXIT_SAPLV60B_008.
    Thanks
    Venkata Ganesh Perumalla
    Edited by: Venkata Ganesh Perumalla on Oct 4, 2010 11:52 AM

  • Warning 'sales document is not yet complete' with BAPI_SALESORDER_CHANGE after deleting correspnding delivery

    Hi,
    I'm trying to change a sales order (add some positions) after deleting the corresponding delivery to it.
    But I get the warning "sales document is not yet complete: Edit Data", because of incomplete dates in schedule lines.
    The schedule lines are filled correctly.
    When I have a Sales Order without corresponding delivery, this Order could be changed successful with BAPI BAPI_SALESORDER_CHANGE.
    But if there is a Sales Order with corresponding Delivery (where I do delete the delivery first with BAPI BAPI_OUTB_DELIVERY_CHANGE ), than the BAPI for changing the Order gives a warning "sales document is not yet complete: Edit Data".
    This is confusing.
    Is there something I have to consider when changing a sales order after deleting its delivery?
    Coding:
    "1. delete delivery to sales order
    CLEAR ls_header_data.
       CLEAR ls_header_ctrl.
       ls_header_data-deliv_numb = iv_vbeln.
       ls_header_ctrl-deliv_numb = iv_vbeln.
       ls_header_ctrl-dlv_del    = abap_true. "set flag for deletion
    * call BAPI to delete delivery
       CALL FUNCTION 'BAPI_OUTB_DELIVERY_CHANGE'
         EXPORTING
           header_data    = ls_header_data
           header_control = ls_header_ctrl
           delivery       = iv_vbeln
         TABLES
           return         = et_msg.
    IF ...
    COMMIT WORK AND WAIT.
    ELSE.
    ENDIF.
    "2. change Sales order (adding new item positions)
    "add new/changed data
       LOOP AT IT_NEW_ITEMS ASSIGNING <ls_new_items>.
         CLEAR: ls_order_item_in,
                ls_order_item_inx,
                ls_schedule_line,
                ls_schedule_linex.
         add 10 to lv_posnr.
         ls_order_item_in-itm_number = lv_posnr. "posNr
         ls_order_item_in-material = <ls_new_items>-matnr. "material
         ls_order_item_in-target_qty = <ls_new_items>-menge.  "quantity
         ls_order_item_in-sales_unit = <ls_new_items>-MEINH. "sales unit
         APPEND ls_order_item_in TO lt_order_item_in.
         "fill order item check table
         ls_order_item_inx-itm_number = lv_posnr.
         ls_order_item_inx-updateflag = 'I'.
         ls_order_item_inx-material   = abap_true.
         ls_order_item_inx-target_qty = abap_true.
         ls_order_item_inx-sales_unit = abap_true.
         APPEND ls_order_item_inx TO lt_order_item_inx.
         "schedule lines
         ls_schedule_line-itm_number   = lv_posnr. "posnr
         ls_schedule_line-sched_line   = '1'.
         ls_schedule_line-req_qty      = ls_order_item_in-target_qty. "quantity
         ls_schedule_line-req_date      = lv_lfdate.               "schedule line date
         APPEND ls_schedule_line TO lt_schedule_line.
         "schedule lines check table
         ls_schedule_linex-itm_number   = lv_posnr. "posnr
         ls_schedule_linex-sched_line   = '1'.
         ls_schedule_linex-req_qty      = abap_true. "quantity
         ls_schedule_linex-req_date      = abap_true.               "schedule line date
         ls_schedule_linex-UPDATEFLAG  = 'I'.
         APPEND ls_schedule_linex TO lt_schedule_linex.
       ENDLOOP.
       "call bapi to add items to sales order
       CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
         EXPORTING
           SALESDOCUMENT    = iv_sales_order
           ORDER_HEADER_INX = ls_order_header_inx
         TABLES
           RETURN           = et_msg
           ORDER_ITEM_IN    = lt_order_item_in
           ORDER_ITEM_INX   = lt_order_item_inx
           SCHEDULE_LINES   = lt_schedule_line
           SCHEDULE_LINESX  = lt_schedule_linex.
    IF....
    COMMIT WORK AND WAIT.
    ELSE.
    ENDIF.

    The first thing I would try is to use fm BAPI_TRANSACTION_COMMIT (with parameter WAIT = 'X') instead of COMMIT WORK AND WAIT which is directly put in your code (this is almost the same but not exactly).
    Then make sure that if your code performs two BAPI calls one after the other, they are separated with either a call to fm BAPI_TRANSACTION_COMMIT or BAPI_TRANSACTION_ROLLBACK.
    Then - if the above is applied and still does not help - I would suspect that some invalid / incomplete data is passed to fm BAPI_SALESORDER_CHANGE.
    regards

  • Remodeling the cube and adding sales document number

    HI guys
    I have a requirement of sales order number in the sales over view cube ( 0sd_c03 ) so i am planing to remodel the cube to add sales order number and item
    as i can not create a new dimension i have to add these two charecteritics to a old dimension
    so whether it will give any perfomance issues later on as the sales document number will increase the
    records in that dimesion or can i go ahead to do it or i have to delete the data in cube and change the cube adding a new diemension ( line item dimension)
    please suggest..
    Regards
    Amiya

    Hi Amiya,
    Regarding ur case ..
    In my opinion, it should be separated into different dimension ..
    Because it will make that old table dimension become have huge data,
    it will make slow in fetching the data.
    To make it.
    1. Edit Info-Cube using t-code RSA1
    2. Create new dimension, and insert dummy characteristic, then save, and activate it.
    3. In the remodeling, t-code: RSMRT, you can add those 2 characteristics there, you also can initilize the value for those characteristic.
    4. Then, in the remodeling, you delete the dummy characteristic.
    Hopefully it can help you a lot.
    Best regards,
    Niel.

Maybe you are looking for

  • How to get the connected screen off when connected

    When I connect my iPod nano (4th gen - I believe) to both my car (through the AUX jack with a USB cord) and to my computer, the screen that says "Connected Eject before disconnecting" comes up and won't go away - even after it syncs and everything. I

  • Access to KeyPolicy mapping table

    Hi all, i've the following scenario: - Sender system: B1.2007 - Sender Object: customized Purchase Order - Receiver system: B1.2007 - Receiver Objcet: standard Sales Order For the insert operation of a new PO, it's all right. About the operation of u

  • Charged twice.

    I have been having trouble with Verizon for the last three months. At first I had new service installed in my name as my parents were leaving the state. However this was in December and in January verizon basically did a name change instead of a new

  • After Effects Rendering too long

    I am trying to make about a 7 second clip of some photography (converted into that cool 3D paralax effect) with a lens flare and a CC light rays effect.  The damn thing took two hours and was less than halfway done, which seemed extremely long to me.

  • No activation mail for iCloud

    Hallo, my sister has a new iPad2 WiFi 3g. All looks fine. But the verification or activation mail for iCloud is not coming? The sended mail from apple was on 17:30 Uhr and Now 21:45 is nothing in the Mail We have 2 times manualy send on the Apple web