Prevent Posting of an Inbound SHIPPL IDOC using EXIT_SAPLV56I_011?

Under certain circumstances (current shipment status), I need to prevent the update of a Shipment from an Inbound SHIPPL IDOC.  The documentation for function module EXIT_SAPLV56I_011 states:
If a check determines that the shipment is not to be updated, the
return code should be set to value zero and the cause should be noted
in an entry in table IDOC_STATUS.
I have programmed according to the documentation (see below). The IDOC
status reflects my status correctly (63) however the Shipment is still
updated even though the return code is set to zero.
IF lv_sttrg = '5'.
ls_bdidocstat-docnum = idoc_contrl-docnum.
ls_bdidocstat-status = '63'.
ls_bdidocstat-msgty = 'E'.
ls_bdidocstat-msgid = 'VW'.
ls_bdidocstat-msgno = '238'.
ls_bdidocstat-msgv1 = gs_e1tpshh-shpid.
ls_bdidocstat-msgv2 = lv_sttrg.
APPEND ls_bdidocstat TO idoc_status.
subrc = 0.
EXIT.
ENDIF.
Looking for any ideas as to why this logic is not working.
Thanks in advance for any iinput.

Hi,
I think, you should set the value of SY-SUBRC to non-zero value.   See the Code after the call to the Enhancement component "EXIT_SAPLV56I_011", it proceeds with creation of SHIPMENT if SY-SUBRC is initial.
See the Code in include "LV56IF0T", Line number 111,133.
if call_subrc ne 0.
      subrc = call_subrc.
    endif.
    if subrc is initial.
* Shipment check complete
      perform shipment_event_check_complete
                       changing subrc.
    endif.
endif.
Regards
Vinod

