Skip to Content
0
Former Member
Aug 28, 2009 at 10:17 AM

BSEG table

19 Views

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.