Invoice output type getting triggered after setting SY-SUBRC = 4 in routine

Dear Friends,
When ever invoice document is generated, if the invoice document is completed and if its accounting document is generated successfully, we need to trigger an output type for invoice ZRD0
For this purpose, we have created a routine 902 in our system. If the required condition, mentioned above, fails then SY-SUBRC set as 4 else set as 0 to trigger the output type.
Currently we are facing a problem, even after setting SY-SUBRC as 4 in routine 902, output type ZRD0 getting triggered.
Please help me to fix this bug.
Thanks a lot.
Best regards,
Amol Chaudhari.

Hello Aditya,
I have maintained same code in both routines 'kobed_902' and 'kobev_902'.
Required code maintained in the routine,
sy-subrc = 4.                          " Do not trigger output type
* If the posting document is created or Billing document canceled    *
* and if invoice document is Completely processed then the output    *
* type ZRD0 is Triggered.                                            *
  IF komkbv3-uvall CA gc_c.   "Invoice document is complete or not
    IF komkbv3-rfbsk CA gc_ce.   "For VF01 and VF11
      sy-subrc = 0.
    ENDIF.
  ENDIF.
We are getting this problem on production client and not able to generate the scenario on quality.
The output type is actually an EDI output type which is generating an IDOC for the invoice.
Thank you.
Best regards,
Amol Chaudhari.

