SD_SALES_HEADER_MAINTAIN

Hi All,
Thanks in advance.
can any one help me out to know why i am getting the error ' Error when copying the contract data in batch input ' when my program is calling the function module 'SD_SALES_HEADER_MAINTAIN'.
I am getting subrc = 1 when control passes through this function module and the further logic in the program is building this error.
what could be the possible field or data that was getting passed to this function module which is wrong.

looks like its not finding some Object it need to be provided.. when I am seeing the code...at the end there is a FM SD_PARTNER_OBJECT_DESTROY, where the exception is maintained... try to debug and see if the BUSINESSOBJEKT and LVF_OBJECTKEY are passed correctly....

Similar Messages

  • How to change header status of a sales order

    Hi people,
    can anybody suggest me a FM for changing sales order header status (say from partailly complete to completed).
    Regards,
    Sandy

    Use this FM SD_SALES_HEADER_MAINTAIN.
    <b><REMOVED BY MODERATOR></b>
    Regards.
    Message was edited by:
            Alvaro Tejada Galindo

  • SD Payment card deletion in Sales order (Standard fucntion?)

    Hi all,
    I have this below scenario regarding updating of Payment Card in a sales document (Header level)
    Requirement is to need to be able to add/delete a payment card when an cusotmer does it online.
    An customized RFC(Z_RFC_1)is called form the outer application RFC is called which internally calls
    Z_RFC_1 internally calls SD_SALES_HEADER_MAINTAIN.
    Here in SD_SALES_HEADER_MAINTAIN is a structure FXZAKAKOM. Here I am passing
    I have the following information to pass.
    TYPZM     Means of payment for classifying payment card plan lines
    CCINS          Payment cards: Card type
    CCNUM     Payment cards: Card number
    FKSAF     Billing status for the billing plan/invoice plan date
    UPDKZ     Update indicator
    When I send UPDKZ = u2018Iu2019 a payment card is created for that sales order.
    Tables: FPLA, FPLT, FPLTC. (Tables for payment card).
    Linked to VBAL-RPLNR
    But when I wan to delete a card and I send u2018Du2019 in field FXZAKAKOM-UPDKZ (SD_SALES_HEADER_MAINTAIN). It does not work.
    After debugging I found that I can delete the payment cards by using function BILLING_SCHEDULE_SAVE. But here the problem is the link in VBAK-RPLNR does not get updated. Hence I have to clear VBAK-RPLNR using a UPDATE statement. (Which is not advised).
    Irrespective of the above scenario can any one let me know how a payment card can be deleted from a sales order using a standard function module.
    Note: Currently I am using SD_SALES_HEADER_MAINTAIN.
    Thanks in advance.
    Kiran

    Hi manam narayana
    Either  you need to have a separate sales document type , but with the same sales document type OR ,it is not possible.So if you want to make it mandatory payment card field mandatory then first of all copy document type OR to ZOR . Now use transaction variants  using t.code SHD0 and there give document type ZOR and business object as BUS2032.and make the feild payment cards as required .
    Now create the sales order using document type ZOR for the customers for whom payment cards should be mandatory.
    But with the same document type i think it is not possible.Because if you make this field mandatory it will affect to all customers
    Regards
    Srinath

  • New in NW04s: FL069 TABLES parameters are obsolete (in function modules)

    Can somebody explain what is the fundamental reason for this behaviour in NW04s?
    In Netweaver 2004s system (like ERP2005 ) you get a warning message in SE37:
    FL069 TABLES parameters are obsolete! when defining quite ordinary tables parameter using LIKE and reference to a structure in ddic.
    I now speak normal function modules, not RFC enabled.
    This example of tables parameter definition will cause the warning message:
    return LIKE BAPIRET2
    I of course looked the additional help provided by this message FL069. I understood it as following:
    you should stop using TABLES parameter and more often use CHANGING parameter by referring a TABLE TYPE defined in dictionary.
    if using CHANGING parameter and still want to pass the header line of your internal table you should use a separate parameter (EXPORT or CHANGING parameter)
    Developers have too much used TABLES parameters for passing internal tables for reading (by value) rather than to be modified (by reference). As a consequence, fm could have change the header line without caller to know it.
    in my opinion the message help is missleadingly telling that header line is no longer passed to function module if TABLES parameter is used. I made a small test program and fm (with TABLES paramerer), and everything worked as before.
    The warning message can be ignored by pressing Enter a few times and your fm with TABLES parameter works as it had in older versions of Netweaver.
    SAP is still using a lot of TABLES parameters in their own function modules. For example SD_SALES_HEADER_MAINTAIN.
    So what is the point of this warning message while everything still works as it used to be and SAP uses this same "OBSOLETE" feature itself? Is there anything more fundamental behind this message? Like TABLES paremeters will no longer work in future versions of ABAP (or header line passing will be ignored in future versions) and therefore developers should switch to CHANGING/EXPORT parameters with TABLE TYPES as soon as possible??
    Please understand that I don't need any assistance how to avoid this message, just interested to share your opinions what is the purpose of this warning message.
    That is why I did not marked this thread as a question.
    Br: Kimmo

    Hello,
    This is the view under Tables tab in my function builder:
    I_T_SELECT     TYPE     SRSC_S_IF_SIMPLE-T_SELECT
    I_T_FIELDS     TYPE     SRSC_S_IF_SIMPLE-T_FIELDS
    E_T_DATA     LIKE     SFLIGHT (which I change to YBWxxxx)
    The moment I change to YBWxxxxx it gives me that error '"TABLES parameters are obsolete! "'
    and unfortunately hitting enter several times is not helping  either
    Thanks!

  • Regarding Sales office and Sales group.

    Hi All,
    I have a small issue, Whenever I am creating a sales order, the sales office and Sales group of Sold-to-party will be copied which is standard functionality. The requirement is to copy the Sales office and sales group of Ship-to-party assigned to the sales order.
    According to our design there are more than a single ship-to-party to a sold-to-party and only Ship-to-parties have the sales group and sales office filled and those fields are empty in Sold-to-party.
    Pleae let me know, if there's any way.
    Thanks,
    Sharath.

    Read the S-note 670487 and the warning.
    But it says it is possible. I suggest you to take the SAP help in this regard (thru service market place).
    S-note : 670487
    Summary
    Symptom **********************************************************************
    WARNING: This is an IS-OIL / IS-MINE-specific note. If you DON'T   *
    have IS-OIL / IS-MINE installed on your system, this note does    *
    not apply to you. If this note is applied and you do not have      *
    IS-OIL / IS-MINE installed, you could cause serious damage to      *
    your system.                                                      *
    When a sales order is created through TPI, sales office and sales group
    are proposed from ship-to-party.
    Other terms
    TPI, phoned order, sales office, sales group, ship-to-party, sold-to-party, CUST_SALES_AREA, SD_SALES_HEADER_MAINTAIN.
    Reason and Prerequisites
    During sales order creation through TPI, MCOE specific form routine CUST_SALES_AREA is called in function module SD_SALES_HEADER_MAINTAIN. This form routine passes ship-to-party as customer and hence sales group and sales office in VBAK are filled from ship-to-party. The call to form routine CUST_SALES_AREA is not required as sales office and sales group of sold-to-party are already correctly filled into VBAK by form routine VBAK_FUELLEN_KUAGV of program SAPFV45K.
    Solution
    Function Module SD_SALES_HEADER_MAINTAIN is modified to remove
    unnecessary call to form routine CUST_SALES_AREA of program SAPMV45A.
    for release 4.6C (core 4.6C) ******************************
    This SAP Note should be applied only to IS-OIL / IS-MINE systems.
    The solution is delivered as part of an assigned patch (AOP or CRT).
    For patch schedule information refer to SAP Service Marketplace
    http://service.sap.com/ocs-schedules and check the document 'Oil CRT
    schedule'.
    If you need to implement this SAP Note urgently, refer to SAP Note 47531.
    Header Data
    Release Status: Released for Customer
    Released on: 15.10.2003  06:10:11
    Priority: Correction with medium priority
    Category: Program error
    Primary Component: IS-OIL-DS-TPI Transportation Planning Interface
    Releases
    Software
    Component Release From
    Release To
    Release And
    subsequent
    IS-OIL 46C 46C 46C  
    Support Packages
    Support
    Packages Release Package
    Name
    IS-OIL 46C SAPKI4C084
    Corrections Instructions
    Correction
    Instruction Valid
    from Valid
    to Software
    Component Ref.
    Correction Last
    Modifcation
    597482 46C 46C IS-OIL SOGK040821 14.10.2003  11:33:31

  • How  to upload sales quotation data through LSMW?

    Hello i need to upload the sales quotation data from transaction VA21 for this we are using LSMW direct input method
    the program RVINVB10 is used and there are 8 segments as given below was mapped
    BVBAKKOM   Header records
    VBPAKOM      Partner records
    BVBAPKOM    Item records
    BVBEPKOM     Schedule line data
    H_BTEXHKOM Header text record
    H_BTEXLKOM  Header text line
    BTEXHKOM      Item text record
    BTEXLKOM      Item text line
    i have tried to upload the data using some test data but unable to upload. can anybody send the sample test data for it which needs to be given in flat file?
    when i debugged the program i found some problem with the function module SD_SALES_HEADER_MAINTAIN
    please let me know what are the export and import parameters to pass to this function module to work properly

    yes

  • BAPI or Direct Input method

    Hi Experts,
    For large data transfers, taking performance in to consideration, which method 'DIrect Input' or 'BAPI'  is preferable ?
    For Eg, for Volume upload of sales orders, I have the option to use BAPI , BAPI_SALESORDER_CREATEFROMDAT2 or direct input programs RVINVBT0 and RVINVB10 .
    If I check the code in detail, for the BAPI and the direct input programs, both of them  finally call standard function modules 'SD_SALES_HEADER_MAINTAIN', 'SD_SALES_ITEM_MAINTAIN' and u2018SD_SALES_DOCUMENT_SAVEu2019  to fiaally create the sales order.
    BAPI is called with import parameter 'i_call_bapi' set to 'X', where as direct input have this parameter blank. This is the only difference I found.
    Can anyone please clarify which method is more performance-oriented and  how .
    Thanks in advance,
    Vishnu Pirya

    for performance point of  you can go for below BAPI or IDOC method. both method are create the inbound idocs...
    BAPI MEthod.
    Business Object      BUS2032      Sales Order
    Method               CREATEFROMDAT2              Sales order: Create Sales
    Message Type         SALESORDER_CREATEFROMDAT2   Sales order: Create Sales
    Basic Type           SALESORDER_CREATEFROMDAT2   Sales order: Create Sales
    IDOC Method:
    Message Type         SALESORDER_CREATEFROMDAT2   Sales order: Create Sales
    Basic Type           SALESORDER_CREATEFROMDAT2   Sales order: Create Sales

Maybe you are looking for