Check in BAdi if delivery processed with IDOC or with transaction

Hello to everyone!
I have encountered an issue and hopefully you could help me in solving this.
I have developed an enhancement (BAdi) in delivery processing.
Every time delivery is being changed - method is triggered and line item is being validated against some conditions
But now I would like to prevend BAdi from being launched when delivery comes in IDOC.
For this purpose I just put a simple condition in BAdi method:
IF sy-batch NE 'X'.
     //here perform validation.
ENDIF.
Unfortunately validation is still performed. Looks like when IDOC is being sent to ECC from PI, sy-batch is empty.
I would also like to prevent validation from being launched when IDOC re-processed manually (BD87 or sth.)
But then sy-batch is also empty.
Could you please advise some solution for this?
How to check in BAdi if delivery is being processed with IDOC or with transaction (VL32N, VL31N, VL32, ...)
I would appreciate every comment on this.
Kind Regards,
P.
Edited by: Piotr Wojciechowski on Jul 28, 2011 8:59 PM

Hi Max,
Thanks a lot for your reply!
Yes, indeed, IDOC is processed by FModule IDOC_INPUT_DELVRY.
You mean I should for example
find some place in this FModule (exit/enhancement point/...)  where I could put-Z-code
and raise a delivery number (or just some flag) to memory (EXPORT TO MEMORY..)
and later on catch it from memory in my BAdi method (IMPORT FROM MEMORY ...)
to check if delivery processed by IDOC/not IDOC ?
Kind Regards,
Piotr.
PS. Maybe you also have some idea how to debug such communication triggered from PI to ECC?
I have posted this in separate [thread|PI-ECC connection (IDOC scenario), how to debug? (External BP);.

Similar Messages

  • BADI for post processing of IDOC BOMORD

    Hi experts ,
    I want a BADI for post processing of IDOC BOMORD. Actually after IDOC processing BOM got updated in system and i want to schedule the explosion of BOM in process order after it. Please update me with the solution.
    Thanks
    Nitin kapoor

    Roberto, thanks for your prompt reply (as always). 
    Actually, it seems that the deletion of the prior infopackage request is performed before executing the infopackage again (not after), I apologize.  I will try your suggestion, though.  If this is actually the correct FM, then I will award you full points!
    I must admit, though, understanding the parameters of the FM are difficult.  Can you aor anyone else provide more details?

  • Error while processing inbound Idoc (HRMDA_07) with FM IDOC_INPUT_HRMD

    Hello,
    I have a inbound Idoc of type HRMD_A (basistype  HRMD_A07) which is processed by Function module (FM)  IDOC_INPUT_HRMD with  proofing. After processing an Idoc the status Monitor for ALE messages (BD87) tell me that my Idoc has status 53, which should be the result i would like to have.
    Unfortunately when i go to transaction PA20 and check the infotypes, i see that infotype 0302 isn't created. When analyzing this problem i see that during the processing the Infotypes are posted with HR_MAINTAIN_MASTERDATA (dialog mode is 0 and luw_mode = 0 from include LRHA2F02 FORM save_pa_pb_infty)  When this is done for infotype 0302 sy-subrc <> 0 the message is A complex application error has occured. This error message is placed in Export parameters
    Return and Return1
    of HR_MAINTAIN_MASTERDATA. When the program returns to the calling Form it checks if there is message of type E in HR_RETURN (see below) :
    CALL FUNCTION 'HR_MAINTAIN_MASTERDATA'
              EXPORTING
                pernr                          = ins_objects-objid       "#EC DOM_EQUAL
                actio                           = 'INS'
                tclas                           = tclas
                dialog_mode               = dial_mode
                luw_mode                  = '0'
                no_existence_check = $cross
                no_enqueue              = $cross
              IMPORTING
                return1                       = return
                hr_return                    = hr_return
              TABLES
                proposed_values    = proposed_values.
            REFRESH proposed_values.
         IF hr_return-msgty = 'E'.                           "note 984409
          CLEAR protocol_error.
          protocol_error-msgty  = hr_return-msgty.
          protocol_error-msgid  = hr_return-msgid.
          protocol_error-msgno  = hr_return-msgno.
          protocol_error-msgv1  = hr_return-msgv1.
          protocol_error-msgv2  = hr_return-msgv2.
          protocol_error-msgv3  = hr_return-msgv3.
          protocol_error-msgv4  = hr_return-msgv4.
          READ TABLE t_hrobjinfty WITH KEY objid = hr_return-pernr
                                           infty = hr_return-infty
                                           subty = hr_return-subty.
          protocol_error-segnum = t_hrobjinfty-segnum.
          protocol_error-routid = 'create_prf_pa_pb_object'
    As mentioned above, the error message is only placed in the parameters Return and Return1  and not in HR_RETURN.please read the first reply

    Hi,
    I think you have preety much done from your end itself .
    Could you please tell me what you got in this parameters:
         protocol_error-msgty  = hr_return-msgty.
          protocol_error-msgid  = hr_return-msgid.
          protocol_error-msgno  = hr_return-msgno.
          protocol_error-msgv1  = hr_return-msgv1.
          protocol_error-msgv2  = hr_return-msgv2.
          protocol_error-msgv3  = hr_return-msgv3.
          protocol_error-msgv4  = hr_return-msgv4.
    It may help us to track down the issue in more better way .
    Thanks!

  • Processing inbound Idoc ORDERS03  with status 51

    Dear ALL
    While processing inbound idoc with message type ORDERS03 i am getting a status 51 with below erros
    I have maintained the data under VOE2 & VOE4 but not got the solution. We are on  SAP ECC6 Version
    Customer 1100 is customers purchase organization
    Partner no 1109 is customers plant
    VKORG, VTWEG, SPART cannot be determined for customer 0000001100 , vendor REN15D
    Message no. VG204
    Terms of payment in IDoc E1EDK18 have been transferred: Check data
    Message no. VG202
    Partner number 1109 for customer 0000001100 , partner function WE does not exist.
    Message no. VG140
    Regards
    Arun

    Hi,
    Vendor 100002 is not maintained in your system. Maintain the same or use some other vendor which is there in your system.
    You should be able to post the document.
    Regards,
    Lalit Kabra

  • Return delivery process with excise in MM module

    Dear Friends,
                        this is chandu working as a consultant-mm , please any one can give the clear information regarding return delivery process for excise material , i'm following one process that is after invoice verification
    1) reverse excise invoice with MR8M
    2) return delivery with MIGO
    3) prepare outgoing excise invoice with J1IS  for print out J1IV
    4) preparing credit memo in MIRO with reference to original po
    the second process
    1) create return po with selecting return po check box in po
    2) GR with reference to the return po
    3)then J1IS  and J1IV  same process
    4) credit memo for return po in MIRO
    this 2 ways i'm doing the process  in the registers part1 that is qty updating (i.e qty is reducing)  but in the case of part2 that is the value it is not updating (i.e value has to reduce in the register right i'm working first time on CIN plz guide me the correct procedure if i'm doing wrong , in this my problem is only value not updating part2 register plz give me solution with clear explanation .
    regards
    chandu

    Hi,
    Follow the below mentioned procedure;
    1. ME21N - Create a Returns PO (Activate "Returns" indicator for PO line item)
    2. MIGO - Goods Receipt > Purchase Order (Returns PO) (Here system will hit Mvmt type "161" and you can also select Un-restricted/blocked stock from where you want to return the stock)
    3. J1IS u2013 Excise Invoice Other Movements
    Here click on u201Ccreateu201D button to create an outgoing excise invoice and reverse the CENVAT Amount.
    Here put all details as below and Press u201CEnteru201D.
    Ref.doc.type - MATD, Doc Number - Material document No of 161 mvmt, Doc Year, Series Group, Excise Group and Vendor
    Here check BED, ECS and SECess values to be reversed and click on u201CSaveu201D button to post the excise invoice.
    4. J1IV - Post and Print Outgoing Excise Invoice.
    5. MIRO - Credit memo w.r.t. Returns PO.
    Regards,
    Mahesh Wagh

  • IDOC is not processing in R/3 with status 64(Urgent)--Production issue.

    Dear Folks,
    Here we are implementing MIRROR sytem for data extraction in to BIW.
    I had gone through the steps in PDF file(How to minimize down thime for Delta Initialization) which has given by SAP.
    These are following steps I had performed in BW production
    1. Using RSADMIN transcation- Assigned one user as a Debugging user.
    2. With the Debugging user Created one infopackage on Purhcasing ITM datasource--
        In data selection tab, I given date as from 2002 to 2003
        In Update tab, I selected update mode as Initialize Delta process-               without data transfer and Uncheck Update Data in master   system immediately
       In schedule tab I selected option Start Data load immediately then Start extraction.
    3.Data was requested and It was intialized properly with green status 1 from 1 Records.
    4. In details tab Request, Extraction, transfer(IDOC and TRFC), Processing everything in Green color.
    5.As per document I have checked in R/3 for IDOC with status 64 using transaction BD87/WE05
    Problem is that IDOC is not processing in R/3 system. for that IDOC I have checked in BW montior screen using the option <b>IDOC list in Source sytem</b>, here also it is not showing any IDOCs.
    Please let me know why BW sytem is not sending any IDOCs to source sytem.Is there any settings I could have miss in BW aswell as in R/3 system.
    Note: In BW production I successfully loaded master data from R/3. aswell as I triggered infopackage-Initialization with data transfer, it is showing IDOC number properly in R/3 system.
    Points is Assured for all replies.

    Hi,
    - check you RFC destination (normal test + authorization test)
    - Check you partner profiles in WE20 and its ports WE21
    - from the source system tree (RSA13) right click your source system and perform a check
    - the best is to restore your source R/3 source system from BW (right click on it ans select RESTORE); you'll need to be able to log in the source system as an admin as well as opening the source system for customizing in SCC4 so that BW can recreate the correct partner parameters automatically; the best is to do that with your basis group.
    hope this helps,
    Olivier.

  • How to process inbound idoc in R/3 with status 75 - idoc received via qRFC?

    Hi gurus,
    we are using EOIO for source to R/3, and all the idocs a received in r/3 with this status. But they can't be processed from BD87. How to process these?
    Thanks,
    Olian
    Edited by: Olian Saludew on Sep 11, 2008 11:44 AM

    Hi,
    Idocs Works on tRFC Queues.
    Check this Report to Process Inbound Idocs with Specified Status.
    RBDAPP01
    Regards
    Seshagiri

  • CHANGE DELIVERY WITH IDOC WSCON.DELVRY03

    Hi everybody.
    We are trying to change a delivery with inbound idoc WSCON.DELVRY03.
    We process de idoc and it's shown that the delivery has been changed correctly but the delivery hasn't  really  benn changed.
    The process of the idoc also provokes the delivery lock.
    Does anybody know how to change the delivery with this idoc and the delivery remains unlock?
    Thanks a lot
    Regards

    Well I think there's no easy way... If I try to make a change on delivery while processing picking with IDOC, it's possible to get an error message "delivery number ... is being processed by ..."
    So, I think I could save this "number of packages" value in a Z table, and then process this table to save in the corresponding field on delivery. I'm still open for suggestions.

  • Issue In processing an IDoc with Huge Segments

    Hi All,
    When we are trying to process an Huge IDoc which has large number of segments. The IDoc process starts and stops in the middle and remains in 64 status ( there are no short dumps etc).
    Currently the IDoc is configured to be Trigger Immediatly. However when we schedule the same IDoc in a background the IDoc is processed successfully.
    So wanted to check what might be the reasons for Idoc to stop the process in between.
    Regards,
    Swaroop

    Possible reasons :
    - Huge memory consumption
    - Large processing time for Idoc segments .
    Idoc parsing and processing happens inside a LOOP statement around EDIDD table , now if you have larger no of segments this will lead to larger execution time .
    There may be other performance reasons e.g. Read Table without Binary Search ; check the IDOC processing function module code .
    Also check the SAP notes for the IDOC processing function module code ; just mentioning a similar SAP note 381942 .

  • IDoc created with status 03 checked via we02, but couldnt find in XI

    Hi all:
        Could you please do me a  favor?  implement a idoc to idoc issue. it has been created successfully .
    as It is found that the idoc created with status of 03 -
    data dispatched to  port ok (rather than 12 dispatch ok). however, I couldn't find  it via SXMB_MONI on XI,  there must be something wrong . coudl you please give me a hint ?
        Thank you very much!!!

    hi,
    you need to check transaction SM58 (remove the user from it) and F8
    it might be the reason that you didn't create a port in IDX1 on XI/PI
    but you will see that in SM58
    Regards,
    Michal Krawczyk

  • CUA - SUIM in client system with background processing of IDOCS

    Hi
    We have setup CUA in our Solution Manager system 4.0 sr2 SP11 and activated background processing of idocs.  When we run SUIM in the child system the user creation/change information is now showing the name of the background user rather than the actual name of the creator/modifier.  
    Has anyone else seen this before and is it standard functionality or a bug?
    Thanks in advance
    Justin

    Hi Djamel
    When you set up CUA you do the inital import of the roles with SCUG, ensure you have the company details correct in each system.  Also in each system schedule the background job SUSR_ZBV_GET_RECEIVER_PROFILES, this will get the details of any new roles/profiles setup in the child systems.
    Regards
    Justin

  • Inbound Processing of Idocs with status other than success

    Hi,
           I am new to ALE/Idocs. Can anyone  please let me know how can I process the Idocs which have the status other than 53.
    Thanks &  Regards,
    Indira

    Hi,
    In addition to the previous posts few more programs to process failed inbound IDocs are as mentioned below.
    - Use program RBDAGAIE to process edited IDocs (IDocs with status 69)
    - Use program RBDAPP01 to process IDocs failing with serialization issue (IDocs with status 66)
    - Use program RBDAGAI2 to process IDocs after ALE inbound error (IDocs with status 56, 61, 63, 65)
    ~ Bineah

  • LSMW Update Process with IDoc

    Hi Experts,
      We have an LSMW project to upload to create new activity in the CRM server and it has been working fine. Now we want to modify the project so that the existing data gets "updated" instead of creating a new activity.
    My question is..
    Is it possible to make data "updates" using LSMW.
    I tried adding more fields in  the existing project and now i get this error when i try to update. "Activity already exists in the system"
    I'd really appreciate your help and inputs.
    Thanks in advance
    Mani

    Hi Mani,
    I have gone through your query.
    When you use LSMW Idoc method to create the Activity with in the CRM system, you can definitely use the same project to update the Activity details as well. Follow the simple rules below.
    1. With the Basic type you have used to create Activity, in the rules for the segments change the task to Update.
    2. With this change done, for the segments you need to update the data, change and save them.
    3. After all these you can create and process the Idocs so that the activity details are updated.
    LSMW can be used to create, update and make changes with in permissible business objects. So definitely this update can be done. I hope this helps.
    Regards,
    Venkat

  • Link business document with an existing archive when processing an IDoc

    Hi Gurus,
    I am trying to configure the linkage (Archivelink) of existing archive documents to new business documents created by processing an IDoc. Is there a standard parameterization that allows to input the Archivelink signature during the Business document creation process ?
    Many thanks in advance,
    Guillaume Secco

    I don't see what the problem is with printing to PDF using the Adobe PDF printer as you did with the other tool. Then open your new Excel PDF and do the same process as before (assuming it worked for you). Just go to the Tools>Interactive and add a button field (I assume this is what you did before) and put the file there. At least give it a try as I think that is what you said you used to do.

  • Splitter program for processing the IDOCS with status 64.

    Hello folks,
    I have a requirement explained below. I am looking for a sample code which could help me to jump start with initial development.
    Requirement:
    Develop a splitter program which retrieves all the IDCOS with status 64, create and schedule batch jobs with 200 IDOCS each. The splitter program with be scheduled every 15 min.
    Restrictions
    Only 150 batch jobs can be created at a time.
    Estimation
    There may be around 36000 IDOCS with status 64 every hour.

    Srinivas,
    Here is the explaination why we require a splitter program.
    Using RBDAPP01 parellel processing
    Let us assume there are 4 servers A, B, C and D in a server group. If we select RBDAPP01 parellel processing there will be too many RFC calls to the servergroup.
    (there are some more RFC calls later on for Order creation for example). As there is a restriction with number of RFC calls, we need to clear other RFC's before making new one. This is making complex and messy.
    Using RDBAPP01 serial processing
    For the volume of orders getting created each day, it takes a week to process those Idoca created in one day. Hence it is not a good solution.
    Splitter program
    We spawn 150 batch jobs with 200 records each. This way if we think it takes 20 min for each job to complete...by the end of 20th min we must had processed 30000 idocs.
    Hence it is the solution offered.
    Srinivas...still this confuses me..but if I am wrong anywhere please correct me.
    But your initial response has helped me a lot. Everything was blank to me, ur reply made it clear over the requirement.
    Thanks a lot,
    Naren

