Output type - Special function 8 - ARCHIV_CONNECTION_INSERT

Hi gurus,
I created a new Output Type with special function 8 called ZPDF in transaction NACE with application MR (invoice verification) and I added to that Output Type ZPDF our custom program called ZXXX_ARCHIVE_LINK in order to post into the MM invoice, a PDF who cames from the SD inovoice.
The SD invoice number is recorder into the field "Referece" in the MM invoice.
So, the program should (through the output type and the program):
1. Read the MM invoice number generated (NAST table into NAST-OBJKY).
2. Enter to table RBKP with MM invoice number RBKP-BELNR and get the SD invoice number: RBKP-XBLNR.
3. Enter with SD invoice number XBLNR to table TOA01-OBJECT_ID And get TOA01-ARC_DOC_ID.
4. Call FM ARCHIV_CONNECTION_INSERT.
The problem here is when I post a MM inovice in MIRO transaction the system through the condition record added the ZPDF Output Type but don´t read the program ZMIC_INVOICE_PDF_ARCHIVE_LINK added to that output type. The status of the output type is green (but without any processing log). I checked the setting for the Output Type like 100 times and everything seems to be OK.
Please this is very urgent. Any advice?
I don´t know why SAP don´t call the program. I think the ABAP code is wrong:
REPORT ZXXX_ARCHIVE_LINK.
Table Declaration
TABLES: NAST, " Message Status
CMFP, " Storage Structure for Errors Collected
EDIDS, " Status Record (IDoc)
VBRK, " Billing Document: Header Data
TOA01. " Link table 1
TYPES: BEGIN OF TY_RBKP,
BELNR TYPE RE_BELNR, " Document number of an invoice document
XBLNR TYPE XBLNR1, "SAEOBJID, " Reference Document Number
END OF TY_RBKP.
TYPES: BEGIN OF TY_TOA01,
OBJECT_ID TYPE SAEOBJID, " SAP ArchiveLink: Object ID (object identifier)
ARC_DOC_ID TYPE SAEARDOID, " SAP ArchiveLink: Document ID
END OF TY_TOA01.
Data Declaration
DATA: WA_BELNR TYPE RE_BELNR ,
WA_ARC_DOC_ID TYPE TY_TOA01 , "-ARC_DOC_ID,
WA_SAP_OBJECT LIKE SAPB-SAPOBJID," TYPE TOAOM-SAP_OBJECT ,
ARC_DOC_ID TYPE TOAV0-ARC_DOC_ID,
GT_RBKP TYPE STANDARD TABLE OF TY_RBKP , "WITH HEADER LINE,
GT1_RBKP TYPE STANDARD TABLE OF TY_RBKP, " WITH HEADER LINE,
GT_ARC_DOC_ID TYPE STANDARD TABLE OF TY_TOA01, " -ARC_DOC_ID,
WA1_RBKP TYPE TY_RBKP ,
WA_RBKP TYPE TY_RBKP.
DATA: WA1_OBJECT_ID TYPE SAEOBJID.
DATA: WA_OBJKY TYPE NA_OBJKEY,
WA1_OBJKY TYPE RE_BELNR.
FORM entry USING ent_retco ent_screen.
CLEAR ent_retco.
PERFORM ARCHIV_CONNECTION_INSERT USING nast-objky ent_retco.
ENDFORM. "entry
FORM ARCHIV_CONNECTION_INSERT USING objky returncode.
* Select Reference Document Number from RBKP table
SELECT BELNR XBLNR
FROM RBKP
INTO TABLE GT_RBKP
WHERE BELNR = objky . " .WA1_OBJKY .
IF SY-SUBRC EQ 0 .
LOOP AT GT_RBKP INTO WA_RBKP.
WA1_OBJECT_ID = WA_RBKP-XBLNR .
CONCATENATE WA1_OBJECT_ID '%' INTO WA1_OBJECT_ID .
WA_SAP_OBJECT = WA_RBKP-BELNR .
SELECT OBJECT_ID
ARC_DOC_ID
FROM TOA01
INTO TABLE GT_ARC_DOC_ID
WHERE OBJECT_ID LIKE WA1_OBJECT_ID.
IF SY-SUBRC EQ 0 .
READ TABLE GT_ARC_DOC_ID INTO WA_ARC_DOC_ID INDEX 1.
ARC_DOC_ID = WA_ARC_DOC_ID-ARC_DOC_ID.
WA_SAP_OBJECT = WA_ARC_DOC_ID-OBJECT_ID.
ENDIF.
CALL Function Module:Link table operations
CALL FUNCTION 'ARCHIV_CONNECTION_INSERT'
EXPORTING
ARCHIV_ID = 'Z0'
ARC_DOC_ID = ARC_DOC_ID
AR_DATE = SY-DATUM
AR_OBJECT = 'MMILOGINV'
DEL_DATE = ' '
MANDANT = SY-MANDT
OBJECT_ID = WA_SAP_OBJECT
SAP_OBJECT = 'BUS2081'
DOC_TYPE = 'PDF'
BARCODE = ' '
EXCEPTIONS
ERROR_CONNECTIONTABLE = 1
OTHERS = 2
IF SY-SUBRC 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CLEAR: WA_RBKP.
ENDLOOP.
ENDIF.
ENDFORM.

