Function module SD_SCD_DELETE deletion of shipment cost document

Hi,
  I need to develop a custom transaction to delete SCD ( shipment cost document). I have found that the FM  SD_SCD_DELETE is used to delete the SCDs. Can anybody tell me how to go about the process and use this FM to delete the SCDs.
Thanks and regards
Prem

HI,
Check these code once :
TYPES: v54a0_vfkk LIKE vfkkvb.
data : itab type v54a0_vfkk .
CALL FUNCTION 'SD_SCD_DELETE'
EXPORTING
  I_REFOBJ                 =
  CHANGING
    c_scd_wa                 = itab
    EXCEPTIONS
   item_not_deletable       = 1
   scd_not_deletable        = 2
   OTHERS                   = 3 .
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Reg,
Siva

Similar Messages

  • Function Module to Update Shipment Cost Document through Idoc.....?

    Is there any EDI function module which can Update Shipment Cost Document through Idoc.....

    Hi Vijendra,
    Welcome to SDN.
    You can use FM IDOC_INPUT_SHPMNT with message SHPMNT and IDoc type SHPMNT01/02/03/04/05 to update shipment document.
    Hope this will help.
    Regards,
    Ferry Lianto
    Please reward points if very helpful.

  • Picking deleted shipment cost documents

    Hello,
    if I delete a shipment costs document (transaction VI02) there will be no flag at document, the document will be deleted completely from the table. How can find any information of deleted documents, the best with any information about values?
    Regards
    Norbert

    Hi,
    If change log is activated, you can get the deletion log in CDHDR & CDPOS tables. You can use function module CHANGEDOCUMENT_READ to get change document information.
    Regards
    Vinod

  • Shipment cost document deletion

    Hi Gurus,
    Can u guide me the process how we need to delete the shipment cost document....
    I tried to delete it by selcting the delete icon in the menu bar (file).. but the below message is coming
    "Document can not be deleted,since item 0001 can not be deleted"
    Please guide me how can i delete
    Regards,
    Subbu

    might u have transferred the shipcost document.u need to cancel the transfer document by checking the cancellation check box.After that u need to delete the account assignment document there by clicking the delete button on the header document we can delete the ship cost document.
    Reward Points If helpful.
    -Sudheer

  • Not Getting Transfer Button in Shipment Cost Document.

    Dear Friends,
    I am configuring the TM module settings.
    while generating shipment cost document I am not getting the tab pages (Price Settings / Tax / Conditions / Settlement).
    Pl guide mre where and what settings I should do the, to get the tab pages in shipment cost document...
    Regards,
    Sreehari.
    Edited by: Sreehari Kondapalli on Sep 8, 2009 5:30 PM
    Edited by: Sreehari Kondapalli on Sep 8, 2009 8:53 PM

    Hi,
    Make setting in OKB9
    Else
    Logistic executive >>> Transportation >>> Shipment cost >>> Settlement >>> Automatic G/L determination & Automatic CO account assignment.
    Kapil

  • Deletion of Shipment, Shipment Cost Document, aftr creation of ref. P.O,IR

    Dear SAP Gurus,
    I have a Scenario in my customer System.
    the Scenario is as follows,
    1) Creation of a Sales ORder
    2) Delivery
    3) Shipment
    4) Shipment Cost (as the shipping is carried by a vendor, we capture the costs here)
    5) With Reference to the Shipment cost, we create a Purchase Order
    6) after the P.O , the IR
    Current Situation :
    The End user is able to delete the Shipment Cost and the Shipment Document even if the P.O  is invoiced.
    Requirement :
    the Shipment and the shipment cost Documents shouldnt be deleted unless the IR is reversed for the P.O
    Note * Is there a Configuration Possible for this requirement *
    awaiting your Expert Comments
    Many thanks in Advance.
    Regards,
    Santa Khattri.

    FSKB     G/L Account Posting
    this transaction is not working

  • Search for a function module for deleting document originals (DMS)

    Hi,
    I'm searching for a function module to delete originals in documents (like manually with transaction cv02n). I'm only able to set an delete mark with the module 'BAPI_DOCUMENT_DELETE'.
    The module 'BAPI_DOCUMENT_CHANGE2' can only add new originals to an existing document. I need a possibility to delete all originals in an document without deleting the document itself.
    Has anyone an idea?
    Thanks.
    Jan-Christian Treusch

    Many thanks!
    That's especially the method I've searched for so long....
    best regards.
    Jan-Christian Treusch

  • Auto creation of Shipment cost document

    Hi Folks,
    Is anyone aware of how to create a shipment cost document using a function module?
    I need to create shipment cost document as well as update the condition values. But all this needs to be done via a BAPI or something in the background.
    Thanks,
    Mihir

    Seen an abaperr and check out the program "RV56TRSL" for your requirement. Through this program, you can Schedule the creation of Shipment cost document.
    If you're talking about automatic PO creation then you need to do the following:
    1. Assignment with relevant Purchasing org & group will be done at SPRO->LE->Transportation->Shipment cost->settlement->Assign Purchasing data
    2. To create the PO automatic you need to do these settings :-
    By selecting the shipment cost & item category for automatic PO (T_56) and selected the default PO type for the transaction.
    Path :- IMG > Material Mgt. >Purchasing >Define default Values for Document Type.
    Path :- IMG >Logixtic Execution >transportation -> Shipment Cost >Ship Cost Document >Shipment Cost Type & Item Category (T_56).
    3. Remember to check EKKN which is the table for account assignment in PO.
    Good luck

  • Is there any BAPI or function module  to delete entries from a table (VBAK)

    Hi Everybody,
    this is my first thread in SDN...
    my problem follows...
    A report is be created that selects all sales orders created by e-Sales that are more than 20 minutes old and still have a delivery block:
    tables:
    VBAK     sales document: header data
    selection fields:
    VBAK-LIFSK      &#8800;     <BLANK>
    VBAK-ERNAM     =     userID used by e-Sales / IVE
              (EP-BATCH / EAI-BATCH)
    VBAK-ERDAT      <=     Current system Date
    VBAK-ERZET     <=     Current system Time - 20 minutes
    These orders should be deleted from SAP system.
    This report should be scheduled to run regularly every 10 minutes.
    my doubt : is ther any BAPI or Function module to delete entries from a standard table...if no what is the way to delete the enteries from a std table...
    best replies will be rewarded....
    regards
    Reddy

    Hi Vasanth ,
    thanks for your reply.
    i tried in the same manner what u mentioned.
    but how to pass only one parameter to the functionmodule..
    here in this case we have to pass only update flag as 'D'..
    i did the same it giving dump..
    An exception occurred that is explained in detail below.                          
    The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', was      
      not caught and                                                                   
    therefore caused a runtime error.                                                 
    The reason for the exception is:                                                  
    The call to the function module "BAPI_SALESORDER_CHANGE" is incorrect:                                                                               
    In the function module interface, you can specify only                            
    fields of a specific type and length under "ORDER_HEADER_INX".                    
    Although the currently specified field                                            
    "INT_ORDER_HEADER_INX" is the correct type, its length is incorrect.              
    my pgm :
    *& Report  YNEW_ORDER_DELETION
    REPORT  ynew_order_deletion.
    TABLES:vbak.
    PARAMETERS:
         p_lifsk LIKE vbak-lifsk DEFAULT '02'.
    SELECT-OPTIONS:
       s_lifsk FOR vbak-lifsk DEFAULT '10',
        s_ernam FOR vbak-ernam,
        s_erdat FOR vbak-erdat,"DEFAULT sy-datum.
        s_erzet FOR sy-uzeit.
    *PARAMETERS:
    p_erzet LIKE sy-uzeit.
       s_erdat like vbak-erdat,
       s_erzet like vbak-erzet.
    DATA:
       BEGIN OF int_final OCCURS 0,
            w_vbeln TYPE vbak-vbeln,
       END OF int_final.
    DATA:
      int_return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
    DATA: int_order_header_inx LIKE bapisditmx OCCURS 0 WITH HEADER LINE.
    DATA:
      wf_time TYPE sy-uzeit.
    INITIALIZATION.
      s_ernam-low = 'KULKARMA'.
      s_ernam-sign = 'I'.
      s_ernam-option = 'EQ'.
      APPEND s_ernam.
    s_ernam-low = 'EAI-BATCH'.
    s_ernam-sign = 'I'.
    s_ernam-option = 'EQ'.
    APPEND s_ernam.
    wf_time = sy-uzeit - 1200.
    p_erzet = sy-uzeit - 1200.
    p_erzet-low = wf_time.
    APPEND s_erzet.
      int_order_header_inx-updateflag = 'D'.
      APPEND int_order_header_inx.
    START-OF-SELECTION.
      SELECT vbeln FROM vbak
                       INTO TABLE int_final
                       WHERE lifsk EQ p_lifsk
                         AND ernam IN s_ernam
                         AND erdat IN s_erdat
                         AND erzet IN s_erzet.
      IF sy-subrc = 0.
        LOOP AT int_final.
          CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
            EXPORTING
              salesdocument         = int_final-w_vbeln
      ORDER_HEADER_IN             =
        order_header_inx            = int_order_header_inx
      SIMULATION                  =
      BEHAVE_WHEN_ERROR           = ' '
      INT_NUMBER_ASSIGNMENT       = ' '
      LOGIC_SWITCH                =
      NO_STATUS_BUF_INIT          = ' '
            TABLES
              return                      = int_return
      ORDER_ITEM_IN               =
      ORDER_ITEM_INX              =
      PARTNERS                    =
      PARTNERCHANGES              =
      PARTNERADDRESSES            =
      ORDER_CFGS_REF              =
      ORDER_CFGS_INST             =
      ORDER_CFGS_PART_OF          =
      ORDER_CFGS_VALUE            =
      ORDER_CFGS_BLOB             =
      ORDER_CFGS_VK               =
      ORDER_CFGS_REFINST          =
      SCHEDULE_LINES              =
      SCHEDULE_LINESX             =
      ORDER_TEXT                  =
      ORDER_KEYS                  =
      CONDITIONS_IN               =
      CONDITIONS_INX              =
      EXTENSIONIN                 =
        ENDLOOP.
        LOOP AT int_return.
          WRITE:/ int_return-type,
                  int_return-id,
                  int_return-number,
                  int_return-message.
        ENDLOOP.
      ENDIF.
    please help me ..its a very urgent issue to be solved...
    am waiting for ur reply...
    regards
    gangareddy

  • Freight capitalization for STO process using shipment cost document

    Dear MM experts
    I have been testing and trying to charge freight to material using transportation module. I know how to do it in simple STO process without SCD (shipment cost document) but I am not able to do it with SCD.
    I have searched and tried every link I found on SCN. Unfortunately there are many open threads and non of them is answered or giving complete solution. For example I have tried this link where Ajit Kumar has explained the scenario in detail I am but unable to achieve my result. I have also tried other links and SAP note 427944 as well.
    Now what thing confusing me is accounting entries and documents/steps where these accounting entries will be posted.
    My current process is like this in plant to plant transfer under same company code
    STO > OBD > Shipment Document > PGI > Accouting Entry with 641 movement type. Material account debit and same account credit. > Shipment Cost document > GR with 101 without any accounting entry > Transfer freight cost to FI using Freight Service PO determination > Accounting Entry Freight Outward Expense Debit and Freight Clearing Account Credit > MIRO > Accounting Entry Freight Clearing Debit and Vendor Credit
    As you can see we are booking freight as an expense and not charging to material. Now what I want is that freight should be charged to material. If I am sending material from plant P000 to plant P201 under same comapny code then freight charges should be added in material cost in plant P201.
    I have done FRB1 condition type with accrual and copy shipment cost tick mark and other stuff suggested in all those threads but it is not working.
    My requirement is to understand the points where and what accounting entries will be created as per my new scenario which is same as old one except one difference which is to charge freight to material instead of booking expense in freight service PO.
    Lets take an example that material cost price is 100 and freight charges is 50. Now as per old threads at the time of GR against OBD system will create accounting document with 150 debiting the stock in plant P201. What about credit? If we have added freight here then what about 2nd accounting entry in my first scenario in which freight expense is debited and clearing account is credited? Could anyone please explain accounting entries and points where these entries will be posted?
    Another thing is that is it only possible with moving average price to charge freight to material or can we do this with standard price as well using some standard or customized solution?
    Detailed and easy to understand answer will be highly appreciated.
    Thank$

    Hi Moazzam ;
    Firstly, you can benefit Badi/s in package VTRA which is given belowed.
    Secondly , i think that  shipping method --> create sto with delivery --> create shipment document and shipment cost document (problem is starting so system will be create PO and service entry sheet automatically , can you try shipment document is non-related with cost document.
    Thirdly , you can post invoices charge to material with miro , if you success to direct freight costs to stock account (BSX).
    Also , you can benefit doc. sap behaviours for Std price/ Map --> Planned & unplanned delivery costs in mm
    I hope , you can manage your process ; for me standart way is the best.
    Regards.
    M.Ozgur Unal

  • How the freight cost are transferred from condition type of shipment cost document to service entry sheet and collected in service PO item

    Dear Experts:
    could you please share with me the knowledge for below topic:
    How the freight cost are transferred from condition type of shipment cost document to service entry sheet and collected in service PO item, because these three objects use three different pricing procedures, and different condition type.
    how did the condition type of service entry sheet know to copy the value of whcih condition type in the pricing procedure of shipment cost document?
    Is this SAP standard function OR there need an enhancement to do that?
    I didn’t find related condition value copy setting in background, could you please share related setting with me? Thank you very much for your kind help!
    Best regards,
    Andy

    Hi, Gopi,
    Glad to see your feedback, but i still have question on your feedback:
    which condition type in the pricing procedure of service entry sheet should know to capture the net value of shipment cost doc? becasue there are so many condition types,
    And i have checked the corresponding condition type (PRSX) of service entry sheet pricing procedure in my SAP system, this is a self-defined condition type, but NO any calculation routine maintained for the condition type (PRSX), how did the condition type (PRSX) know to copy the total cost of shipment cost document?
    Below is the example and another question:
    what the relationship between the pricing procedures at service PO item level and service line item level?
    1. The freight cost in shipment cost document—including used condition type and pricing procedure
    The pricing procedure of shipment cost document
    2. The freight cost in service entry sheet—including used condition type and pricing procedure
    The pricing procedure of service entry sheet--the pricing procedure at service line item level
    3. The freight cost in service PO item—including used condition type and pricing procedure:

  • Business Area not flowing automatically in Shipment Cost document

    Hi there,
    In transportation module, while creating shipment cost document, business area is not flowing automatically. Upon more exploration we found that plant is also not flowing, and may be because of that business area is not flowing. What can the posible reasons for plnt not flowing? Suggest solution.
    Thanks and Regards,
    Deepshikha

    Dear Deepshikha,
    Please check the Assign purchasing data settings in T_53 transaction with the combination of the plant.
    Through this setting plant will flow in the shipment cost document.
    I don't have idea about where the businees area field avail in the shipment cost document.
    If so please chek the settings related to business area through this IMG path.
    SPRO>IMG>Enterprise structure>Assignment>Business Area Account Assignment.
    Define Rules By Sales Area
    If Rule 1 is assigned then
    Assign Business Area To Plant And Division
    If Rule 2 is assigned then
    Assign Business Area by Sales Area.
    I hope it will help you,
    Regards,
    Murali.

  • Export Shipment Cost Document / Service Agent

    Dear Gurus,
    My client having Exports, Client is sending goods from shipping Point to Port through Truck, its a direct leg. forwarding agent is one from shipping point to port, but another agent is responsible for the "Clearing and Forwarding agent" activities.
    In my shipment document on upper side i put the forwarding agent who is responsible from shipping point to port, and by default there is only one field of forwarding agent.
    But I have two item category so that can call two procedure in the cost document, one is for cost of truck and second is for clearing cost.
    I can successfully call two line items in the shipment cost with two different procedure, but forwarding agent is one. when i double click on the first line and change the "Invoicing Party" system can accept this but still forwarding agent at header is not change. Means when put the check of transfer and save the document both cost hit the same vendor appear on the shipment document,
    I want that shipment cost to be hit to both first line cost to the main agent (truck), and second line cost is to the "clearing agent" which i put on the shipment cost against the "invoicing party field".
    Hope gurus understand the scenario nad assist me.
    Regards,

    Issue resolved, through partner function functionality.
    Add the partner on the shipment document screen, and same would be call on the shipment costing document.
    Regards,

  • Inbound freight - Goods receipt before Shipment cost document

    Hi,
    We are in process of implementing Transportation module for capturing Inbound freight.
    All our test cases passed except 2) mentioned below:
    Operationally transactions sequence can happen in two ways:
    1) Purchase Order -> Inbound delivery -> Shipment document ->Shipment Cost ->Goods receipt ->Invoice verification - Materials
    > Invoice verification - Freight
    2) Purchase Order -> Inbound delivery -> Goods receipt ->Shipment document -> Shipment Cost ->  Invoice verification - Materials
    > Invoice verification - Freight
    In case 1 we are we are getting correct results as freight amount is getting added in material cost during MIGO as below
    Inventory              Dr          (is sum of GR/IR and Frt Provision)
    GR/IR                    Cr
    Frt Provision         Cr
    While in case 2) since MIGO is done prior to shipment document we are not able to get FI effects for freight cost. Hence Invoice booking is not possible for freight neither it is getting added into materials.
    Results expected as below :
    In case 1 , same as it is happening today.
    In case 2, it should post freight provision at shipment cost document so that freight booking can be done.
            Inventory       Dr
            Frt Provision  Cr
    It will be of great help if anybody suggest solution on this.
    Regards,
    Swanandesh Rane

    Hi Ilya,
    A simple search term "Shipment cost document creation before PGI" and got the below thread which is exactly the same the only difference is for process GR and GI
    May i ask you to go through with existing thread first and if  your question is not answered please let us know
    G/R mandatory before shipment cost....

  • Default the Tax Code on a Shipment Cost Document

    How do I set the tax code to default in the Shipment Cost Document under the Tax tab?  We're seeing different behavior depending on whether we're shipping from US to Canada or the other way around.  It must be configurable but I can't find it.  Please help as I've read many existing posts and can't find a resolution.
    Here's what's happening:
    B/L 122252 was shipped in Company 2000 from CA to US.  When I settle the cost document for these types of shipments, I have to delete the Tax Jurisdiction (US0000000) before I can complete it.  The Tax Code is also blank, when it should be I0 (Tax Exempt).
    2.    B/L 122325 is in Company 1000, and is the reverse of the one above (US to Canada shipment). It has a Canadian Tax Jurisdiction with the Tax Code of I0, and it works fine. The Jurisdiction does not have to be deleted.
    It seems that the issue with the Company 2000 shipments would be the Tax Code of I0 not being populated, when the shipment cost document is created.

    I was able to add a record to the Condtions' table that solved half my problem.  The Tax Exempt code (I0) is now being added to the Canadian record like it is for the US record.  However, the Tax Jurisdiction field is still being populated and we want it to be blank.  Where does this field come from?    It's not in the condition record, and it's something different for the US ship cost doc than the Canadian record, so something's telling it what to put there.