Similar Messages

  • Output is successfully triggered even after setting SY-SUBRC = 4 in Routine

    Hi All,
    My requirement is to set the processing status for a output type  [which generates an IDoc]  as Error for the transaction VT02n in case the Shipment Satisfies a particular condition.
    In order to implement the requirement ,I have created a requirment routine using VOFM transaction where the required condition is checked successfully. The Routine returns SY-SUBRC as 4 , but the output type is still successfully processed .
    I have also added the routine number in the procedures section  of the NACE transaction.
    Is there any other configuration required in order to fulfill the requirement?
    Thanks in advance.
    Best regards,
    Souvik

    Hello Brad,
    Thanks for your reply .
    I the output analysis log of the output type, the many output types are displayed but the output type output type which was triggered shows that the requirement 999 was to fulfilled . But the processing log shows that the I DOC has been generated.
    Could you please let me know which portion of the standard code do I need to re implement the code in requirement routine.
    At present , I have pasted the code at the beginning of ALE_PROCESSING form which gets triggered when I DOC is triggered with the condition of the transaction and output type. The code sets the RC value 1 and exits the form if certain condition is satisfied.
    The result is as expected . The I DOC is not triggered.
    Is this the portion where you suggested to re implement the code?
    Regards,
    Souvik

  • Same output type getting triggered twice upon saving the document

    Dear SDNers,
    I have a shipment Document.
    Upon saving it the same Output type gets generated twice. ( in a gap of 1 second)
    Clarification needed:
    1. Please guide as to where i need to look for the error as to why same output is getting triggered twice  simultaneously( gap of 1 second).
    2. i have checked in the processing routine associated with it. Is it the right place?
    P.S. I had posted another similar thread. Closed it since i felt it lacked clarity.
    Regards,
    SuryaD.

    Hi,
    Fetch the data from Nast table for that document number
    Check the vstat  . if it is 0 then use the below function module.
    CALL FUNCTION 'RV_MESSAGE_SET_PROCESS_STATE'.
    Then it will update the existing single record for the first time .
    Next time on wards you will get the multiple records for te document in the Nast table.
    For that you need to change the VSTAT status as per the requirement.
    Hope this might solve your problem.
    With Regards,
    Sumodh.P

  • MIRO - Invoice Output types (MR90)  Routines Based on Specific Suppliers

    Hi All,
    Requirement is to trigger Invoice outputs for a specific set of suppliers, while doing invoice verification in MIRO and the same need to be processed in MR90 for the output.
    Is there a routine which triggers a invoice output ( type REKL) only for specfic set of suppliers, for e,g if the suppliers are all ERS suppliers then it should trigger "REKl" else not?
    I am aware we have a routine 181 which can be modified but wanted to know from experts if this kind of requirements has a standard solution.
    Will appreciate any help regarding this.
    Note :Standard settings and customization have been done and triggering output is not an issue so please address the specific requiremennts.
    Regards
    Swagat Panda

    Would like to know more on how your are cancelling ERS invoices already settled? as i am not able to cancel them in MR8M is there any other ways around it?
    Also, Sub Cr we are using not for back dated price changes but since we are a service company we don't have concepts of MAP prices for the materials all are account assigned materials and get expensed and revaluation will just act as a statistical entry as there won't be stock at any point of time.
    The invoice reduction we are not using as these are all ERS invoices and if there is any amount to be debited to the supplier we come to know after a settlement run (MRRL) is over and we see a "visual" quality defect at a later point of time as i mentioned earlier we don't have stock.
    So this is one of the reason why we are debited the supplier at a later stage using Sub Cr and for this the vendor has to be sent a "notification" that we are going to debit him for a delivery ( account assigned ).
    But your suggestions were helpful in setting up business rules.
    Please be in touch.
    Regards
    Swagat Panda

  • Invoice outputs are not printing after saving the document..!

    Invoice outputs are not printing after saving the document. Eventhough we maintain all condition records not only that Processing log also it showed that it has been processed on some date. but customer not received the printout
    Amar

    hI,
    GO TO IMG, SD, BF, OUTPUT CONTROL, OUTPUT TYPES, SELECT UR OUTPUT TYPE, GO TO DETAILS ICON AND ASSIGN THE VALUE "ISSUE OUTPUT IMMEDIATELY SAVING THE APPLICATION" FROM DROP DOWN DOWN LIST IN THE DEFAULT VALUES
    AND ASSIGN THE RELEVENT PRINTER TO USER ID IN SU01 AND IN CONDITION RECORDS
    REGARDS,
    SK
    Edited by: Sadanandam Kasarla on Mar 16, 2009 12:07 PM
    Edited by: Sadanandam Kasarla on Mar 16, 2009 12:08 PM
    Edited by: Sadanandam Kasarla on Mar 16, 2009 12:10 PM

  • Output type mot triggered

    Hi,
    The process is that
    A sales orders are getting created with the batch job once the sales order has been generate a Output type is triggers
    and mail sents to customer about the order confirmation.
    The medium os output type is "Send external" and dispatch type is "3 - Send with application own transaction"
    Our problem is this output type has not getting triggered it in Yellow only.
    if we change the dispatch time form 3 to 4 - Send immidetiatly then its working fine.
    why this is happening?
    how to resolve this so that there will be smooth operation with dispatch time as 3?
    regards,
    anup

    See, you can process a message immediately by updating the application document or you can process it at a later time. For later processing you must use the report program RSNAST00 or a corresponding application function.
    Thus there are some individual possibilities are:
    Time 1: The message is processed through report program RSNAST00. This report program can be scheduled periodically or started manually.
    Time 2: As in time 1, but the message contains an earliest processing date and a requested processing time. The message is ignored by report program RSNAST00 before the requested date.
    Time 3: The message is selected and processed by application specific programs. Processing can take place online or in the background.
    Time 4: The message is processed when the application document is saved. No further processing of the message is necessary.
    So, check your communication method & transmission medium for dispatch time 3 for your requirement : A sales orders are getting created with the batch job once the sales order has been generate a Output type is triggers and mail sents to customer about the order confirmation. Check the output condition record maintained.
    Also you can use user exit MV45AFZZ for automatic generation of email.
    Hope this can assist you.
    Thanks & Regards
    JP

  • Functional module which get triggered after posting of the document F-22

    Hi,
    I am posting the documents using the transaction F-22. I need to update some table after the documet will get post.
    I try to find out the BTE'S in the transaction FIBF but unable to find it out.
    Can anyone help me to find out the relvant functional module which will get triggered after the posting of the documents.
    Please help me with this.
    Thanks in advanced.
    Regards,
    Darshana

    Hi Harini,
    It is also not get triggered while i am posting the documents.
    Can you please suggest me some more functional modules.
    Thanks in advanced.
    Regards,
    Darshana

  • Print a invoice output type on two printers

    Hi,
    I want to print a invoice output type on two printers simultaneously.
    Is there is any ways to assing this.
    Regards,
    S

    Hi,
    From SAP at a time only single printer can print the Output.
    But once the spool request is generated, in the OS level with the help of network people on SPOOL SERVER you can distribute that Spool request to multiple printers.
    Regards,
    Anji

  • Mailing Invoice through output type - Getting Error "No address exists"

    Hi Experts,
    I am trying to mail the invoice using out put type. I am using the standard out put type MAIL, Print program RSNASTSO and routine SAPOFFICE_AUFRUF_VX for external send 5 and using SP partner type.   I maintained email address in Customer master. When I am assigning output type to send mail its failing and am getting an error as following.
    Object 1001101366
    Output type: Mail
    Processing log for program RSNASTSO routine SAPOFFICE_AUFRUF_VX
    Function module SO_NAME_CONVERT with return code
    Text 110V31001101366                    MAILE0000200290 ID STAM lang
    No address exists
    Error while copying recipient object
    Specify at least one recipient
    Message object FOL35000000000004SCR36000000000089 created or sent
    And the mail is not triggering. Please help me out to resolve this issue. I am an Abaper, SD consultant is not available for me now.
    Thanks and Regards,
    hemanth

    Check whether Note 960088 - FAQ: Sending SD messages externally,  helps you
    thanks
    G. Lakshmipathi

  • Output type Requirement triggering

    Hi,
    In my project I have a requirement to stop triggering of an output type if all the items in the sales order have reason for rejection set.
    I have done the condition check in a output requirement routine and if the condition fails then I set SY-SUBRC = 4.
    Problem 1:
    But when I am creating the sales order, the komkbv1 structure does not have the sales order no. (it has other fields) and kompbv1structure is not filled. Then how do I check if all the items have Reason for rejection set or not.
    Problem 2:
    For an existing sales order, I trigger the output type in Header-->Output... , this code is getting executed and sy-subrc is set to 4. But still the output is triggered.
    Please let me know how do I proceed.
    Code:
    w_vbeln = komkbv1-vbeln.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        INPUT         = w_vbeln
    IMPORTING
       OUTPUT        = w_vbeln .
    Atleast one item of the Sales Order does not have
    reason for rejection set.
    select single * from VBAP
    where vbeln = w_vbeln and
          ABGRU eq space.
    if sy-subrc ne 0.
       sy-subrc = 4.
       EXIT.
    endif.
    Thanks in advance,
    Vishnu Priya

    Hi,
    For the first problem,
      Check the standard structures available, but not sure.
    For the Second one,
      You routine include should be included in the standard include RV61BNNN
    for it to get triggered.
    Your routine will not get executed if your routine is not included in this standard include.
    Hope this helps.

  • Output type not triggering

    Hi,
    I have maintained a condition record for the output type in my billing document. It should be triggered automatically.What are settings that I should check?
    NOTE:- I am using an already existing o/p type and o/p procedure.Only the differentiation factor this time is that the sales organization is different than the previous one.So, have maintained only the condition record for the new sales organization.
    After maintaining the condition record, the o/p type should get trigger automatically in my billing document which doesn't happen.Kindly throw some light on it.

    >
    Amit Yadav wrote:
    > Dear Christino,
    >
    > Check with Condition record in T. Code: VV31/ 32.
    >
    > Key-in your Sales Org and Billing Type
    >
    > Maintain row-entry as:
    >
    > Bill Type-----FunctionMedium--
    Date/time
    >
    > once maintained, click tab: Communicaion
    >
    > within this, Maintain Output device and check box: Print immediately (if, medium is 1).
    >
    > Best Regards,
    >
    > Amit
    Hi Christino,
    Along with Amit's points pls check that in further data whether option 4(Saving the applaication) is maintained or not.
    Regards,
    Mohan.

  • Error in invoice output type.

    Hi All,
    When we are trying to send invoice using ZXXX output type and external send as medium i.e transmission medium is 5  using VF02. This invoice is not going out and output type is in red/error status with no process log.
    Could you please help.
    Thanks,
    N M Poojari.

    Well, that's poor programming as you've already figured out.  The output program should be calling NAST_PROTOCOL_UPDATE and adding a message to the processing log so you can determine what's wrong without guessing or debugging.  What you need to do now is debug the output program and find the point where it sets the return code (the parameter in the output subroutine call) to a non-zero value and determine the condition that that triggered the error.

  • Output type not triggered during Delivery Order - pls help

    Hi,
    Need some help.
    I'm trying to setup output determination for delivery. It's a new output type for delivery.
    There are some checking that I want to build in to determine whether the output type is to be generated. Therefore I have to make sure of requirement (routine). However, after putting in the configuration, coding the requirement and creating the condition record, the output type still cannot be generated. When I go to VL02N to check the Output Determination Analysis it says the requirement " " is not fulfilled. It's not even calling out the requirement number that I assigned in the access sequence.
    Any idea what could be wrong? 
    This is what I've done :
    1. Creating condition tables
    2. Creating access sequence & assigning the condition tables to the access sequence
    3. In the access sequence, assign requirement number 999. The "Exclusive" indicator is not ticked.
    4. Ensure that the requirement 999 is activated in tcode VOFM.
    5. Create output type, assign the access sequence to the condition type.
    6. Assign the condition type to the output determination procedure. Make sure the "Manual" checkbox is not ticked.
    7. Assign the delivery type to the output determination procedure.
    8. Create condition record. 
        Note : when i created the condition record, I am not able to assign a Partner Function (for eg. SH) to the record. However in the config for the output type I've already configured for that Partner Function "SH" to be allowed for that output type.
    Appreciate suggestions & feedback.
    Thanks
    Rgds,
    L

    Hi,
    When I go to VL02N to check the Output Determination Analysis it says the requirement " " is not fulfilled. It's not even calling out the requirement number that I assigned in the access sequence.
    This is because in requirement you put certain conditions should be fulfill then out put should trigered,
    Example - if you maintained condition in requirement that user must maintain loading point
    Now when creating delivery user not maintained loading point then output will not trigered, so user must maintain that then only it will trigered output.
    Same problem just now solved, check which data maintenance conditions in routine and try to maintain that.
    Kapil

  • Output type not generated after PO save.

    HI,
    While creating new PO, we are able to see the output type(ABC) before saving the PO. But after saving it, there isn't any output type (ABC) generated.
    I have maintained MN04 & WE20. Kindly advice.
    Best Regards,
    Kapil.

    1) Have you checked the T code WE21 (Ports in IDoc processing)
    is your IDoc port exist in WE21. the same port which you have assigned in WE20 (Partner type LI)
    2)in WE20, for Partner (Vendor )- check the partner status as "A"- active in classification tab
    Hope you have maintained "message type" in outbound parameters. where we assign the IDoc Port
    Thanks

  • Two modifiable invoice output types to be generated

    Hi experts,
    One of my customer has requested us that he need modifiable output types. the first invoice will be like a normal one which he want to keep it for company internal purpose and posting to FI will be done on that basis.
    the second invoice is based on first and is splited into two parts which he want to send to customer it can be anything llike 80-20, 90-10, 40-60, 50-50, 20-30 and many more as per user requirement.  the field on which the invoice is to be splitted is on material price. in part A  suppose it will be 80% of material price + 100% taxes and in part B it will be remaining 20% of the amount left. Everywhere in first part 100% of taxes are charged.
    can i use proforma invooice concept or any other or  a complete Z program is to be written.
    please suggest
    with regards
    SANTOSH GOSWAMI

    hi,
    i think you can achieve it
    but, its a huge task for an abaper to understand your requriment
    as per your requriment you have to align that many logics in the smart form from smart form point of view.
    then i think so that many condition types in outside condition records.
    happy new year
    please check with your abaper and confirm
    balajia

