Amount is different in VBRK and VBRP
For currency USD, why the amount posted to NETWR in VBRK is correct and amount posted to NETWR in VBRP is with 2 decimal places. Example, total of 226.472,0000 USD but posted as 22.647.200,00.
Hi,
1> Please check the decimal notation settings under default tab for the user under transaction SU3.
2> If your condition rate currency is different than document currency, exchange rate will be applied during the condition value calculation. Exch rate * TCURF-FFACT = VBRK-KURRF (In case of billing doc). So plz check the TCURF table FFACT value whether is 1 or 100. It should be 100 for no decimal currencies (Such as JPY, TWD)
Regards,
P Gomatheeswaran
Similar Messages
-
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
PradeepHii
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 -
Select from vbak, vbrk and vbrp
Hi experts,
In one of my programs i hve to select the data from tables <b>VBAK, VBRK</b> and <b>VBRP.</b>
The requirement is:
<b>parameters: p_matnr like vbrp-matnr,
p_charg like vbrp-charg.
select-options: audat for vbak-audat.</b>
upon entering the values on selection-screen,
i need to select <b>FKDAT, FKIMG</b> from tables VBRK and VBRP respectively.
Please help me in writing the selection.
Any help is appreciated.
Thanks a lot.Hi,
Hope this will give u some idea..
select avbeln bfkdat into table itab from vbak as a inner join
vbrk as b on
avbeln = bvbeln where
a~audat in s_audat.
if not itab[] is initial.
select fkimg into corresponding fields of table itab_final
from vbrp for all entries in itab
where vbeln = itab-vbeln and
matnr = p_matnr and
charg = p_charg.
endif.
Cheer,
Vikram
Pls reward fopr helpful replies!! -
Amount posted different for Invoice and Credit memo
Hi Experts,
The user has reversed only one line item of an invoice entry (RE), which was processed back in 2009. The invoice entry was processed with two Gl Accounts( Transit Comm.match and Com.Inv.GIT d.d) with amount allocated as 576.35 (5399.2 and -4822.85)with an input tax of 22%.But in the reversal entry the amount allocated to these account are different(-5851.62 and 5275.27), thought the total match to -576.35. Interesting thing is this entry was posted in a foreign currency (EUR) wherein the Local Currency values which is in PLN is same for both invoice and reversal entries. Exchange rate for both the entries are 4.20430.
Please let me know your thoughts..Hi Ravi,
Here by reversal I meant the credit memo processed against invoice. -
Find total quantity from vbrk and vbrp
Hi frinds doing a report to display sales in 3 month 6 month snd past 12 months but didnt get logic to find out
here is my code
SELECT vbrk~vbeln
vbrk~fkdat
vbrp~fkimg
vbrp~matnr
vbrp~werks
INTO CORRESPONDING FIELDS OF TABLE iquan
FROM vbrk INNER JOIN
vbrp ON vbrkvbeln = vbrpvbeln
WHERE vbrk~fkdat >= w_date " w_date =past 12month
AND vbrp~matnr IN s_matnr " = imatr-matnr
AND vbrp~werks IN s_werks. " = imatr-werks
**now how to find the total sales quantity
i tried in this way its not working "iquan is same as iquan1 with added added sales field.
LOOP AT iquan.
READ TABLE iquan1 WITH KEY matnr = iquan-matnr
werks = iquan-werks.
IF sy-subrc = 0.
IF w_date3 LE iquan-fkdat.
w_tot3 = w_tot3 + iquan-fkimg.
ELSEIF
w_date2 LE iquan-fkdat.
w_tot2 = w_tot2 + iquan-fkimg.
ELSEIF
w_date1 LE iquan-fkdat.
w_tot1 = w_tot1 + iquan-fkimg.
ENDIF.
iquan-sale12 = w_tot1.
iquan-sale6 = w_tot2.
iquan-sale3 = w_tot3.
ENDIF.
MODIFY iquan.
ENDLOOP.
*PLs pls pls pls help me with code or suggestion
0ut put shpuld be
material plant sales 3months 6months 12 months
01 0040 130 00.00 120
regardsHi Farukh,
Try this code. This will definitely help you.
<b>REPORT ZTEST .</b>
<b>TABLES:</b> VBRK,
VBRP.
<b>SELECT-OPTIONS :</b>
s_matnr FOR VBRP-MATNR,
S_WERKS FOR VBRP-WERKS.
<b>DATA:</b> BEGIN OF STRUCT,
matnr LIKE vbrp-matnr,
werks LIKE vbrp-werks,
vbeln LIKE vbrk-vbeln,
fkdat LIKE vbrk-fkdat,
fkimg LIKE vbrp-fkimg,
sale6 LIKE vbrp-fkimg,
sale12 LIKE vbrp-fkimg,
sale3 LIKE vbrp-fkimg,
END OF STRUCT,
IQUAN LIKE TABLE OF STRUCT WITH HEADER LINE,
IQUAN1 LIKE TABLE OF IQUAN WITH HEADER LINE.
<b>DATA:</b> w_tot1 LIKE iquan-fkimg,
w_tot2 LIKE iquan-fkimg,
w_tot3 LIKE iquan-fkimg.
<b>DATA:</b> W_DATE1 LIKE SY-DATUM,
W_DATE2 LIKE SY-DATUM,
W_DATE3 LIKE SY-DATUM.
**assign dates
W_DATE1 = '20051107' .
W_DATE2 = '20060507' .
W_DATE3 = '20060807'.
<b>SELECT</b> vbrk~vbeln
vbrk~fkdat
vbrp~fkimg
vbrp~matnr
vbrp~werks
INTO CORRESPONDING FIELDS OF TABLE iquan
FROM vbrk INNER JOIN
vbrp ON vbrkvbeln = vbrpvbeln
WHERE vbrk~fkdat >= w_date1 " w_date1 =past 12month
AND vbrp~matnr IN s_matnr " = imatr-matnr
AND vbrp~werks IN s_werks. " = imatr-werks
<b>SORT</b> IQUAN BY MATNR WERKS.
IQUAN1[] = IQUAN[].
<b>LOOP AT iquan.</b>
READ TABLE iquan1 WITH KEY matnr = iquan-matnr
werks = iquan-werks.
IF sy-subrc = 0.
"w_date3 : PAST 3 MONTHS
IF w_date3 LE iquan-fkdat.
w_tot3 = w_tot3 + iquan-fkimg.
ELSEIF
"w_date2 : PAST 6 MONTHS
w_date2 LE iquan-fkdat.
w_tot2 = w_tot2 + iquan-fkimg.
ELSEIF
"w_date1 : PAST 12 MONTHS
w_date1 LE iquan-fkdat.
w_tot1 = w_tot1 + iquan-fkimg.
ENDIF.
iquan-SALE12 = w_tot1.
iquan-sale6 = w_tot2.
iquan-Sale3 = w_tot3.
ENDIF.
<b> MODIFY iquan.</b>
ENDLOOP.
<b>LOOP AT IQUAN.</b>
STRUCT = IQUAN.
<b>AT END OF WERKS.</b>
<b>WRITE:/</b>
STRUCT-matnr, ' ',
STRUCT-werks, ' ',
STRUCT-sale6, ' ',
STRUCT-sale12, ' ',
STRUCT-sale3.
ENDAT.
<b>ENDLOOP.</b>
<b>The output is:</b>
9767A002AA 3201 10,255.000 0.000 0.000
C9138-60001 3201 10,255.000 2,000.000 0.000
C9361-30001 3201 10,255.000 2,004.000 0.000
Hope this will solve your purpose.
Regards,
Pragya -
Vbrk and Vbrp tables performance problem
Hi all,
The below query is taking lot of time in QAS i need to decrease the time without affecting the logic.....
SELECT vbrk~kunag
vbkd~bstkd
vbkd~bstdk
INTO TABLE c_tab_po FROM vbrp
INNER JOIN vbrk ON vbrkmandt = vbrpmandt AND vbrk~vbeln =
vbrp~vbeln
INNER JOIN vbkd ON vbkdmandt = vbrpmandt AND vbkd~vbeln =
vbrp~aubel
AND vbkd~posnr = con_zposnr
WHERE vbrp~vbeln EQ nast-objky.
DELETE ADJACENT DUPLICATES FROM c_tab_po COMPARING ALL FIELDS.
*Getting the other Invoices based on the customer PO number
IF c_tab_po[] IS NOT INITIAL.
SELECT
vbrk~kunag
vbkd~bstkd
vbkd~bstdk
vbkdposex_e vbrkvkorg
vbrpvbeln vbrpposnr vbrp~erdat
vbpakunnr vbrpaubel vbrpaupos vbakerdat
vbrpmatnr vbrkmwsbk vbrp~netwr
vbrkvaldt vbrkzterm vbrk~vbtyp
INTO TABLE g_tab_invoice FROM vbrp
INNER JOIN vbrk ON vbrkmandt = vbrpmandt AND vbrk~vbeln =
vbrp~vbeln
INNER JOIN vbkd ON vbkdmandt = vbrpmandt AND vbkd~vbeln =
vbrp~aubel
AND vbkd~posnr = con_zposnr
INNER JOIN vbpa ON vbpamandt = vbrpmandt AND vbpa~vbeln =
vbrp~aubel
AND vbpaposnr = con_zposnr AND vbpaparvw =
con_parvw
INNER JOIN vbak ON vbakmandt = vbakmandt AND vbak~vbeln =
vbrp~aubel
FOR ALL entries IN c_tab_po
WHERE vbrk~kunag EQ c_tab_po-kunag AND
vbkd~bstkd EQ c_tab_po-bstkd AND
vbkd~bstdk EQ c_tab_po-bstdk.
ENDIF.Hi Younus,
First join seems to be oku2026
But you are querying Db tables multiple times to avoid this.
Fetch the fields
vbkdposex_e vbrkvkorg
vbrpvbeln vbrpposnr vbrp~erdat
vbrpaubel vbrpaupos
vbrpmatnr vbrkmwsbk vbrp~netwr
vbrkvaldt vbrkzterm vbrk~vbtyp
in the first join itself.
SELECT vbrk~kunag
vbkd~bstkd
vbkd~bstdk
vbkd~posex_e vbrk~vkorg
vbrp~vbeln vbrp~posnr vbrp~erdat
vbrp~aubel vbrp~aupos
vbrp~matnr vbrk~mwsbk vbrp~netwr
vbrk~valdt vbrk~zterm vbrk~vbtyp
INTO TABLE c_tab_po FROM vbrp
INNER JOIN vbrk ON vbrk~mandt = vbrp~mandt AND vbrk~vbeln =
vbrp~vbeln
INNER JOIN vbkd ON vbkd~mandt = vbrp~mandt AND vbkd~vbeln =
vbrp~aubel
AND vbkd~posnr = con_zposnr
WHERE vbrp~vbeln EQ nast-objky.
then Just join VBPA & VBAK and get required data.
Thanks,
Sudha -
"How to sum FKIMG in VBRK and VBRP Table with sample output
Sir\Mam\Gurus ;
I hardly found it difficult in resolving my program in getting the sum of FKIMG inside the VBRP and VBRK tables
The scenario is that i have one Sales Order with multiple invoices . What i need to do is to sum up the fkimg or the quanitity of specific material regardless of how many invoices the material have in a particular SO
Example I have Sales Order number 35678952 with
3 invoices
Invoice # 123 with material number mat1=12, mat2=5 , mat3=7
345 with material number mat1=7, mat2=7
678 with material number mat1=5, mat3=10
Output shoud be
salesorder# 35678952
mat1 = 24
mat2 = 12
mat3 = 17
Below is my Sample Codes:
DATA : it_vbrp_details TYPE STANDARD TABLE OF wa_vbrp_details,
ls_vbrp_details TYPE wa_vbrp_details,
ls_vbrp_details1 TYPE wa_vbrp_details,
lsfinal_vbrp_details TYPE wa_vbrp_details,
it2_vbrp_details TYPE STANDARD TABLE OF wa2_vbrp_details,
ls2_vbrp_details TYPE wa2_vbrp_details,
it3_vbrp_details TYPE STANDARD TABLE OF wa_vbrp_details,
itfinal1_vbrp_details TYPE STANDARD TABLE OF wa_vbrp_details,
itfinal2_vbrp_details TYPE STANDARD TABLE OF wa_vbrp_details,
itfinal3_vbrp_details TYPE STANDARD TABLE OF wa_vbrp_details,
ls3_vbrp_details TYPE wa_vbrp_details,
rtime1 TYPE i,
rtime2 TYPE i,
rtime3 TYPE i,
s_erdate type d,
scr_erdat type d,
s_erdate = scr_erdat.
CALL FUNCTION 'MONTH_PLUS_DETERMINE'
EXPORTING
months = 1 " Negative to subtract from old date, positive to add
olddate = s_erdate
IMPORTING
newdate = new_date.
""" This is another way manual adding by days
CALL FUNCTION 'CALCULATE_DATE'
EXPORTING
days = +30
start_date = s_erdate
IMPORTING
result_date = new_date.
result_date = ddate.
REFRESH: it_vbrp_details.
SELECT
vbrp~matnr
vbrp~aubel
vbrp~aupos
vbrp~vbeln
vbrp~kzwi1
vbrp~kzwi2
vbrp~kzwi3
vbrp~kzwi4
vbrp~kzwi5
vbrp~kzwi6
vbrp~mvgr1
vbrp~mvgr2
vbrp~mvgr3
vbrp~mvgr4
vbrp~mvgr5
vbrp~knuma_pi
vbrp~knuma_ag
vbrp~mwsbp
vbrp~vkaus
vbrp~fkimg
vbrk~vbeln
vbrk~fkart
vbrk~belnr
vbrk~xblnr
vbrk~vbtyp
vbrk~kunag
vbrk~fksto
vbap~posnr
INTO TABLE it_vbrp_details
FROM vbrp INNER JOIN vbrk ON vbrkvbeln EQ vbrpvbeln
where vbeln eq gt_data-vbeln
where vbrpaubel eq vbapvbeln
WHERE vbrp~posnr GE ''
AND vbrk~vbtyp EQ 'M'
AND vbrk~fksto NE 'X'
AND ( vbrperdat GE s_erdate OR vbrperdat LE new_date OR vbrp~erdat IN s_erdat ) " + JP 09 19 2011 Additional Optimization
ORDER BY aubel aupos .
ORDER BY aubel aupos matnr.
"""" This where i need your help Sir\Mam\Gurus
it3_vbrp_details = it_vbrp_details.
SORT it3_vbrp_details BY aubel matnr fkimg kzwi1 kzwi2 kzwi3 kzwi4 kzwi5 kzwi6 aupos vbeln
mvgr1 mvgr2 mvgr3 mvgr4 mvgr5 knuma_pi knuma_ag mwsbp vkaus fkart belnr vbtyp kunag fksto.
LOOP AT it3_vbrp_details INTO ls_vbrp_details.
COLLECT ls_vbrp_details INTO itfinal1_vbrp_details.
APPEND ls_vbrp_details TO it_vbrp_details.
ENDLOOP.
kzwi1,kzwi2,kzwi3 is also been sum up
Sir the output is something like this
Sales Ord# Material Qty KWIZ1 KWIZ2 KWIZ3 MGVR1 VBELN
1234 Mat1 24 23.2 22 12 LastInvoice#
1234 Mat2 12 20.0 21 15 LastInvoice#
1234 Mat3 37 22.0 22 16 LastInvoice#
5432 Mat1 30 25.0 23 15 LastInvoice#
5432 Mat2 24 22.0 24 23 LastInvoice#
5432 Mat3 20 18.0 20 12 LastInvoice#
Hope you can help me as i cant hardy sleep thinking of this ...
I will really appreciate your great help..
Thanks !
I will really appreciate your great help..
Thanks !
Moderator message: duplicate post locked.
Edited by: Thomas Zloch on Sep 20, 2011 3:05 PMHi,
How you want to display the output?..
If you want to display the output as mentioned below, then you have to use nested loop & dynamic field assignments to get result.
Output column
sales order Mat1 Mat2 Mat3 ......
1234 24 12 37
Kindly let me know, if you have any questions
Regards,
S.Senthilkumar -
Join Problem LIKP,LIPS,VBRK and VBRP
Hi,
i am working on the SAP Query report. But having problem in creating joins between the following tables
LIKP
LIPS
VBRK
VBRP
please guide me
regard
khurramLIKP
LIPS
VBRK
VBRP
select a~ b~ c~ d~ into corresponding fields of table itab from likp as a inner join
LIPS as b on a~VBELN = b~VBELN
VBRK as c~VBELN = a~VBELN
VBRP as d~VBELN = a~~VBELN.
also check the first condition a~VBELN = b~(KDAUF,VBELV,VGBEL,WKTNR)
second condition a~VBELN = c~SFAKN
third condition a~VBELN = d~(AUBEL,VBELV,VGBEL,VGBEL_EX)
hope it solves... -
How to get invoice data(VBRK and VBRP)
Hi, guru:
Would like to ask one thing:
customer system will pass ECC invoice id, and base on that do we have any SAP standard BAPI or function module which can get all the details for that invoice(header and items both).
I tried BAPI_billingdoc_getdetail, however I can only get data for header(VARK)
Thanks heaps!
Ericis ECC a legal number maintained in the J*** transaction. then you can fetch if from there.
-
Why is different between consumption and spare part material Amount in Accounting?
I go to mb51
in Accounting document there is different
l found the standard price was changed in the last . it was changing from 850,000 to 1000
i don't know why is different between consumption and spare part material Amount Accounting??? please help me . how can I solve it?pay attention just first document has a different accounting amount . in others there aren't different .see these screenshot :
-
Relation between RV61A structure and VBRP,VBRK,KONV
Hi Gurus,
My requirement is i need to get RV61A -KOEIN values.Currently i have tables VBRP,VBRK and KONV which i have connected . Now i need a relation to connect RV61A with either of these tables.
Also i need to connect tables KOMP-NETWR , KOMK-WAERK with these tables.
How to connect these tables.Hi Abhishek,
Just see my post in this thread. Hope it will be helpful for you.
Re: Determining relationships between tables
Thanks
Nitesh -
Table relations between vbrk and bkpf for Accounting Document Number
hello,
i am using 4 tables to get data into my programs.
vbrk,vbrp konv and bkpf.
i want to get belnr from bkpf.i found relation between vbrk and belnr.but in vbrk table belnr's value is initial.
can anybody tell me that how should i relate vbrk and bkpf or how to get Accounting Document Number(belnr) from bkpf for Billing Document(vbeln).
regards,
soniya s.hi,
chekc this. its working for me.
data : WA_AWKEY LIKE BKPF-AWKEY.
data : WA_BELNR LIKE BKPF-BELNR.
data : LENGTH TYPE I.
*BREAK MTABAP.
LENGTH = STRLEN( IT_VBRK-VBELN ).
if LENGTH = '10' .
MOVE it_vbrk-VBELN TO WA_AWKEY.
SELECT SINGLE BELNR FROM BKPF INTO WA_BELNR
WHERE AWKEY = WA_AWKEY
AND AWTYP = 'VBRK'
and blart = 'RV'.
it_final-acc_doc = WA_BELNR.
CLEAR WA_BELNR .
CLEAR WA_AWKEY .
else.
CONCATENATE '0' it_vbrk-vbeln INTO wa_awkey.
SELECT SINGLE BELNR FROM BKPF INTO WA_BELNR
WHERE AWKEY = WA_AWKEY
AND AWTYP = 'VBRK'
and blart = 'RV'.
it_final-acc_doc = WA_BELNR .
CLEAR WA_BELNR .
CLEAR WA_AWKEY.
endif. -
Hi all ,
I have a requirement to Post Cash Journal Document using FBCJ tcode.
Is it possible multiple line items debit & single line item credit and different cost centers and different profit centers
for exp:
pk GL a/c description amount cost center profit center
40 400101 telephone exp 500 1403 P 1000
40 400101 telephone exp 100 1404 P 2000
50 200100 cash in hand 600-
This is My requirement is it possible in fbcj
Please suggest me.ASAP.
Regards
Naresh.Hi,
This you can do it in two ways:
1. Make three header under top level....one Product A, 2nd Product B ( as Billing element) and third as Common expense ( only cost). Now 1st & 2 nd WBS, you have to have sales order linking with individual lint item, for third you will accumulate all the common expense till the period end then make a reposting of the same in desired proportion to both products WBS hierarchy
(This is if you want to have a track on the common expense as well.......like planning, budgeting & control)
After this reposting, run RA for individual billing element and hence you will all the complement detailing and control over Revenue and expense with respect to Product A and Product B individually.
2. If you don't want to maintain that kind of detailing the common expense and keep track of it through project, then have cost centers accordingly and make an assesment/ distribution with respect to expenses accumulated at those cost centers for the period to the respective WBS under each product. Then execute the period end processes for the project.
Or
You can try with have two more line items in the costing sheet as an overhead against common expenses with respect each product.
I hope this should help you.
Regards
Avisek Bhardwaj -
Trial Balence amount is different with query of JDT1 amount
Hi all,
I try to get summary from JDT1 for a period, but I find the debit amount is different with Trial Balance. does anybody knows what's happen ? please help.
the queries is this :
SELECT sum(T1.[Debit]), sum(T1.[Credit]) FROM OJDT T0 INNER JOIN JDT1 T1 ON T0.TransId = T1.TransId INNER JOIN OACT T2 ON T1.Account = T2.AcctCode WHERE T2.[FatherNum] = 'A01' and T0.[DueDate] >= '1/1/09' and T0.[DueDate] <= '12/31/2009'Hi,
Welcome you post on the forum.
Try tis:
SELECT sum(T1.Debit), sum(T1.Credit) FROM OJDT T0 INNER JOIN JDT1 T1 ON T0.TransId = T1.TransId INNER JOIN OACT T2 ON T1.Account = T2.AcctCode WHERE T2.FatherNum = 'A01' and T0.RefDate >= '1/1/09' and T0.RefDate <= '12/31/2009'
Thanks,
Gordon -
FB60 screen change layout different between DEV and PRD
Hi,
I'm having problem with transaction FB60. When i try to change the layout in PRD, in screen Edit System Setting, some of the field showing 0 length. For example in WBS element field, in DEV show length 24 but PRD show length 0. I try to compare the version but it is same (program & table structure - ACGL_ITEM). When I debug the program, found out that it will get the structure from sap internal c program call 'AB_GET_CX_DATA'. So, maybe this program version are different between DEV and PRD.
Anybody knows what is the cause of this problem? Or maybe somebody can tell me how to check sap internal c program.
Thank you very much.Yes. FB60 is Enter Vendor Invoice. In this screen you can see a table with column such as GL Acct, Debit/Credit, Amount in DC, Cost Center and others. You can add or remove some of the field using Table Setting and create Screen Variant. My problem is, the length of WBS Element and Profit Center field is 0. How to change the length.
I already searched in forum but I only found how to create screen variant.
Thanks.
Maybe you are looking for
-
I have a BPM, the scenario is SAP -> (asynchronous) -> XI -> JDBC (query table) -> mapping ->. JDBC (query next table) -> SAP (call another asynchronous RFC). And I also use fork to fork 4 parallel process (different table) in the same BPM. Current p
-
Substitution variable is not visible at Data Prep editor-creating rule file
Hi, We are working on Essbase 9.3.1, Oracle as a database source for loading the data into Essbase. We have create a substitution variable at "server level" to use it in rule file as a DSN for data source. But this substitution variable is not visibl
-
How do I view on my tv what is on my computer
how do I hook up my computer to my hdtv
-
How to hide the Group Tree in WPF viewer
I am trying to hide the GroupTree when I run a report, I would like to be able to turn this feature on for a few reports, however; I will normally like to hide the groups. Your help will be highly appreciated
-
TREX preprocessing failed, HTTP Status Code 401
Hello everybody! I'm using SAP NetWeaver 7.0 (2004s), TREX 7.0 on Win2003 Server. I'm trying to index files, but it doesn't work for files bigger than 10KB. I know that for these documents > 10KB only the URI is transmitted to TREX. So it seems the p