Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Very strange and complex problem - Only for experts

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

Former Member
Former Member replied

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

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question