Reading VBAK, VBAP and VBFA table during a process

Hi friends,
I have an execution DUMP in a Z report, so I would be very thankful if you can give me your expert opinion.
I have a Z report which collects some information into an internal table. After that, I need to go over each record and read VABK, VBAP and VBFA tables and compute some quantities. It is not possible to do this in another way because I need to get some information first.
Of course, each table is being read in the corresponding sequence (1st VBAK, then VBAP and then VBFA and at the end LIPS table) using the key or part of it. The problem is that if the user wants to execute the report online, it will be finish in a dump at this routine.
My question is if it is possible to skip the dump getting VBAK and VBAP tables in memory and instead of reading directly, read them from memory. Notice that if I do this I need to put almost the entire table into memory. So, do you think that I will earn time or it will be the same or worse?
Thanks in advance & kind regards,
MMP.

Hi everybody!
We applied the note but it doesn't help. We realized that we have a problem with records quantity, so the key user is going to analyze which other parameter could be helpful.
Thank everybody very much!
Kind regards.

Similar Messages

  • RELATIONSHIP BETWEEN VBAK/VBAP AND V46R_HEAD TABLE

    Hi,
    can you please tell me that is there any relationship between VBAK and  V46R_HEAD TABLE or VBAP and V46R_HEAD TABLE table.
    where V46R_HEAD TABLE is a structure and i want to display sme fields of vbak and some of V46R_HEAD  and some of VBAP.
    I got the relation between VBAK and VBAP ie. the field VBELN. But i am not getting the relation with V46R_HEAD sturcture.
    Please help me to solve this problem.

    Hi,
    the field vbeln is present in V46R_HEAD also.
    Please check it!!  Please do a CTR+F and look for VBELN.
    Regards.

  • Sales Document from VBAK ,VBAP and VEDA

    Hi ,
    I need to fetch the Sales Document from VBAK and VBAP and VEDA with the contract sign date for sales document line item .
    Contract sign date is in selection screen as select options.
    Please let me know how to fetch the sales Document per line item from these 3 tables considering that A sales document could have many line items and each can have a different sign date.
    Thanks
    Sachin

    Hi,
    The link between all the tables VBAK, VBAP and VEDA is VBELN i.e sales document number.
    However, while fetching from VBAP and VEDA you would need to consider POSNR as well.
    As your ABAPer to code the logic using 'for all entries' method.
    Regards,
    Amit
    Edited by: Amit Iyer on Jun 23, 2011 12:28 PM

  • Read data from STATIC internal table during round trip in DO_PREPARE_OUTPUT

    Dear Gurus
    I have a requirement where I need to select some data from the database table BUT_HIER_NODE_D.
    After SELECTING this data to an internal table (say ITAB), I am displaying this data in a table view. I was able to achive this functionality by putting some code in the DO_PREPARE_OUTPUT method.
    Now according to my requirement, after the above data has been displayed on the screen initially, the user will click on any row. After clicking on a particular row, I need to capture the document number on that particular row and need to display all its child document numbers in a separate table. I am able to achive this functionality also.
    Initially I am not sure of how to READ the same internal table (ITAB) again and again by avoiding the SELECT query upon each round trip (between CRM and Web).
    After some research, I understand that I might have to use STATIC internal table to store the data during the
    initial SELECT. This way, upon each round trip, I can READ the data from the same internal table.
    My question: But now, when I tried to create a STATIC internal table in DO_PREPARE_OUTPUT, it is not allowing me to declare this table because DO_PREPARE_OUTPUT method is a INSTANCE method.
    I didn't find any STATIC methods in the IMPL class of the view.
    I would really appreciate if somebody can help me on how to proceed further.
    Thanks
    Raj

    Hi Bharathy / Adil / Masood
    Thank you very much for the replies. I declared a static method inside the IMPL class and I was calling this method inside the DO_PREPARE_OUTPUT method. Looks like it is working fine for me...will comeback if I had any further issues.
    Masood
    As per my requirement, I need to Select the data into the internal table during the very first step, then I need to continuosly read the data from this internal table upon every round trip. So I am not sure if I would be able to use the method DO_INIT_CONTEXT. Because I need a method which will trigger upon each round trip and will also hold the data of this internal table. So right now, the only option for me is DO_PREPARE_OUTPUT method.
    Plz let me know if am doing in the right way.
    Thanks
    Raj

  • Co products and by products during production process

    hi,
    I have a production scenario where in both co products as well
    by products exists during production process.
    We can maintain co products by choosing the indicator in material master and in BOM but how should i maintain the by products?
    And also, co products and by products produced will undergo further production process with different operations, in this scenario how I can include these operations and products in my production planning? and how the costs are calculated?
    Can any one please help in this regard.
    Thanks and Regards,
    Pavan

    Hi
    For Co-product just by choosing the indicator in material master and in BOM.
    So when ever u confirm the production order co- product GR done automatically through 101 movement type.
    For By-product
    1) u have to enter the byproduct code in the BOM with -ve sign if ur by-product is fixed qty.
    2) If ur by-product is varying qty then u have to post the by product qty through MIGO 531 movement type against the production order.

  • Query with tables VEPVG, VBAK, VBAP AND KONV

    hi all,
    I have a requirement, that is Open Sale Orders which is having Special Discount. I am trying to write a Query, But KONV table is not coming into the joins. my execution plans is bellow
    VEPVG  -->  VBAK         vbak-knumv = konv-knumv and konv-kschl = Special Discount
                        VBAP
    Please explain me, how to design the query with conditions.
    Thanks & Regards,
    Srinivas

    Hi,
    Have you referred this help document.
    http://help.sap.com/printdocu/core/Print46c/EN/data/pdf/BCSRVQUE/BCSRVQUE.pdf
    Regards - Shree

  • How to change values in VBAP and VBUP tables?

    All,
    I have a sales order where I need to change the values in 2 fields.
    VBAP-ABGRU  and VBUP-UVP03
    I have found the BAPI_SALESORDER_CHANGE but not sure it will let me change the VBUP field.
    Any suggestions would be nice.
    Thanks.
    Scott

    SEE THIS:
    http://www.sapabapsdmm.com/sap-abap-bapi-programming.htm
    http://abap.wikiprog.com/wiki/BAPI_SALESORDER_CHANGE

  • Problem with item and/or data during page-processing-PS/SQL

    Greetings!
    On my page I have a custom report (from 2 tables) and a small form-field, that adds and edits data in the report. After generating the form with the wizard I added an extra item, to store the id from one of the tables from the report data.
    Now, on submit a calculation should take place, that updates data according user input with a procedure in Page-Prosseses:
    declare a number;
    begin
    case :PLATZ
    when 1 then a:=100;
    when 2 then a:= 50;
    else a:=25;
    end case;
    update TBL_MITGLIEDER set TURNIERPUNKTE = TURNIERPUNKTE + a
    where ID_MITGL = :P14_ID_MITGL;
    end;
    :PLATZ is user selected (1,2,3), :P14_ID_MITGL stores the reference to TBL_MITGLIEDER (and shows the change, when I select another record)
    As I understand, that process should also run, when I submit a chance, but nothing happens then.
    But when I try to save a new record (which worked without any problems before adding that process), I get this error message:
    ORA-06550: line 1, column 64: PL/SQL: ORA-00957: duplicate column name ORA-06550: line 1, column 7: PL/SQL: SQL Statement ignored
         Error      Unable to process row of table TBL_TURNIERSIEGER.
    Then, when I go back into the app-builder and try to run the page again, I get this message:
    ORA-01403: no data found
         Error      Unable to fetch row.
    I am not sure, if you guys have all the information you need, to know whats going on. Maybe this has to do with session-id and the whay, items are updated. I hope you can help me.
    Thanks, best regards,
    tobi

    First can you please post all log file errors
    >> I can't really give you a solution or specific recommendation since I did not saw this error yet myself, but on your own risk you can try:
    1. You may try to just register 'dts.dll' using regsvr32.exe, but this error may indicate a bigger problem with setup.
    If you are running SQL Server 64bit then try running this at the command prompt: %windir%\syswow64\regsvr32 "%ProgramFiles(x86)%\Microsoft SQL Server\90\dts\binn\dts.dll"
    2. You can try reinstall from start (In this case you have to make sure that you un-install all)
    [Personal Site] [Blog] [Facebook]

  • How to link vbak and vbrp tables

    hi friends,
    i want to display lips table values based on lips-vbeln = it_vbrp-vgbel
    here i want a filed thru which i can link vbrp-<fieldname> to vbak/vbap-vbeln
    so that i can get values into it_vbrp.
    here is equation.
      it_vbrp =>   vbak-vbeln = vbrp-< ? >
      it_lips =>   vbrp-vgbel = lips-vbeln.
    thanks in advance for your co operation
    regards,
    Anil kumar p

    u can reach vbrp vbeln from vbrk vbeln
    and to get vbrk vbeln from vbak vbeln
    goto table VBFA
    1.
    GIVE VBFA-VBELV = VBAK-VBELN
    and
    VBFA-VBTYP_N = 'M'.   "INVOICE  IN CAPS
    AND F8
    THIS WILL GIVE U VBRK-VBELN .
    NOW U CAN USE VBRK-VBELN TO FETCH VBRP
    SIMILARLY
    2.
    IF U WANT TO PICK DELIVERY NUMBER FROM LIKP USING VBAK-VBELN.
    SAME PPROCEDURE
    PUT VBFA -VBELV = VBAK-VBELN
          VBFA-VBTYP_N = ' J'.   "IN CAPS 
    WILL FETCH U LIKP-VBELN "DELIVERY
    USE THIS TO GET LIPS ENTRIES
    hope this helps
    regards,
    vijay

  • Contract Sign Date from VBAK and VBAP and VEDA.

    Hi ,
    I need to fetch the Sales Document from VBAK and VBAP and VEDA with the contract sign date for sales document line item .
    Contract sign date is in selection screen as select options.
    Please let me know how to fetch the sales Document per line item from these 3 tables considering that A sales document could have many line items and each can have a different sign date.
    Thanks
    Sachin

    Hi,
    The link between all the tables VBAK, VBAP and VEDA is VBELN i.e sales document number.
    However, while fetching from VBAP and VEDA you would need to consider POSNR as well.
    As your ABAPer to code the logic using 'for all entries' method.
    Regards,
    Amit
    Edited by: Amit Iyer on Jun 23, 2011 12:28 PM

  • Vbfa and vbrk tables invoice issue

    Hi friends,
    Here I am facing one problem in one of my report in that i am first match delivery no with likp and vbfa table then i am take vbeln from vbfa table
    like that
    SELECT SINGLE *
             FROM vbfa WHERE vbelv = likp-vbeln  AND vbtyp_n = 'M'
            AND vbtyp_v = 'J' AND rfmng NE 0 AND rfwrt NE 0.
        itab2-invno = vbfa-vbeln.
    Then I go in vbrk table like
    IF sy-subrc = 0.
    SELECT SINGLE * FROM vbrk WHERE vbeln = itab2-invno AND   fksto <> 'X'.                                             
           itab2-invdt = vbrk-fkdat .
    endif.
    so here its take's cancelled invoice also so I add one condition for from vbrk and add it here " fksto  'X'  ".
    so my problem is that I  want to filter vbeln which have  fksto <> 'X'.
    So how can I edit my code and take vbeln fvbrk.
    see this code and modify it if u hv any idea.
    THnaks,
    Prashant.

    Check how different was your code especially in the extraction parameters compared to the one in the above.
    When you need FKSTO NE 'X' i.e Non-Cancelled document, ofcourse you can change the condition and use accordingly.
    Eg: I dont have any syntax errors with the following code:
    PARAMETERS: p_vbelv TYPE vbeln_vl.
    DATA: l_vbeln TYPE vbeln,
          l_fkdat TYPE fkdat.
    SELECT SINGLE a~vbeln b~fkdat INTO (l_vbeln, l_fkdat)
           FROM vbfa AS a
           INNER JOIN vbrk AS b
           ON a~vbeln = b~vbeln
           WHERE a~vbelv = p_vbelv "likp-vblen
           AND   a~vbtyp_n = 'M'
           AND   a~vbtyp_v = 'J'
           AND   a~rfmng NE 0
           AND   a~rfwrt NE 0
           AND   b~fksto NE 'X'.
    IF sy-subrc EQ 0.
      WRITE:/ 'Billing Document:', l_vbeln,
            / 'Date:', l_fkdat.
    ENDIF.

  • Link between vbap and vbrk

    hi folks
    whatt's the link between vbap and vbrk table.
    gaurav

    Hi Gaurav
    VBAP is Sales document item detail table and VBRK is Billing header data table.
    VBRK is linked to VBRP by VBELN (i.e. VBAP-VBELN = VBRK-VBELN).
    VBRP is linked to LIPS(SD document: Delivery: Item data)by
    VBRP-VGBEL = LIPS-VBELN.
    VBRP-VGPOS = LIPS-POSNR.
    And LIPS is linked to VBAP by
    LIPS-VGBEL = VBAP-VBELN.
    LIPS-VGPOS =VBAP-POSNR.
    the flow of the SD tables is like after creation of the sales document the header details of the document is filled in VBAK.THe item details of the sales document is stored in VBAP.After creation of the delivery the delivery documnet number is updated in the LIPS table and than if the INVOICE for the particular delivery is done than the BILLING document is generated the details of which can be looked in VBRK.

  • Read data from VBFA table

    hi gurus;
         I want to read data from VBFA table nd pass its VBELV to VBAK table to get VBAK values, Iam using FM SD_DOCUMENT_FLOW_GET ND RV_ORDER_FLOW_INFORMATION, BUT i am not getting desire result. WHEN iam using FM SD_DOCUMENT_FLOW_GET, it will give result only for last row of data, its not considering body part, so tell me how to used this FM properly.
    data: l_docflow type tdt_docflow.
    data lw_docflow type tds_docflow OCCURS 1 WITH HEADER LINE .
    SELECT VBELN KNUMV BUKRS KUNRG REGIO NETWR FKSTO FKDAT FKART  INTO CORRESPONDING FIELDS OF TABLE T_VBRK
          FROM VBRK WHERE BUKRS IN P_BUKRS AND FKDAT IN P_FKDAT AND VKORG IN P_VKORG AND REGIO = '07'
        ORDER BY VBELN KNUMV.
      SORT T_VBRK BY vbeln.
      LOOP AT T_VBRK.
        IF  T_VBRK-FKART = 'F2' OR T_VBRK-FKART = 'YF2' OR T_VBRK-FKART = 'ZF2' OR
            T_VBRK-FKART = 'ZG2' OR T_VBRK-FKART = 'ZL2' OR T_VBRK-FKART = 'YG2' OR T_VBRK-FKART = 'YL2' .
          IF T_VBRK-FKSTO IS INITIAL.
        CALL FUNCTION 'SD_DOCUMENT_FLOW_GET'
      EXPORTING
        IV_DOCNUM              = T_VBRK-vbelN
      IV_ITEMNUM             =
      IV_ALL_ITEMS           =
      IV_SELF_IF_EMPTY       = ' '
    IMPORTING
       ET_DOCFLOW             = l_docflow
    LOOP AT l_docflow INTO lw_docflow   .
      IF  lw_docflow-vbtyp_V = 'C' OR lw_docflow-vbtyp_V = 'K' OR lw_docflow-vbtyp_V = 'L' OR lw_docflow-vbtyp_V = 'E'.
    T_VBFA-vbelv = lW_docflow-vbelv.
    T_VBFA-VBELN = lW_docflow-VBELN.
    T_VBFA-vbtyp_V = lW_docflow-vbtyp_V.
    APPEND t_vbfa.
    endif.
    endloop.
    ENDIF.
    endloop.
    loop at t_vbfa.
      if t_vbfa-vbtyp_V = 'C' OR t_vbfa-vbtyp_V = 'K' OR t_vbfa-vbtyp_V = 'L' OR t_vbfa-vbtyp_V = 'E' .
    SELECT VBELN BSTNK BSTDK FROM VBAK INTO CORRESPONDING FIELDS OF TABLE T_VBAK FOR ALL ENTRIES IN T_VBFA
              WHERE VBELN = T_VBFA-VBELV .
    endif.
      ENDLOOP.

    Hello
    Use the below function module
    RV_ORDER_FLOW_INFORMATION pass the type as C and pass the number.You will get all the flow.
    SELECT VBELN KNUMV BUKRS KUNRG REGIO NETWR FKSTO FKDAT FKART  INTO CORRESPONDING FIELDS OF TABLE T_VBRK  FROM VBRK WHERE BUKRS IN P_BUKRS AND FKDAT IN P_FKDAT AND VKORG IN P_VKORG AND REGIO = '07'
        ORDER BY VBELN KNUMV.
    SORT T_VBRK BY vbeln.
      LOOP AT T_VBRK.
        IF  T_VBRK-FKART = 'F2' OR T_VBRK-FKART = 'YF2' OR T_VBRK-FKART = 'ZF2' OR
            T_VBRK-FKART = 'ZG2' OR T_VBRK-FKART = 'ZL2' OR T_VBRK-FKART = 'YG2' OR T_VBRK-FKART = 'YL2' .
          IF T_VBRK-FKSTO IS INITIAL.
    i_vbco6-vbeln = t_vbrk-vbeln.
    CALL FUNCTION 'RV_ORDER_FLOW_INFORMATION'
      EXPORTING
      AUFBEREITUNG        = '2'
      BELEGTYP            = ' '
        COMWA               = i_vbco6
      NACHFOLGER          = 'X'
      N_STUFEN            = '50'
      VORGAENGER          = 'X'
      V_STUFEN            = '50'
    IMPORTING
      BELEGTYP_BACK       =
      TABLES
        VBFA_TAB            = t_vbfa
    EXCEPTIONS
       NO_VBFA             = 1
       NO_VBUK_FOUND       = 2
       OTHERS              = 3
    endif.
    ENDIF.
    endloop.
    loop at t_vbfa.
      if t_vbfa-vbtyp_V = 'C' OR t_vbfa-vbtyp_V = 'K' OR t_vbfa-vbtyp_V = 'L' OR t_vbfa-vbtyp_V = 'E' .
    *clear t_vbfa.
    SELECT VBELN BSTNK BSTDK FROM VBAK INTO CORRESPONDING FIELDS OF TABLE T_VBAK FOR ALL ENTRIES IN T_VBFA WHERE VBELN = T_VBFA-VBELV .
    endif.
      ENDLOOP.
    In case of any more help is required do let me know
    Regards,
    Nabheet Madan

  • Read Only and HTML Table Cell Attributes

    Hi Guys,
    I believe i have come accross a bug - i'm been working on a form that can be filled out and printed - when going into print for sake of the output looking nice i set the form element to read-only.
    As soon as an element such as a drop down box, text feild, text area, etc which display as "[selected value]" in plain text in read only mode, are changed to the read only mode apex seem to ignore the html table cell attributes.
    For example i have a id number in the top left and then a version number in the top right. Both use a text feild; the top left uses 'width="100%"' for it's HTML Table Cell Attribute to push the right cell to the right. and the right cell has 'align="right"'. Now this works fine when read only is off... but as soon as read only is on, both the width and the alignment are totally ignored, and i can't find any sign of them in the code.
    Because this is for printing; using the "disable" on the form element instead of "read only" function, isn't appropriate as disabled will make the elements faded and hard to read when printed, and keeping the elements as is will allow the user to edit information on the print screen - which is not appropriate.
    Is this a bug? Will it be fixed soon? Is there any work around?
    Cheers,
    Alex

    Use the "Read Only Element Table Cell(s) Attributes" in the Read Only region of the Item edit form.
    Scott

  • How to update the VBFA table without entries in VBRK and VBRP tables

    Hello,
    I have a requirement , where the sales order , delivery happens in one SAP system say X system and billing document wil happens in other sap system say Y.
    Now in this particular case , if the user want to know the billing document number in X system. what would be the solution.
    Is there any possibility to update the VBFA table with invoice number of Y system (without updating the VBRK and VBRP tables).
    User want to see the billing doc number from sales order in the form of document flow in X system
    Thanks in advance
    Pradeep

    Hii
    Without updating VBRK/VBRP table and updating VBFA is not possible, So you have to play with work arround to create one Z TABLE, so whenever system Y will create billing document with the reference of System X data you have to update Ztable with Invoice number created in System Y, The primary key will be in Z TABLE is Delivery document number to track one to one with billing doc.
    Thanks and Regards
    Shambhu Sarkar

Maybe you are looking for