EDI INVOICE Function module IDOC_OUTPUT_INVOIC

Hi,
  Please help me with a solution for the Specification.
Requirements:
1.     EDI Invoice requires populating bottle UPC number not case UPC in IDOC and also populates customer PO number when invoice billing type is a credit.  These changes need to be reflected on EDI invoice (Idoc INVOIC02).
Investigation:
Requirement 1. EDI invoices are populating segment E1EDP19 qualifier 003 based on the unit of measure in the line item.  If shipment unit is CSE then it populates CSE upc, if shipment unit is EA then it populates Bottle UPC. 
a.     It was found that the UPC populated on the EDI invoice was being read from material master – Additional data tab.  (Field SMEINH-EAN11).  For the EDI invoice, the customers expect the bottle UPC on this column.
Requirement 2.  Need to always populate Segment E1EDK02 Qualifier 001 (customer PO) on the INVOIC02 idoc.  Standard SAP populates this information only when the billing type is F2 (regular invoice) and if the customer PO was entered in the Sales Order.
                            a) Premier requires this information to be populated in the idoc if the billing type is G2, RE, L2 also.
Solution:
Requirement 1.
       IDOC_OUTPUT_INVOIC function module needs to be changed to always populate the UPC number for the bottle UPC in segment E1EDP19 qualifier 003, field IDTNR.  This number is found on the material master – Basic data 1 view.  Field name is MARA-EAN11.   Please see screenshot of where in the material master to find the bottle UPC. 
     a. This change applies to all billing types (F2, G2, L2, RE etc).
       Requirement 2.
             Change IDOC_OUTPUT_INVOIC function module to always populate customer PO information in Segment E1EDK02 qualifier 001, field BELNR.
If billing type is equal to G2, L2, RE and VBRK-XBLNR not equal blanks then make BELNR = VBRK-XBLNR.
Segment:  E1EDK02
                              Field:  QUAL = 001
                              Field:  BELNR = VBRK-XBLNR
Waiting for your reply,
Please,Its urgent.
Thanks,
Chandra

Hi,
Neither EXIT_SAPLV56K_001 or EXIT_SAPLV56K_002 will be called when delivery is saved.
You can use this user exits USEREXIT_SAVE_DOCUMENT in program MV50AFZ1 for saving delivery document.
Also check this include progams which contains all user exits available for delivery processes.
MV50AFZZ
MV50AFZ1
MV50AFZ2
MV50AFZ3
MV50AFZK
MV50AFZL
MV50AFZP
Hope this will help.
Regards,
Ferry Lianto
Please reward points if helpful.

