RE SD_SALES_DOCU_MAINTAIN

Dear all,
I try to create Job -Work Order using this function module SD_SALES_DOCU_MAINTAIN.
Its creating with one incomplete log.( Missing data: Configuration ).
In which parameter i want to pass this configuration data.
Thanks,
Hemachandran.R

REPORT Z_REPAIRORDER_CREATE.
DATA: header_data TYPE vbakkom,
header_datax TYPE vbakkomx,
header_out TYPE vbak.
DATA: item_data TYPE vbapkom OCCURS 0 WITH HEADER LINE,
item_data_out TYPE vbap OCCURS 0 WITH HEADER LINE,
item_datax TYPE vbapkomx OCCURS 0 WITH HEADER LINE,
partner_data TYPE vbpakom OCCURS 0 WITH HEADER LINE,
return_data TYPE bapiret2 OCCURS 0 WITH HEADER LINE,
schedule_data TYPE vbepkom OCCURS 0 WITH HEADER LINE.
DATA: v_menge_g TYPE vbapkom-menge_g value '1',
var type vbapkom-zmeng value 1.
*----Header data
header_data-auart = 'ZCOS'.
header_data-vkorg = 'SIPL'.
header_data-vtweg = '60'.
header_data-spart = '20'.
header_datax-auart = 'X'.
header_datax-updkz = 'I'.
header_datax-vkorg = 'X'.
header_datax-vtweg = 'X'.
header_datax-spart = 'X'.
*----Item data
item_data-posnr = '000010'.
item_data-matnr_g = '000000000148670245'.
item_data-menge_g = v_menge_g.
item_data-zmeng = var.
item_data-zieme = 'LE'.
item_data-matkl = '138'.
item_data-werks = 'MUM3'.
APPEND item_data.
item_datax-posnr = '000010'.
item_datax-updkz = 'I'.
item_datax-matnr_g = 'X'.
item_datax-menge_g = 'X'.
item_datax-zmeng = 'X'.
item_datax-zieme = 'X'.
ITEM_DATAX-MATKL = 'X'.
item_datax-werks = 'X'.
APPEND item_datax.
*----Partner data
partner_data-posnr = '000000'.
partner_data-parvw = 'AG'.
partner_data-kunnr = '0000680818'.
APPEND partner_data.
CALL FUNCTION 'SD_SALES_DOCU_MAINTAIN'
EXPORTING
i_vbakkom = header_data
I_VBAKKOMX = header_datax
WITH_COMMIT = 'X'
I_CALL_BAPI = 'X'
SUPPRESS_AVAILIBILITY_DIA = 'X'
STATUS_BUFFER_REFRESH = 'X'
IMPORTING
E_VBAK = header_out
TABLES
IX_VBAPKOM = item_data
IX_VBAPKOMX = item_datax
IX_VBPAKOM = partner_data
RETURN = return_data

