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: 

BSEG table

Former Member
0 Kudos

I am populating BAPI BAPI_ACC_DOCUMENT_POST......here i m getting values for posting key..as postin key is not there in BAPI..i m writing below code and finding out whether it is credit/debit...

The document is getting posted correctly...BUT my problem is every time...when i goto BSEG table and see the posting key(BSCHL) values..it is showing something else...if i pass 34 for 1st line item i getting 31...PLS help

*--fill_currencyamount

CLEAR : lv_wrbtr1,lv_wrbtr, lv_shkzg.

SELECT SINGLE shkzg FROM bseg INTO lv_shkzg

WHERE bukrs = wa_finput-bukrs

AND bschl = wa_finput-newbs.

*--(S = debit, H = credit)

MOVE wa_finput-wrbtr TO lv_wrbtr1.

IF lv_shkzg = 'S'.

MOVE lv_wrbtr1 TO lv_wrbtr.

ELSEIF lv_shkzg = 'H'.

CONCATENATE '-' lv_wrbtr1 INTO lv_wrbtr.

ELSE.

ENDIF.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

HI,

Try passing Account Type Also in BSEG Query.

I think this Posting is used for Vendor Account. Try checking = 'K'.

Not very sure, but you can try...

Regds,

Anil

5 REPLIES 5

Former Member
0 Kudos

Hi ,

Check considering bseg-koart , bseg-shkzg field and up date accordingly.

Regards,

Kumar

ThomasZloch
Active Contributor
0 Kudos

Look at form routine FILL_ACCT_KEY in include LACC9F20 to understand what's happening.

In short, '34' is not covered by this BAPI.

Thomas

0 Kudos

but my functional consultant wants that 34 as the posting key....i told that it is not possible by BAPI...but they what that onyl....any other way we can find it......

0 Kudos

Maybe ACCOUNTGL-ACCT_KEY can help, which links to table T030B, which stores posting keys.

Thomas

Former Member
0 Kudos

HI,

Try passing Account Type Also in BSEG Query.

I think this Posting is used for Vendor Account. Try checking = 'K'.

Not very sure, but you can try...

Regds,

Anil