Similar Messages

  • How to debug outbound Idoc function module for invoice

    I have to debug the outbound IDOC function module and UserExit for invoice message type INVOIC, process code SD09, function module is IDOC_OUTPUT_INVOIC and user exit for the function module LVEDF001.
    I tried putting the break point in function module IDOC_OUTPUT_INVOIC and recreate the IDOC using WE19 but it creates the idoc but does not stop at the break point. I have also tried generation of idoc through VF02. It again creates the idoc but does not stop at the function module.
    Please let me know if I am missing any thing and not doing it right.
    Appreciate your help.
    Rohit

    Hi Ali,
        I faced the same problem. Thing is the break point is not getting triggered when i ran tha IDOC through WE19.
    What i have done is i created a project for my exit in CMOD and kept some junk code in the exit and executed it through BD21. Then the Break point got triggered. See if it works.
    Regards,
    Uday S.

  • Function module to copy INVOIC IDOC

    One of our customers use the IDOC message type INVOIC. When the IDOC are received and the proces has been started, we will like to make a copy of the IDOC with the status code 70.
    I know this functionality exist when we change the segment data using the transaction code BD87, and I have debugged this transaction, but the "copy" functionality are developed in the program SAPLEDI5 and not in a function module.
    I am looking for a function module to handle this functionality. Hope you can help me.
    Per Larsen

    To make a copy of idoc message type, you simply have to find the linked Function module of the Idoc. So for INVOIC, there would be a linked Function Module , you can copy the interface of the Function Module and build your own custom Function Module (Z function module) to attach it to the message type.
    So the steps to your problem would be:
    1. Copy the FM to attached mesaage type into a Z function module.
    2. Write the functionality you require in your Z function module.
    3. Attach the message type/ idoc type to this function module. The systematic steps to this can be simply carried out in the Transaction WEDI which is an area menu for EDI/IDOC . Depending on whether it is inbound/outbound, you can follow the steps.
    Cheers!
    Disha

  • Is there any function module which gives open invoices &open amount?

    Hello All,
    I want to use function module which gives open invoices with open amount.
    I know 'CUSTOMER_OPEN_ITEMS'  'BAPI_AR_ACC_GETOPENITEMS' function which gives open invoices but does not give open amount.
    Can anyone help me to find such function?

    From this BAPI ,
    BAPI_AR_ACC_GETOPENITEMS, You got amount for items in lc_amount field of lineitems table parameter.
    I hope, it will helpful to you.
    by
    Prasad GVK.

  • Function module to retrieve the account number linked to an SD invoice item

    Hi all,
    I should retrieve the gl account number linked to a certain SD invoice item. The
    program starts from VBRK and VBRP data. Is there a function module which
    enables to get it starting from these header lines? I already used the function
    module: RV_INVOICE_ACCOUNT_DETERM ( release: 4.0 ), but in some cases it
    doesn't seem to function properly ( the export table TKOMV doesn't contain a
    value for the SAKN1 field ). For the invoices for which the function isn't able to
    retrieve the account number, the standard accounting analysis functionality returns
    the following message: account determination carried out via KOFI type. So I'm
    searching for a function module that's able to retrieve the account number in these
    cases also.
    Thanks in advance.
    Adriano.

    Dear Adriano,
    Try with Function Module 'SD_DETERMINE_ACCOUNT_INVOICE '.
    Additional Info:
    BAPIs related salesorder:
    BAPI_SALESORDER_CHANGE Sales order: Change Sales Order
    BAPI_SALESORDER_CONFIRMDELVRY Sales Order: Confirmation of Delivery; Document Flow Update
    BAPI_SALESORDER_CREATEFROMDAT1 Sales order: Create Sales Order
    BAPI_SALESORDER_CREATEFROMDAT2 Sales order: Create Sales Order
    BAPI_SALESORDER_CREATEFROMDATA Create Sales Order, No More Maintenance
    BAPI_SALESORDER_GETLIST Sales order: List of all Orders for Customer
    BAPI_SALESORDER_GETSTATUS Sales Order: Display Status
    BAPI_SALESORDER_SIMULATE Sales Order: Simulate Sales Order
    FM:
    MB_ADD_PURCHASE_ORDER_QUANTITY (Reading and adding open purchase order quantities)
    SD_SALES_ORDER_STATUS_WWW for complete details including the delivery information.
    Hope this will help.
    Regards,
    Naveen.

  • Function module to retrieve the account linked to an SD invoice item

    Hi all,
    I should retrieve the gl account number linked to a certain SD invoice item. The
    program starts from VBRK and VBRP data. Is there a function module which
    enables to get it starting from these header lines? I already used the function
    module: RV_INVOICE_ACCOUNT_DETERM ( release: 4.0 ), but in some cases it
    doesn't seem to function properly ( the export table TKOMV doesn't contain a
    value for the SAKN1 field ). For the invoices for which the function isn't able to
    retrieve the account number, the standard accounting analysis functionality returns
    the following message: account determination carried out via KOFI type. So I'm
    searching for a function module that's able to retrieve the account number in these
    cases also.
       Thanks in advance.
       Adriano.

    Hi
    Try using FM SD_DETERMINE_ACCOUNT_INVOICE or  WLF_INVOICE_ACCOUNT_DETERM.
    Thanks
    Sandeep
    Reward if helpful

  • Function module to Print Customer Invoice as PDF and to Printer

    Hi,
    I am writing a program to create a document through FB01. After that I also need to a PRINT the customer invoice for Same document. I need to print Invoice as PDF and Report and print to a Printer. Which Function Modules can I use for these purposes.
    Thanks.
    FS
    Moderator Message: SDN is not here to do your job for you. There are plenty of good developers who work at CSC who can help you out. Thread locked.
    Edited by: Neil Gardiner on Oct 5, 2010 6:38 PM

    Hi,
    please see the given link,It may help you.
    Re: Regarding Print Problem in ALV
    Regards,
    Shamma

  • Function module to identify first bill or invoice to the customer

    Dear all,
    Is there any function module to identify first bill/invoice or both to the customer?.
    with regards,
    Umar

    Try ISU_PREVIOUS_BILL_SELECT. If it returns a previous bill, then the current one is not the first one, if no previous bill returned, then this is the first one.

  • BAPI or Function module to park FI Invoice

    Hi All,
    I have been trying hard to find a Function Module or a BAPI to park a vendor Invoice. Do rememeber that I am using the transaction FV60 for this purpose and not MIRO. For MIRO you have the BAPI_INCOMINGINVOICE_CREATE. But for the FI vendor invoice I am finding hard to find a function module. I have as of now using a BDC but the customer needs to upload 500 invoices and it is very slow. The reason why I need a banckground process is because there is a report in conjunction with the upload program which actually gives the status of all the Invoices and to whom it has been assigned to for processing.
    I have a workflow running behind this and report is about the workflow.
    I would appreciate if somebody could help me out here
    Cheers,
    Sudhi

    Hi All,
    Thanks a lot to all for providing me the inputs but all the Function modules that are mentioned are for the MM Invoice that you create through transaction MIRO or MIR7. I need a functin module that can park an invoice through transaction FV60. Any inputs will be appreciated.
    Cheers,
    Sudhi

  • Function Module For Customer Receivable Invoice Document Wise

    Dear All,
    Is there a standard Function Module / BAPI available for calculating Customer Receivable amount invoice document wise? I will explain the scenario in greater detail:
    1) Invoice is booked against customer (FB70 / SD Interface)
    2) Receipt is made (F-28 )
    3) Matching of invoice is done at the time of receipt (either partial or residual)
    4) Customer Account Clearing is done (F-32)
    We have explored tables BSID,BSAD,BSEG and BSE_CLR, but are unable to decipher the exact logic by which the System is storing the cleared amount, invoice document wise. We have tried referring to BSEG-REBZG (Invoice Reference) and BSE_CLR for finding out the clearing document and thus arriving at the invoice document balance, but the table entries are not similar in case of partial and residual payment and hence it is creating problem in deducing the actual invoice wise open balance. Can anyone refer to some FM / API / Logic for deducing the same?
    Your inputs will be sincerely appreciated.
    Thanks and Sincere Regards,
    Amitabha

    Hi People,
    Any ideas?
    Thanks and Sincere regards,
    Amitabha

  • Function Module/BAPI for posting of Parked Invoice/Documnet

    Dear all,
    Please provide me.
    Function Module/BAPI for posting of Parked Invoice/Documnet
    Regards
    Ricky

    Hi Ricky,
    What about MR_POST_PP_INVOICE?
    In my current project, though, we had to develop a function module for this.
    Regards,
    Eli

  • Function module to display offsetting invoice of incoming payment

    Hi all,
    I would like to print the customer statement of accounts through sap correspondence. 
    Is there any function module where it will display out the offsetting invoice numbers of the incoming payment that I can use in the sapscript? 
    Eg:
    Incoming payment:  1,000.00
    Offset against
    Invoice A: 500.00
    Invoice B: 300.00
    Invoice C: 200.00
    Thanks.
    Rgds,

    Hi,
    When you do the clearing, these invoices are stored in BSAD Table under the field BELNR and the link between the incoming payment and the invoice is the clearing document number. You dont need any function module to determine the invoice.
    You can also get this link in the table BSE_CLR.
    Regards
    Mahendra

  • Function Module to Determine Split Invoice

    Hi,
    Is there any function module to determine if the delivery orders will result into a split invoice?
    Regards,
    Mawi

    Hi ,
    Look at the following FM.
    FI_INVOICE_SPLIT
    FM_PPA_SPLIT_INVOICE          
    FI_WT_ACI_INVOICE_SPLIT
    FI_WT_INVOICE_SPLIT
    FI_WT_INVOICE_SPLIT_CIFPP
    Thanks
    Shambhu

  • Function module to get invoice details ...

    Hi friends ...
    I need function module to get sales invoice details including items ....
    Thanks & Regards ..
    Ashish

    Hi Ashish,
    Try LB_BIL_INV_OUTP_READ_PRTDATA function module, this will help you..
    Regards,
    S. Sudagar

  • Function Module to find Fully Invoice PO

    Hi all,
           Is there any function module to find Fully Invoice PO?
           Or
          Tell me the tables from where can i get the details of Fully Invoiced PO?

    Hi,
       My requirement is like this.
    I have a company code on selection screen.
    I have to take PO's based on company code.
    Then I need to check whether that PO is fully invoiced or not.
    Initial i was checking EKKO table. But I found that is not the correct table to find out.

Maybe you are looking for

  • Is there a way to prevent DPS from going to next article when using swipe left/swipe right?

    I have placed web content in an article in Indesign with swipe left and swipe right function and it works just fine except for one thing. When swiping the animation starts but it also goes to the next/previous article in the folio. Is there a way to

  • Getting the information from a writable form into Excel ...

    Help! I have a writable form that was created in Adobe Acrobat Professional I would like to either post or email out this form to fellow employees. Once they fill out this form - it needs to come back to me I then need to be able to take the data fro

  • Account determination base on vendor code

    Dear Expert, According to sap normal configuration, the account determination base on MT and valuation class in OMJJ and OBYC. Currently we have new requirement which is same material post to different GL account under same MT such like 101. Can we e

  • What's the maximum GB I can render at a time

    I have about 300GB to render. I calculated that it might take 40 hours so I wanted to simply do it over the weekend. Is that dangerous?

  • Do InCopy/InDesign files work hosted on NAS?

    We are trying to set up an onsite NAS to host the inDesign and inCopy workflow. Client currently uses Google Drive to host their inDesign and inCopy files. Will it function with a NAS and if so, are there any migration concerns?