09-23-2008 3:39 PM
hi,
I need to set the transaction type as say '120' in the BAPI BAPI_ACC_GL_POSTING_POST. I found a piece of code that says set it in obj_key, obj_type etc of the DOCUMENTHEADER parameter of the BAPI. Can anyone give the exact code how to do that ?
i think i understood that we have to set the following:
obj_type
obj_key
obj_sys
what are the values ? in my case I know that transaction type is giong to be 120. please tell me how to set this and other values in the BAPI ?
thks
09-23-2008 10:02 PM
if i am not mistaken you are trying to populate transaction type for aquisitioni.e BSEG-BEWAR. Try using
BAPI_ACC_DOCUMENT_POST and populate CS_TRANS_T in GL line item.
09-23-2008 3:44 PM
Use Where-used list for this FM you will be able to see some code by SAP.
BAPIACHE08-OBJ_TYPE "<<<Enter your Transaction
Amit.
09-23-2008 4:03 PM
Hey Amit,
In the sample code I could see transaction type set as 'BKPFF', but mine is a 3 character field like '120'. Are we dealing with the correct field in the BAPI and is my value representation correct ? Can I pass '120' to this obj_type ??
thks
09-23-2008 4:09 PM
obj_type ? i am thinking it is BKPFF not 120
obj_key " it is combination of Documentnumber +
" company code+ Fiscal Year
obj_sys " sy-sysid
Edited by: Vijay Babu Dudla on Sep 23, 2008 11:11 AM
09-23-2008 4:22 PM
>
> obj_type ? i am thinking it is BKPFF not 120
> obj_key " it is combination of Documentnumber +
> " company code+ Fiscal Year
> obj_sys " sy-sysid
>
> Edited by: Vijay Babu Dudla on Sep 23, 2008 11:11 AM
Trying to dare correct vijay's reply
obj_type = BKPFF"This is 100% correct.
obj_key it is combination of Document Type +
company code+ Fiscal Year
obj_sys " sy-sysid
Please correct me if i'm wrong.
Cheers
09-23-2008 4:29 PM
+obj_key it is combination of Document Type ++
company code Fiscal Year+
then in that case it may be some thing like this $doctypecccode+fyear , then one $ will come in the beginning..I am guessing..
I am still thinking of the documentnumberccodeyear
09-23-2008 4:31 PM
Yes you are exactly right.
I give up
For more confirmation you can see include LWOSCR_CBLF02 line 1055.
CONCATENATE l_belnr pi_comp_code pi_fisc_year INTO pe_obj_key.
Great vijay
Amit.
09-23-2008 4:36 PM
lets see what he/she wants.
ps: sdn user if you can reveal your name that will be great. I want to call your name. I am not able to mention he/she.
09-23-2008 6:20 PM
thanks to all for ur inputs.. I am not sure if I asked my question the right way, actually i am referring to the " Ttype " field in the screen F-22 in the item level entry.
I want the BAPI to post this value !! In my environment the user enters 120 in this field and i want to pass this to the BAPI
BAPI_ACC_GL_POSTING_POST !!
any more help ?
thks
BTW, vijay, you can refer me as "she" !!..
09-23-2008 7:39 PM
i am not sure that is the correct function..? and also it is item level, so why are you checking at the header level then..?
09-23-2008 7:45 PM
No Vijay, initially I thought that Transaction type is going to be on header level and hence thought filling upthe obj_key, obj_type will help. But then noticed that mine is a 3 character value like 120 and I found ou that the screen element in which i typically enter is in transaction F-22, RF05A-NEWBW, the field labelled TType in the item level entry.
Can u too see that on screen F-22 ?
So now my requirement is to post this value thru the BAPI and my program uses the BAPI as follows:
CALL FUNCTION 'BAPI_ACC_GL_POSTING_POST'
EXPORTING
documentheader = w_documentheader
TABLES
accountgl = t_accountgl
currencyamount = t_currencyamount
return = t_return.
So i thought accountgl must accomodate the Ttype field but it is not. So whats the way I can enter the value 120 for transaction type thru the BAPI ? Hope i have explained clearly this time. Pl do let me know if u have any suggestions. thks
09-23-2008 8:10 PM
i checked it, and i am thinking you are using some wrong function.
09-23-2008 7:58 PM
F-22 is an invoice transaction. The BAPI is for GL related postings.
Rob
09-23-2008 8:14 PM
09-23-2008 8:21 PM
09-23-2008 10:02 PM
if i am not mistaken you are trying to populate transaction type for aquisitioni.e BSEG-BEWAR. Try using
BAPI_ACC_DOCUMENT_POST and populate CS_TRANS_T in GL line item.
09-24-2008 10:06 AM
Yup you can use this BAPI [BAPI_ACC_DOCUMENT_POST] in common to post like invoice,Gl,asset,credit memos and also you find the field transactio type in this bapi.
thank
Sudharshan
09-24-2008 2:08 PM
Yes Kshamatha Eda . You are right, that is what is my requirement. I hope there is not much change to be done to move my statements from calling the other BAPI to this new.
thanks, will let you know once i am successful on this.