11-03-2011 10:21 AM
Hi to all,
This is my problem:
I need to post the print output from the SD invoice document into the MM invoice document.
The first thing is to generate the output type in the SD billing with the Storage Mode 3 (print and archive), that will create an entry in TOA01 table.
So then, with a second Output Type in MM, the program will read the entry in TOA01. Will copy the SD ARC_DOC_ID and create through FM ARCHIV_CONNECTION_INSERT an entry in TOA01 for the MM invoice but with the SD document ID.
In that way the same attachment from the SD billing (VF01) will be posted into the MM invoice (MIRO).
For some reason this do not work. When the user attemp to open the attachment in the MM logistic inovice in MIR4, the system send an error message. I do not why and the way to solve this.
The details for this development are the followings:
1. Create a new output type ZPDF and a new custom program (assigned to ZPDF output) in order to post the invoices from CoCo GBXX and NL05 in the MM invoice CoCo NLXX. The MM invoice number is recorder into NAST table into NAST-OBJKY:
The MM invoice number is 510XXXXXXX
2011 is the year.
2. Enter to table RBKP with MM invoice number RBKP-BELNR and get the SD invoice number: RBKP-XBLNR.
MM invoice number: 510560XXXX (comes from the output type ZPDF)
SD invoice number: 0030000XXXX (RBKP-XBLNR).
3. Enter with SD invoice number XBLNR to table TOA01-OBJECT_ID.
And get TOA01-ARC_DOC_ID:
TOA01-ARC_DOC_ID= 4E88A704C9D56FFFE10000000A5E0A2D
(Important: if the program couldn´t find any value in TOA01, finish the process without posting anything)
4. I f the program found a record in point three, go to FM ARCHIV_CONNECTION_INSERT with the following parameters:
Where:
u2022 ARCHIV_ID Z0 (always Z0).
u2022 ARC_DOC_ID 4E88XXXXXXXXXXXXXXXXXXXXA5EXX2D (TOA01-ARC_DOC_ID).
u2022 AR_DATE The current date- Example: 13.10.2011
u2022 AR_OBJECT MMILOGINV (always MMILOGINV).
u2022 DEL_DATE (leave blank).
u2022 MANDANT 100
u2022 OBJECT_ID 510560XXXXXXX (RBKP-BELNR - The MM invoice number follows with the document year).
u2022 SAP_OBJECT BUS2081 (always BUS2081)
u2022 DOC_TYPE
u2022 BARCODE
Moderator message: please choose more descriptive subject lines for your posts.
Edited by: Thomas Zloch on Nov 3, 2011 10:29 PM
11-03-2011 10:29 AM
Hi
Which kind of message you have?
I suppose you can see the archived print in VF03, don't you?
Max
11-03-2011 10:29 AM
Hi
Which kind of message you have?
I suppose you can see the archived print in VF03, don't you?
Max
11-03-2011 10:36 AM
Yes. If I Got to transaction code : VF03, Enter the Billing document number, got to Menu bar u2018Billing documentu2019 and select the u2018Issue output tou2019, And select the output type u2018ZINFu2019 & SELECT print preview button, I Enter the file name to download the pdf file and save file. With taht way I can see the print output (the SD invoice).
Regards,
11-03-2011 12:56 PM
Hi Fred,
I really liked your approach. Can you please check whether the document type assigned to both the object IDs (SD and MM) are same or not in Archive Link Configuration? You can go to this link below:
http://d.logosworld.com/?q=node/75
Have a look at the very last screen shot, which describes relationship between object type and document type. Just check your configuration and make sure you use same document type in both the cases (Object ID for SD and MM). Let us know if this work.
Regards,
11-03-2011 1:19 PM
Hi
I mean you've really activated the contenent server for archving, so after archiving SD print you need to see it from archiving, not from the message.
You can see the archived print from service objet int attachment section
Max
11-03-2011 6:14 PM
Hi Max,
When I post an SD invoice in VF01, the system trigger an Output Type that post an entry in TOA01, like this:
SAP_OBJECT: VBRK
OBJECT_ID: 0030000278 0000002782
ARCHIV_ID: Z0
ARC_DOC_ID: 4EB1345753A425C6E10000000A5E0A2D
AR_OBJECT: SDOINVOICE
AR_DATE: 03.11.2011
DEL_DATE:
RESERVE: PDF
Then, when I post an MM invoice in MITO, through another Output Type the system make an another entry in TOA01, like this:
SAP_OBJECT: BUS2081
OBJECT_ID: 51056060022010
ARCHIV_ID: Z0
ARC_DOC_ID: 4EB1345753A425C6E10000000A5E0A2D
AR_OBJECT: MMILOGINV
AR_DATE: 03.11.2011
DEL_DATE:
RESERVE: PDF
The idea is that the same attachment from the SD is copy to the MM.
Do you see something strange on this? Do you need more information?
Thanks,
11-04-2011 12:00 AM
Hi Fred,
If you are using issue output then system is generating the new output again, this is not your archived output. To see the archived output, you have to go to services objects in VF03/VF02. You should have one attachment object created in your Invoice. Click on that and see if you are getting your Invoice PDF. If you are not able to see your Invoice PDF then you wont be able to see it from MM document as well.
Regards,
11-04-2011 9:12 AM
The strange thing here is that the user can see the SD attachment in VF03 through the Livelink Archive Windows Viewer program. But, when he attemps to open the MM attachment in MIR4, the system show the message "Error calling application via OLE.ALVIEWER.APP"
It seems that there is something missing here.
11-04-2011 9:25 AM
I can't understand if you really have the archiving activated.
The hit in TOA01 is nothing if the archiving is not active.
Max
11-04-2011 9:35 AM
HI Max, where I can look if the archiving is active or not?
Thanks.
11-04-2011 9:58 AM
HI Himanshu,
I can see in table TOA01 that the are some diffences.
SD:
Client 100
Object Type VBRK
Object ID 0160000686 0000018719
Cont.Rep.ID M0
Doc. ID aaql46oquuvec3xpaqdhdk4ergqamMTA0000015
Document type SDOINVOICE
Storage date 22.10.2004
Delete date
Reserve PDF
MM:
Client 100
Object Type BUS2081
Object ID 51069865452011
Cont.Rep.ID Z0
Doc. ID aaql46oquuvec3xpaqdhdk4ergqamMTA0000015
Document type MMILOGINV
Storage date 27.10.2011
Delete date
Reserve PDF
The Cont. Rep. ID are diferents. Could be that the reason you are saying?
Hi Maxi, if I go to the Service Objects in MIR4 transaction I can see the attachment in Attachment List. But I could not open.
Regards,
11-04-2011 9:58 AM
Hi
Your contenent server is Z0, try to run the transaction of customizing OAC0
Here you should see the hit Z0, try to check it
Max
11-04-2011 10:00 AM
Hi
yes it seems you have 2 different contenent server: Z0 and M0
Try to check both them by trx OAC0, you should assign the same contenet server
The archiving ID like your 4EB1345753A425C6E10000000A5E0A2D is the link between SAP document and archived file, it's like the name of the file, so it has to be in the contenent server
Max
12-20-2011 10:43 AM
Problem solved. There where 2 problems:
1. I had 2 different contenent server: Z0 and M0. Shoul be the same.
2. In test system the archive function was not active.
Thanks to all.