BSEG Line item Value

Sir's,
My table link is BKPF --> BSEG --> VBRP ---> VBRK ---> Konv.
i want to ftech  Feild DMBTR and WRBTR from BSEG table using key belnr, but here lots of entry avalble same belnr,
i want to fecth line BSEG-BUZEI line no 3.
please guide me how to fetch this and which key field for another table.
Thanks,
Bhavesh

Hello,
Hope you have the value for the fields BKPF-BUKRS, BKPF-BELNR, BKPF-GJAHR.
Then select the related entries from BSEG against BSEG-BUKRS, BSEG-BELNR, BSEG-GJAHR [& BSEG-BUZEI (if required)].
BKPF-XBLNR normally contains the billing document number VBRK-VBELN. Select accordingly from the VBRP table against the VBRK-VBELN.
VBRK-KNUMV contains the condition number which will be the input for the KONV table.
Just FYI, once you got the VBRK-VBELN, you can use the fucntion module -'RV_INVOICE_DOCUMENT_READ' to read other details (VBRP & KONV).
Regards,
Selva K.

Similar Messages

  • Line Item Value change in MIRO Transaction

    I have one  requirement i.e as follows.
    <b>Line Item Value change in MIRO Transaction</b>
    After getting the items in table control of  the miro screen of a particular order.
    I have to clicked on edit own condition of selected item.
    then it will show another screen ( create invoice document item - conditions)which have the all condtions details like
    Fra1 , frb1 , sd%  ,  Penalty % , gross price , frieght charges etc.
    In this screen first time it is showing line item as
    in the miro intial screen i.e. if u click po item
    10 it will show 10 only.
    after  updating fra1  value , i came back to the main screen at that time it is asking that select the any one of three.
    after selecting manual selection its fra1 was changed.
    once again if i go to the same line item by clicking
    the edit own condition(13 column if u select all information in textbox whixh is above tablecontrol right corner) it is showing line item as 1 in screen ( create invoice document item - conditions) which  should be line item as 10. ( here i took line item as 10)
    Please clarify this, why it is showing
    first time as  a original line item and
    after updating it is showing like
    for line item 10 -
    1
                   20 -
    2
                  100 -
    10
                  110 -
    11.

    "...it does not work..." is probably the worst description of a problem you can imagine. As an application developer you should know that. Do you use firebug to see what happens once it "does not work"? Any better hints?
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.apress.com/9781430235125
    https://apex.oracle.com/pls/apex/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • How to validate the line item values in OFR - quantity , unit price and UOM

    Hi All,
    Is there any possibility to validate the line items like quantity, unit price and UOM against the DB and stops those invoices at verifier (1 batch =10 invoices) level  if yes could you please let me know the process how to proceed further.
    due to this some the invoices are coming to OFR is with incorrect quantity, UOM and unit price different from PO lines information like quantity , UOM and unit price and those invoices are not validating from the DB and these are processed to EBS and it's effecting the GL and reporting.
    Regards,
    Anil

    Hi ,
    I did not get the exact requirement.Let me bit:
    In standard AP project lines validation will try to compare the quantity , unit price and UOM of line against the database for match which actually performed on export.
    So even if match fails batch will be exported.Now if you want to correct it before EBS,i think you can do it in the business process easily that you are consuming whether BPEL/BPM process.
    We have done this in several projects
    =========================
    But If you want that to be done from OFR side i think we need to code  UserExitPONumberValidate event to  compare the line items values against database.I need to test this also.

  • How to pass line item values in the table paramer of FM

    Hi all,
    When i will give the import of  the FM as VBELN"sales order number.
    I want to display all the line items for "PO Quantity in the out put of the FM.
    For this i thnk i have to pass the line item values in the table parameter of the FM.
    Can any body please tell me how to pass the values for the line items in the table parameter fo teh FM.
    Please give a example.
    Thanks

    Sub pLoopThroughPivotFields()
    Dim oItem As Excel.PivotItem
    Dim oField As Excel.PivotField
    Set oField = ThisWorkbook.Worksheets("Sheet1").PivotTables("Pivot Table name").PivotFields("field name")
    For Each oItem In oField.PivotItems
    oField.CurrentPage = oItem.Name
    'Put your copy code here
    DoEvents
    Next oItem
    End Sub
    Felipe Costa Gualberto - http://www.ambienteoffice.com.br

  • Transaction ABAV, ABUM, ABSO is impossible to modify line items values

    Hi experts,
    In transaction ABAV (similar problem is also in tr. ABUM, ABSO) is  impossible to modify line items values (foe example for depreciation area 50).  We tried to use standard (200) and non standard transation types (for example Z03), but system doesn´t allow to modify line item values. This problem apeared only in quality assurance system in each klient.
    The value for depreciation area 50 is changed and the line Items changes are confirmed with ENTER.
    When line Items are opened again, there is no changed valiue for depreciation area 50...
    Thank you for a answer

    Hi Bernhard,
    the notes:
    743667 - is not for my SAP release (we have SAP_APPL 600 patch 15 )
    977233 - The requested SAP Note is either in reworking or is released internally only
    758279 -  is not for my SAP release
    In the development and production environment can be changed, but not on the test system.

  • Gurus...Need help....extract data from BKPF header table and BSEG line item

    Gurus,
    I have to write the logic to fetch data from bkpf and bseg. Need help on how can i do that..
    I have to get bukrs  belnr gjahr ldgrp from BKPF for a given date and company code. For all these documents, then i have to get the line items from BSEG if the ldgrp is I1 or SPACE.
    If the ldgrp is not I1 or SPACE then i have to fetch the records from BSEG_ADD and then generate a ALV report with all the data including the data that was fetched from BKPF.
    So, it wil be a combined ALV report that displays header as well as LINE item data together...
    Can u please help me with the code...I am not sure how can everything go all together in one internal table....Becoz once its there in one table then only a ALV list can be generated.......
    Cheers:
    Sam

    hi Sam, this may be of some similar thing.
    Use this program, I got this prog from a source and we added a small conditional check in the program which checks document numbers in BSEG and also comapres in BKPF and sees if the output from BSEG falls under the posting data range specified in the initial selection.
    Now just so you know, this output is kinda messed up, so you will have to play with it in Excel to extract the document numbers, if that is what you want.
    ============================
    PROGRAM....... ZFI_BSEG_DOWNLOAD
    TITLE......... Download BSEG
    PROGRAM TYPE.. Download
    ======================================================================
    GENERAL DOCUMENTATION AND COMMENTS
    <...>
    ======================================================================
    ASSOCIATED PROGRAMS
    <Program>..... <Description>
    ======================================================================
    CHANGE HISTORY
    Date By Ticket Description
    REPORT zfi_bseg_download.
    TABLES: bseg, bkpf.
    TYPES: BEGIN OF ty_output,
    line(6000) TYPE c,
    END OF ty_output.
    TYPES: ty_tab_output TYPE TABLE OF ty_output,
    ty_tab_nametab TYPE TABLE OF x031l.
    CONSTANTS: c_delimiter(04) TYPE c VALUE '"%%"',
    c_records TYPE i VALUE 10000.
    SELECTION-SCREEN
    SELECT-OPTIONS: p_bukrs FOR bseg-bukrs,
    p_belnr FOR bseg-belnr,
    p_buzei FOR bseg-buzei,
    p_gjahr FOR bseg-gjahr,
    p_budat for bkpf-budat.
    SELECTION-SCREEN SKIP.
    PARAMETERS: p_file LIKE rlgrap-filename OBLIGATORY.
    SELECTION-SCREEN SKIP.
    PARAMETERS: p_append AS CHECKBOX DEFAULT 'X'.
    START-OF-SELECTION
    START-OF-SELECTION.
    PERFORM get_records.
    *& Form get_records
    FORM get_records.
    DATA: l_cursor TYPE cursor,
    lt_bseg TYPE TABLE OF bseg,
    ls_bseg LIKE LINE OF lt_bseg,
    lt_output TYPE ty_tab_output,
    ls_output LIKE LINE OF lt_output,
    lt_nametab TYPE ty_tab_nametab,
    ls_nametab LIKE LINE OF lt_nametab,
    l_field(30) TYPE c,
    l_output(50) TYPE c,
    l_date(10) TYPE c,
    l_len TYPE i.
    FIELD-SYMBOLS: <field>.
    IF p_append NE space.
    OPEN DATASET p_file FOR APPENDING IN TEXT MODE.
    ELSE.
    OPEN DATASET p_file FOR OUTPUT IN TEXT MODE.
    ENDIF.
    Retrieve BSEF fieldnames and data types
    PERFORM get_fields CHANGING lt_nametab.
    OPEN CURSOR l_cursor FOR
    SELECT * FROM bseg
    WHERE bukrs IN p_bukrs
    AND belnr IN p_belnr
    AND buzei IN p_buzei
    AND gjahr IN p_gjahr.
    Write out fieldnames
    IF p_append IS INITIAL.
    LOOP AT lt_nametab INTO ls_nametab.
    CONCATENATE ls_output ls_nametab-fieldname
    INTO ls_output SEPARATED BY c_delimiter.
    ENDLOOP.
    IF ls_output+0(4) = c_delimiter.
    SHIFT ls_output LEFT BY 4 PLACES.
    ENDIF.
    l_len = strlen( ls_output ).
    TRANSFER ls_output TO p_file LENGTH l_len.
    ENDIF.
    Process BSEG records
    DO.
    CLEAR lt_bseg.
    FETCH NEXT CURSOR l_cursor
    INTO TABLE lt_bseg
    PACKAGE SIZE c_records.
    IF sy-subrc 0.
    EXIT.
    ENDIF.
    LOOP AT lt_bseg INTO ls_bseg.
    SELECT single * FROM BKPF
    WHERE BUKRS = ls_bseg-BUKRS
    AND BELNR = ls_bseg-BELNR
    AND GJAHR = ls_bseg-GJAHR
    AND BUDAT in p_budat.
    if syst-subrc 0.
    continue.
    endif.
    CLEAR ls_output.
    Process individual fields of BSEG record
    LOOP AT lt_nametab INTO ls_nametab.
    CONCATENATE 'LS_BSEG-' ls_nametab-fieldname INTO l_field.
    ASSIGN (l_field) TO <field>.
    CLEAR l_output.
    Process by field data types
    CASE ls_nametab-exid.
    WHEN 'C' OR 'N' OR 'I'.
    Character, Numeric & Integer
    l_output = <field>.
    WHEN 'D'.
    Dates
    WRITE <field> TO l_date DD/MM/YYYY.
    l_output = l_date.
    WHEN 'P'.
    Packed decimals
    WRITE <field> TO l_output.
    WHEN OTHERS.
    MESSAGE a000(zs) WITH 'Data type error - ' ls_nametab-exid.
    ENDCASE.
    SHIFT l_output LEFT DELETING LEADING space.
    CONCATENATE ls_output l_output
    INTO ls_output SEPARATED BY c_delimiter.
    ENDLOOP.
    IF ls_output+0(4) = c_delimiter.
    SHIFT ls_output LEFT BY 4 PLACES.
    ENDIF.
    l_len = strlen( ls_output ).
    TRANSFER ls_output TO p_file LENGTH l_len.
    ENDLOOP.
    IF sy-subrc = 0.
    ENDIF.
    ENDDO.
    CLOSE CURSOR l_cursor.
    CLOSE DATASET p_file.
    ENDFORM. " get_records
    *& Form get_fields
    FORM get_fields CHANGING pt_nametab TYPE ty_tab_nametab.
    CALL FUNCTION 'RFC_GET_NAMETAB'
    EXPORTING
    tabname = 'BSEG'
    TABLES
    nametab = pt_nametab
    EXCEPTIONS
    table_not_active = 1
    OTHERS = 2.
    IF sy-subrc 0.
    ENDIF.
    ENDFORM. " get_fields
    hope this helps.
    cheers,
    Hema.

  • Iterating through bseg line items and picking the vendor line item

    Hello,
    I am creating a report in which i want to show the list of vendors (with their WHT's). The output will be based on selection of a certain period(range). I guess i have to first iterate through BKPF and get those documents that lie in the given range, then i 'll have to iterate through the selected documents in BSEG and pick out the vendor line items (KOART = 'S'). Will i be using GET for this..
    Is this the right way? secondly, if yes, can sumone show me how to iterate through BKPF and BSEG and get vendor details.?
    Thanks..
    SHehryar

    Hey,
    Instead of selecting data from BKPF-BSEG you could use BKPF-BSIK-BSAK.
    BSIK and BSAK have the same details as BSEG and are use by SAP for reporting purposes.
    Similarly for customer the table are BSID, BSAD and for GL the tables are BSIS and BSAS.
    BSIK will have the open items and BSAK will have the cleared items.
    -Kiran

  • How to avoid XVBPA line item values while creating sales order

    Hi Friends
    I am creating Sales order using function module IDOC_INPUT_ORDERS, for that I am passing partner details through segment E1EDKA1.If I pass the same partner details(Partner number, name1,name4,city,postel code) which is same like customer master,
    I can able to book the order and entries are coming only one time in VBPA table(Header Item level).But if I change any value for the particular partner in the Input(For example Name4, there is no value in customer master but I added through program).Now its creating an order but its showing the entered partner informations in header level.When I checked the same in line item level, its not picking the values from header, its picking the values from customer master for that particular partner.
    So this line item also coming in VBPA table, because its different from header data.
    Anyone guide me, how to avoid this problem while booking order through program.
    Thanks
    Gowrishankar

    I am updating Ship-To-Party value in segment E1EDKA1 and calling IDOC_INPUT_ORDERS function module to create the sales order.
    In this case for the particular partner there is no NAME4 value in KNA1, I am passing some value through this segment E1EDKA1.
    So its creating an order with this new addresses , so its generating new ADRNR in VBPA header level.Thats fine.But the same time
    its not copying the same value from header to line item.
    In Line item level again its picking the address details from KNA1 for the particular partner number.So its showing Blank value in NAME4 field of line items.Its creating and spllitting issue, while creating delivery.
    Thanks
    Gowrishankar

  • User Exit / BADI for  F-02 during SAVE to update BSEG Line Items.

    Hi Experts,
    I need a User Exit / BADI for Transaction code F-02 which triggers during save to update  BSEG-SGTXT with Vendor / Customer 
    name in the Tax Line Item.This is to update table BSEG .
    Thanks in Advance,
    Nithy

    Hi,
    Do it with the BTE 00001120 (tcode FIBF).
    I hope this helps you
    Regards,
    Eduardo
    PD: I forgot, check this link. It will tell you how to do it
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/207835fb-0a01-0010-34b4-fef1240ba9b7
    Edited by: Eduardo Hinojosa on Jul 15, 2009 6:38 PM

  • Urgent : FB60 line item value splitting

    All,
    My client needs to split the value of line item by the specified percentage.
    When clicking simulate/Post button
    1. The amount of the line item is split by the specified percentage.
    2. The tax amount is split by the specified percentage.
    Does anyone know which user-exit or method i could use to meet this expectation?
    Thanks a lot!
    suresh

    Hi,
        How r u and this is anil.  i doesnt understand the question.
      will  u please clearly mention what do u want so that i can help u
    u rs friend
    anilkumar

  • How to look up the first line item value based on several line items

    Hi Expert,
    I have one start routine in my transformation. But, I want to optimize it and only extract the first required line item. Can anyone help? thanks
    SELECT
    number
    item
    char3
    char4
    char5
    char6
    FROM
    /bi0/adsoa00
    t_dsoa into table t_itab
    FOR ALL ENTRIES IN
    source_package
    WHERE
    number EQ source_package-number
    AND item between '1' and '99'. -> question, if there are more than one value and I always want to fill the first item, could I use any ABAP syntax like exit or up to row 1 in the code.

    you can sort the table after the select and use delete adjacent duplicates to keep only the first or last item

  • Account assignment template (FB60) Line item Value date

    Hi Gurus,
    I have an issue regarding the value date on line item level on Account assignment template on FB60. When user activates an Account Assignment template, on each line item system populates the value date equal to the date of the template creation date and not the current date. I created the template with several GL accounts and before saving it I deleted the value date from the line items. Now I want to reuse the same template after a week, it shows the correct GL accounts but with the value date equl to the template creation date (last week date). Any suggestion please, how can I fix this.
    Regards,
    Ahmad

    In the IMG "Enter Global parameters" for your Company code change the status of the switch "Define Default value date" and then test.
    Thanks
    Ron

  • How to retrieve line Item values from an object using groovy

    def RevenueObject = nvl(ChildRevenue,0);
    println('revenueItems==='+revenueItems.size());
    while(RevenueObject.hasNext())
    def revenueLine = RevenueObject.next();
    revenueLine.setAttribute('Test_c', 'Hello');
    } Groovy Scripting
    Error : Getting null value for Revenue object
    Exception in expression "OpportunityEO" trigger "getRevenueItems" : groovy.lang.MissingMethodException : No signature of method: oracle.jbo.server.ViewRowSetIteratorImpl.size() is applicable for argument types: () values: [] Possible solutions: is(java.lang.Object), find(), use([Ljava.lang.Object;), with(groovy.lang.Closure), sleep(long), find(groovy.lang.Closure)
    at "OpportunityEO" trigger "getRevenueItems" line 7
    No signature of method: oracle.jbo.server.ViewRowSetIteratorImpl.size() is applicable for argument types: () values: [] Possible solutions: is(java.lang.Object), find(), use([Ljava.lang.Object;), with(groovy.lang.Closure), sleep(long), find(groovy.lang.Closure)

    Depending on the message the line number might be in one of the fields:
    MESSAGE_V1
    MESSAGE_V2
    MESSAGE_V3
    MESSAGE_V4
    Although if the message simply is not meant to include the line number, it won't be there. That's the way it is. If there is a user exit available, you may add your custom messages with the line number. In some user exits (in sales order for sure) there is a special variable (flag), which is set when the BAPI runs the transaction.

  • Addition of line item values in KP06

    Friends,
    We are using LSMW to load cost center planning for KP06. My user wants to know if he can give same cost center and cost element combination twice in the excel file with different values and will LSMW totals up the values. Usually it will overwrite with the latest entry of the cost center and cost element combination.
    Is there a solution?
    Thanks in advance

    Hi,
    I think if you go thru excel upload instead of LSMW, you should be able to upload 2lines i.e. same combination of coste center element with different amount and should aggregrate the figure.
    hope this helps.
    Assign points if useful.
    Regards,

  • F8 Pro Forma for free goods - value in F8 line item to equal VPRS cost

    Hello,
    I would like to configure the following scenario:
    FD sales order created with KLN item category
      LF delivery created and processed
      F2 billing invoice created (no charge)
      F8 pro forma invoice created (line item value to equal line item cost)
    I have already configured this to work properly for regular sales orders and the values copy from the order as specified in the VTFL copy control settings, but I can't figure out how to get the above situation working.  Any help would be greatly appreciated.
    Thanks,
    Andy

    Check OSS Note 33258 - Processing free-of-charge items is of help to your scenario.
    Regards,

Maybe you are looking for