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

BAPI_ENTRYSHEET_GETDETAIL



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Interfaces | Интерфейсы -> BAPI
View previous topic :: View next topic  
Author Message
admin
Администратор
Администратор



Joined: 01 Sep 2007
Posts: 1637

PostPosted: Tue Jun 09, 2009 4:09 pm    Post subject: BAPI_ENTRYSHEET_GETDETAIL Reply with quote

BAPI_ENTRYSHEET_GETDETAIL - Display Detailed Data on Entry Sheet

Code:
 LOOP AT t_po_item.
* Populate payable invoice items with service entry sheet
      w_gross = w_gross + t_po_item-zpinamt.
      li_item_pay-invoice_doc_item  = li_item_pay-invoice_doc_item + 1.
      li_item_pay-po_number         = t_po_item-ebeln.
      li_item_pay-po_item           = t_po_item-ebelp.
      li_item_pay-item_amount       = t_po_item-zpinamt.
      li_item_pay-sheet_no          = t_po_item-lblni.                  " service entry sheet
      APPEND li_item_pay.
* Populate retainage invoice items with service entry sheet
      w_ret_gross = w_ret_gross + t_po_item-zrtamt.
      li_item_ret-invoice_doc_item  = li_item_ret-invoice_doc_item + 1.
      li_item_ret-po_number         = t_po_item-ebeln.
      li_item_ret-po_item           = t_po_item-ebelp.
      li_item_ret-item_amount       = t_po_item-zrtamt.
      li_item_ret-sheet_no          = t_po_item-lblni.                  " service entry sheet
      APPEND li_item_ret.

* Get the details with ref to service entry sheet
      CALL FUNCTION 'BAPI_ENTRYSHEET_GETDETAIL'
        EXPORTING
          entrysheet                          = t_po_item-lblni
*       LONG_TEXTS                          = ' '
*     IMPORTING
*       ENTRYSHEET_HEADER                   =
       TABLES
     entrysheet_account_assignment       = lit_po_acct
        entrysheet_services                 =  lit_serpo_acc
         entrysheet_srv_accass_values        = lit_ser_acc.

   lv_act_item = lv_act_item + 1.

      LOOP AT lit_po_acct.
* populate the account asignment data for Payable Invoice
        IF NOT lit_po_acct-accass_val IS INITIAL.
          lit_pay_acct_asgn-invoice_doc_item = lv_act_item.
          lit_pay_acct_asgn-serial_no = lit_pay_acct_asgn-serial_no + 1.
          lit_pay_acct_asgn-item_amount = ( t_po_item-zpinamt * lit_po_acct-PERCENTAGE ) / 100. " pass the amount at PO retainge level
          lit_pay_acct_asgn-profit_ctr = lit_po_acct-profit_ctr.
          lit_pay_acct_asgn-co_area = lit_po_acct-co_area.
          lit_pay_acct_asgn-network    =     lit_po_acct-network.
          lit_pay_acct_asgn-activity   =     t_po_item-vornr.
          lit_pay_acct_asgn-CMMT_ITEM = lit_po_acct-cmmt_item_long.
*          lit_pay_acct_asgn-CMMT_ITEM_LONG = lit_po_acct-cmmt_item_long.
          lit_pay_acct_asgn-gl_account  = lit_po_acct-gl_account.
          lit_pay_acct_asgn-tax_code = lit_po_acct-tax_code.
          lit_pay_acct_asgn-costcenter = lit_po_acct-costcenter.
          APPEND lit_pay_acct_asgn.

        ENDIF.
      ENDLOOP.

    ENDLOOP.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Interfaces | Интерфейсы -> BAPI 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.