Hi,
Use
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.
The individual possibilites 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.
Kapil

Similar Messages

  • OUTPUT TYPE SPECIAL FUNCTION

    Hi Experts,
    I am using a custom program and a form call from output type with special function.
    This output type is for transaction VF01. I need help in how to get the data entered from VF01 when I am on the subroutine of my custom program. Can you provide what is the available data i can use? I need to determine the sales order number but I am having a hard time getting the data when I am at the custom program called by the output type.
    Thanks in advance.

    Hi Sravan Kumar,
    I wont be using any forms, the output type is special function because i only need to edit user status of the sales order connected to the billing done via VF01. What I need to determine is the sales order number but when I am at my custom program, the data available to me is limited. What I need to know is where can I get the sales order number or even the delivery number entered in VF01.

  • Possible to trigger output type through Function module?

    Hi,
    Is it possible to trigger output type through Function modules or through some codings or any standard FM's?
    Regards
    Bala.

    You did not specify what area you need to retrigger an output type for, but here is a sample to retrigger a delivery output.
      CALL FUNCTION 'BAPI_LIKP_PROCESS_MSG_DIRECT'
        EXPORTING
      DYNAMICOUTPUTDEVICE       =
          processing                       = PROCESSING
      SORTMESSAGE               = 1
        TABLES
          deliverynumber                 = delnbrs
          outputtype                       = outputs
          messageprotocol              = bapimsgprot
          return                              = bapiret2.
    Thanks

  • Output for special functions

    Hi
    For all the output typesd I need to use transmission medium 8( Special function).Kindly let me know what is purpose of special functions and where to see output of the form.
    Points will be rewarded.

    Hi,
    Some info, in case it helps.
    I had a requirement to use two different SAPscript forms for printing sales invoices (one for normal invoice printing and the other for in a program for printing dunning letters plus their invoices).
    So in the IMG (transaction V/40) I set up processing for transmission medium 8 just like what was already there for transmission medium 1, but with the other SAPscript form.
    In our program, NAST-NACHA is set to 8, and a call is made to the appropiate form (e.g. einzelnachricht_ohne_update) of program rsnast00 in order to print.  This picks up and uses the config (the print program, SAPscript form etc) for transmission medium 8.
    Used in this way, 8 seems to work just like 1, except 1 is used by the regular processing but 8 by our custom program.
    John

  • Query regarding NACE output types

    Hello Gurus,
    I have two Output types ZABC & ZXYZ. I have placed ZABC and ZDEF in this order in Procedures. ZABC is of the type 'Special Function' while ZXYZ is of the type 'EDI'. Please help me understand if these output types will be triggered parallely or in the sequence described above.
    Thanks
    Rohit

    Hi,
    If you are triggerring both the output types, it will process in the order which you triggered.
    Thanks
    Arul

  • How to trigger EDI output type by logical system

    Hi,
    I am trying to propose a delivery output on delivery document based on logical system.
    I have maintained partner profile by logical system. In the partner profile, i have given the delivery output type and the process code.
    I have also maintained condition records for the delivery output.
    I would like the system to propose the delivery output not by ship to party or sold to party but by the logical system.
    Because i do not want to maintain 3000 customers in the partner profiles, instead trigger the output by logical system.
    Please let me know, if anyone has gone thru this situation and resolved.
    Thank you in advance.
    -Naga

    Hi,
    First thing you should make sure that, when you create the output type , partner function should have an entry for EDI - LS combination.
    Secondly , make sure you have option for EDI transmission on the output type (medium 6).
    Third, when you create partner profile for LS, make sure you give partner function as LS, even though SAP gives warning that its not required.
    Last but not least, i didnt create any distribution model , because when i created distribution model and generate partner profile, system was not generating the profile properly.
    I am not sure, whatever i did was right, but its working for me.
    -Naga

  • Output type config error:No communication data has been defined for transmi

    Hi Gurus,
    i have copied an existing output type ZOCT to ZORD . when i change the sales order the output is automatically triggered but is not processed successfully instead it is in red. when i see the processing log i could see the error below.
      green Object 0000000133                                        
      green Output type: UK Sales Order                              
      green  Processing log for program RSNASTED routine ALE_PROCESSING
       RED   No partner profiles (message control) maintained         
    I tried adding communication data in VV11 but i get the below error.
    No communication data has been defined for transmission medium A
    Message no. VK603.
    I am using ordrsp and orders05 in partner profiles and in message control tab i am giving
    V1 ZORD SD10 values.
    Please suggest me to correct these errors. Your help is much appreciated.Thanks.
    Regards.
    Sanjeev

    Hi V V Reddy,
    Thanks a lot for your inputs. I have debugged the program rsnasted at routines and in EDP12 there were repeated entries .
    So i deleted all the partner profiles and created and generated them agian.
    I have also missed to maintain SP partner function in output type partner functions. I do not see any errors now.
    Thank you very much.
    Regards,
    Sanjeev

  • Special function 8 - Output Type

    Hi gurus,
    I created a new Output Type with special function 8 called ZPDF in transaction NACE with application MR (invoice verification) and I added to that Output Type ZPDF our custom program called ZXXX_ARCHIVE_LINK in order to post into the MM invoice, a PDF who cames from the SD inovoice.
    The SD invoice number is recorder into the field "Referece" in the MM invoice.
    So, the program should (through the output type and the program):
    1. Read the MM invoice number generated (NAST table into NAST-OBJKY).
    2. Enter to table RBKP with MM invoice number RBKP-BELNR and get the SD invoice number: RBKP-XBLNR.
    3. Enter with SD invoice number XBLNR to table TOA01-OBJECT_ID And get TOA01-ARC_DOC_ID.
    4. Call FM ARCHIV_CONNECTION_INSERT.
    The problem here is when I post a MM inovice in MIRO transaction the system through the condition record added the ZPDF Output Type but don´t read the program  ZMIC_INVOICE_PDF_ARCHIVE_LINK added to that output type. The status of the output type is green (but without any processing log). I checked the setting for the Output Type like 100 times and everything seems to be OK.
    <removed by moderator>. Any advice?
    I don´t know why SAP don´t call the program. I think the ABAP code is wrong:
    REPORT  ZXXX_ARCHIVE_LINK.
    Table Declaration
    TABLES: NAST,     " Message Status
            CMFP,     " Storage Structure for Errors Collected
            EDIDS,    " Status Record (IDoc)
            VBRK,     " Billing Document: Header Data
            TOA01.    " Link table 1
    TYPES: BEGIN OF TY_RBKP,
           BELNR TYPE RE_BELNR,   " Document number of an invoice document
           XBLNR TYPE XBLNR1, "SAEOBJID, " Reference Document Number
      END OF TY_RBKP.
    TYPES: BEGIN OF TY_TOA01,
      OBJECT_ID     TYPE SAEOBJID,    " SAP ArchiveLink: Object ID (object identifier)
      ARC_DOC_ID TYPE     SAEARDOID,  " SAP ArchiveLink: Document ID
      END OF TY_TOA01.
    Data Declaration
    DATA: WA_BELNR TYPE RE_BELNR ,
          WA_ARC_DOC_ID TYPE TY_TOA01 , "-ARC_DOC_ID,
          WA_SAP_OBJECT LIKE SAPB-SAPOBJID," TYPE TOAOM-SAP_OBJECT ,
          ARC_DOC_ID TYPE TOAV0-ARC_DOC_ID,
          GT_RBKP TYPE STANDARD TABLE OF TY_RBKP , "WITH HEADER LINE,
          GT1_RBKP TYPE STANDARD TABLE OF TY_RBKP, " WITH HEADER LINE,
          GT_ARC_DOC_ID TYPE STANDARD TABLE OF TY_TOA01, " -ARC_DOC_ID,
          WA1_RBKP TYPE TY_RBKP ,
          WA_RBKP TYPE TY_RBKP.
    DATA:  WA1_OBJECT_ID TYPE SAEOBJID.
    DATA: WA_OBJKY TYPE NA_OBJKEY,
          WA1_OBJKY TYPE RE_BELNR.
    FORM entry USING ent_retco ent_screen.
      CLEAR ent_retco.
      PERFORM ARCHIV_CONNECTION_INSERT USING nast-objky ent_retco.
    ENDFORM.                    "entry
    FORM ARCHIV_CONNECTION_INSERT USING objky  returncode.
    * Select Reference Document Number from RBKP table
    SELECT BELNR XBLNR
           FROM RBKP
           INTO TABLE GT_RBKP
           WHERE BELNR = objky . " .WA1_OBJKY .
    IF SY-SUBRC EQ 0 .
      LOOP AT GT_RBKP INTO WA_RBKP.
        WA1_OBJECT_ID = WA_RBKP-XBLNR .
        CONCATENATE WA1_OBJECT_ID '%' INTO WA1_OBJECT_ID .
        WA_SAP_OBJECT = WA_RBKP-BELNR .
        SELECT OBJECT_ID
               ARC_DOC_ID
               FROM TOA01
               INTO TABLE GT_ARC_DOC_ID
               WHERE  OBJECT_ID LIKE WA1_OBJECT_ID.
        IF SY-SUBRC EQ 0 .
          READ TABLE GT_ARC_DOC_ID INTO WA_ARC_DOC_ID INDEX 1.
          ARC_DOC_ID = WA_ARC_DOC_ID-ARC_DOC_ID.
          WA_SAP_OBJECT = WA_ARC_DOC_ID-OBJECT_ID.
        ENDIF.
    CALL Function Module:Link table operations
        CALL FUNCTION 'ARCHIV_CONNECTION_INSERT'
               EXPORTING
                ARCHIV_ID                   = 'Z0'
                 ARC_DOC_ID                 = ARC_DOC_ID
               AR_DATE                     = SY-DATUM
                 AR_OBJECT                  = 'MMILOGINV'
            DEL_DATE                   = ' '
                MANDANT                     = SY-MANDT
                 OBJECT_ID                  = WA_SAP_OBJECT
                 SAP_OBJECT                 = 'BUS2081'
                DOC_TYPE                    = 'PDF'
            BARCODE                    = ' '
             EXCEPTIONS
             ERROR_CONNECTIONTABLE      = 1
             OTHERS                     = 2
        IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        CLEAR: WA_RBKP.
      ENDLOOP.
    ENDIF.
    ENDFORM.
    Edited by: Thomas Zloch on Oct 26, 2011 10:52 AM

    ok, if you set for your output type NAST-VSZTP=3 you can add code in your print program to display popup window in which
    user specify own path for storing PDF...
    but if output type will be created in background ( VSZTP ne 3) then
    you must save PDF in server path...and user may download it by
    cg3y...
    regards, darek

  • Issue with configuration of 'Special Function' to a custom output type

    Hi Experts,
    In my project we have a requirement to configure a custom output type for application V3 (billing) and assign a Special Function to it. I have assigned a custom Program Name and a custom form routine within the custom output type in Processing Routines (in NACE). But when I try to save the Billing document using VF01 / VF02 it gives me an error saying 'Processing Routine XXXXX in program ZXXXXX does not exist'. I have double checked that the Z program is activated. I have declared as follows:
    REPORT ZXXXX.
    FORM XXXX USING return_code us_screen.
    Can anyone please tell me if I am missing something?
    Thanks,
    Avi

    Hi Neil,
    Now this error is resolved. It does not give me that message anymore. But I am getting a new error while saving the billing document with the customized output type. Following is my configuration in NACE:
    Application: V3
    Output Type: ZMAM
    Program: YVRO_TOLLING
    Form Routine: F_FETCH_AND_PREPARE_DATA
    I am trying to place a break-point within the form routine F_FETCH_AND_PREPARE_DATA but it does not stop there. When go back inside the billing document, it shows an error against the ZMAM output type but has nothing in the processing log. Am I missing something?
    Avi

  • Trigger special function output type through a custom program

    Hi,
    I have to trigger the special function output type from a custom program.
    This custom program contains a BAPI and the output parameters of this BAPI are required as input to the second BAPI which is contained in the form routine of the special function output type.
    I am not able to understand how to trigger the special function as I dont know how the nast-objky will be updated
    and how the BAPI parameters will be passed.
    Is this has to be done through a Idoc
    Can anyone guide me on how to handle the above functionality.

    Hello,
    I am not able to understand your requirement completely...
    agree with above post....addition-
    1. Transport medium would be '8 - Special Function' where one program would fire and that can be used for further processing.
    2. If condition record are maintained and it is matching with parameters then output type with all transport medium would be called
    Thanks

  • Special functions in output type

    Hi
    For all the output types I need to use transmission medium 8( Special function).Kindly let me know what is purpose of special functions and where to see output of the form .
    Points will be rewarded.

    Hi,
      Usually Special Function Output types are used if you are not using the standard outputs like IDOC, Print for which SAP standard programs and mehtods/Forms(SAP SCRIPTS) are available. If you want to create an output other than those or if you need some other functionality then you can maintain Special Function Output types and need to maintain the program to process that output type.
    Thanks
    vinod.

  • Special function Output type failing

    Hi,
    I configured a special function output type and set the dispatch time to 4. The output includes a custom program that executes a function module to create reservation. Its created in Form entry. However its failing to output when I save my order. Am I missing something? Can we not use submit programs with special function output types or dispatch time of 4?

    No. the OSS note doesn't help. I think the issue is with using dispatch time 4 instead of 1 for special function or maybe in the program code that I have:
    FORM ENTRY USING RETURN_CODE TYPE I
                     US_SCREEN TYPE C.
      DATA: L_VBELN LIKE VBAK-VBELN,
            L_RSNUM LIKE RESB-RSNUM,
            L_SUBRC LIKE SY-SUBRC.
      CLEAR RETCODE.
      if nast-objky is not initial.
        l_vbeln = nast-objky.
        CALL FUNCTION 'ZSD_RESERVATION_CREATE'
          EXPORTING
            VBELN = L_VBELN
          IMPORTING
            RSNUM = L_RSNUM
            SUBRC = L_SUBRC.
      else.
        retcode = 1.
      endif.
      IF RETCODE NE 0.
        RETURN_CODE = 1.
      ELSE.
        RETURN_CODE = 0.
      ENDIF.
    ENDFORM.

  • Special Function in Output type for PO

    Hi Expetrs:
       Can any please tell me how to write a code for a Purchase Order in the transmission medium "8" ie., Special Function and the PO Script output is converted to PDF file and it should be send to the server path location through FTP.
    Thanks,
    Venkat

    Dear Muthukumar,
    Thanks for this.
    Could you please explain more about it. I am having similar requirement.
    I want to save document on FTP server immediately after saving invoice in PDF format. So how can I use transmission medium 8 and add program to it.
    Please help.

  • Special function in output type

    Hi Sap Gurus,
    I am using special function ( 8 ) as medium of sending in my output which is defined for delivery.
    If i try to process this output with dispatch time 3 ( Send application with own transaction ) its getting processed.
    But if i try with option 4  ( Send immediately --at time of saving ) its giving an error.
    Is there any standard SAP note or any pointer to solve this error
    Thanks and Regards,
    Abhijeet

    Hi,
    Use
    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.
    The individual possibilites 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.
    Kapil

  • Transmission Medium NACHA = '8' Special function-executing  output type

    hi All,
    i have requirement that through the Transmission medium '8' i need to assign the custom program to store  the Smartform as PDF in the desktop location or the location where the user selects.
    if i assigned the  transmision medium as  8 for particular output type say ZAP1 . the particular output type is not getting displayed when i try to use issue output option through va22.
    any pointers will be highly appreciated.
    thanks.

    ok, if you set for your output type NAST-VSZTP=3 you can add code in your print program to display popup window in which
    user specify own path for storing PDF...
    but if output type will be created in background ( VSZTP ne 3) then
    you must save PDF in server path...and user may download it by
    cg3y...
    regards, darek

Maybe you are looking for