Maybe you are looking for

  • How do I change the language of ADF framework error messages?

    I'm a beginner in ADF and JDeveloper and I tried to run one of the tutorials for ADF (Build a Web Application with JDeveloper 11g Using EJB, JPA, and JavaServer Faces). While clicking through the application I got errors like this one: ADF_FACES-6009

  • How to get addresses to autofill in calendar invitations?

    When I create an event in Calendar on my iPhone, I can send it to invitees. I type in a few letters, and I get a selection from my Contacts -- same as typing in the To: field of an email. When my wife sends a calendar event from her iPhone, she gets

  • Returning to a previous Node in the process.

    Does anyone have a good pattern for returning to a previous node in the process? I can't think of any way to do it that is not exceedingly cumbersome, especially considering that I Want to be able to return to almost any node from any other node. To

  • Dump error while running tcode

    Hi When i am running my payroll with standard tcode pc00_m10_calc that tcode is going into abap runtime error., I even checked with abap and basis but can able to solve the prob so kindly help me Error in the ABAP Application Program The current ABAP

  • Can the iMac G5 supports TWO USB 7-port Hubs??

    Hi all, call me greedy but belive it or not, I am running out of USB ports!! I have a Belkin 7-port USB 2.0 Powered Hub (with 2 ports pointing upbright) which serves me very well, but I am running out of ports, now that I am considering getting the n