‎2006 Oct 03 9:18 AM
Hi All,
I am using the fm RV_PRICE_PRINT_HEAD to fetch condition records. When I run this fm in SE37 for a particular document(vbeln) number, the values are fetched correctly into the internal tables TKOMV and TKOMVD.
The same fm does not fetch values when I run for second time for the same document(vbeln). This means :
1) I will go to SE37, type RV_PRICE_PRINT_HEAD, supply the export parameters in COMM_HEAD_I, execute it and obtain the condition records (Till this time absolutely fine)
2) Now, press Back (F3), Let the export parameters in "COMM_HEAD_I" will remain same. Just press Execute (F8). Then condition values are not fetched.
Could any body help in this regard...
Thanks
Thimmappa Hegde
‎2006 Oct 03 9:21 AM
hi thimmappa,
try saving the values in test data directory and for the next test, access it from test data directory.
Regards,
Preema
‎2006 Oct 03 9:39 AM
Hi
Welcome to SDN.
Use FM: RV_KONV_SELECT for retreiving condition details.
Pass 'X' for GENERAL_READ.
Here if you pass space it will work first time and wont work for the later immediate executions, whereas if you pass 'X' it will work for later executions too.
Please check the same.
Kind Regards
Eswar
‎2006 Oct 03 9:56 AM
Hi,
To be more specific,
I want to take out only the values of internal table "tkomvd" to obtain all header conditions for a document. That is why in I am using the fm "RV_PRICE_PRINT_HEAD" in my report program. This fm will fetch correct values when I run the report for first time. Where as the same fm does not fetch values when I run the same report with the same selection screen values.
But when I run the report again by typing the transaction SE38 and same selection screen values, the function module fetch the values in the internal table tkomvd.
Regards
Thimmappa
‎2006 Oct 03 10:02 AM
Hi
I have given you the other alternative bcoz there is a limitation while calling this FM: RV_PRICE_PRINT_HEAD.
If you see the comments and code of Include: LV61AA11, you can understand the problem.
<b>* mechanism to controll which conditions are already part of table TKOMV
Every time a pricing result is read from database the key is put into
TABGL. Also TABGL is updated if we've lines in TKOMV assigned to a
special key but entry in TABGL (case 2).
Originally TABGL was established to handle following pathological
case: condition successfully read from DB -> entry in TABGL. Then all
read conditions where deleted during processing (e.g. manually
deletion etc.). If we run into this routine again no records should
be redetermined from DB...</b>
read table tabgl with table key knumv = komk-knumv
transporting no fields.
Case 1:
conditions have been already read because there is a fitting entry in
TABGL. Exit immediately if caller doesn't want to force DB access.
if sy-subrc eq 0. ---><b> First time SY-SUBRC NE 0 so no problem</b>
if generell_lesen ne 'X'. <b>--> Later runs SY-SUBRC eq 0 and generell_lesen value is SPACE</b>.
exit.
endif.
else.Hope this clarifies your doubt now.
Kind Regards
Eswar
‎2006 Nov 29 4:45 PM
Use this function module to initialize the price print buffer before calling RV_PRICE_PRINT_HEAD.
CALL FUNCTION 'RV_PRICE_PRINT_GET_BUFFER'
EXPORTING
i_print_from_buffer = 'A'.
Regards
Volker
‎2011 Feb 14 4:00 PM
Hi,
I had the same issue. The problem, as said before more or less, is that once you read the records from BBDD you can't read them from again on the same session. You just gotta read them from buffer instead using this FM:
RV_PRICE_PRINT_HEAD_BUFFERThough Volker's way works using SE37 to execute the FM's, I couln't make it work on an Abap program.
I think this could be marked as "Answered".
Regards.
Edited by: John Smith on Feb 14, 2011 5:24 PM