Similar Messages

  • Repair orders using SD_SALES_DOCU_MAINTAIN

    Hi all,
    I'm trying to use the FM 'SD_SALES_DOCU_MAINTAIN' for creating repair orders. On runing the progrma i'm getting the following error message <b>'Only quantity 1 AU is allowed (Item 000010)'</b>.
    I'm attaching my code here. If any one has worked on this FM before kindly guide me.
    REPORT  Z_REPAIRORDER_CREATE.
    DATA: header_data         TYPE vbakkom,
          header_datax        TYPE vbakkomx,
          header_out          TYPE vbak.
    DATA: item_data           TYPE vbapkom   OCCURS 0 WITH HEADER LINE,
          item_data_out       TYPE vbap      OCCURS 0 WITH HEADER LINE,
          item_datax          TYPE vbapkomx  OCCURS 0 WITH HEADER LINE,
          partner_data        TYPE vbpakom   OCCURS 0 WITH HEADER LINE,
          return_data         TYPE bapiret2  OCCURS 0 WITH HEADER LINE,
          schedule_data       TYPE vbepkom   OCCURS 0 WITH HEADER LINE.
    DATA: v_menge_g           TYPE vbapkom-menge_g value '1',
          var                 type vbapkom-zmeng   value 1.
    *----Header data
    header_data-auart = 'ZCOS'.
    header_data-vkorg = 'SIPL'.
    header_data-vtweg = '60'.
    header_data-spart = '20'.
    header_datax-auart = 'X'.
    header_datax-updkz = 'I'.
    header_datax-vkorg = 'X'.
    header_datax-vtweg = 'X'.
    header_datax-spart = 'X'.
    *----Item data
    item_data-posnr   = '000010'.
    item_data-matnr_g = '000000000148670245'.
    item_data-menge_g = v_menge_g.
    item_data-zmeng   = var.
    item_data-zieme   = 'LE'.
    item_data-matkl   = '138'.
    item_data-werks   = 'MUM3'.
    APPEND item_data.
    item_datax-posnr   = '000010'.
    item_datax-updkz   = 'I'.
    item_datax-matnr_g = 'X'.
    item_datax-menge_g = 'X'.
    item_datax-zmeng   = 'X'.
    item_datax-zieme   = 'X'.
    ITEM_DATAX-MATKL   = 'X'.
    item_datax-werks   = 'X'.
    APPEND item_datax.
    *----Partner data
    partner_data-posnr = '000000'.
    partner_data-parvw = 'AG'.
    partner_data-kunnr = '0000680818'.
    APPEND partner_data.
    CALL FUNCTION 'SD_SALES_DOCU_MAINTAIN'
      EXPORTING
       i_vbakkom                       = header_data
       I_VBAKKOMX                      = header_datax
       WITH_COMMIT                     = 'X'
       I_CALL_BAPI                     = 'X'
       SUPPRESS_AVAILIBILITY_DIA       = 'X'
       STATUS_BUFFER_REFRESH           = 'X'
    IMPORTING
       E_VBAK                          = header_out
    TABLES
       IX_VBAPKOM                      = item_data
       IX_VBAPKOMX                     = item_datax
       IX_VBPAKOM                      = partner_data
       RETURN                          = return_data
    Thanks in advance
    Warm regards,
    Roshan Basheer

    Hi vijaya dasu,
    Thanks for your reply; but 'LE' is the internal format for sales unit 'AU'.
    Regards,
    Roshan

  • Error "The sales document is not yet complete" when using SD_SALES_DOCU_MAINTAIN

    Hi there,
    I have built an update program for updating the sales documents (VA42). In that program I am using the BAPI-SD_SALES_DOCU_MAINTAIN. It works fine except for the sales docs that are incomplete. For those sales docs I have the following messages in the Return-internal tab. from the BAPI:
    V4
    233
    VBAKKOM has been processed successfully
    V4
    233
    VBAPKOM has been processed successfully
    V4
    233
    VBAPKOM has been processed successfully
    V4
    233
    VBAPKOM has been processed successfully
    V1
    555
    The sales document is not yet complete: Edit data
    V1
    311
    Collection Contract 55259592 has been saved
    The sales doc is indeed incomplete. What is missing in this sales doc is the prices. After discussion with the people from the business, I found out that it is impossible to complete those sales docs.
    In the transaction-VA42 it is possible to save such sales docs, after clicking the "Save" button in the pop-up "The sales doc is incomplete. (Save - Edit - Cancel)".
    The standard reports SDVBUV00 and SDVBUK00 do not help.
    Is there any other possibility or other BAPI that I could use to save such sales docs?
    Thanks,
    Dimce

    no issue anymore. On the QA-system it didn't work and on the production one it works.

  • VBEP-LIFSP Change in Sales Order

    Hello Gurus,
    In VA02 when the user double click on a material ->Schedule Line Tab-> Delivery Block. I need to update the VBEP-LIFSP field. I tried BAPI_SALESORDER_CHANGE but this BAPI do not provide the LIFSP field in any of the tables. I was reading about this function module SD_SALES_DOCU_MAINTAIN but I'm not sure how to achieve this requirement with this FM. Any help will be greatly appreciated. Thanks in advance.

    Hello.
    The following code work fine.
    ----------------------------------------------------->
    REPORT  ybapi_so_change2.
    PARAMETERS:
               p_vbeln  LIKE vbak-vbeln.
    DATA:
           lt_bapisdh1  TYPE bapisdh1,
           lt_bapisdh1x TYPE bapisdh1x,
           lt_bapischdl  TYPE STANDARD TABLE OF bapischdl  WITH HEADER LINE,
           lt_bapischdlx TYPE STANDARD TABLE OF bapischdlx WITH HEADER LINE,
           ls_return     TYPE STANDARD TABLE OF bapiret2   WITH HEADER LINE.
    START-OF-SELECTION.
       lt_bapisdh1x-updateflag = 'U'.    " Flag de actualiza
       lt_bapischdlx-updateflag = 'U'.   " Flag de actualiza
    *  lt_bapisdh1-dlv_block = '01'.    " Asignación bloqueo de entrega (Cabecera)
    *  lt_bapisdh1x-dlv_block = 'X'.    " Flag de actualización
       lt_bapischdl-req_dlv_bl = '04'.   " Asignación bloqueo de entrega (Posición)
       lt_bapischdlx-req_dlv_bl = 'X'.   " Flag de actualización
       lt_bapischdl-sched_line = '0001'. " Nro reparto
       lt_bapischdlx-sched_line = '0001'." Nro reparto
       lt_bapischdl-itm_number = '30'.   " Nro de posición
       lt_bapischdlx-itm_number = '30'.  " Nro de posición
       APPEND lt_bapischdl.
       APPEND lt_bapischdlx.
       CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
         EXPORTING
           salesdocument    = p_vbeln
           order_header_in  = lt_bapisdh1
           order_header_inx = lt_bapisdh1x
         TABLES
           return           = ls_return
           schedule_lines   = lt_bapischdl
           schedule_linesx  = lt_bapischdlx.
       CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

  • Repair Order using BAPI_SALESORDER_CREATEFROMDAT2

    Hi,
      I am creating a Repairs order using the above BAPI, but it does not provide the functionality to add Servicable Material and Repair Information.
      there was a similar forum where it was mentioned to use 'SD_SALES_DOCU_MAINTAIN', I am not sure where to pass this info and if this FM is safe to be directly used..
    Regards,
    Kaustubh.

    Hi Kaustubh,
    We are using 'SD_SALES_DOCU_MAINTAIN' to create the Repair Order and its working fine for us. We came at this conclusion only after extensive testing and debugging the standard BAPI.
    The material vbapkom-matnr is 'REPAIR' in our case. You should check with your functional person about the same.
    You need to populate the vbapkom-zmeng (quantity).
    The servicable material field is vbapkom-matnr_g which is the actual material that needs repair.
    You also need to populate the vbapkom-menge_g which is the servicable material quantity
    Apart from this you have to populate the schedule line table vbepkom, partner table vbapkom and header structure.
    My call looks like this       CALL FUNCTION 'SD_SALES_DOCU_MAINTAIN'
            EXPORTING
              i_vbakkom                 = wa_vbakkom
              i_call_bapi               = 'X'
              suppress_availibility_dia = 'X'
              status_buffer_refresh     = 'X'
            IMPORTING
              e_vbak                    = wa_vbak
            TABLES
              ix_vbapkom                = lt_vbapkom
              ix_vbpakom                = lt_vbpakom
              ix_vbepkom                = lt_vbepkom
              return                    = lt_bapireturn
              ix_text_header            = lt_text_head.
    Do let me know if you need any other information.
    Regards,
    Shubham
    P.S.- You can also use the standard BAPI for doing this. But in that case you have to append fields matnr_g and menge_g to the item table vbap and then populate the extension table 'EXTENSIONIN' of the standard BAPI BAPI_SALESORDER_CREATEFROMDAT2.

  • Update "Additional data b" tab.

    Hi all,
    I have a requirement to change SD Orders in background. Function module BAPI_SALESORDER_CHANGE is working fine, but I need to update u201Cnotification number fieldu201D at Sales Order header. In transaction VA02 notification number appears in the tab u201Cadditional data bu201D (field VBAK-QMNUM). However, I canu2019t find this field to be updated through BAPI_SALESORDER_CHANGE. Has anyone faced this issue before? Is there any technique to update vbak-qmnum in background?
    Thanks,
    Marcos Vilela.

    Hi Marcos,
    I can suggest 3 alternatives for what you want:
    (1) use fm SD_SALES_DOCU_MAINTAIN instead:
          It is more complicated to use, cause you have to populate all the
          relevant structures and internal tables with SO data. However it can handle
          VBAK-QMNUM in I_VBAKKOM
    (2) use the EXTENSIONIN parameter of the BAPI
          To do this, you should first create append structures for BAPE_VBAK and BAPE_VBAKX
          Introduce the QMNUM field in append str. for BAPE_VBAK with data element QMNUM (12chars),
          in append str. for BAPE_VBAKX with data element BAPIUPDATE (1 char)
          Then populate the EXTENSIONIN parameter with 2 lines:
          1. extensionin-structure = 'BAPE_VBAK'
              extensionin-valuepart1 = vbak-vbeln(10 chars) + vbak-qmnum(12 chars)
          2. extensionin-structure = 'BAPE_VBAKX'
              extensionin-valuepart1 = vbak-vbeln(10 chars) + 'X'(1 char)
    (3) simply update VBAK-QMNUM with SQL statement UPDATE.
    BR,
    Barna

  • How to set "Configuration Variant" for a sales order item using function

    Hello All,
    I use function module 'SD_SALES_DOCU_MAINTAIN'  to create Customer Indep. Requirements but how to set "Configuration Variant" for a sales order item.
    Is their any idea or sample code?

    Hi Zhijun zhang,
    <u>http://help.sap.com/saphelp_nw2004s/helpdata/en/c0/98038ce58611d194cc00a0c94260a5/content.htm</u>
    <u>http://help.sap.com/saphelp_nw04/helpdata/en/c0/980374e58611d194cc00a0c94260a5/content.htm</u>
    A variant is simply an SAP report where the parameters for running the report have been set by the user and then saved with unique name. This allows future retrieval and execution of the report faster without reentering the parameters. As a convention the variant name should start with with the digits 50 so searchs for LHU variants is easier and quicker.
    The first link will guide you by screen shot wise.
    Award points if it adds information.
    Thanks
    Mohan

  • How SD_SALES_CONDITION_MAINTAIN work

    Hi all,
         I want to insert a price condition by   SCHEDULE level.
         When using BAPI_SALESORDER_CHANGE ,it popup up a screen and let me choose the schedule(J_3AETENR).
         Now i do not let it popu up the screen, i want to pass parameter to J_3AETENR directly.
         I search and konw how it popup up a screen and get  J_3AETENR value.But I don't konw how it use J_3AETENR value.
         where does it update table.
         BAPI_SALESORDER_CHANGE ----> SD_SALESDOCUMENT_CHANGE --->   SD_SALES_DOCU_MAINTAIN
         --->   SD_SALES_CONDITION_MAINTAIN---  perform komv_pruefen --->  PRICING_CHECK -->  J_3A_SIZE_POPUP
    Kical

    Hi,
    Most of the pricing in SD is carried out with the Sales Order Header information and only few is with item information. I can't see any table or structure in SD_SALES_ITEM_MAINTAIN where you can pass any Header Information (e.g. Sold-To, Ship-To, Sales Org, Order Type etc.)
    I was having the same issue where in I need to get the pricing information with simulation and I used BAPI only.
    Thanks,
    Mandar

