08-28-2009 11:17 AM
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.
08-28-2009 1:39 PM
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
08-28-2009 11:50 AM
Hi ,
Check considering bseg-koart , bseg-shkzg field and up date accordingly.
Regards,
Kumar
08-28-2009 11:57 AM
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
08-28-2009 12:50 PM
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......
08-28-2009 1:24 PM
Maybe ACCOUNTGL-ACCT_KEY can help, which links to table T030B, which stores posting keys.
Thomas
08-28-2009 1:39 PM
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