Maybe you are looking for

  • How do I use "LabVIEW dll import wizard" to import NETAPI32.dll

    I am trying to use the LabVIEW dll import wizard for the first time. I am not very familiar in C-coding so this might be a good help instead of configuring CallLibraryFunction nodes myself. I want to import NETAPI.dll. I am interested in several func

  • How to create an applet within an application?

    Hi. Im trying to make an applet work within a main application but I cant get it to work because then I have 2 of these and it gives me an error: public class java_tester extends JFrame implements MouseListener //MAIN APPLICATION public class MusicPl

  • Images load really slow after using Reduce File Size...

    After using the "Reduce File Size..." feature in Acrobat 9 on Windows Vista, some of the images load really slow as I page through the document. Is there some kind of compression setting that I should look for to prevent the images from be affected b

  • Requesting guidance on repair versus replace for iBook G4 (2005)

    I'm looking for some guidance in deciding to upgrade/repair for my iBook G4, operating Mac OS X 10.4.11. I've gotten to the point where I don't seem to be able to run more than one application at a time (for example be online and listen to music at t

  • ResultSet updateRow ,insertRow ,deleteRow APIs on table with no PRIMARY KEY

    Hi, When I use ResultSet.insertRow , updateRow ,deleteRow API's on a table which contais no primary key column I find the following Exception , java.sql.SQLException: Operation invalid. No primary key for the table at com.tandem.sqlmx.Messages.create