Posted: Thu Jan 24, 2008 10:57 pm Post subject: Create Sales Order using SD_SALESDOCUMENT_CREATE
Code:
* Variablen und Strukturen
DATA: headerin TYPE bapisdhd1,
headerout TYPE bapisdhd,
itemsin TYPE TABLE OF bapisditm WITH HEADER LINE,
partner TYPE TABLE OF bapiparnr WITH HEADER LINE,
schedin TYPE TABLE OF bapischdl WITH HEADER LINE.
DATA: zsd_preisfindung TYPE zsd_preisfindung.
*Parameter für Selektionsbild, können von externen Aufruf gefüllt werden
PARAMETERS: p_auart TYPE bapisdhd1-doc_type,
p_vkorg TYPE bapisdhd1-sales_org,
p_vtweg TYPE bapisdhd1-distr_chan,
p_spart TYPE bapisdhd1-division,
p_pdate TYPE bapisdhd1-price_date,
p_prolle TYPE bapiparnr-partn_role,
p_partn TYPE bapiparnr-partn_numb,
p_matnr TYPE bapisditm-material,
p_menge TYPE bapisditm-target_qty,
p_eidat TYPE bapischdl-req_date.
START-OF-SELECTION.
* Füllen der Daten für Aufruf des Funktionsbausteins *********
* Kopfdaten füllen
headerin-doc_type = p_auart.
headerin-sales_org = p_vkorg.
headerin-distr_chan = p_vtweg.
headerin-division = p_spart.
headerin-price_date = p_pdate.
Age: 160 Joined: 04 Oct 2007 Posts: 1218 Location: Санкт-Петербург
Posted: Mon Dec 29, 2008 11:32 pm Post subject:
Code:
DATA: order_header_in LIKE bapisdhd1.
DATA: order_items_in TYPE STANDARD TABLE OF bapisditm WITH HEADER LINE.
DATA: order_schedules_in
TYPE STANDARD TABLE OF bapischdl WITH HEADER LINE.
DATA: order_partners TYPE STANDARD TABLE OF bapiparnr WITH HEADER LINE.
DATA: return TYPE STANDARD TABLE OF bapiret2 WITH HEADER LINE.
data: itemx like bapisditmx occurs 10 with header line.
*Add following lines with more than one line
itemx-itm_number = '000010'.
itemx-updateflag = 'I'.
itemx-material = 'X'.
itemx-target_qty = 'X'.
append itemx.
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.