Maybe you are looking for

  • Yoga 2 Pro Tent Mode/Mode Switch Issues

    Hi, I can't get my lenovo yoga 2 pro to go into tent mode. In fact, the screen won't even do a full 180 degree flip, but it will do a 90 degree flip to vertical (so I know the screen flip is working to a degree). Further, when switching to tablet mod

  • Adding Forwarding Agent to Partner details in a Sales Order.

    Hi Experts,   Below is the detailed scenario :   We have inbound orders been created by Idocs Orders04 using the Idoc_Input_orders function module. the requirement is that if the partner forwarding agent is not been populated in Idoc then we need to

  • Workflow - Blank mail in SBWP

    Hi Experts, I had developed a simple workflow scenario (SWDD) just to send a mail to inbox which contains only 2 items (in SBWP): Accept or Reject. I had created the step for User decison & steps for Approval and Reject only. Workflow is error free a

  • Set default language of SpellChecker Add-on IE11 to Dutch

    Hello,  Is it possible to set the default language of the spellchecker add-on in Internet Explorer 11 to Dutch with a GPO or registry key? We use a Windows Server 2008 R2 server. Default is the language set to English, but our Dutch users do not like

  • Inspection lot for recurring inspection was created without user decision

    A manual inspection lot was created for recurring inspection. When reporting results QE51, the user decision option is disable, therefore I can not move the batch from Quality Inspection to Unrestricted.