SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

Баланс поставщика



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP
View previous topic :: View next topic  
Author Message
Влад
Специалист
Специалист



Joined: 26 Dec 2007
Posts: 63

PostPosted: Thu Oct 02, 2008 1:04 pm    Post subject: Баланс поставщика Reply with quote

Каким ФМ узнать текущий баланс поставщика?
Back to top
View user's profile Send private message
vga
Мастер
Мастер


Age: 170
Joined: 04 Oct 2007
Posts: 1218
Location: Санкт-Петербург

PostPosted: Fri Oct 03, 2008 3:11 pm    Post subject: Reply with quote

3007 Customer account business object
BAPI_AR_ACC_GETBALANCEDITEMS Customer account clearing transactions in a given time period
BAPI_AR_ACC_GETCURRENTBALANCE Closing balance of customer account in current fiscal year
BAPI_AR_ACC_GETKEYDATEBALANCE Customer account balance at a key date
BAPI_AR_ACC_GETOPENITEMS Customer account open items at a key date
BAPI_AR_ACC_GETPERIODBALANCES Posting period totals per customer account in current fiscal year
BAPI_AR_ACC_GETSTATEMENT Customer account statement for a given period

3008 Vendor account business object
BAPI_AP_ACC_GETBALANCEDITEMS Vendor Account Clearing Transactions in a given Period
BAPI_AP_ACC_GETCURRENTBALANCE Vendor Account Closing Balance in Current Fiscal Year
BAPI_AP_ACC_GETKEYDATEBALANCE Vendor Account Balance at Key Date
BAPI_AP_ACC_GETOPENITEMS Vendor Account Open Items at a Key Date
BAPI_AP_ACC_GETPERIODBALANCES Posting Period Balances per Vendor Account in Current Fiscal Year
BAPI_AP_ACC_GETSTATEMENT Vendor Account Statement for a given Period

или можно по открытым позициям просчитать

Code:
  DATA: l_dmbtr TYPE bsik-dmbtr.
  DATA: lt_bsik TYPE TABLE OF bsik WITH HEADER LINE.

    SELECT * FROM bsik
      INTO TABLE lt_bsik
      WHERE bukrs = p_bukrs
        AND lifnr = p_lifnr.

    LOOP AT lt_bsik.
      IF lt_bsik-xnegp = 'X'.           "Negative Posting:
        IF lt_bsik-shkzg = 'S'.         "Soll/Haben drehen und Betrag
          lt_bsik-shkzg = 'H'.          "negieren
        ELSE.
          lt_bsik-shkzg = 'S'.
        ENDIF.
        lt_bsik-dmbtr = lt_bsik-dmbtr * -1.
      ENDIF.
      IF lt_bsik-shkzg EQ 'H'.
        lt_bsik-dmbtr = lt_bsik-dmbtr * -1.
      ENDIF.
      l_dmbtr = l_dmbtr + lt_bsik-dmbtr.
    ENDLOOP.
Back to top
View user's profile Send private message Blog Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.