Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

transaction type in BAPI_ACC_GL_POSTING_POST

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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.

17 REPLIES 17

former_member181995
Active Contributor
0 Kudos

Use Where-used list for this FM you will be able to see some code by SAP.

BAPIACHE08-OBJ_TYPE "<<<Enter your Transaction

Amit.

0 Kudos

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

former_member188685
Active Contributor
0 Kudos

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

0 Kudos

>

> 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

0 Kudos

+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

0 Kudos

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.

0 Kudos

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.

0 Kudos

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" !!..

0 Kudos

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..?

0 Kudos

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

0 Kudos

i checked it, and i am thinking you are using some wrong function.

Former Member
0 Kudos

F-22 is an invoice transaction. The BAPI is for GL related postings.

Rob

0 Kudos

Hey Rob the transaction is F-02 ...

0 Kudos

It pays to get it right the first time.

Rob

Former Member
0 Kudos

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.

0 Kudos

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

0 Kudos

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.