Application Development and Automation 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: 
Read only

transaction type in BAPI_ACC_GL_POSTING_POST

Former Member
0 Likes
4,448

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
Read only

Former Member
0 Likes
3,083

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
Read only

Former Member
0 Likes
3,083

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

BAPIACHE08-OBJ_TYPE "<<<Enter your Transaction

Amit.

Read only

0 Likes
3,083

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

Read only

Former Member
0 Likes
3,083

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

Read only

0 Likes
3,083

>

> 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

Read only

0 Likes
3,083

+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

Read only

0 Likes
3,083

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.

Read only

0 Likes
3,083

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.

Read only

0 Likes
3,083

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

Read only

0 Likes
3,083

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

Read only

0 Likes
3,083

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

Read only

0 Likes
3,083

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

Read only

Former Member
0 Likes
3,083

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

Rob

Read only

0 Likes
3,083

Hey Rob the transaction is F-02 ...

Read only

0 Likes
3,083

It pays to get it right the first time.

Rob

Read only

Former Member
0 Likes
3,084

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.

Read only

0 Likes
3,083

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

Read only

0 Likes
3,083

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.