BKPF-BELNR for a given MKPF-MBLNR

Hi,
how can i fast find the BELNR for a given MBLNR. I have MSEG-MBLNR and MKPF-MBLNR and need the
corresponding BELNR of FI.
Thanks.
Regards, Dieter

Hi,
  Check
https://forums.sdn.sap.com/click.jspa?searchID=11620181&messageID=3915226
https://forums.sdn.sap.com/click.jspa?searchID=11620181&messageID=634488
Regards
Kiran Sure

Similar Messages

  • How to get KTOPL for a given BELNR

    Hi all you experts!
    I am codding a simple report that obtains some data from BSAK including BELNR and SAKNR.
    I need to show in this report the description of SAKNR. I know that I can get it from table SKAT but in order to do that I need to know SPRAS and KTOPL.
    I don't have any problem getting SPRAS. But I don't know how to get the correct value for KTOPL.
    Could any of you kindly tell me how can I get KTOPL for a given BSAK-BELNR?
    Many thanks in advance.

    Hello
    Using direct DB selections for such a basic standard functionality is just nonsense.
    BSAK contains both the company code (BUKRS) and the account (SAKNR). Thus, simply feed BAPI_GL_ACC_GETDETAIL with these details and the EXPORTING parameter ACCOUNT_DETAIL contains the required texts.
    Even though there are alternative fm's like
    GL_ACC_GETDETAIL
    READ_SACHKONTO_AND_TEXT
    I always recommend to use the most generic approach (here: BAPI ).
    Regards
      Uwe

  • Mapping of bkpf-belnr  with ekbe-belnr

    hi ,
             we are mapping bkpf-belnr  with ekbe-belnr, but the field have different value in the tables . is it due to wrong entry in the database or they have different value
    it self.
    thanks and regards
    abaper.

    Hi,
    ekbe-belnr usualy don't have relation to account documents in BKPF.
    Usualy in Purchase Document Flow, you have relation to Material Documents (MKPF-MBLNR), Invoice (RBKP-BELNR) and other's.
    Regards,

  • How to define certain document type (BKPF-BLART) for certain movement (101)

    Sometimes ( I think it is becuase of the tcode)  certain purchase 101 movements create a WA type FI document and some other times purchase 101 movements create WE type FI documents. I have seen a table ( accessing from omba transaction) in which for diffenent tcode´s we have either WE or WA. If we always use migo transaction why sometimes in bkpf we have migo_tr, migo_gi, ....;....
    How should I do in order to create always WE FI documents for purchase 101 movements?
    Thanks in advance.

    Check the settings in SPRO-MM-Inventory Management-Number assignemnt-Define number ranges for accounting documents.
    Here you assign accounting document type to tcodes.
    Normally , WA is used in receipts for MB1C/MIGO_GI tcode - for e.g for 561 mvmt type.
    SAP recomends keeping this setting as it is.
    SAP help text copied here for reference:
    Define Number Assignment for Accounting Documents
    In this step, you set the number ranges for the accounting documents which are created when goods movements or inventory differences are posted.
    Accounting documents in inventory management
    For accounting-relevant goods movements, the system creates two different documents:
    material document
    accounting document
    Both the material documents and the accounting documents have their own document numbers. When inventory differences are posted, the system also creates an accounting document for the physical inventory document.
    In this step, you only maintain the number assignment for accounting documents.
    Document types
    Accounting documents are split into document types to allow differentiated document number assignment, which is the basis for distinguishing between the various accounting operations. A number range is assigned to each document type. In a company code, you have to define number intervals for each number range and fiscal year.
    In inventory management, the transaction determines which document type is used.
    Example: Goods receipt for purchase order
    Requirements
    You have already defined the company code.
    Default Settings
    In the standard SAP System, the following document types are predefined for inventory management:
    WA  for goods issues, transfer postings, other goods receipts
    WE  for goods receipts with reference to purchase orders
    WF  for goods receipts with reference to production orders
    WI  for inventory differences
    WL  for goods issues with reference to deliveries (SD)
    WN  for net posting of goods receipts
    PR  for revaluation documents
    Each document type is already assigned a number range. In company code 0001, number intervals are defined for each number range both for the current and the previous fiscal year.
    Number range 49 with the year-related interval 4900000000 to 4999999999 is assigned to the document types for all goods movements, except goods movements with reference to purchase/production orders.
    Document type WE is used for goods receipts with reference to purchase orders and production orders. This document type is assigned number range 50 with the year-related interval 5000000000 to 5099999999.
    Please note that net postings of goods receipts (document type WN) are not active in the standard SAP System. If you want to post goods receipts net, you have to assign document type WN (instead of WE) to the transaction MB01.
    Document type WI is used for posting inventory differences. This document type is assigned the number range 01 with the year-related interval 0100000000 to 019999999999.
    SAP Recommendation
    Activities
    1. Check whether you can use the standard settings.
    2. If not, you have to add new document types to satisfy your requirements:
    a) Define a new document type under Financial accounting document
    b) types.
    c) Assign a number range to the document type.
    d) Under Financial accounting number ranges, define the year-related number intervals for the given number range in your company code. If you do not want to use the year-related number assignment method, enter 9999 in the Year field.
    e) Under Allocate document type to transaction, assign the relevant document type to the transaction codes of inventory management.
    Document type PR (revaluation documents) is already assigned.
    Notes on transport
    You transport number range objects as follows:
    Choose Interval -> Transport in the accounting document Number Range screen.
    All intervals for the selected number range object are deleted in the target system first. After the import, only the intervals you export are present. The number statuses are imported with their values at the time of export.
    Dependent tables are not transported or converted.
    All other activities are linked to the automatic transport.
    Edited by: Saurav on Jan 24, 2011 6:03 PM

  • Stock at Vendor Materialwise for the given postingdate

    Hi,
    I got a requirement to develop a report which lists the Stock at Vendor materialwise for the given postingdate.
    How to calculate the opening & closing stock for the given date for a vendor materialwise?
    Regards,
    VK.

    Hello
    MSLB - Special Stocks with Vendor
    And for stock on specific date you need calculate with tables MKPF and MSEG.

  • Are there any alternatives for mseg and mkpf

    I had to display from table S032...following fields.
    S032-LETZTABG --> Date: last (i.e. most recent) goods issue
    S032-LETZTVER --> Date: last (i.e. most recent) consumption
    However the data was not properly filled in s032 table.  So I went for mseg and mkpf table to get budat based on moment types.
        SELECT   MSEG~MATNR
                 MSEG~WERKS
                 MSEG~LGORT
                 MSEG~BWART
                 MKPF~BUDAT
                 INTO TABLE IT_MSEG
                 FROM MKPF AS MKPF  INNER JOIN MSEG AS MSEG
                 ON
                     MKPFMBLNR  =  MSEGMBLNR  AND
                     MKPFMJAHR  =  MSEGMJAHR
                 FOR ALL ENTRIES  IN  T_OUT_TMP
                WHERE MSEG~MATNR  EQ  T_OUT_TMP-MATNR
                  AND MSEG~WERKS  EQ  T_OUT_TMP-WERKS.
    Are there any other alternative table for mseg and mkpf...
    Because my above coding  ( which includes above  SELECT of mseg and mkpf )got performance issue...
    Could you please suggest me anyu other alternative for mseg and mkpf ...

    Try to include the BUDAT in the selection of the MKPF.. if you don't have any restriction in MKPF than just pass an empty range.
    RANGES: S_BUDAT FOR MKPF-BUDAT.
    SELECT
    MKPF~BUDAT   "<<<
    MSEG~MATNR
    MSEG~WERKS
    MSEG~LGORT
    MSEG~BWART
    INTO TABLE IT_MSEG
    FROM MKPF AS MKPF INNER JOIN MSEG AS MSEG
    ON
    MKPF~MBLNR = MSEG~MBLNR AND
    MKPF~MJAHR = MSEG~MJAHR
    FOR ALL ENTRIES IN T_OUT_TMP
    WHERE
    MKPF~BUDAT IN S_BUDAT   " <<<
    MSEG~MATNR EQ T_OUT_TMP-MATNR
    AND MSEG~WERKS EQ T_OUT_TMP-WERKS.
    Regards,
    Naimesh Patel

  • FM to get actual line items, budget and actual amounts for a given IO num.

    Hello Experts,
    I am currently doing a report to show the actual and budget amounts for a given internal
    order number. Now, my processing takes a long time so I need to know if there are any
    available FM's for this.
    I am checking transactions: S_ALR_87013019 and KO03.
    Hope you can help me guys.Thank you and take care!

    Hi Rob,
    I am actually modifying my colleague's program and based on my checking, it is taking a very long time to fetch the relevant line items for a given IO(internal order) in tables BSIS and BSAS. Below is the code:
    SELECT bukrs
             belnr
             budat
             aufnr
             dmbtr
             shkzg
      INTO TABLE it_pdate1
      FROM bsis
      WHERE bukrs IN s_bukrs
      AND budat IN r_budat_p
      AND aufnr IN s_aufnr.
      SELECT bukrs
             belnr
             budat
             aufnr
             dmbtr
             shkzg
      APPENDING TABLE it_pdate1
      FROM bsas
      WHERE bukrs IN s_bukrs
        AND budat IN r_budat_p
        AND aufnr IN s_aufnr.
      SORT it_pdate1 BY aufnr.
      DELETE it_pdate1 WHERE aufnr EQ space.

  • How to update Table MKPF (MKPF-MBLNR)

    Can anyone help me on how can I update table MKPF? I'm trying to change the value of MKPF-MBLNR during GR Creation. (I created PO, then GR, then MIGO). So during GR creation, MKPF-MBLNR should be changed before going to MIGO. I just needed to modify MBLNR to do the offset of years depending on user input. I can not use BDC for this since this is a standard one.
    I tried to use this function CALL FUNCTION '/SAPHT/DRM_CALC_DATE' to modify the data of mblnr and created a custom function "CALL FUNCTION 'ZUPDATE_EQUIP_DATE' starting new task 'test'"... where it open a new task once there's an error in updating the value. But this one is limited since SAP only allows the maximum of 6 sessions only.So if the 6th session has been reached, it stops the process.
    Does anyone has a better idea regarding this?

    Sorry for a vague explanation... Let me rephrase, my requirement is to change the Valid from field in IQ02.
    So I create GR in MIGO. So from here, I wanted to manipulate the value of 'VALID FROM' field (MKPF-DATAB) to do some offset or addition based on user input. So during creation, the value that will be saved in MKPF is the one manipulated. So when you go to MIGO, and see the Valid FROM field, it will now show your manipulated data.
    Any help/idea is very much appreciated...

  • Relation between BKPF-BELNR and Clearing document number

    Hi Friends,
    I need one to one relation between Posted document number BKPF-BELNR and
    the clearing document number generated for that (AUGBL).
    I could find BSEG is having the clearing document number in its one of the line item but i don't want to strain my code querying BSEG.
    is there any other way.
    If querying BSEG is the only option, appreciate if any one help me in giving an optimal query( if you have faced the similar requirement)
    Thanks in advance
    Simha

    Hi All,
    Thanks for your help.
    My problem is resolved. I queried BSAK (for my requirement)as suggested by many of you.
    Thanks.
    Simha
    Edited by: Simha on Nov 15, 2008 5:27 AM

  • Material opening and closing stock for a given day- Tables or FM

    Dear Friends
             i have to make a report  , related to Material opening and closing stock for a given day  , i check the T-Code- MB5B ,
    it is not giving correct date . is any functional module is available  ? . i checked some table like mbew , mard . it is also not giving correct requirement . Please help

    Hi
    Goto transaction MC.9, Give your Material and,Plant and the date which you need to know the closing stock. Do make sure that in the high and low values you are giving the same date there. I guess no such FM are available for this. You can refer the  [Link|https://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=15856]  for some help.
    Regards
    Vinodh
    Edited by: Vinodh_AN on Dec 15, 2010 9:19 AM
    Edited by: Vinodh_AN on Dec 15, 2010 9:25 AM

  • How to get period date of for a given month from a given date in mdx for SSRS report (mm/dd/yyyy)

    I have a situation,  where i need to write expression Period to date(PTD). i want to know how to get the period date. i want you to help in writing Period date or else is there any function to get period date for a given date(the  date is given
    from the parameter dynamically) in MDX for SSRS report
    ram

    Hi ram,
    Per my understanding that you want to get the period date based on the month selected and the given date, right?
    Could you please provide details information below to help us better understanding your requirements, thus we will be more effective to provide an solution:
    What is the format of the period date you want to get, is this date in the DB and you want to filter it based on the month and the given Date?
    Did the month and given date are two parameters in the report? if possible, could you please provide some sample data in the DB and also the snapshot of the report structure
    I assume you want to get the period date(mm/dd/yyy) between the select month(e.g:Feb) and the given date (10/1/2014) and you should get the date between(02/01/2014-10/1/2014).
    If so,and you also have two parameter "Month","EndDate"(EndDate is the given date), please reference to details information below:
    You can create an new parameter "BeginDate" (Date/Time) which is the begin date of the period, you can use the expression to get the value based on the value of the month and the year value from the given date,finally hide this parameter:
    Specify the available value:
    Label:=Parameters!Month.Value &"/01/"& DatePart("yyyy",Parameters!EndDate.Value)
    Value:=CDate(=Parameters!Month.Value &"/01/"& DatePart("yyyy",Parameters!EndDate.Value))
    Specify the default Value:
    Value:=CDate(=Parameters!Month.Value &"/01/"& DatePart("yyyy",Parameters!EndDate.Value))
    Add filter to the dataset as below:
    Preview you will get all the date in the given Period:
    If you still have any problem, please feel free to ask.
    Regards
    Vicky Liu

  • How to find the number of references created for a given  object ??

    How to find the number of references created for a given object in a big application environment.
    That means, if i give any object name (of my application) as input, then how can i find the[b] number of references created for that particular object ??

    Please do not post the same question multiple times.
    As for your original question, there is no direct way to do it.
    Especially not the way you phrased it,
    since objects don't have "names".
    Applications also don't have "names".
    They have classes and instances.
    Also, there are 2 related issues, and I'm not sure which one is the one you asked.
    #1. Finding the number of references to the same object.
    Eg.
    Map<String,String> a = new HashMap<String,String>();
    Map<String,String> b = new HashMap<String,String>();
    Map<String,String> c = a;In this case, there are only 2 objects.
    The first object has (at least) 2 references pointing to it.
    The second object has (at least) 1 reference pointing to it.
    (There may be more, if the HashMap library keeps
    references to these things, or if the HashMap object has
    some internal cyclic references...)
    If you're asking this, then it can't be done.
    It's an active research topic in universities
    and software research labs, called "alias analysis".
    Type it in google, and you'll see people are working hard
    and having little success so far.
    #2. Finding the number of instances created from a class.
    In this case, what you have to do is to add a counter to
    the constructor of the class. Every time an object is constructed,
    you increment the counter. Like this:
       class MyClass
           public static int counter = 0;
           public MyClass( )  { counter++; }
        // Then later in your program, you can do this:
        MyClass a = new MyClass();
        MyClass b = new MyClass();
        System.out.println(MyClass.counter); // It should show 2Note: you won't be able to do this to every class in the system.
    For every class you care about, you have to modify its constructor.
    Also: when an object is deleted, you won't always know it
    (and thus you won't always be able to decrement the counter).
    Finalizers cannot always work (read Joshua Bloch's
    "Effective Java" book if you don't believe me), but basically
    (1) finalizers will not always be called, and
    (2) finalizers can sometimes cause objects to not be deleted,
    and thus the JVM will run out of memory and crash

  • Err "Couldn't retrieve binding for the given channelId" in receiver SOAP CC

    Hello.
    We have increase the support package level of our XI 3.0 system from level 17 to 23. After this "upgrade" all interfaces using a receiver SOAP channel communication are getting the next error:
    SOAP: response message contains an error XIServer/UNKNOWN/ADAPTER.JAVA_EXCEPTION - com.sap.aii.af.service.cpa.impl.exception.CPALookupException: Couldnt retrieve binding for the given channelId: Binding:CID=8cb6335a548730ea9ca27aaa78034109; at com.sap.aii.af.service.cpa.impl.lookup.AbstractLookupManager.getBindingByChannelId(AbstractLookupManager.java:361) at com.sap.aii.af.mp.soap.web.MessageServlet.doPost(MessageServlet.java:421) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364) at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039) at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265) at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95) at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)
    We have done the next steps:
    - Run SXI_CACHE and start a complete cache refresh,
    - http://<Host>:<portNo.>/CPACache/refresh?mode=full
    - Restart J2EE server.
    The problem isn't solved.
    any idea?

    Probably you need to ask your BASIS team if they have done it or not.
    Secondly you can just see if something has been done under SWCV SAP BASIS --- http://sap.com/xi/XI/System --- Adapter Metadata, just by oping any adapter and then by looking at Properties or Hisotry from menu "Adapter Metadata". Here you can see the date under "Changed on", so if this matches with your upgrade date then something has been done. But this check will not help you know about the SP level. So better to ask with BASIS.

  • The company I work for has given me an iPhone, but I haven't been able to download any apps. I've created an apple account, it claimed that it had been verified, but everytime I go to download something, it verifies again and claims there's an error.

    The company I work for has given me an iPhone, but I haven't been able to download any apps. I've created an apple ID account, it claimed that it had been verified, but everytime I go to download something, it verifies again and claims there's an error. I've tried this now with 3 different emails, and the message reads: go to the iTunes support page. I've emailed Apple, and they were extremely unhelpful. I was given the most vague responses by Bidyut from the iTunes Store Customer service team. I would just like to be able to use this phone since I'm paying for it.

    It might be helpful if you told us exactly what the error was... If you don't give us specifics, the best you're going to get is vague responses.

  • How to discover all available font styles for a given family?

    I'm using InDesign CS3 and need to discover all of the available styles for any given font. I've found Application.Fonts.itemByName(), but this only returns a single font by the full name. Using ExtentScript in CS3 How can I ask for ALL font styles for any given font family (as displayed in the styles drop-down?)
    Thanks!

    hey,
    I was just searching the web trying to find why this piece of code:
    for (var i = 0; i <app.fonts.length;i++) {
         app.fonts[i]..... some other code
    take 4+ minutes to execute.
    app.fonts.everyItem().getElements(); did the trick, sweet!!
    However, I would like to ask you whether you know if there is some handout or some guide (possibly online page) for such advanced scripting...
    or how did you find this solution?
    thank you very much for this post, anyway
    regards
    jenda

Maybe you are looking for

  • Doubt in SPDD Transaction

    Hi All, When I click on the yellow traffic light corresponding to a paticular dictionary object in the SPDD Tcode, I am getting a screen where I need to accept proposal or Do not accept Proposal. I am confused as to what I should be doing here . Plea

  • There is a problem with Adobe Acrobat Reader etc etc error code 103?? Help Please

    Adobe Acrobat Reader issue as above - downloaded latest version again still issues. I am using an old Acer laptop with Windows XP which I only now use for printing

  • MiniDisplay to DVI not working

    I connected my projector to my MacBook Pro via Apple's MiniDisplay-to-DVI adapter. The screen flickers (turns blue for a sec) but the external display is not recognized. It tried 3 different adapters/cables combination, but no avail. My projector is

  • IMac crashing

    Hi guys. Today after streaming a video on a website (I was watching an episode of GoT), I ran a virus scan with Avira and my mac froze. This has happened 3-4 times tonight alone (although it's the first time I've experienced this problem). Safari has

  • Item User Status - Sales Order

    1- The cancellation item is created with reference to an existing line item on Sales Order. How is done? 2- I would like to see the original item have its status for both delivery and billing changed to completed and have it’s overall status complete