How to get vendor and company code based on logistic invoice document

how to get vendor and company code based on logistic invoice document in abap/4?

Hello Kumar
When you call BAPI_INCOMINGINVOICE_GETDETAIL using
INVOICENUMBER = <number of invoice>
FISCALYEAR = <fiscal year>
the returned HEADERDATA contains what you are looking for:
HEADERDATA-COMP_CODE
HEADERDATA-DIFF_INF
Regards
  Uwe

Similar Messages

  • How to get list of company codes with current period not opened?

    Hi,
    How to get list of company codes with current period not opened?
    Is there any way we can check whether the current period is opened for all company codes.
    If not how, can we generate a report which having information of period and company code. Also please tell me, which table will have info on posting periods and company codes.
    Thanks
    Vineeth Varghese

    Hi,
    The MM periods details can be viewed In Table MARV . On the selection screen you have the option of entering the company codes , current period, year current period etc. so make the required entries and you get the all details relevant to MM periods. Also it can be downloaded as a report.Thanks

  • Relation b/w vendor and company code

    hi,
        i m working on vendor details report, where i wanna select vendor on the comany code parameter.
    but i m not getting any relation b/w bukrs n lifnr so plz help me if u no anything regarding this.
    this is very urgent.
    thanks in advance
    marks will be sure.
    regards
    vijay

    Hi Vijay,
    LFB1 is vendor master data (company code)
    this gives the 1 to 1 relation between a vendor and a company code..
    to select the vendor based on company code
    SELECT lifnr
    FROM knb1
    INTO TABLE t_lifnr
    WHERE bukrs EQ 'comp code value'
    Thanks and Best Regards,
    Vikas Bittera.
    **Reward if useful**

  • How to get the most current file based on date and time stamp using SSIS?

    Hello,
    Let us assume that files get copied in a specific directory. We need to pick up a file and load data. Can you guys let me know how to get the most current file based on date and time stamp using SSIS?
    Thanks
    thx regards dinesh vv

    hi simon
    i excuted this script it is giving error..
       Microsoft SQL Server Integration Services Script Task
       Write scripts using Microsoft Visual C# 2008.
       The ScriptMain is the entry point class of the script.
    using System;
    using System.Data;
    using Microsoft.SqlServer.Dts.Runtime;
    using System.Windows.Forms;
    namespace ST_9a6d985a04b249c2addd766b58fee890.csproj
        [System.AddIn.AddIn("ScriptMain", Version = "1.0", Publisher = "", Description = "")]
        public partial class ScriptMain : Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase
            #region VSTA generated code
            enum ScriptResults
                Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success,
                Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
            #endregion
            The execution engine calls this method when the task executes.
            To access the object model, use the Dts property. Connections, variables, events,
            and logging features are available as members of the Dts property as shown in the following examples.
            To reference a variable, call Dts.Variables["MyCaseSensitiveVariableName"].Value;
            To post a log entry, call Dts.Log("This is my log text", 999, null);
            To fire an event, call Dts.Events.FireInformation(99, "test", "hit the help message", "", 0, true);
            To use the connections collection use something like the following:
            ConnectionManager cm = Dts.Connections.Add("OLEDB");
            cm.ConnectionString = "Data Source=localhost;Initial Catalog=AdventureWorks;Provider=SQLNCLI10;Integrated Security=SSPI;Auto Translate=False;";
            Before returning from this method, set the value of Dts.TaskResult to indicate success or failure.
            To open Help, press F1.
            public void Main()
                string file = Dts.Variables["User::FolderName"].Value.ToString();
                string[] files = System.IO.Directory.GetFiles(Dts.Variables["User::FolderName"].Value.ToString());
                System.IO.FileInfo finf;
                DateTime currentDate = new DateTime();
                string lastFile = string.Empty;
                foreach (string f in files)
                    finf = new System.IO.FileInfo(f);
                    if (finf.CreationTime >= currentDate)
                        currentDate = finf.CreationTime;
                        lastFile = f;
                Dts.Variables["User::LastFile"].Value = lastFile;
                Dts.TaskResult = (int)ScriptResults.Success;
    thx regards dinesh vv

  • Need a output based on document no and company code

    Hello All,
    I am new to BI and appreciate your cooperation
    I have a requirement where in I need a total count based on Document no and company code in the Report where in a document no can exist in multiple company code
    Say for eg
    Doc No CompanyCode
    123456          1000
    123456          2000   
    222222          2000
    333333          2000    
    Now I need the count based on document no and company code in the report. Kindly advice
    Thank you
    Poonam

    Hi Poonam,
    I don't know if this is possible in Query Designer level..
    Here is my suggestion:
    1. Create a new infoobject that will be used for the combined Doc No and Comp Code
    2. In transformation level, create a field routine that will CONCATENATE the Doc No and Comp Code in the infoobject you have created in STEP 1
    3. In Query Designer, make a FORMULA VARIABLE and choose REPLACEMENT PATH (select the infoobject you have created in STEP 1)
    4. In replacement path tab, choose INFOOBJECT, then ATTRIBUTE, and select CONSTANT 1 (forgot the exact name but there is constant 1 something in the selection)
    5. Create a global CKF with this formula (FORMULA VARIABLE * 1), this is necessary because sometimes the FV doesn't work without doing this
    6. Use the global CKF in your keyfigure structure, it will show the number of UNIQUE combination of Doc No and Comp Code
    Regards,
    Loed

  • Block/Delete Vendors by Company Code wide

    Hi Guru's
    We have got requirement to block/delete unused vendors in company code wide automatically or thru customised program. We have FK05 and FK06 to block&delete vendors. I triend updating LFB1 table using VENDOR_UPDATE Function module.
    Below is the code used In my program.
    IT_LFB1 = List of Vendors.
    LOOP AT IT_LFB1 INTO WA_LFB1 .
    WA_LFB1-SPERR = 'X'. " Block Vendor
    WA_LFB1-LOEVM = 'X'. " Deletion Flag for all areas
    WA_LFB1-NODEL = 'X'. " Deletion flag for general data
    CALL FUNCTION 'VENDOR_UPDATE' IN UPDATE TASK
    EXPORTING
    I_LFB1 = WA_LFB1.
    IF SY-SUBRC = 0.
    COMMIT WORK.
    ELSE.
    Endloop.
    But since this FM is not checking any authorisation to block/delete vendor. Could you please let me know how I can go ahead for this requirement either through BAPI which exactly perform like FK05/FK06. Looking forward with your suggestions.
    Thanks in advance..
    Shreyansh.

    Thanks a lot Keshav..
    Please help me..I have done coding as below for calling MAINTAIN_BAPI.
    i_IS_MASTER_DATA-VENDORS-HEADER-OBJECT_INSTANCE-LIFNR = WA-LIFNR.
    i_IS_MASTER_DATA-VENDORS-HEADER-OBJECT_TASK = 'U'.
    i_IS_MASTER_DATA-VENDORS-COMPANY_DATA-CURRENT_STATE = ''.
    i_IS_MASTER_DATA-VENDORS-COMPANY_DATA-COMPANY-TASK = 'U'.
    i_IS_MASTER_DATA-VENDORS-COMPANY_DATA-COMPANY-DATA_KEY-BUKRS = WA-LIFNR.
    i_IS_MASTER_DATA-VENDORS-COMPANY_DATA-COMPANY-DATA-SPERR = 'X'.
    i_IS_MASTER_DATA-VENDORS-COMPANY_DATA-COMPANY-DATA-LOEVM = 'X'.
    i_IS_MASTER_DATA-VENDORS-COMPANY_DATA-COMPANY-DATAX-SPERR = 'X'.
    i_IS_MASTER_DATA-VENDORS-COMPANY_DATA-COMPANY-DATAX-LOEVM = 'X'.
          CALL METHOD G_VMD->MAINTAIN_BAPI
          EXPORTING
            IV_COLLECT_MESSAGES  = 'X'
            IS_MASTER_DATA = i_IS_MASTER_DATA.
    is this correct..?..I am getting syntax errors in this..pleas help.

  • Change company code based on profit center at line item level in FB50

    Hi All,
    Following is my requirement, would be thankful if anyone can provide inputs on the same.
    When posting documents through FB50, In line item table control company code column gets un-editable ones correct entries are entered for that line. But after this if we want to change the profit center which belongs to different company code system throws error and makes company code column un-editable. In this situation there is no option left for user to correct the values unless he deletes the current line and creates a new one.
    Here can we make the company code field always editable?
    If not can we update the company code based on the profit center entered on that line item?
    I looked for exits but couldn't find any, validation and substitution are also not working because error message thrown by SAP is getting triggered before the substitution or validation code is executed.
    Please drop in your comments/inputs.
    Thanks in advance.
    Lucky.

    Transaction Code - FB50                     G/L Acct Pstg: Single Screen Trans.
    Exit Name           Description
    RFAVIS01            Customer Exit for Changing Payment Advice Segment Text
    RFEPOS00            Line item display: Checking of selection conditions
    RFKORIEX            Automatic correspondence
    SAPLF051            Workflow for FI (pre-capture, release for payment)
    F050S001            FIDCMT, FIDCC1, FIDCC2: Edit user-defined IDoc segment
    F050S002            FIDCC1: Change IDoc/do not send
    F050S003            FIDCC2: Change IDoc/do not send
    F050S004            FIDCMT, FIDCC1, FIDCC2: Change outbound IDoc/do not send
    F050S005            FIDCMT, FIDCC1, FIDCC2 Inbound IDoc: Change FI document
    F050S006            FI Outgoing IDoc: Reset Clearing in FI Document
    F050S007            FIDCCH Outbound: Influence on IDoc for Document Change
    F180A001            Balance Sheet Adjustment
    FARC0002            Additional Checks for Archiving MM Vendor Master Data
    FEDI0001            Function Exits for EDI in FI
    No of Exits:         14
    USER EXIT
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sapgenie.com/abap/code/abap26.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
    http://www.easymarketplace.de/userexit.php
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sappoint.com/abap/userexit.pdfUser-Exit
    http://www.sap-img.com/ab038.htm
    http://help.sap.com/saphelp_46c/helpdata/en/64/72369adc56d11195100060b03c6b76/frameset.htm
    USER EXIT
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    http://expertanswercenter.techtarget.com/eac/knowledgebaseAnswer/0,295199,sid63_gci982756,00.html
    Rewards if useful.........
    Minal

  • Urgent: How To Get Vendor History Report

    Hi Sap Techies,
    Please can Any one help me how To Get Vendor History Report and Which Transaction Code I have To use or Do i Need to write any Programs For that
    Moderator: Please, search before posting

    Dear,
    What type of history you want for Vendor, you want list of Vendor or you want transaction data for Vendor
    For Vendor transaction use FBL1N and for Vendor List you can use S_ALR_87012086
    Hope it helps!!
    Br,Vivek

  • Bapi_Acc_Document_Post - E 018 : Invalid tax code and company code combination

    Hi All,
    I need the help of this forum once again.
    I am using bapi Bapi_Acc_Document_Post to create KR documents in SAP. The bapi works absolutely fine except for one scenario:
    For a particular type of invoice coded to Company "XXXX" with lines having tax code "I0", the bapi returns error message "E 018 : Invalid tax code and company code combination". The tax code "I0" and the company code "XXXX" has been mapped in SAP and if I try to create the invoice manually in SAP using the GUI, the invoice gets created without any issue.
    I have tried searching the forum but could not find any post on this topic.
    Therefore, requesting the masters to please help me out on this.
    Best Regards
    Sutirtha Roy

    Hi Gowthami,
    how have you solved your problem, because I am facing the similiar issue and trying desperately to post the following combination with BAPI_ACC_POST_DOCUMENT:
    001 40       490100     Aufw. aus Marge PP              R2                 15,92
    002 31       10000003   Kreditor                                R2                 15,92-
    003 50       175060     Abzugsverfahren USt            R2                  3,18-
    004 40       154060     Abzugsverfahren Vst             R2                  3,18
    THANX!
    Regards
    Marko

  • Valuation at plant level and company code level

    Hi,
    Can someone explain me the difference between the valuation at plant level and company code level with a real world example?
    Regards,
    Malsha Kalubowila

    Hi,
    Inventory can be valuated at two levels either at company code level or at plant level. If you select valuation at company code level, all materials across all the plants will have same material price since valuation is at only company code level.
    Say for example Company code 1000 is buying a material which unit price is Rs. 10 from a vendor who supplies to two different plant A & B of company code 1000.  Assume Plant A is situated near vendor premises itself (so freight cost is Re 1 extra)  whereas plant B is situated at far away from vendor place (so freight cost rs 2 extra) and both cases freight cost is borne by the company and not by vendor.
    Assuming you have selected valuation at plant level, now in plant A same material will be valauted at Rs. 11 (10 +1) whereas at plant B it is valuated at Rs. 12 (10+2).
    Whereas if you have selected valuation at company code level, price will not be valuated at plant level rather at company code level which will get updated at moving average price in this case.
    So it is always best practice to select valuation at plant level rather than at company code level.
    Reg
    Karthikeyan G

  • MIRO Error- No amount authorization for customers/vendors in company code

    Hi Friends,
    While creating Invoice (MIRO), when I enter amount at Header level, I faced below error.
    No amount authorization for customers/vendors in company code  XXX.
    Message no. F5155
    Please help to know how to rectify this.
    Regards, RAMAN.

    HI
    My problem  is not solved please guide me
    No amount authorization for customers/vendors in company code xxxx
    Message no. F5155
    Diagnosis
    No amount authorization for customer/vendor line items has been specified in company code xxxx for the user group to which you are assigned.
    Provided that you are not explicitly assigned to a user group, the amount authorization to the group blank (" ") is valid.
    Procedure
    If you entered the correct company code, initiate the maintenance of tables T043 (user groups) and/or T043T (company code authorizations).
    Regards
    Krishna

  • IV Error No amount authorization for customers/vendors in company code IN01

    Hi Friends,
    I am getting an error "No amount authorization for customers/vendors in company code IN01"while doing MIRO.
    Please help to resilve this.
    Regards,
    Ram

    Hi,
    Check in SPRO > MM > Logistics Invoice Verification > Authorization Management > Define Tolerance Groups > Here check the Tolerance Group for Company Code and also the amount
    If it is not assigned then copy it from Company Code "0001"
    Check in SPRO > MM > Logistics Invoice Verification > Authorization Management > Assign User Tolerance Group > Here check the Tolerance Group assigned to User

  • Error - No amount authorization for customers/vendors in company code

    Hi All,
    I'm new to SAP MM. This question has been posted many times but the suggested solutions are not working for me.
    Whatever i'm doing related to amounts (either while invoicing through FB60 or while creating down payment request through F-47), I'm getting error "No amount authorization for customers/vendors in company code".
    I have already tried following solutions -
    1.) Created tolerance groups and assigned to company code via tcode OBA3
    2.) Gone to SPRO and assigned 2 tolerance groups to company code (one blank and one created above in Step-1)
    3.) Assigned user-id (as in SAP system) to the respective tolerance group.
    Still I'm getting below error.
    Any inputs on this issue are welcome.

    I dont really know why you mentioned that you are new to MM, as this is related to FI.
    the error message has number  F5 155, the F in the beginning or hte error message number already mentions that it belongs to FInance
    If you use SE91 and lookup the where-used list  for this number then SAP will show you a few programs, in the detail you can see that SAP checks table T043T
    if you then use SM30, enter T043T and click customizing, then SAP takes you to the customizing knot to maintain this table.
    which is: IMG > Financial Accounting > Financial Accounting Global Settings > Document > Line Item >
    ....Define Tolerance Groups for Employees
    ....Assign User/Tolerance Groups

  • No amount authorization for customers/vendors in company code 123..

    hi.. frnds..
    While doing MIRO, am getting this error: No amount authorization for customers/vendors in company code 123..
    can any one resolve this...
    thanks in advance...
    Regards.
    Raghav.KH

    Hi Raghav,
    Use following path,
    SPRO-  Financial Account ()New )   -
    Financial Account   Globlal  settings- Document -   Tolerance Groups -
    ---  Define Tolerance Groups for Employees   and  Assign User/Tolerance Groups
    This should solve your problem
    Thanks and regards
    Gitesh
    Edited by: gitesh mahamuni on Aug 31, 2009 7:17 AM

  • No amount authorization for customers/vendors in company code

    When I am posting transaction in F-43, i am getting below error
    "No amount authorization for customers/vendors in company code "

    Hi:
    You have to maintain configuration for table T043T (by company code)under transaction SPRO:
    In the future if the error message references a table use th following menu path as a short cut.
    System> Services> Table Maintenance> Extended table maintain=2 Then type in the table name (I.e., T043T). Click on customizing customizing with or without your project. A list will pop up=2 Select the appropriate one and double-click on the item you wan to configure.
    Please let me know if you need more information.
    Assign points if useful.
    Regards
    Sridhar M

