‎2011 Jan 04 8:27 AM
Hi Experts,
I have a special function tied to an output type. When an invoice is being processed in VF01, then the Output Type program is triggered. The program is a special function. In the program i can see the generated invoice document number from NAST, however this is still not populated in table VBRK or VBRP. I need help because I need to know the Sales Order Document number and I cant get it from the invoice document since I cannot trace it from the standard tables. Can you please advice?
Thank you.
Jerome
‎2011 Jan 04 8:31 AM
‎2011 Jan 04 8:33 AM
How can I do this when I am at the custom program called by the output type? the only thing visible is the invoice document number from nast and it is still not available in table VBRK or VBRP.
‎2011 Jan 04 8:36 AM
What is your exact requirement ? Anyway refer to the standard output type (Billing) CMSF ->CMS outgoing Invoice (Transmission Medium - 😎 . See the coding in the attached program, CMSR_OUTPUT_ENTRY & the function module CMS_PLUG_IN_PROC called from the program for reference.
‎2011 Jan 04 9:04 AM
I need to change the sales order document status when the output type is process in VF01 invoice creation so i created a program in output type. but when i am at the custom program all i can use is the invoice document which is not yet populated in table VBRK and VBRP so i cannot trace the sales order number.
‎2011 Jan 04 9:14 AM
Have you checked the standard output type & associated program mentioned in earlier post ?
‎2011 Jan 04 9:22 AM
‎2011 Jan 04 9:29 AM
The Output type may not be relevant. But if you go through the code written in the Function module, It extracts the data related to VBRK and VBRP using the function module RV_INVOICE_DOCUMENT_READ. Though I am not sure, I think you will get VBRK& VBAP data using above method since Output type is processed in UPDATE TASK.
‎2011 Jan 04 9:54 AM
i dont think I can use RV_INVOICE_DOCUMENT_READ because the data from VF01 is still not posted in VBRK and VBRP.
All I can use is the OBJTY from NAST which is the invoice document but still not available in VBRK and VBRP. Are there other ways to determine the sales order number from this?
‎2011 Jan 04 10:12 AM
I don't think it is correct. In a Similiar scenario, where the IDOC is to be generated with document flow of the billing document, I used the table VBFA get the information alongwith the Invoice details (which was just saved in the current session).
‎2011 Jan 04 10:20 AM
When I am at the custom program, I can see the invoice document number from NAST-OBJKY to be created but this is still not present in VBRK and VBRP tables. How can I use this to determine the sales order number?