Maybe you are looking for

  • I need to know how to make a copy of my contacts from my iphone to my PC?

    I cannot get my contacts to appear on my PC so I can make a copy.I am due to recive a new company phone today and I do not want to lose my contacts.I am unsure of what type phone my next one will be.But I do know that I will be with Verizon Wireless.

  • Error message when posting invoice : Day-end closing not defined

    Hi, In our training environment we migrated from FAGLFLEXT to FMGLFLEXT and activated fund management. Now when posting an invoice the system provides an error message: "FQ252 Day end closing not defined". There is no configuration related to F845 bu

  • MMREF Magnetic Media Files Download/Saved from Tax Reporter

    Often times when we go to download the MMREF Federal File and various state files that are generated in PU19, they are not in the correct format.  Please explain how these should be downloaded.  Is the process to take the temse file and just download

  • Disabled button does not look disabled

    In a simple FX app I created a button and set the disable property to true, for exampledeleteButton.disable = true The problem is that when I run the app the button does not look disabled. The only way I can tell if the button is enabled or disabled

  • CS4 and (no) Intel Chip

    I have MOS 10.4.11, but bought my iMac just before the Intel chip arrived. I also have CS4 to install, but don't know if I should do so without the Intel chip, seemingly a requirement. Will appreciate any help offered. Ginnie