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

Get pricing accounting values from Sales Order



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> SD
View previous topic :: View next topic  
Author Message
vga
Мастер
Мастер


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

PostPosted: Thu Jan 27, 2011 1:51 pm    Post subject: Get pricing accounting values from Sales Order Reply with quote

Code:
FUNCTION zerum_pricing_so.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"  IMPORTING
*"     VALUE(I_VBELN) TYPE  VBELN
*"  TABLES
*"      T_OUTPUT STRUCTURE  BAPISDCOND
*"  EXCEPTIONS
*"      NOT_FOUND
*"----------------------------------------------------------------------
*  Function name                        : ZERUM_PRICING_SO
*  Development specification ID         :
*  Process team contact person/team name:
*  Date created                         :
*  Service Desk change number           :
*  Transport request number             :
*  Author                               :
*  Description                          : select conditions values
*                                         from SO
*----------------------------------------------------------------------*


  DATA:
    i_bapi_view              TYPE  order_view,
    sales_documents          TYPE  sales_key OCCURS 0 WITH HEADER LINE,
    order_cond_out           LIKE  bapisdcond OCCURS 0 WITH HEADER LINE,
    order_cond_head          LIKE  bapicondhd OCCURS 0,
    order_cond_item          LIKE  bapicondit OCCURS 0,
    order_cond_qty_scale     LIKE  bapicondqs OCCURS 0,
    order_cond_val_scale     LIKE  bapicondvs OCCURS 0.

* get details for sales order
  sales_documents-vbeln = i_vbeln.
  COLLECT sales_documents.

  i_bapi_view-header = 'X'.
  i_bapi_view-item = 'X'.
  i_bapi_view-sdcond = 'X'.
  i_bapi_view-sdcond_add = 'X'.

  CALL FUNCTION 'BAPISDORDER_GETDETAILEDLIST'
    EXPORTING
      i_bapi_view          = i_bapi_view
    TABLES
      sales_documents      = sales_documents[]
      order_conditions_out = order_cond_out[]
      order_cond_head      = order_cond_head
      order_cond_item      = order_cond_item
      order_cond_qty_scale = order_cond_qty_scale
      order_cond_val_scale = order_cond_val_scale.

  t_output[] = order_cond_out[].

ENDFUNCTION.

_________________
Молитва - это запрос разработчику на изменение кода программы.
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 -> SD 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 cannot 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.