Similar Messages

  • Inbound IDOC using  XML

    Hi,
    I need to create an Inbound IDOC using Function modules using an XML file as Input.
    I am using mySAP ERP 2004(WAS 6.4).
    IDOC type : HRMD_A05
    Message Type : HRMD.
    I am using the FM's in an ABAP report for testing, reading the data from the XML File using the FM GUI_UPLOAD .
    I tried using the FM <b>IDOC_INBOUND_XML_VIA_HTTP</b>,with import parameters XML_STREAM, CONTENT_LENGTH, CONTENT_TYPE, REMOTE_ADDR.(ALL Type Strings)
    This FM creates the IDOC successfully but i do not get the status record for the IDOC as there are no export parameters or tables where i can get the value.
    I am trying using the FM <b>IDOC_INBOUND_XML_SOAP_HTTP</b>,with import Parameters as <b>XML_STREAM type XSTRING</b>,and there is the export parameter ASSIGN ,type IDOC_ASSIGN_TAB and i was wondering if this could return the status.
    I used the same XML and used the FM "SCMS_STRING_TO_XSTRING", to convert the file input string into XSTRING.
    On executing this i get the exception,"NO DATA RECEIVED" .
    Can anybody Please Tell me
    1)How to get the status of an IDOC if i use the FM IDOC_INBOUND_XML_VIA_HTTP ?
    2)How to use the FM IDOC_INBOUND_XML_SOAP_HTTP ?
    3)Is there any other way to create an IDOC with XML input?
    Thanks,
    regards,
    Siddhartha Jain

    HI Nagarajan,
    I had checked the first link mentioned by you and activated the required service from Transacttion SICF,but still it didn't help.
    The second link points to the IDOC Adaptor for XI,guess it won't help as i'm not using XI.
    I want to pass XML data read from file and call a FM which creates and posts and IDOC into R/3 and returns the IDOC Number and Status.
    For this i found the FM's IDOC_INBOUND_XML_SOAP_HTTP and IDOC_INBOUND_XML_VIA_HTTP.
    The FM IDOC_INBOUND_XML_VIA_HTTP accepts xml as string and posts IDOC succesully,but i do not get the status and IDOC Number.
    The IDOC_INBOUND_XML_SOAP_HTTP accepts xml as xstring,so i used the FM SCMS_STRING_TO_XSTRING to convert the same xml string to xstring and pass it to the FM.But it gives an error 'NO DATA RECEIVED'.
    If i make few changes to the XML doc,to include SOAP envelope ,like
    <?xml version="1.0" encoding="UTF-8"?><HRMD_A05>.......</HRMD_A05>
    to
    <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"><soap-env:Body><IDOC BEGIN="1">.......</IDOC></soap-env:Body></soap-env:Envelope>
    I get the error,the tag <IDOC BEGIN="1"> not found ,the IDOC XML should be of format <IDOC BEGIN="1"> <IDOC>.
    Can anybody please help on what to do/how to proceed.
    Thanks,
    Regards,
    Siddhartha

  • How to post Freight Charge in INbound INVOIC Idoc? (MM Invoice Verif)

    Hi Folks,
    Would like to post an inbound invoice(810) IDoc  that has multiple line items that may or may not have variances(quantity, price, etc.). MM Logistics Invoice verification is the process used for posting our invoices for raw materials. We would like for the line item variances to continue to post to the PPV account. Our problem is freight. Freight in this instance is in the header of the IDOC(segment E1EDK05). For example, we create a purchase order with 3 line items for $100.00 each totaling $300.00 for the purchase order. We receive an EDI Invoice for $345.00 which contains a $45.00 charge in the header for freight. We would like for the freight to be posted to the appropriate account. Currently the $45.00 difference in P/O total and Invoice total is being posted to the PPV account. Your helpis appreciated!
    What if Freight charge is populated as Line item in the inbound invoic idoc. Will the inbound program allow this kind of posting??
    Throw some light experts.
    Thanks,
    Matt
    Edited by: Creasy Matthew on Aug 16, 2009 6:25 PM
    Edited by: Creasy Matthew on Aug 16, 2009 6:25 PM

    Yes, you can include the freight cost in line item as well but that would not be advisable. Why don't you include Fright Cost in your pricing procedure ??? Do check the following link
    How to account freight in purchase order

  • When we post Inbound Invoice IDocs, we are getting an error message "Enter a tax jurisdiction code".

    Hi Experts,
    When we post Inbound Invoice IDocs, we are getting an error message "Enter a tax jurisdiction code". As checked, we have configured OBCD and OBCA for the vendor and we are passing the Tax Jurisdiction code in E1EDP04 SAL segment. Can anybody give us some idea to resolve this issue.
    Regards,
    Sameek

    Hi Sameek,
    Please refer the below link. Hope it helps.
    http://scn.sap.com/thread/1435286
    Regards,
    Chandan.

  • Issue In Posting Proof Of Delivery Using Idoc using Message Type STPPOD

    Hi ,
    (The details I have attached in the below file.)
    We are trying to perform proof of delivery with respect to a outbound delivery via IDOC using idoc inbound function module IDOC_INPUT_STPPOD.
    Everything is working fine except when it is creating a new stock movement document on confirmation of proof of delivery, the newly created stock movement document is not reflecting the actual received quantity instead it is showing the the Actual Delivery quantity.
    For clicking on the button - "Proof of Delivery Confirmation " (green wright symbol) and change the overall POD status as completed ( depending on this status C the stock movement document gets created) we did a custom coding in the customer exit of IDOC_INPUT_STPPOD.
    The details I have attached in the below file.
    I am not able to understand where I am making mistake due to which, the quantity on the stock movement document after proof of delivery confirmation is not reflecting the actual received quantity.
    Can you please suggest  what necessary coding changes I need to perform to make it work properly.
    Regards
    Saifur Rahaman

    Hi Thripura,
    In DELVRY03 Idoc type,there is a segment E1EDL37  containing Shipment Header Information.As a header segment,there are 6 segments under this,which contains other details.Please see the below details.
    E1EDL37                        Shipping unit header
        E1EDL39                        Control segment for shipping units
        E1EDL38                        Shipping unit header descriptions
        E1EDL49                        Express Delivery Company's Tracking Connection Data
            E1EDL50                        Express Delivery Company - Additional Data
        E1EDL44                        IDoc: Shipping unit item (delivery)
            E1EDL46                        Serial Numbers HU
    Regards,
    VSN

  • Inbound Delivery Idoc with batch split then PIC and PGI using DELIVERY03

    Dear Experts,
    Requirement to split the delivery item then PIC and PGI, while Processing Inbound Idoc using basic Idoc type DELIVERY03
    I have searched forum already but it vain. Please advice.
    Thanks and Regards,
    Thiru.
    Moderator message : Spec/requirements dumping not allowed, show the work you have already done.  Thread locked.
    Edited by: Vinod Kumar on Nov 16, 2011 5:09 PM

    Hello Finbarr
    I assume that you do NOT send any (suggested) batches to your warehouse. Otherwise you would have the same problem like we have that the WHSCON cannot overwrite a (suggested) batch.
    However, if you just send the quantity per item then the batch split is much simpler than you suggested:
    "First E1EDL24 segment:
    POSNR     50
    MATNR     000000000000602006
    MATWA     000000000000602006
    CHARG     L1519   " <<< first batch
    LFIMG     37.000
    VRKME     CT
    "Second E1EDL24 segment:
    POSNR     50
    MATNR     000000000000602006
    MATWA     000000000000602006
    CHARG     L1880   " <<< second batch
    LFIMG     37.000
    VRKME     CT
    Well, and as qualifier we use: E1EDL19-QUALF = 'XYZ'  " a dummy
    The SAP system is smart enough the realize that these two E1EDL24 segment belong to the same item yet have different batches and, therefore, yield a batch split in the delivery. The system generated the 9xxxxx numbers for this sub-item lines automatically.
    Although I believe that it is not possible to change a batch in the delivery using an inbound WHSCON I would appreciate to have a final proof of this assumption. I could imagine that if you first delete the item containing the suggested batch and then add a new item with the actual batch from the warehouse it might works. However, this would require to implement a user-exit which I do not prefer.
    Regards
      Uwe
    PS: It seems I gave an answer to the wrong question (should be EDI (DESADV): Can batches be overwritten by an inbound WHSCON (pick conf)? )

  • How the SAC amounts are posted to G/L accounts through Inbound Invoic Idocs

    Hi EDI/ABAP experts,
    Can anyone please tell me wow the SAC amounts are posted to G/L accounts through Inbound Invoic Idocs??
    Can anyone point me to the code that permits INVOIC02 IDocs to post the SAC (service allowances and Charge) amount to particular G/L account??
    What is the logic??
    Thanks,
    Creasy
    Edited by: Creasy Matthew on Apr 27, 2009 10:41 PM

    Hi Sunil,
    When ever you prepare a billing document it creates an entry in General Ledger as Trial Balance has to be generated for the company all the expenses for a company should be recorded in GL. So that a company can see view their profit/loss figures.
    As Billing is a sales related transaction it creates an GL Entry where in
    Debits    --> Customer Account
    Credit     --> Sales Revenue Account
    And when the Customer Makes a payment with reference to the bill
    One more GL Entry will be created i.e
    Debit     --> Bank Account
    Credit    --> Customer Account
    With this we can track the customer balance (What ever balance is there in Customer account is customer Balance)
    I think this is very clear with respect to the question you had asked.
    Reward points if it helps.
    Regards,
    Sreekanth

  • Receive XML file from CIDX adapter and Post to SAP as IDoc using XI

    I have scenario where we will receive the xml file from CIDX adapter. I need to take the xml from CIDX, do the Database Lookup and post it to SAP as IDoc.
    Any technical documentaion or step-by-step process documents can be very helpfull to me, since I am new to XI
    Thanks
    SP

    Lookup in XI is used to call the target data storage system and get data from there to your mapping programme.
    In XI you can do Lookup in Message Mapping, Java Mapping and in XSLT Mapping. Previously Lookup in XI was system dependent. But now what ever the system are i.e. SAP system or non-sap system(Oracle,MS SQL etc) lookup API are same.
    Overview of Lookup
    - Lookups are used to identify/request the data from mapping program.
    - It interrupt the process and looking for data which was stored in target system.
    - It get that data and comeback to process and continue with that data.
    Types of Lookups in XI
    - JDBC Lookup: JDBC lookup is used for accessing data from database (non SAP).
    - RFC Lookup: RFC lookup is used for accessing the SAP Data.
    - SOAP Lookup: SOAP lookup is used for accessing data from Webservice
    Steps to perform Lookup in Mapping
    Import package com.sap.aii.mapping.lookup.*;
    Create connection to the target Database system.
    // Determine communication channel created in ID
    Channel channel = null;
    channel = LookupService.getChannel("DB-SYSTEM-NAME","DB-CHANNEL-NAME");
    // Get system accessor for the channel.
    DataBaseAccessor accessor = null;
    accessor = LookupService.getDataBaseAccessor(channel);
    Build the Query String.
    Getting Result
    // Execute Query and get the values.
    DataBaseResult resultSet = null;
    resultSet = accessor.execute(Query);

  • Idoc using inbound process

    Hi,
    my issue is regarding the Idoc using inbound process using the FM BAPI_IDOC_DISTRIBUTE_LIST1.
    here the user wants the dhmt plant tobe refer instead of mirror plant.
    can anybody help me regarding this or any doc regarding iDOCS inbound.

    Seetha,
    I have this already..
    IDOCPACKET                                                           
    Object type                         IDPKWMMBXY             
    End event                           MASSINPUTFINISHED      
    IDOC                                                          
    Object type                         IDOCWMMBXY             
    Start event                         INPUTERROROCCURRED     
    End event                           INPUTFINISHED          
    Application object                                                                      
    Object type                         BUS2017                           
    Start event

  • Creating Inbound IDoc Using LSMW

    How to create the inbound IDoc using LSMWu2026
    For example
    Input is Flat filesu2026.
    I created custom IDoc with header and items
    Structure looks
    Header 1
      Item 1
      Item 2
    Header 2
      Item 3
      Item 4
    Header 3
      Item 4
      Item 5
    u2026u2026.
    u2026u2026.
    u2026u2026..
    Do I need to create different flat files (item level & Header level) as input while creating IDoc using LSMW ??
    Can some one guide me on thisu2026with best way to create IDoc using LSMW with flat fileu2026.
    Ramesh

    can you please help me ... how input file to LSMS looks ..Sample file is helpful...
    My Structure
    E1EDK01    < Header Data    
    E1EDK14    < Header Data
    E1EDK14    < Header Data
    E1J3K03     < Header Data
    E1EDK05    < Header Data
    E1EDK05    < Header Data
    E1EDKA1    < Header Data
    E1EDKA1    < Header Data
    E1J3P01      < Header Data
         E1J3AIM     < Item Data
         E1EDP20     < Item Data
    E1J3P01      < Header Data
         E1J3AIM       < Item Data
         E1EDP20      < Item Data
    Header had 3 segement E1EDK14   E1EDK05  & E1EDKA1 repeating twice.... i am facing prolem with this
    What Structure format i used for above segement in LSMW and what file format i should use..for input to LSMW...
    Edited by: Ramesh on Mar 25, 2009 1:26 AM
    Edited by: Ramesh on Mar 25, 2009 1:41 AM
    Edited by: Ramesh on Mar 25, 2009 1:44 AM

  • Inbound IDoc using LSMW

    Hi..
    I am trying To Upload customer master data using LSMW with IDOc.
    I am debugging the Inbound IDoc Using BD87 and INPUT_METHOD = 'A'
    One segment E1KNB1M data is not passed to transaction 'XD01'  due that my company code data is not updated
    Pls tell me how to pass segment E1KNB1M data to transaction.
    I am using Message type :  /SAPSLL/DEBMAS_SLL
               Idoc type    :  Debmas03
            Function Module  : IDOC_INPUT_DEBITOR

    Hi Rishi,
         Thanks for the document. But the document mainly concentrates on LSMW(I'm aware of generic LSMW with BDC), it doesn't explain the inbound IDoc, segment merging, Creation of partner function or Message and Basic types WRT inbound IDoc. Please send any document with that relevance.
    Kiran

  • Posting Post Goods Issue Idoc using XI

    Hi Experts,
    My scenario is file to idoc.
    I will get the shipping conformation XML file from the client by using that xml file i have to post the PGI idoc, is it possible to post the PGI idoc using shipping conformation xml.
    i have one assumption regarding this please correct me if i am wrong.
    Already shipping conformation Idoc is there, so by using the shipping conformation xml if i post the shipping conformation idoc, is there any possibility that it will automatically update the PGI idoc. Why i got this idea is the shipping conformation xml file whcih was send by the client is matching with fileds in shipping conformation idoc but not with the PGI idoc. So without having the common fileds in xml file and the respective idoc we cannot post the idoc.
    Kindly suggest me the possbile solutions for the scenario.
    Thanks & Regards,
    Venkat

    Hi,
    If you want to post an IDOCbased on the data comping from Client.
    as i understood.
    1. your client is sending data which is similar to shipping conformation idoc.
    2. your requirement is to send PGI IDOC.
    You can go for BPM where you will do 2 mappings 1 for File to Shipping confirmation and other 2nd for Shipping to PGI.
    So at target side you can directly post PGI IDOC.
    Regards,
    Akshay Jamgaonkar.
    Reward points if find  useful.

  • Issue with inbound EDI idocs

    Hi
    we are receiving inbound EDI idocs throgh third party.  Third party received EDI file having 5000 transactions .
    It was transalated same number of idocs text document and posted in SAP.  But after 4 hours same file processed in SAP.
    Third party saying they sent only once .
    Is there any way in SAP file placed two times or one time .
    Any table stores this information . we are using TRFC port .  I know EDIF12 table but it was not used here.
    Any clue on this.
    Thanks

    HI
    ANY Clue on this issue

  • Inbound Invoice IDoc - Problem, Please clarify.................

    Hi All,
    I am implementing an Inbound INVOIC02 IDoc for posting Credit Memo that references purchase order. But there is some unique thing. This IDoc is used to post only the SAC (D240 - Freight Allowance).
    Freight Allowance will come at Header level on the X12. This amount should be posted to a G/L account.
    I want this SACD240 amount to be mapped onto IDoc.
    I have extended the IDoc with a Z-segment @ line item level and is mapping into this z-segment.
    The mapping team came up with a question. If SACD40 is mapped onto Z-segment. And no other line item information is present on the X12/IDoc (such as matnr). Will SAP process this IDoc??
    Plz clarify??
    Thanks,
    Creasy

    data in extended Z segment would not get processed automatically.
    If std Function module IDOC_OUTPUT_INVOIC is used as inbound process code then
    you need to add custom code in  exit   CALL CUSTOMER-FUNCTION '001'   include ZXEDFU01 to pass to correct fields. or you may have to call another FM or BDC to pass data to required transaction/fields.

  • WMMBXY idoc using MBST

    Hi,
    Inbound WMMBXY idoc needs to post the GR reversal (movement type 102) for a Process order. e are using transaction MB31 in E1MBXYH-TCODE segment.
    When a Movement type 102 is posted, the idoc gives an error - "Deficit of BA Unrestricted Use". This is happening coz the stock has moved to quality stock and a reversal cannot be made until the stock is unrestricted.
    Transactin MBST cancels the Material document and posts the 102. But I am unable to use the tcode in WMMBXY idoc.
    Is there an alternative?
    The inbound idoc needs to post a 102 mov type GR reversal.
    Please let me know if there is an vailable solution.

    EDI is described as the interchange of structured data according to agreed message standards between computer systems, by electronic means. Structured data equates to a simple and direct method of presenting the data content of a document. The method of ensuring the correct interpretation of the information by the computer system is defined by the EDI standard."
    EDI is a technique used to communicate business transactions between computer systems of different companies and organizations. Note that sometimes the EDI mechanism deployed at a company is often used to interface to other systems within the same organization."
    The difference between ALE and EDI process flows occurs at the communication level. The EDI process transmits IDocs to an EDI subsystem using flat file format. The ALE process transmits IDocs to an SAP system via memory, using asynchronous communication.
    Check the following links
    How Can I transfer invoice details to customer through IDOC in EDI
    Re: IDOC Types and their equivalent messages in EDIFACT and ANSI X12
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    http://www.henrikfrank.dk/abapexamples/IDOC/IDOC.htm
    http://help.sap.com/printdocu/core/Print46c/en/Data/Index_en.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/0b/2a6095507d11d18ee90000e8366fc2/frameset.htm
    Reward Points if useful.

Maybe you are looking for

  • Help needed with loading data from ODS to cube

    Hi I am loading data from an ODS to a cube in QA. The update rules are active and definition seems right. I am getting the following error, in the update rules. "Error in the unit conversion. Error 110 occurred" Help. Thanks.

  • OIM 9.1.0.1 SPML Web Service Deployment on JBoss 4.2.3

    Ran the script to deploy the services. The log file says thats the build was successful. When I start JBoss it fails to deploy. Anyone tried this. Start seeing error messages here: 2009-12-09 12:39:26,217 ERROR [org.apache.catalina.core.ContainerBase

  • Activating Project Professional 2010 after a crash

    hi there:- I am looking to reactivate/reinstall Project Professional 2010 after a crash. I have a product activation code having downloaded the software online (no disks). What do I need to do? Much obliged Tom

  • Storing files (digital video, photos) without a computer

    Is there an adapter out there that will let me use my iPod to store video and stills shot by a digital camera? They don't have to play back; I just want to store on them on the iPod HD until I can offload them later. I have this: http://www.samsung.c

  • Cannot start Toshiba Recovery Disc Creator on my Satellite A300-15K

    Hi! I'm from Poland so my English is a little poor.. (but I hope that is sufficient) My problem: I haven't Recovery disc (DVD) because I don't use earlier Toshiba Recobery Disc Creator (when all in my laptop was good). Now I haven't do this disc beca