Fetching CaseID using Document number (BSEG-BELNR)
Hi Team,
I need to fetch the dispute case id using the accounting document number .
T-Code FB03
I need relation between BSEG-BELNR and SCMG_T_CASE_ATTR-EXT_KEY.
Any suggestions welcome.
Regards
Sukhjinder
hey,
try to use the FM 'FDM_COLL_INVOICES_READ' to fetch the ext_key
regards,
sampath
Similar Messages
-
Want to use document number as the cheque number (without cheque management
Dear All,
During Automatic payment run - F110 I would like to use accounting document number as cheque number.
Kindly suggest solution for the same.
Thanks
PrashantHi Santosh,
In this country Bank letters are issued as mode of payment. Unique sequence number is used to track the Bank letter. Since Accounting Document is Unique number I want to use the same.
Kindly suggest the solution for capturing Accounting Document number instead of Cheque number.
Or in other words I want to run F110 without maintaining cheque lot. Is it possible to make payment run without maintaining cheque lot number.
Thanks
Prashant -
BAPI - For Clearing Vendors by using Document Number in F-51.
Hi One and All,
As I have searched Forum before posting, I found few BAPI's and FM's which are not helpful for my requirement.
a. 'BAPI_PAYM_ITEM_POST_CLEARING'
b. 'POSTING_INTERFACE_CLEARING' and soon.
I am Posting the Vendor Invoice as in F-43 Using 'BAPI_ACC_DOCUMENT_POST' , Now I want to Clear these generated Document no.s in F-51.
By manually I can do it, But I need a BAPI / FM to do Clear a bunch of Vendor Document Numbers.
Welcome for all suggestions.
Regards,
Suneel GHi Suneel,
The FM is the correct one,,,! But you have the Above Exception,,,
Read the RFBIBL00 Documentation,,, Look how to pass the data in a Batch I/P....
Now lets put a break there,,, The RFBIBL00 Still calls the FM 'POSTING_INTERFACE_CLEARING', By this, the error may(I am not sure, But there is a chance) trigger again...!
The Alternate Solution may be, The FM 'POSTING_INTERFACE_CLEARING' calls
Include LFIPIF00 And if yo utry to look into that include,
FT-PROGRAM = REP_NAME_A.
FT-DYNPRO = '0105'.
FT-DYNBEGIN = 'X'.
APPEND FT.
IF NOT BELNS IS INITIAL.
CLEAR FT.
FT-FNAM = 'RF05A-BELNS'.
FT-FVAL = BELNS.
APPEND FT.
ENDIF.
IF NOT BUKRS IS INITIAL.
CLEAR FT.
FT-FNAM = 'BKPF-BUKRS'.
FT-FVAL = BUKRS.
APPEND FT.
ENDIF.
IF NOT GJAHS IS INITIAL.
CLEAR FT.
FT-FNAM = 'RF05A-GJAHS'.
FT-FVAL = GJAHS.
APPEND FT.
ENDIF.
IF NOT BUDAT IS INITIAL.
CLEAR FT.
FT-FNAM = 'BSIS-BUDAT'.
FT-FVAL = BUDAT.
APPEND FT.
ENDIF.
CLEAR FT.
FT-FNAM = 'BDC_OKCODE'.
FT-FVAL = '/11'.
APPEND FT.
PERFORM TRANSAKTION_BEENDEN USING P_NO_AUTH.
I have seen the 100's of lines like the above code...! Which means You can simple write a BDC for your requirement...(Its just an alternate when no other option)
Thanks & regards,
Dileep .C -
BADI - ENHANCEMENT TO GET BSEG-BELNR
Hi experts,
Im using the Transaction 'VF02' to post accounting documents from invoices, i need to put on the field BSEG-REBZG the final document number 'BSEG-BELNR' of that accounting document.
I was looking for some BADi's, BTE's.. and always the FIELD BSEG-BELNR value is invoice number or something like '$1'.
ThanksFor anybody needed,
I solved it applying enhancement point in program: SAPLFACI, FORM: FI_DOCUMENT_PREPARE. -
How to find Invoice number linked to FI accounting document number ??
Hello All,
I have been looking around for all possible combinations to find the link between FI accounting document number (BSEG-BELNR) and Intercompany Invoice number (for which billing corr. to STOs' or POs' is done).
The requirement is that during ERS posting, we have accounting document numbers (BSEG-BELNR) and associated STOs' for this (BSEG-EBELN), but we are unable to map the Intercompany Billing Invoice number(s) (where the billing corr. to STOs' obtained from BSEG-EBELN) to this accounting document number (BSEG-BELNR).
Any pointers or detailed view solution would be of great help.
Thanks,
AnshHello DPM,
Thank you for the descriptive help. But my requirement is to look for Intercomapny Billing number (VBRK-VBELN) linked to an accounting document number (BSEG-BELNR) and not Invoice Receipt Number.
The steps that I am following are:
From BSEG, found EBELN (Stock Transfer Order) and XREF3 (Reference Key, combination of fiscal yr., some ref. number, maybe GR no. and ref item no.), based on BELNR (Accounting document number).
From EKBE, found XBLNR (Reference Delivery Number or Direct Intercompany Billing Number on which GR is done) based on
EKBE - EBELN = BSEG - EBELN
EKBE - BELNR = BSEG - XREF3 (only ref and item no., considering it to be a GR no.)
EKBE - VGABE = '1' and EKBE - BEWTP = 'E'.
From VBRP, found VBELN (Intercompany Billing No., which is a desired number) based on
VBRP - AUBEL = EKBE -EBELN (Stock Transfer Order)
VBRP - VGBEL = EKBE - XBLNR (Delivery number)
Here, I am not sure about 2 things:
Whether the reference no in BSEG-XREF3 will always be Goods Receipt number for Stock Transfer Order or not. If not, then what it can be and how I will have to proceed further then.
Secondly, If in case for an accounting document number, I have 2 Stock Transfer orders (BSEG - EBELN) and same reference number (BSEG-XREF3), then from History table (EKBE) I get only single delivery based on which GR was doen for both STOs', then I shall be getting single Intercompany Billing Invoice from VBRP or different ?
Kindly provide your inputs.
Thanks,
Ansh -
How to fetch accounting document number from known material document number
Hi,
Using MIGO transaction, by giving mblnr(material document number) as input, I get accounting document number by clicking FI document.I have to add this accounting document number in my report for corresponding known mblnr(material document number) values.
My question is how to fetch the accounting document number present in MIGO to add in my report program.
I used the xblnr(Reference Document Number) which is present both in mkpf and bkpf tables to fetch values.
I extracted xblnr values with known mblnr values from mkpf (Header: Material Document table).
and then extracted belnr(accounting document number) from bkpf (Accounting Document Header table) by using xblnr values.
But the query is running for a long time.
Is there any other method to extract the values in a simpler way.
Kindly advise.
Thanks and Regards,
SanjeevI had the values of xblnr and some other fields such as mblnr, budat etc in wi_item table.
I created a new internal table i_xblnr and got down those values.
And then created a new internal table i_belnr and tried to get values of belnr in it.
The code I wrote is given below:
IF not wi_item[] is initial.
loop at wi_item.
at new xblnr.
ws_xblnr-xblnr = wi_item-xblnr.
append ws_xblnr to i_xblnr.
endat.
endloop.
select belnr xblnr from bkpf into table i_belnr for all entries in i_xblnr where xblnr = i_xblnr-xblnr.
ENDIF.
Kindly look after it.Thank you.
Regards,
Sanjeev -
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
SimhaHi 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 -
For BSID- Accounting Document Number corresponding PO Number is required
Hi Gurus,
I have got a requirement to develop a report similiar to 'FBL5N' . I am getting the details of open and cleared items of a customer from BSID and BSAD tables respectively. My requirement is also to fetch the corresponding PO number of the LINE items displayed in the report.
Can any one suggest how can I fetch PO number with Accounting document number(BSID-BELNR) or (BSAD-BELNR).
Your efforts in this matter are deeply appreciated and <<removed_by_moderator>>.
Thanking You,
ZIa.
Edited by: Vijay Babu Dudla on Jan 28, 2009 11:07 PMIf you have fields BSID-VBEL2 and BSID-VPOS2 are populated with the sales order, than access VBKD with the Sales Order to get the Customer PO (VBKD-BSTKD)
Or
First, You need to get the Billing document. Access BKPF with the BSID-BELNR to get the AWKEY where AWTYP = 'VBRK'
Now, you can go to SD document flow with the billing document to find out the Sales Document. Access VBKD with the Sales document to get the Customer PO
Regards,
Naimesh Patel -
BAPI_ACC_DOCUMENT_POST & generated document number
Hi,
I am using BAPI function BAPI_ACC_DOCUMENT_POST to post financial documents in the system. My question is, how properly retrieve generated document number (BKPF-BELNR). We are using internal document number generation so the function generates document number. But, function itself, does not return generated document number. Currently, after commit I try to locate a record of generated document using reference key ... Isn't there any better way how to get generated document number?
Tkank you.Yes, I found this code ... as I wrote, there is not problem if I set curtp = '10'. BUT, there is another problem, with different currencies. Then, when I try to post document in different currency that the currency of company code is, function raises error "Inconsistent currency information" ...
here is an example, how I fill tax information, as requested:
DATA: docHeader TYPE BAPIACHE09,
accGL LIKE BAPIACGL09 OCCURS 0 WITH HEADER LINE,
accReceivable LIKE BAPIACAR09 OCCURS 0 WITH HEADER LINE,
accAmnt LIKE BAPIACCR09 OCCURS 0 WITH HEADER LINE,
accTax LIKE BAPIACTX09 OCCURS 0 WITH HEADER LINE,
extension LIKE BAPIACEXTC OCCURS 0 WITH HEADER LINE,
tax_account TYPE STRING,
tax_code TYPE STRING,
tax_trans TYPE STRING,
tax_spec LIKE ZIFPRMS-VALUE,
itemno TYPE N LENGTH 10.
* initialize document header
docHeader-bus_act = 'RFBU'.
docHeader-username = sy-uname.
docHeader-header_txt = fin_data-text.
docHeader-comp_code = header-company_code.
docHeader-doc_date = header-document_date.
docHeader-pstng_date = fin_data-posting_date.
docHeader-ref_doc_no = header-id_sale.
docHeader-doc_type = params-doc_type.
* process document items, in loop
LOOP AT fin_items INTO fin_item.
* initialize AR (line 1)
accReceivable-itemno_acc = itemno.
accReceivable-customer = cus_data-id_contact.
accReceivable-comp_code = header-company_code.
CONCATENATE fin_item-text ' (receivable)' INTO accReceivable-item_text.
accReceivable-pmnttrms = params-payment_term.
accReceivable-pmnt_block = params-payment_block.
IF doc_type = 'APR'.
accReceivable-sp_gl_ind = 'F'.
ENDIF.
APPEND accReceivable.
* initialize receivable amount
accAmnt-itemno_acc = itemno.
accAmnt-currency = fin_data-currency.
accAmnt-curr_type = '10'.
accAmnt-amt_doccur = fin_item-vat_base + fin_item-vat.
IF doc_type(2) = 'CR'.
accAmnt-amt_doccur = accAmnt-amt_doccur * ( -1 ).
ENDIF.
APPEND accAmnt.
itemno = itemno + 1.
* do not continue when posting a down payment request
CHECK doc_type < > 'APR'.
* initialize GL account line item
accGL-itemno_acc = itemno.
accGL-gl_account = params-doc_gl_account.
CONCATENATE fin_item-text ' (revenue)' INTO accGL-item_text.
accGL-pstng_date = fin_data-posting_date.
accGL-tax_code = tax_code.
accGL-doc_type = params-doc_type.
accGL-costcenter = fin_item-cost_centre.
APPEND accGL.
* initialize GL amount
accAmnt-itemno_acc = itemno.
accAmnt-currency = fin_data-currency.
accAmnt-curr_type = '10'.
accAmnt-amt_doccur = - ( fin_item-vat_base ).
IF doc_type(2) = 'CR'.
accAmnt-amt_doccur = accAmnt-amt_doccur * ( -1 ).
ENDIF.
APPEND accAmnt.
itemno = itemno + 1.
* initialize TAX account line item
IF STRLEN( tax_code ) > 0.
accTax-itemno_acc = itemno.
accTax-gl_account = tax_account.
accTax-tax_code = tax_code.
accTax-cond_key = 'MWAS'.
APPEND accTax.
* initialize tax amount
accAmnt-itemno_acc = itemno.
accAmnt-currency = fin_data-currency.
accAmnt-curr_type = '10'.
accAmnt-amt_doccur = - ( fin_item-vat ).
accAmnt-amt_base = - ( fin_item-vat_base ).
IF doc_type(2) = 'CR'.
accAmnt-amt_doccur = accAmnt-amt_doccur * ( -1 ).
accAmnt-amt_base = accAmnt-amt_base * ( -1 ).
ENDIF.
APPEND accAmnt.
itemno = itemno + 1.
ENDIF.
ENDLOOP.
* translate customer field to BAPI format
CALL FUNCTION 'MAP2E_BAPICOBL_CI_TO_BAPIEXTC'
TABLES INTERNAL_CI_COBL = cust_ext
EXTENSION_CODINGBLOCK = extension.
* call BAPI function to create customer invoice
CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
EXPORTING DOCUMENTHEADER = docHeader
IMPORTING OBJ_TYPE = obj_type
OBJ_KEY = obj_key
OBJ_SYS = obj_sys
TABLES ACCOUNTGL = accGL
ACCOUNTRECEIVABLE = accReceivable
ACCOUNTTAX = accTax
CURRENCYAMOUNT = accAmnt
EXTENSION1 = extension
RETURN = returnTab.
Edited by: Rastislav Mojzis on Jul 9, 2008 7:18 AM -
EBS : clearing AR invoice through document number
Hi,
In EBS, I am using document number serach algorithm.
But I get the below error.
From FEBA, if I try to clear, I get the below error. Seems, system is not able to figure out the customer.
Please let me know, where it is going wrong.
Regards
SRHI Sanil,
Here is the bank file snap .Tag 86 has the document number to be cleared.
Below is the posting rule.
belwo is the alogorithm assignment
I have not defined any search string. An I expect document number from tag 86 should be used for clearing.
Regards
SR -
Excise No. using Accounting Document Number and the P.O. number
Hi All ! In my GL report, I'm displaying the Accounting Document Number and the P.O. number.
Now, the requirement is to display the excise no..
Tried different tables in SE11 using J_1EXC for excise detials, but to no avail.
And last which vendor to pick, Because vendors in P.O and BSEG differs.
If I use the BSEG-BELNR I get a different vendor & If I use the P.O. no. in EKKO then also I get a different vendor.
Please suggest.Hi,
Actually the vendor in the accounting document and PO should match. If not look in table EKBE, It will have the accounting document or at least the invoice receipt against which accounting document would have been created. Check if the vendor number matches with the invoice receipt.
Regarding the excise number I'm not sure what you mean, If you mean excise invoice number, you can look at the J_1IEXCDTL
J_1IEXCHDR tables. You could check with FC on what basis the document is getting created to make out the relation ship. If it is vendor excise no etc. you can hit F1 help to find out the table etc.
Hope it helps.
Sujay -
Get FI Documet number from BKPF table using CO document number in COVP tabl
Hi,
In datasource 0CO_OM_CCA_9 , we have written a code in CMOD to get the FI Document Number from CO document Number.
The flow of code is:
1) From the CO document number, get reference document number (REFBNfield) from, COVP table
2) Pass this REFBN in AWKEY(10) field of BKPF table.
3) We have created new field in datasource named 'ZBELRE' which gets populated with BELNR field obtained from BKPF table.
This ZBELNR is the FI Document number.
But somehow wrong FI Document number is getting populated.
After analyzing code, we found that the AWKEY which we passed in BKPF table is incomplete and the full AWKEY is
COVP-REFBN+COVP-AWORG
Is this condition always remains true in all the cases? Also, is the selection criterion which we have used to find the FI document number from BKPF table is sufficient?
Our CO Consultant says that we should also pass AWTYP along with AWKEY in BKPF table.
Please suggest a solution.
Following is the code :
***********Datasource Modification for0CO_OM_CCA_9*******************
WHEN '0CO_OM_CCA_9'." Data Source
TYPES:BEGIN OF ty_bkpf,
belnr TYPE bkpf-belnr,
xblnr TYPE bkpf-xblnr,
bktxt TYPE bkpf-bktxt,
awkey TYPE bkpf-awkey,
bukrs TYPE bkpf-bukrs,
gjahr TYPE bkpf-gjahr,
END OF ty_bkpf.
TYPES : BEGIN OF ty_bseg1,
lifnr TYPE bseg-lifnr,
belnr TYPE bseg-belnr,
bukrs TYPE bseg-bukrs,
gjahr TYPE bseg-gjahr,
END OF ty_bseg1.
DATA: it_bkpf TYPE STANDARD TABLE OF ty_bkpf,
wa_bkpf TYPE ty_bkpf,
it_bseg1 TYPE STANDARD TABLE OF ty_bseg1,
wa_bseg1 TYPE ty_bseg1,
l_s_icctrcsta1 TYPE icctrcsta1.
"Extract structure for Datasoure 0co_om_cca_9.
DATA: l_awkey TYPE bkpf-awkey.
DATA: l_gjahr1 TYPE gjahr.
DATA: len TYPE i,
l_cnt TYPE i.
l_cnt = 10.
SELECT lifnr
belnr
bukrs
gjahr
FROM bseg
INTO TABLE it_bseg1.
DELETE ADJACENT DUPLICATES FROM it_bseg1 COMPARING belnr gjahr .
SELECT belnr
xblnr
bktxt
awkey
bukrs
gjahr
FROM bkpf
INTO TABLE it_bkpf.
IF sy-subrc EQ 0.
CLEAR: l_s_icctrcsta1,
wa_bkpf,
l_awkey,
wa_bseg1.
LOOP AT c_t_data INTO l_s_icctrcsta1.
MOVE l_s_icctrcsta1-fiscper(4) TO l_gjahr1.
READ TABLE it_bkpf INTO wa_bkpf WITH KEY awkey(10) =
l_s_icctrcsta1-refbn
gjahr = l_gjahr1.
IF sy-subrc EQ 0.
MOVE wa_bkpf-belnr TO l_s_icctrcsta1-zzbelnr.
MOVE wa_bkpf-xblnr TO l_s_icctrcsta1-zzxblnr.
MOVE wa_bkpf-bktxt TO l_s_icctrcsta1-zzbktxt.
MODIFY c_t_data FROM l_s_icctrcsta1.
READ TABLE it_bseg1 INTO wa_bseg1
WITH KEY
belnr = wa_bkpf-belnr
bukrs = wa_bkpf-bukrs
gjahr = wa_bkpf-gjahr.
IF sy-subrc EQ 0.
MOVE wa_bseg1-lifnr TO l_s_icctrcsta1-lifnr.
MODIFY c_t_data FROM l_s_icctrcsta1.
CLEAR: l_s_icctrcsta1,
wa_bseg1,
l_gjahr1.
ENDIF.
ENDIF.
CLEAR: l_s_icctrcsta1.
ENDLOOP.
ENDIF.
***End of Datasource Modification for 0CO_OM_CCA_9*******************Hi,
this forum is for the SAP BusinessObjects BI Solution Architecture. Please post your question into the corresponding product forum for SPA BW
regards
Ingo Hilgefort -
Urgent !!! How to change Accounting document using Billing document number
Hi experts,
I have one requirement where I have to modify the accounting document using report. User will enter billing document no and I have to find out respective accounting document and I have to change header data..
I am very new to these modules so please give me solution.
Thanks
SameerHi,
Get a record from BKPF where
AWTYP = 'VBRK' & AWKEY = VBRK-VBELN .Once you get the accounting header document you can always fetch item level records from BSEG where bukrs =bkpf-bukrs
BELNR = BKPF-BELNR & GJAHR = BKPF-GJAHR.
I hope this helps,
Regards
Raju chiatle -
How to fetch billing number using delivery number
Hi Experts,
Based on delivery number(LIPS-VBELN) i need to get the data from billing table(VBRK and VBRP).
Is there any function module to get the same. Pls anyone help on this.
Thanks
Ramesh Manoharan
Moderator message: please do some research before asking.
Edited by: Thomas Zloch on Mar 2, 2011 9:16 AMHi ,
My requirement is to fetch the check number from payr table using CHECT field .
but relation ship i taken from bseg table.
i am giving query as follows
select single chect from payr into a_chect where vblnr = bseg-belnr.
above query is not giving solution.
is there any other relation ship for getting check number.
i written subroutine program for calling into form .
form check_get tables in_tab structure itcsy
out_tab structure itcsy.
tables: payr.
data: a_chect type payr-chect,
b_belnr type bseg-belnr.
read table in_tab INDEX 1. "with key NAME = 'BSIK-BELNR'.
check sy-subrc = 0.
b_belnr = in_tab-value.
break-point.
select single CHECT from PAYR into A_CHECT where vblnr = b_belnr.
if sy-subrc = 0.
read table out_tab index 1. "with key 'CHECT'.
check sy-subrc = 0.
out_tab-value = a_chect.
modify out_tab index 1.
endif.
endform. -
G/L Account number using accounting document number...
Hi,
How do I find the G/L Account number with the help of Accounting Document number (BELNR) ?
-RajeshHI,
Use tables BSAS,BSIS and pass the docuemnt number you will get the GL account.
Thanks
Mahesh
Message was edited by:
I Can Solve It
Maybe you are looking for
-
My keynote widget in iBooks Author doesn´t work.
Hi there! I can´t previsualize in my iPad a keynote widget, made for a book in iBooks Author... it simply doesn´t appear... does anybody know if I´m missing a step?? I drag the file in a keynote and also in HTML formats and it just doesn´t work. Than
-
How can i remove the protection in Pdf file
how can i remove the protection in pdf file so i can convert it to word
-
Javadoc -link giving me a javascript error
was not sure how to reference this issue in a title. anyways, i am running a command like this javadoc -link http://java.sun.com/j2se/1.4/docs/api/ -sourcepath /home/dir/com/hostname/ com.hostname.A com.hostname.B everything works great. All core API
-
Managing existing keywords with Controlled Vocabulary
Hi, my photos (10,000 RAW/JPG's) were previously keyworded in another application. I just imported David Rieck's Controlled Vocabulary keyword file into Lightroom 1.1 and now I have a mess of keywords. Any suggestions on how best to mange the keyword
-
Anybody ever done something like that ? I need to display a very large grid, where the headers have a fairly long text, but each cell only has a single character in it, so I was thinking of making the headers vertical. Any help, pointers would be app