REPORT zcreate_dn.
DATA:lv_ship_point TYPE bapidlvcreateheader-ship_point VALUE '0001',
lv_due_date TYPE datum VALUE '20181205',
lv_delivery TYPE bapishpdelivnumb-deliv_numb,
lt_so_items LIKE TABLE OF bapidlvreftosalesorder,
ls_so_items LIKE LINE OF lt_so_items,
lt_return TYPE TABLE OF bapiret2,
ls_read TYPE order_view,
lt_item TYPE TABLE OF bapisdit,
lt_order_headers_out TYPE TABLE OF bapisdhd,
lt_header TYPE TABLE OF sales_key,
lt_bapisdtehd TYPE TABLE OF bapisdtehd,
lt_bapitextli TYPE TABLE OF bapitextli,
lt_bapiret2 LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
APPEND INITIAL LINE TO lt_header ASSIGNING FIELD-SYMBOL(<header>).
ls_read-item = 'X'.
<header>-vbeln = '0000000376'.
CALL FUNCTION 'BAPISDORDER_GETDETAILEDLIST'
EXPORTING
i_bapi_view = ls_read
TABLES
sales_documents = lt_header
order_items_out = lt_item.
LOOP AT lt_item ASSIGNING FIELD-SYMBOL(<item>).
APPEND INITIAL LINE TO lt_so_items ASSIGNING FIELD-SYMBOL(<fill>).
<fill>-ref_doc = <item>-doc_number.
<fill>-ref_item = <item>-itm_number.
<fill>-dlv_qty = <item>-req_qty.
<fill>-sales_unit = 'EA'.
ENDLOOP.
CALL FUNCTION 'BAPI_OUTB_DELIVERY_CREATE_SLS'
EXPORTING
ship_point = lv_ship_point
due_date = lv_due_date
IMPORTING
delivery = lv_delivery
TABLES
sales_order_items = lt_so_items
return = lt_return.
LOOP AT lt_return ASSIGNING FIELD-SYMBOL(<return>).
WRITE:/ | Type: { <return>-type }: { <return>-message } | COLOR COL_NEGATIVE.
ENDLOOP.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'
IMPORTING
return = lt_bapiret2.
LOOP AT lt_bapiret2 ASSIGNING <return>.
WRITE:/ 'Message:', <return>-message COLOR COL_POSITIVE.
ENDLOOP.
import ABSL;
var HttpMethod = "GET";
var HttpResource = ""; // not required
var ContentType = ""; // not required
var Body = ""; // not required
var HeaderParameter : collectionof NameAndValue; // not required
var URLParameter : collectionof NameAndValue;
var URLParameterEntry : NameAndValue;
URLParameterEntry.Name = "SoID";
URLParameterEntry.Value = this.ID.content;
URLParameter.Add(URLParameterEntry);
WebServiceUtilities.ExecuteRESTService("JerryExternalService", "JerryExternal", HttpMethod, HttpResource,
URLParameter, HeaderParameter,ContentType, Body);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
30 | |
16 | |
9 | |
8 | |
8 | |
7 | |
7 | |
6 | |
6 | |
5 |