Maybe you are looking for

  • HP scan incompatible with Mac OS 10.9 (Mavericks)?

    A number of people seem to be having scan problems after upgrading to OS X Mavericks.  Me too. Working with LaserJet Pro 300 color MFP M375 nw. I want to use HP Scan from my iMac, connected to the LaserJet, to scan from that printer/scanner to my iMa

  • New Mac Pro and Apple Cinema Display

    Warning, for those of you upgrading to the new Mac Pro and you plan on using your old Cinema Display, you will not get the maximum resolution out of the display. In fact, you only get 1650 x 800--which of course is way under utilizing install resourc

  • What to do in iPhoto, error when sending pics email, username and password not recognized

    I have imported photos from my camera to iphotos, cool it works great. But why when I want to email the pics, I get an error message that states my username and password arent recognized??

  • AP Elements in IE7

    Hi, One page on a site I recently uploaded contains absolute positioned elements, and is not displaying correctly in IE7. It seems to be working fine in all other IE versions and all other browsers. I understand that IE7 seems to cause a lot of probl

  • DPS: need to have multitple certificate mappings/search methods

    My 6.3 DPS is configured to authentificate end-users through SASL binds and to request a client certificate. I need to use 4 user attributes (cn,sn,givenname,ou) defined in the backend LDAP directory to map certificates to LDAP entries. The problem i