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.

Similar Messages

  • 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

  • Help viewing an output type requirement

    We have a few custom output type requirements and I need to know how to view them.  When I go to the "Control Data" overview (through SPRO) and click the dropdown for the output requirement the custom requirements do not show up.  We are having a problem with an output type calling the wrong print program and we believe that it has to do with the requirement associated with that output type.
    Regards,
    Davis

    Hi Davis,
    Please try transaction NACE and VOFM to see the output type configuration and requirement.
    Regards,
    Ferry Lianto

  • 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.

  • Output type requirement

    Hi,
       We are trying to tag a requirement to all the PO output types to stop them from triggering when the PO is put on hold. I see the transaction NACE and find requirements already tagged to few of the output types. If I have to add our requirement for these output types, how this can be done. Moreover I would like to know the other fields (step, counter etc.) used in the transaction.
    Thanks for your help,
    Aparna

    Hi Vivek
    In the IMG, you should go to Logisitics Execution - Shipping - Basic Shipping Functions - Output Control - Output Determination - Maintain Output Determination for Outbound Deliveries - Maintain Output Determination Procedure. Highlight the output type you are using and click on "Control Data" - there is a requirement field there where you should assign your requirement 1 to the output type.
    If it helps, please assign points.
    Jon

  • 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

  • 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 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.

  • Blocking Output types from Triggering.

    Client has a requirement that if overall credit status of delivery is 'B' ( Blocked ) then all output types Automatic or Manual associated with the delivery should be blocked.
    I added following lines of code in requirements for all output types associated with deliveries
      IF   KOMKBV2-CMGST CA 'B'.
        SY-SUBRC = 4.
        EXIT.
      ENDIF.
    But we are still able to attach output types to deliveries with credit status blocked, any pointers ?

    hi Saket,
    This can be the issue you are facing.
    you are exiting from the current event with the 'EXIT' statment, but the validation is not applicable in the subsequent event.
    in the subsequent event, may be 'END-OF-SELECTION',
    insert the following statement, as the first statement:
    CHECK NOT KOMKBV2-CMGST EQ 'B'.
    hope this helps

  • Output type not triggered on time

    Dear All,
    I have an issue on output determination.
    We have a list of outputs on Delivery which will be determined after the loading start checked in Shipment based on activity profile assigned to the Shipment type.
    Out of all the outputs, only one output is not printed on time (But it is determined on time).
    We checked the condition record and everything, all found ok. But still we are facing this issue.
    Could anyone suggest me on this.
    Regards,
    Mullairaja

    Hi Mullairaj,
      If i understand it right, you are able to trigger output for both the cases but only one is picked by batch job and so you are only seeing one "Green" output but the other stays "Yellow". if this is right then did you check if the batch job is calling program RSNAST00 with right variants ?. Does this JOB has variant to pick both the Outputs.
    Let me know.
    Thanks!

  • Triggering output type(Bringing it to unprocessed state )

    Hi All,
    I have one output type. I want to trigger that output type and then bring it to an unprocessed state.
    Please let me know how can I achieve the same.
    My requirement is that, after the output type is triggered, I have to process the output type and get the PDF.
    This part can be done. All I want is ,,,to bring the output type to unprocessed state.
    Please  suggest the needful.
    Regards
    Rudra

    set nast-vstat = 0

  • Output type triggered by which tcode

    Hi,
    1. Could anyone tell me how can I determine one output type is triggered by which tcode?
    2. Please give me step by step to create new output type for new SD document type, for ex Contract, and how to populate it in VA43?
    Thanks.

    Hello,
    New Output type can be created by,
    SPRO --> SD --> Basic Functions --> Output Control --> Output Determination --> Output Determination Using the Condition Technique --> Maintain Output Determination for Sales Documents --> Maintain Output Types
    But before doing all the things you need to maintain which kind of output you want for sales documetns
    For sales documents the output condition can be maintained by VV11, delivery documents it is VV21 and for billing it is VV31.
    Prase

  • SmartForm not printing some values when output type triggered automatically

    Output type 'ZD00' for billing is created and configured in NACE with 'send immediately (when saving the application)'. I'm creating a billing document in VF01, then this output type is triggering perfectly. But when I check the form output in spool price and discount values are not displaying. And for the same billing document, when I go to VF03 and selects issue output to and execute the same output type its giving all the perfectly.
    What could be the problem ?

    there we go, you might want to have a look at RVADIN01 which is the standard driver program for invoice printing.
    Your main interest should be to see how they select their prices, and then learn from it and adopt your program accordingliy.
    Yeah RVADIN01 is a SAP-SCRIPT driver program, but the selection of data is the same as in SMARTFORMS, so dont be afraid to use their logic.
    regards.

  • Remove output type in PO through a report/BAPI

    Hi,
    am creating a PO from a report through BAPI .What i need to all the output types are triggered except a specific one.
    I want to achieve this .........I Don't want to change the settings.
    Thank you
    Mohsin

    It doesn't matter how PO is created. Output determination is triggered the same way.
    If you don't need output generated for a specific document, etc., use the output requirement routine (VOFM transaction). Routine needs to be assigned to the output type (or in the output procedure).
    Google 'Inside VOFM', there is a document available somewhere. Also check the existing routines, it's really a no-brainer.

  • Determining output type inside the IDOC processing FM

    Hi,
    When sales order is created, ZXXX is the output type triggered which invokes the function module (FM) IDOC_OUTPUT_ORDRSP to send the IDOC. My question is how do we know which output type got triggered the execution inside the FM?
    My requirement is to do some calculation only for ZAAA inside the FM IDOC_OUTPUT_ORDRSP but this same FM is triggered by many output types ZXXX, ZXYZ, ZMNO. So I want to know which output type triggered the FM. Hope I make it clear.
    Thanks,
    Sakthi.

    dossgs
    An import parameter of FM IDOC_OUTPUT_ORDRSP is the structure named OBJECT (like NAST).  OBJECT-KSCHL is the message type (output type).
    Regards,
    zKen

Maybe you are looking for

  • How do i sync my i-Pod to a new computer/music library?

    My i-Pod had been linked to a computer I no longer have. I've uploaded all of my songs (plus several new ones not on my i-Pod) onto a new computer with a new version of i-Tunes and now I want to sync up my i-Pod to this new computer. How do I do this

  • I just downloaded ios 6 on my ipad, and i cant find siri anywhere

    i downloaded ios 6 just now and when i go through the process it didnt give me an option for siri. and afterwards when i go to my setting and into general there is nothing related to siri there... can anyone tell me whats wrong?

  • Album Art

    Hi, After importing my music into iTunes, I added album artwork and after syncing with my 30 GB video iPod all of the artwork shows up great. Just like music purchased from the iTunes store. Fast forward a couple of weeks... I imported two more CDs a

  • Update from OS10.1 to....

    Hey Guys, I'm hoping you could help me out with a similar problem as the poster below me. I donated my old imac g3 to my grandparents and unfortunetly, I've come to realize how terribly outdated it is. at the moment it's running OS 10.1 with 256 MB o

  • My Spry Vertical Menu does not "drop-down"

    I've created my Srpy Vertical Menu and does not drop down to the second level, am I missing something?, I must have moved something in the style or something because it does work in a new page but not in the one I'm creating, how can I restart?... My