Back order Delivery Detail using API
Hi All,
Is there any API to back order the Delivery detail?.. Please let me know what is the API and how it can be done.
Thanks and Regards,
Mahesh
I used WSH_INTERFACE.Update_Shipping_Attributes to backorder the lines.
Thanks and Regads,
Mahesh
Similar Messages
-
Req:Download of purchase order item details using ALV oops
Hi all,
How to download the purchase order item details using ALV oops from the output of header detailsHi all,
How to download the purchase order item details using ALV oops from the output of header details -
IMPORT OF INSTALLATION DETAILS USING API
We have got orders in the existing 11.5.10 system now we want to import the systems from our legacy system and link them to the orders. I know we can create the systems using CSI_SYSTEM_PUB but how do we link them to order lines so that they are visable in order line installation details. Is there a api to do this? Please help.
Thank you,
Nag.Nag
There is no public API but a group API is available. Assuming that you have already created transaction lines (using CSI_T_TXN_DETAILS_GRP) you can use CSI_T_TXN_SYSTEMS_GRP to assign systems. So first you create transaction lines and then systems.
Thanks
Nagamohan -
Req:Download of purchase order item details using ALV
Hi all,
In my requirement i have to display the output like this by using fm reuse_alv_commentary_write.But i need space in between them like this.please help me in doing this.
From: Belverin B.V. Order nr. : PO-B013554
To: GRAF. BV
Date: 28-JUL-2005 14:02 Doc. Currency: EURHi,
To add more gap you can try html_top_of_page in place of commentry write ....
FORM html_top_of_page USING top TYPE REF TO cl_dd_document.
DATA: l_text(255) TYPE c.
DATA: text1(255) TYPE c.
DATA: t_header TYPE REF TO cl_dd_table_element ,
wa_header TYPE REF TO cl_dd_table_area.
CALL METHOD top->add_gap "to add gap as you like....
EXPORTING
width = 10.
CALL METHOD top->add_text
EXPORTING
text = <your text>
* fix_lines =
sap_style = 'HEADING'
sap_color = cl_dd_document=>list_heading_int
sap_fontsize = 'MEDIUM'
sap_fontstyle = 'ARIAL'
sap_emphasis = cl_dd_document=>strong.
* style_class =
* CHANGING
* document = -
Urgent: how to cancel orders in OM using API.oe_order_pub
Hi All,
I have written API - oe_order_pub, its compiling successfully but the orders are not getting cancelled. Do I need to add few more things for the following code...
Please help
create or replace package body apcx_test_cancel_order is
PROCEDURE process_order_api (
p_header_rec IN OUT oe_order_pub.header_rec_type,
p_line_tbl IN OUT oe_order_pub.line_tbl_type,
p_action_request_tbl IN OUT oe_order_pub.request_tbl_type,
x_return_status OUT VARCHAR2,
x_msg_count OUT NUMBER,
x_msg_data OUT VARCHAR2) IS
l_header_val_rec oe_order_pub.header_val_rec_type;
l_header_adj_tbl oe_order_pub.header_adj_tbl_type;
l_header_adj_val_tbl oe_order_pub.header_adj_val_tbl_type;
l_header_price_att_tbl oe_order_pub.header_price_att_tbl_type;
l_header_adj_att_tbl oe_order_pub.header_adj_att_tbl_type;
l_header_adj_assoc_tbl oe_order_pub.header_adj_assoc_tbl_type;
l_header_scredit_tbl oe_order_pub.header_scredit_tbl_type;
l_header_scredit_val_tbl
oe_order_pub.header_scredit_val_tbl_type;
l_line_val_tbl oe_order_pub.line_val_tbl_type;
l_line_adj_tbl oe_order_pub.line_adj_tbl_type;
l_line_adj_val_tbl oe_order_pub.line_adj_val_tbl_type;
l_line_price_att_tbl oe_order_pub.line_price_att_tbl_type;
l_line_adj_att_tbl oe_order_pub.line_adj_att_tbl_type;
l_line_adj_assoc_tbl oe_order_pub.line_adj_assoc_tbl_type;
l_line_scredit_tbl oe_order_pub.line_scredit_tbl_type;
l_line_scredit_val_tbl oe_order_pub.line_scredit_val_tbl_type;
l_lot_serial_tbl oe_order_pub.lot_serial_tbl_type;
l_lot_serial_val_tbl oe_order_pub.lot_serial_val_tbl_type;
BEGIN
oe_order_pub.process_order (p_api_version_number => 1.0,
p_init_msg_list => fnd_api.g_true,
p_return_values => fnd_api.g_false,
p_action_commit => fnd_api.g_false,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data,
p_header_rec => p_header_rec,
p_line_tbl => p_line_tbl,
p_action_request_tbl => p_action_request_tbl,
x_header_rec => p_header_rec,
x_header_val_rec => l_header_val_rec,
x_header_adj_tbl => l_header_adj_tbl,
x_header_adj_val_tbl => l_header_adj_val_tbl,
x_header_price_att_tbl => l_header_price_att_tbl,
x_header_adj_att_tbl => l_header_adj_att_tbl,
x_header_adj_assoc_tbl => l_header_adj_assoc_tbl,
x_header_scredit_tbl => l_header_scredit_tbl,
x_header_scredit_val_tbl => l_header_scredit_val_tbl,
x_line_tbl => p_line_tbl,
x_line_val_tbl => l_line_val_tbl,
x_line_adj_tbl => l_line_adj_tbl,
x_line_adj_val_tbl => l_line_adj_val_tbl,
x_line_price_att_tbl => l_line_price_att_tbl,
x_line_adj_att_tbl => l_line_adj_att_tbl,
x_line_adj_assoc_tbl => l_line_adj_assoc_tbl,
x_line_scredit_tbl => l_line_scredit_tbl,
x_line_scredit_val_tbl => l_line_scredit_val_tbl,
x_lot_serial_tbl => l_lot_serial_tbl,
x_lot_serial_val_tbl => l_lot_serial_val_tbl,
x_action_request_tbl => p_action_request_tbl);
END process_order_api;
PROCEDURE cancel_order (
p_order_header_id oe_order_headers.header_id%TYPE,
p_change_reason_code VARCHAR2,
p_change_comments VARCHAR2,
x_return_status OUT VARCHAR2,
x_msg_count OUT NUMBER,
x_msg_data OUT VARCHAR2) IS
l_header_rec oe_order_pub.header_rec_type := oe_order_pub.g_miss_header_rec;
l_stmt NUMBER;
BEGIN
l_stmt := 10;
l_header_rec := OE_ORDER_PUB.G_MISS_HEADER_REC;
l_header_rec.operation := oe_globals.g_opr_update;
l_header_rec.header_id := p_order_header_id;
l_header_rec.cancelled_flag := 'Y';
l_header_rec.change_reason := p_change_reason_code;
l_header_rec.change_comments := p_change_comments;
-- Call process order api
l_stmt := 20;
process_order_api (p_header_rec => l_header_rec,
p_line_tbl => oe_order_pub.g_miss_line_tbl,
p_action_request_tbl => oe_order_pub.g_miss_request_tbl,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data);
l_stmt := 30;
EXCEPTION
WHEN OTHERS THEN
oe_msg_pub.add_text ('Unexpected error in apcx_test_order_api.cancel_order, stmt ' || l_stmt || ': ' ||SQLERRM);
x_msg_count := NVL (x_msg_count, 0) + 1;
x_return_status := fnd_api.g_ret_sts_unexp_error;
if x_return_status = FND_API.G_RET_STS_SUCCESS then
dbms_output.put_line('success');
commit;
else
dbms_output.put_line('failure');
rollback;
end if;
end;
END apcx_test_cancel_order;
Thanks in advance.
Raj
Message was edited by:
user613675Hi,
Can you pls try by passing this parameter value too.
l_header_adj.adjusted_amount := 5;
Thanks,
Praveen -
Req:Download of purchase order item details using normal ALV
Hi all,
Can we display the output as script form by using function module reuse_alv_grid_display_lvc.u can use the PRINT button above in the output...
-
Table name for purchase order delivery fields
Hi Gurus,
Can you please tell me the name of the tables and the joining condition for purchase order delivery details like Name, street , city, postal code, address detail and the joining condition?
Regards
MD. SAMYHi MD. SAMY,
1. Table EKPO has details lat line item level.
2. You must make a simple ABAP program in the infosets (or functional area) that contain a line "addrnumber = ekpo-adrnr" while addrnumber is ADRC table field.
3. Choose fields that you want in ADRC and put it into new fields (e.g. : DELI_NAME2 = adrc-name2., etc)
4. The new field attribute must be maintained in the infosets (in EXSTRA).
5. Now in the query you have those fields.
Regards,
Sameer -
SALES ORDER LINE IS CANCELLED BUT DELIVERY DETAIL IS SHOING AS BACKORDERED
SALES ORDER LINE IS CANCELLED BUT still the DELIVERY DETAIL IS showing as BACKORDERED it should be in cancelled
status.The Sales order (only one ex:3904854) is cancelled , however order in shipping transactions screen indicates order is on backorder.
at that time of order cancellation the line level workflow error out due to the Workflow package is inactive .
I tried to resubmit the error out workflow using retry option from the responsibility “Workflow Administrator” the workflow is completed with forcible option but still the delivery detail is in back order status not changing it to cancel status.
Error Name :-4068 [Error Process Error: WF Error Message: ORA-04068: existing state of packages has been discarded
ORA-04061: existing state of package body "APPS.XRX_SUPPLIES_NEW_WF_PKG" has been invalidated
ORA-04065: not executed, altered or dropped package body "APPS.XRX_SUPPLIES_NEW_WF_PKG"
ORA-06508: PL/SQL: could not find program unit being called: "APPS.XRX_SUPPLIES_NEW_WF_PKG" [Error Process Error: 3114: Activity 'WFERROR/R_ERROR_RETRY' is not a process.]
Error Stack: Wf_Engine_Util.Function_Call(XRX_SUPPLIES_NEW_WF_PKG.XRX_CLOSE_LINE_DETAILS, OEOL, 55098479, 195982, RUN)
[Error Process Error: Wf_Engine.CreateProcess(WFERROR, WF5147218, R_ERROR_RETRY) ]Mohan
You need a simple script to get the status corrected. Log an SR or search metalink for the script. I am sure there is one out there (if you search with the orphan reservations). This script supported, but not exactly targeted at your problem But it will solve it. You can log an SR and confirm.
Thanks
Nagamohan -
How 2 creat report for displaying the details of a Delivery Document using
how to create report for displaying the details of a Delivery Document using the tables LIKP, LIPS
thank you
regards,
jagrut bharatkumar shukla
points will be rewardedHI
I AM GIVING YOU MY DELIVERY DOCUMENT CODE...MODIFY IT ACCORDING TO YOUR REQUIREMENT
*& Report ZDELIVERY *
report zdelivery message-id z9bhu .
types: begin of t_likp,
vbeln type likp-vbeln, "Delivery
erdat type likp-erdat, "Date for rec creation
* LFDAT TYPE LIKP-LFDAT, "Delevery Date
* WAERK TYPE LIKP-WAERK, "Currency
kunnr type likp-kunnr, "Ship-To Party
kunag type likp-kunag, "Sold-to party
traty type likp-traty, "Means-of-Transport
end of t_likp.
types: begin of t_lips,
vbeln type lips-vbeln, "Delivery
posnr type lips-posnr, "Delivery item
matnr type lips-matnr, "Material Number
arktx type lips-arktx, "Short Text for Sales Order Item
lfimg type lips-lfimg, "Actual quantity delivered
netpr type lips-netpr,
* MEINS TYPE LIPS-MEINS, "Base Unit of Measure
vgbel type lips-vgbel, "Doc no of the reference document
end of t_lips.
types: begin of t_vbpa,
vbeln type vbpa-vbeln, "SD DocumenT Number
posnr type vbpa-posnr, "Item number
parvw type vbpa-parvw, "Partner function
kunnrb type vbpa-kunnr, "Customer Number 1
end of t_vbpa.
types: begin of t_kna1,
kunnr type kna1-kunnr, "Customer Number 1
name1 type kna1-name1, "Name 1
ort01 type kna1-ort01, "City
adrnr type kna1-adrnr, "Address
end of t_kna1.
types: begin of t_li_vbpa,
vbeln type likp-vbeln, "Delivery
erdat type likp-erdat, "Date for rec creation
* LFDAT TYPE LIKP-LFDAT, "Delevery Date
* WAERK TYPE LIKP-WAERK, "Currency
kunnr type likp-kunnr, "Ship-To Party
kunag type likp-kunag, "Sold-to party
traty type likp-traty, "Means-of-Transport
vbeln1 type lips-vbeln, "Delivery
posnr type lips-posnr, "Delivery item
matnr type lips-matnr, "Material Number
arktx type lips-arktx, "Short Text for Sales Order Item
lfimg type lips-lfimg, "Actual quantity delivered
netpr type lips-netpr, "Net Price
* MEINS TYPE LIPS-MEINS, "Base Unit of Measure
vgbel type lips-vgbel, "Doc no of the reference document
vbeln3 type vbpa-vbeln, "SD DocumenT Number
parvw type vbpa-parvw, "Partner function
kunnrb type vbpa-kunnr, "Customer Number 1
end of t_li_vbpa.
types: begin of t_final,
vbeln type likp-vbeln, "Delivery
erdat type likp-erdat, "Date for rec creation
kunnr type likp-kunnr, "Ship-To Party
kunag type likp-kunag, "Sold-to party
traty type likp-traty, "Means-of-Transport
vbeln1 type lips-vbeln, "Delivery
posnr type lips-posnr, "Delivery item
matnr type lips-matnr, "Material Number
arktx type lips-arktx, "Short Text for Sales Order Item
lfimg type lips-lfimg, "Actual quantity delivered
netpr type lips-netpr, "Net Price
vgbel type lips-vgbel, "Doc no of the reference document
vbeln3 type vbpa-vbeln, "SD DocumenT Number
parvw type vbpa-parvw, "Partner function
kunnrb type vbpa-kunnr, "Customer Number 1
name1 type kna1-name1, "Name 1
ort01 type kna1-ort01, "City
adrnr1 type kna1-adrnr, "Address
name2 type kna1-name1, "Name 1
ort02 type kna1-ort01, "City
adrnr2 type kna1-adrnr, "Address
name3 type kna1-name1, "Name 1
ort03 type kna1-ort01, "City
adrnr3 type kna1-adrnr, "Address
end of t_final.
* D A T A D E C L A R A T I O N
*&*********Internal Table Declaration****************&*
data: it_likp type standard table of t_likp.
data: it_lips type standard table of t_lips.
data: it_vbpa type standard table of t_vbpa.
data: it_kna1 type standard table of t_kna1.
data: it_li_vbpa type standard table of t_li_vbpa.
data: it_li_vbpa_temp type standard table of t_li_vbpa.
data: it_final type standard table of t_final.
*&*********Work Area Declaration********************&*
data: wa_likp type t_likp.
data: wa_lips type t_lips.
data: wa_vbpa type t_vbpa.
data: wa_kna1 type t_kna1.
data: wa_li_vbpa type t_li_vbpa.
data: wa_li_vbpa_temp type t_li_vbpa.
data: wa_final type t_final.
*&*********Data Declaration************************&*
data: d_vbeln type likp-vbeln.
data: flag type i value 0.
* S E L E C T I O N S C R E E N D E C L A R A T I O N
selection-screen begin of block block2 with frame title text-001.
select-options: s_vbeln for d_vbeln obligatory. "Delivery no
selection-screen end of block block2.
* A T S E L E C T I O N - S C R E E N E V E N T S
*AT SELECTION-SCREEN.
*PERFORM VALIDATE_DATA.
* S T A R T O F S E L E C T I O N E V E N T S
start-of-selection.
perform fetch_data.
perform merge_data_kna1.
*INCLUDE Z9BT_SH_***4_FORMS.
call function 'OPEN_FORM'
exporting
* APPLICATION = 'TX'
* ARCHIVE_INDEX =
* ARCHIVE_PARAMS =
device = 'PRINTER'
* DIALOG = 'X'
* FORM = ' '
language = sy-langu
* OPTIONS =
* MAIL_SENDER =
* MAIL_RECIPIENT =
* MAIL_APPL_OBJECT =
* RAW_DATA_INTERFACE = '*'
* SPONUMIV =
* IMPORTING
* LANGUAGE =
* NEW_ARCHIVE_PARAMS =
* RESULT =
exceptions
canceled = 1
device = 2
form = 3
options = 4
unclosed = 5
mail_options = 6
archive_error = 7
invalid_fax_number = 8
more_params_needed_in_batch = 9
spool_error = 10
codepage = 11
others = 12
if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
sort it_final by vbeln.
loop at it_final into wa_final.
call function 'START_FORM'
exporting
* ARCHIVE_INDEX =
form = 'Z9BT_DELIVERY'
language = sy-langu
* STARTPAGE = ' '
* PROGRAM = ' '
* MAIL_APPL_OBJECT =
* IMPORTING
* LANGUAGE =
exceptions
form = 1
format = 2
unended = 3
unopened = 4
unused = 5
spool_error = 6
codepage = 7
others = 8
if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
call function 'WRITE_FORM'
exporting
element = 'ITEM_LIST'
function = 'SET'
type = 'BODY'
window = 'MAIN'
* IMPORTING
* PENDING_LINES =
* EXCEPTIONS
* ELEMENT = 1
* FUNCTION = 2
* TYPE = 3
* UNOPENED = 4
* UNSTARTED = 5
* WINDOW = 6
* BAD_PAGEFORMAT_FOR_PRINT = 7
* SPOOL_ERROR = 8
* CODEPAGE = 9
* OTHERS = 10
if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
call function 'END_FORM'
* IMPORTING
* RESULT =
exceptions
unopened = 1
bad_pageformat_for_print = 2
spool_error = 3
codepage = 4
others = 5
if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
endloop.
call function 'CLOSE_FORM'
* IMPORTING
* RESULT =
* RDI_RESULT =
* TABLES
* OTFDATA =
exceptions
unopened = 1
bad_pageformat_for_print = 2
send_error = 3
spool_error = 4
codepage = 5
others = 6
if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
*& Form VALIDATE_DATA
* text
* --> p1 text
* <-- p2 text
form validate_data .
select single vbeln into wa_likp-vbeln
from likp where vbeln in s_vbeln.
append wa_likp to it_likp.
if sy-subrc <> 0.
flag = 1.
endif.
endform. " VALIDATE_DATA
*& Form FETCH_DATA
* text
* --> p1 text
* <-- p2 text
form fetch_data .
select a~vbeln
a~erdat
a~kunnr
a~kunag
a~traty
b~vbeln
b~posnr
b~matnr
b~arktx
b~lfimg
b~netpr
b~vgbel
c~vbeln
c~parvw
c~kunnr
into table it_li_vbpa
from likp as a
left outer join lips as b on a~vbeln = b~vbeln
inner join vbpa as c on b~vgbel = c~vbeln
where a~vbeln in s_vbeln and
c~parvw = 'RE'.
endform. " FETCH_DATA
*& Form MERGE_DATA_KNA1
* text
* --> p1 text
* <-- p2 text
form merge_data_kna1 .
if it_li_vbpa[] is not initial.
it_li_vbpa_temp[] = it_li_vbpa[].
sort it_li_vbpa_temp by kunnr.
delete adjacent duplicates from it_li_vbpa_temp comparing kunnr.
loop at it_li_vbpa into wa_li_vbpa.
read table it_li_vbpa_temp into wa_li_vbpa_temp with key kunnr =
wa_li_vbpa-kunag.
if sy-subrc <> 0.
wa_li_vbpa_temp = wa_li_vbpa.
append wa_li_vbpa_temp to it_li_vbpa_temp.
endif.
read table it_li_vbpa_temp into wa_li_vbpa_temp with key kunnr =
wa_li_vbpa-kunnrb.
if sy-subrc <> 0.
wa_li_vbpa_temp = wa_li_vbpa.
append wa_li_vbpa_temp to it_li_vbpa_temp.
endif.
endloop.
endif.
if it_li_vbpa_temp[] is not initial.
select kunnr
name1
ort01
adrnr into table it_kna1 from kna1
for all entries in it_li_vbpa_temp
where kunnr = it_li_vbpa_temp-kunnr.
endif.
loop at it_li_vbpa into wa_li_vbpa .
wa_final-vbeln = wa_li_vbpa-vbeln.
wa_final-erdat = wa_li_vbpa-erdat.
*it_final-LFART = it_li_vbpa-LFART.
wa_final-kunnr = wa_li_vbpa-kunnr.
wa_final-kunag = wa_li_vbpa-kunag.
*it_final-VSTEL = it_li_vbpa-VSTEL.
wa_final-traty = wa_li_vbpa-traty.
wa_final-vbeln1 = wa_li_vbpa-vbeln.
wa_final-posnr = wa_li_vbpa-posnr.
wa_final-matnr = wa_li_vbpa-matnr.
wa_final-arktx = wa_li_vbpa-arktx.
wa_final-lfimg = wa_li_vbpa-lfimg.
wa_final-netpr = wa_li_vbpa-netpr.
*wa_final-GEWEI = it_li_vbpa-GEWEI.
*it_final-VOLUM = it_li_vbpa-VOLUM.
*it_final-VOLEH = it_li_vbpa-VOLEH.
wa_final-vgbel = wa_li_vbpa-vgbel.
wa_final-vbeln3 = wa_li_vbpa-vbeln.
*wa_final-PARVW = wa_li_vbpa-PARVW.
wa_final-kunnrb = wa_li_vbpa-kunnrb.
read table it_kna1 into wa_kna1 with key kunnr = wa_li_vbpa-kunnr.
if sy-subrc = 0.
wa_final-name1 = wa_kna1-name1.
wa_final-ort01 = wa_kna1-ort01.
wa_final-adrnr1 = wa_kna1-adrnr.
endif.
read table it_kna1 into wa_kna1 with key kunnr = wa_li_vbpa-kunag.
if sy-subrc = 0.
wa_final-name2 = wa_kna1-name1.
wa_final-ort02 = wa_kna1-ort01.
wa_final-adrnr2 = wa_kna1-adrnr.
endif.
read table it_kna1 into wa_kna1 with key kunnr = wa_li_vbpa-kunnrb.
if sy-subrc = 0.
wa_final-name3 = wa_kna1-name1.
wa_final-ort03 = wa_kna1-ort01.
wa_final-adrnr3 = wa_kna1-adrnr.
endif.
append wa_final to it_final.
clear wa_final.
endloop.
endform. -
Delivery details of sale order in CRM
Hello Experts,
I've a scenario in CRM where sale order is triggered in ECC & acknowlegement was also received in CRM from ECC under doc. flow. Now outbound delivery & goods movement document have created in ECC. But this information has not passed to CRM. Line item status are Successfully distributed. No unprocessed BDOC's are found in SMW01. ECC sale order status is in complete & fully delivered. Can anybody guide me whether any custom setting is required for this doc flow..?
Regards
Devika.SHi Srikanth,
This object is very much maintained in CRM. For transaction Field service order this to & fro doc. flow is happening. Message is passed to CRM with all delivery details from R/3 without any issue.
But in my scenario transaction used is Project Service order, for this transaction type delivery details are not recived from R/3. So my question comes here whether custom setting is reqd. wrt transaction type..? If yes, pls provide me the path.
Regards
Devika.S -
How to cancel a Move Order line using API
Hi
I have a requirement, where I have to cancel Move order lines.
At times, multiple Move order lines are getting created for the same Sales order line.
Even after the Sales Order line is shipped and closed, the move order line is still open and it also has a corresponding pending transaction in mtl_material_transactions_temp table.
I came across INV_MOVE_ORDER_PUB.process move order line API.
how do I use it to cancel the move order line. Any sample codes would be highly welcome.
ThanksFinally, found an alternate solution.
used the following code.
===================================
SET serveroutput on size 1000000
DECLARE
l_return_status VARCHAR2(100);
l_msg_count NUMBER;
l_msg_data VARCHAR2(2000);
l_msg_index NUMBER;
l_user_id NUMBER;
l_resp_id NUMBER;
l_appl_id NUMBER;
l_org_id NUMBER := &org_id;
l_move_order_line_id NUMBER := &mo_line_id ;
BEGIN
SELECT user_id
INTO l_user_id
FROM fnd_user
WHERE user_name = 'PRAWILNSON';
SELECT responsibility_id
,application_id
INTO l_resp_id
,l_appl_id
FROM fnd_responsibility_vl
WHERE responsibility_name = 'Order Management Super User';
FND_GLOBAL.apps_initialize (l_user_id, l_resp_id, l_appl_id);
MO_GLOBAL.set_policy_context ('S', l_org_id);
MO_GLOBAL.init;
DBMS_OUTPUT.put_line ('Calling INV_MO_BACKORDER_PVT to Backorder MO');
DBMS_OUTPUT.put_line ('===============================');
inv_mo_backorder_pvt.backorder (p_line_id => l_move_order_line_id
,x_return_status => l_return_status
,x_msg_count => l_msg_count
,x_msg_data => l_msg_data);
DBMS_OUTPUT.put_line ('Return Status is : '|| l_return_status);
-- Check Return Status
IF l_return_status = fnd_api.g_ret_sts_success THEN
DBMS_OUTPUT.put_line ('Successfully BackOrdered the Move Order Line');
COMMIT;
ELSE
DBMS_OUTPUT.put_line ('Could not able to Back Order Line Due to Following Reasons' );
ROLLBACK;
FOR j IN 1 .. l_msg_count LOOP
FND_MSG_PUB.get(p_msg_index => j
,p_encoded => fnd_api.g_false
,p_data => l_msg_data
,p_msg_index_out => l_msg_index);
DBMS_OUTPUT.put_line ('Error Message is : '|| l_msg_data);
END LOOP;
END IF;
END;
/ -
Upload of purchase order details using LSMW
Hi friends,
I encountered a problem while uploading purchase order details using LSMW . in the field mapping I could not able to fine the field TCODE. as a result I could not assign the transaction code ME21. could you please suggest me a solution.
thanksHai
Check with the following
Select fifth Radio button then follow the bellow step
<b>5) select radio-Button 5 and execute
Maintain Field Mapping and Conversion Rules
Select the Tcode and click on Rule button there you will select constant
and press continue button
give Transaction Code : ME21 and press Enter</b>
Thanks & regards
Sreenivasulu P -
Move Order lines and Delivery Detail lines - Relationship
Hi All,
Is there a one - to - one realtionship between Move Order Line and Delivery Detail Line?
i.e., Each Move Order line will correspond to only one Delivery Details line Record?
Thanks in advance.
Regards,
GowriHello,
There is a one - to - many relationship between Move Order Line and Delivery Detail Line when you split lines in delivery.
select * from mtl_material_transactions t you have source_id.
select * from WSH_DELIVERABLES_v t you have move_order_id.
Regards,
Luko -
Deleting Sales Order Details using BAPI_SALESORDER_CHANGE And Reinserting
Hi All,
I need to <b>change a Sales Order</b> in such a way that I would <b>delete all the existing Line Items</b> of that SO And <b>then reinsert new Line Items</b> as generally is the practice of saving a document.(Update Header-Delete Old Item Entries-Reinsert New Present Entries).
I coded a small test program in ABAP using the <b>BAPI_SALESORDER_GETLIST And BAPI_SALESORDER_CHANGE</b>.
In order to affect the Qty I have to update the Schedule Parameter also of the BAPI_SALESORDER_CHANGE Function.But this causes a new entry in VBEP.
eg:
<b>Before BAPI Calls</b>
SO-Number:9001
Header:9001,etc......
Detail:ItemNo=10,Material=xyz,TargetQty=100,etc..
Scedule:ItemNo=10,Scheduleline=1,Req_Qty=100,etc...
I coded the program such that
1.I <b>Get the List of Items</b> using BAPI_SALESORDER_GETLIST.
2.Call the <b>BAPI_SALESORDER_CHANGE</b> filling appropraite values in Parameters <b>with UpdateFlag = 'D'</b>
3.<b>Insert new values</b> in OrderItems And Schedule Parameters
say:
Detail:ItemNo=10,Material=xyz,TargetQty=25,etc..
Scedule:ItemNo=10,Scheduleline=1,Req_Qty=25,etc...
4.<b>Call the BAPI_SALESORDER_CHANGE</b> filling appropraite values in Parameters <b>with UpdateFlag = 'I'</b>
<b>The output now becomes.</b>Header:9001,etc......
Detail:ItemNo=10,Material=xyz,TargetQty=100,etc..
Scedule:ItemNo=10,Scheduleline=1,Req_Qty=100,etc...
ItemNo=10,Scheduleline=2,Req_Qty=25,etc...
Now After Commit when I see my <b>SO it shows me a qty of
125</b>.
I am attaching the code for your analysis.
Thanx in advance.
*& Report ZSM_CHANGESALESORDER *
REPORT ZSM_CHANGESALESORDER .
DATA:
For Calling the GetList BAPI Function
CUSTOMER_NUMBER LIKE BAPI1007-CUSTOMER,
SALES_ORGANIZATION LIKE BAPIORDERS-SALES_ORG,
IT_SALES_ORDERS LIKE TABLE OF BAPIORDERS,
WA_SALES_ORDERS LIKE LINE OF IT_SALES_ORDERS,
IT_RETURN LIKE TABLE OF BAPIRETURN,
WA_RETURN LIKE LINE OF IT_RETURN.
For Calling the ChangeFromData BAPI Function
DATA:
SALESDOCUMENT LIKE BAPIVBELN-VBELN,
WA_ORDER_HEADER_IN LIKE BAPISDH1,
WA_ORDER_HEADER_INX LIKE BAPISDH1X,
IT_ORDER_ITEM_IN LIKE TABLE OF BAPISDITM ,
WA_ORDER_ITEM_IN LIKE LINE OF IT_ORDER_ITEM_IN,
IT_ORDER_ITEM_INX LIKE TABLE OF BAPISDITMX ,
WA_ORDER_ITEM_INX LIKE LINE OF IT_ORDER_ITEM_INX,
IT_SCHEDULE_LINES LIKE TABLE OF BAPISCHDL ,
WA_SCHEDULE_LINES LIKE LINE OF IT_SCHEDULE_LINES,
IT_SCHEDULE_LINESX LIKE TABLE OF BAPISCHDLX ,
WA_SCHEDULE_LINESX LIKE LINE OF IT_SCHEDULE_LINESX,
IT_RETURN_CHG LIKE TABLE OF BAPIRET2,
WA_RETURN_CHG LIKE LINE OF IT_RETURN_CHG.
DATA:
IT_RETURN_CT LIKE BAPIRET2.
PARAMETERS:
P_SO LIKE VBAK-VBELN,
P_CUSTNO LIKE BAPI1007-CUSTOMER,
P_SORG LIKE BAPIORDERS-SALES_ORG.
START-OF-SELECTION.
SALESDOCUMENT = P_SO.
CUSTOMER_NUMBER = P_CUSTNO.
SALES_ORGANIZATION = P_SORG.
Retrieve the Existing Sales Order details for that Sales Order.
PERFORM GETREQSODETAILS.
Delete the Existing Sales Order details from that Sales Order.
PERFORM DELETEOLDSODETAILS.
Insert New details for that Sales Order.
PERFORM ADDNEWSODETAILS.
END-OF-SELECTION.
PERFORM COMMITTRANS.
*& Form GetReqSODetails
FORM GETREQSODETAILS .
CALL FUNCTION 'BAPI_SALESORDER_GETLIST'
EXPORTING
CUSTOMER_NUMBER = CUSTOMER_NUMBER
SALES_ORGANIZATION = SALES_ORGANIZATION
IMPORTING
RETURN = WA_RETURN
TABLES
SALES_ORDERS = IT_SALES_ORDERS.
*delete the Sales Order Details of Sales Orders other than the req.One
IF NOT IT_SALES_ORDERS[] IS INITIAL.
SORT IT_SALES_ORDERS BY SD_DOC.
LOOP AT IT_SALES_ORDERS INTO WA_SALES_ORDERS.
IF WA_SALES_ORDERS-SD_DOC NE SALESDOCUMENT.
DELETE IT_SALES_ORDERS.
ENDIF.
ENDLOOP.
ENDIF.
ENDFORM. " GetReqSODetails
*& Form deleteOldSODetails
FORM DELETEOLDSODETAILS .
DATA: IRECCOUNT TYPE I.
IRECCOUNT = 1.
*Clear all the Inernal Tables And Work Areas
*and Update the SO Header Index
PERFORM CLEARDATA.
PERFORM SOHEADERINDEX.
LOOP AT IT_SALES_ORDERS INTO WA_SALES_ORDERS.
*Fill the Order Details Index Internal Table
PERFORM FILLSODELETEDTLS_INDEX_PARAM
USING WA_SALES_ORDERS-ITM_NUMBER 'D'.
*Fill the Order Scedule Index Internal Table
PERFORM FILLSODELETESCH_INDEX_PARAM
USING WA_SALES_ORDERS-ITM_NUMBER IRECCOUNT 'D'.
ENDLOOP.
*call the Sales Order Change Fumction to delete the Existing Data
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
SALESDOCUMENT = SALESDOCUMENT
ORDER_HEADER_INX = WA_ORDER_HEADER_INX
TABLES
RETURN = IT_RETURN_CHG
ORDER_ITEM_INX = IT_ORDER_ITEM_INX
SCHEDULE_LINESX = IT_SCHEDULE_LINESX.
ENDFORM. " deleteOldSODetails
*& Form SOHeaderIndex
FORM SOHEADERINDEX .
WA_ORDER_HEADER_INX-UPDATEFLAG = 'U'.
ENDFORM. " SOHeaderIndex
*& Form FillSODeleteDtls_Index_param
FORM FILLSODELETEDTLS_INDEX_PARAM
USING VALUE(P_ITM_NUMBER) VALUE(P_FLAG).
WA_ORDER_ITEM_INX-ITM_NUMBER = P_ITM_NUMBER.
WA_ORDER_ITEM_INX-UPDATEFLAG = P_FLAG.
APPEND WA_ORDER_ITEM_INX TO IT_ORDER_ITEM_INX.
ENDFORM. " FillSODeleteDtls_Index_param
*& Form FILLSODELETEsch_Index_PARAM
FORM FILLSODELETESCH_INDEX_PARAM
USING VALUE(P_ITM_NUMBER) VALUE(P_RECCOUNT) VALUE(P_FLAG).
WA_SCHEDULE_LINESX-ITM_NUMBER = P_ITM_NUMBER.
WA_SCHEDULE_LINESX-SCHED_LINE = P_RECCOUNT.
WA_SCHEDULE_LINESX-UPDATEFLAG = P_FLAG.
APPEND WA_SCHEDULE_LINESX TO IT_SCHEDULE_LINESX.
ENDFORM. " FILLSODELETEsch_Index_PARAM
*& Form addnewSODETAILS
FORM ADDNEWSODETAILS .
DATA: IRECCOUNT TYPE I, ITEMNO TYPE I.
IRECCOUNT = 1.
*Clear all the Inernal Tables And Work Areas
*and Update the SO Header Index
PERFORM CLEARDATA.
PERFORM SOHEADERINDEX.
WHILE IRECCOUNT <= 1.
ITEMNO = IRECCOUNT * 10.
*Fill the New Order Details in the Internal Table
PERFORM FILLSODTLDATA USING ITEMNO 'TEST FG' 37 .
*Fill the Order Details Index Internal Table
PERFORM FILLSODELETEDTLS_INDEX_PARAM USING ITEMNO 'I'.
*Fill the New Schedule Details in the Internal Table
PERFORM FILLSOSCHDATA USING ITEMNO IRECCOUNT 37 .
*Fill the Order Scedule Index Internal Table
PERFORM FILLSODELETESCH_INDEX_PARAM
USING ITEMNO IRECCOUNT 'I'.
IRECCOUNT = IRECCOUNT + 1.
ENDWHILE.
*call the Sales Order Change Fumction to Insert New Data
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
SALESDOCUMENT = SALESDOCUMENT
ORDER_HEADER_INX = WA_ORDER_HEADER_INX
TABLES
RETURN = IT_RETURN_CHG
ORDER_ITEM_IN = IT_ORDER_ITEM_IN
ORDER_ITEM_INX = IT_ORDER_ITEM_INX
SCHEDULE_LINES = IT_SCHEDULE_LINES
SCHEDULE_LINESX = IT_SCHEDULE_LINESX.
ENDFORM. " addnewSODETAILS
*& Form clearData
FORM CLEARDATA .
CLEAR WA_ORDER_HEADER_INX.
CLEAR WA_ORDER_ITEM_INX.
REFRESH IT_ORDER_ITEM_INX.
CLEAR WA_SCHEDULE_LINESX.
REFRESH IT_SCHEDULE_LINESX.
CLEAR WA_RETURN.
REFRESH IT_RETURN.
CLEAR WA_ORDER_ITEM_IN.
REFRESH IT_ORDER_ITEM_IN.
CLEAR WA_SCHEDULE_LINES.
REFRESH IT_SCHEDULE_LINES.
ENDFORM. " clearData
*& Form FILLSODTLDATA
FORM FILLSODTLDATA USING VALUE(P_ITEMNO) VALUE(P_MATERIAL)
VALUE(P_TARGET_QTY) .
WA_ORDER_ITEM_IN-ITM_NUMBER = P_ITEMNO.
WA_ORDER_ITEM_IN-MATERIAL = P_MATERIAL.
WA_ORDER_ITEM_IN-TARGET_QTY = P_TARGET_QTY.
APPEND WA_ORDER_ITEM_IN TO IT_ORDER_ITEM_IN.
ENDFORM. " FILLSODTLDATA
*& Form FILLSOschDATA
FORM FILLSOSCHDATA USING VALUE(P_ITEMNO)
VALUE(P_RECCOUNT)
VALUE(P_REQ_QTY) .
WA_SCHEDULE_LINES-ITM_NUMBER = P_ITEMNO.
WA_SCHEDULE_LINES-SCHED_LINE = P_RECCOUNT.
WA_SCHEDULE_LINES-REQ_QTY = P_REQ_QTY.
APPEND WA_SCHEDULE_LINES TO IT_SCHEDULE_LINES.
ENDFORM. " FILLSOschDATA
*& Form committrans
FORM COMMITTRANS .
DATA:SUCCESSFLAG(1).
LOOP AT IT_RETURN_CHG INTO WA_RETURN_CHG.
IF WA_RETURN_CHG-TYPE = 'S'
AND WA_RETURN_CHG-ID = 'V1'
AND WA_RETURN_CHG-NUMBER = 311
AND SUCCESSFLAG IS INITIAL.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
IMPORTING
RETURN = IT_RETURN_CT.
SUCCESSFLAG = 'X'.
ENDIF.
ENDLOOP.
IF SUCCESSFLAG IS INITIAL.
WRITE: 'SORRY SOME ERROR'.
ELSE.
WRITE: 'SUCCESSFUL'.
ENDIF.
ENDFORM. " committransThanx wolfgang,
I needed that info.
As I had mentioned in the earlier posts, I want to delete the old Sales Order Item Details,
Schedule Details,Basic Price data And Reinsert data in the same.
I am giving u the algo that I have used.
1.<b>Get the SalesOrder Details</b> for a particular Sales Order using BAPI_SALESORDER_GETLIST(para:customer & sales Org and then deleting unwanted SO data).
2.<b>Delete</b> the Sales Order <b>Item Details,Schedule Details</b> using BAPI_SALESORDER_CHANGE.
3.<b>Commit</b> Transaction(<b>If I dont use this commit Error comes in Step No.7 while Commiting</b>)
using BAPI_TRANSACTION_COMMIT.
4.Check <b>Return Table</b> of both BAPI_SALESORDER_CHANGE and BAPI_TRANSACTION_COMMIT.
5.if Step No.4 is <b>Not okay</b> <b>then Rollback</b>(BAPI_TRANSACTION_TRANSACTIN) <b>and Exit</b> <b>else move to step 6</b>.
6.<b>Add New</b> Sales Order <b>Item Details,Schedule Details, Basic Price</b> using BAPI_SALESORDER_CHANGE.
7.<b>Commit Transaction</b> using BAPI_TRANSACTION_COMMIT.
8.<b>Check Return</b> Log of both BAPI_SALESORDER_CHANGE and BAPI_TRANSACTION_COMMIT.
9.if Step No.9 is okay then Exit else Rollback(BAPI_TRANSACTION_TRANSACTIN) and move to step 10.
10.Add Old Sales Order Item Details,Schedule Details, Basic Price from Data available in Internal
table(Filled in step.1 ) using BAPI_SALESORDER_CHANGE.
11.Commit Transaction using BAPI_TRANSACTION_COMMIT.
This <b>works fine in 1 server in which I get the message of Incomplete Data,etc...when I make a Sales Order from va01</b>.
But in another server where I dont this message,I get <b>error in step 7 or 11 as per the flow</b>.
The return structure of BAPI_TRANSACTION_COMMIT contains error with Message 'Updating was not possible'. Also the message 'Updation was terminated' cms frm the SAP server.
What could be the reason?
Thanx in advance -
How to import order from Interface table using Api Order Import
Hi All
I am using oracle EBus R12.
I was working in Data migration in Order management.
I have manually entered data in Interface table ie (oe_header_iface_all) and (oe_lines_iface_all)
And i have given the order_source_id as 2 and order_source as COPY.
And after that i ran the concurrent program with parameter as COPY but the concurrent program does'nt picks the order in the interface.
Can any one please tell the steps in OM.
Thanks & Regards
Srikkanth.MHi;
please check:
http://sureshvaishya.blogspot.com/2009/04/order-import-using-api.html
Also i suggest see:
http://irep.oracle.com/index.html
API User Notes - HTML Format [ID 236937.1]
R12.0.[3-4] : Oracle Install Base Api / Open Interface Setup Test [ID 427566.1]
Oracle Trading Community Architecture API User Notes, June 2003 [ID 241320.1]
Technical Uses of Customer Interface and TCA-API [ID 269121.1]
http://www.google.com.tr/#hl=tr&source=hp&q=Api+Order+Import+&oq=Api+Order+Import+&aq=f&aqi=&aql=&gs_sm=e&gs_upl=469l469l0l1l1l0l0l0l0l0l0ll0&fp=87c57485fd170fd2&biw=1259&bih=793
Regard
Helios
Maybe you are looking for
-
Question on the ADF Tree Table
Hi, I am using Jdev 10.1.3.2 and ADF BC. I have created a ADF Tree Table to display multiple attributes, both the master and detail VO are based on the same EO. It seems all of attributes are displayed in one colume, and there is no column heading, i
-
Hi, I turned my MacBook Pro off before I went to sleep, and this morning when I awaken. I can't seem to turn up or down my volume. It comes up with all the volume bars and a little circle sign with a diagonal line in the middle, like a stop sign. I h
-
Is it safe to overcharge my ipad mini?
IS IT SAFE TO OVERCHARGE MY IPAD MINI?
-
My power went out earlier (which happens a lot as I am on a payg meter) and when everything came back on my TV would no longer display my iMac screen. Both devices knew they were connected as when I unplugged the HDMI cable the TV said 'No Cable' and
-
Yesterday I opened up my iBook G4 and it instantly gave graphical glitches followed by a black screen. For a while I wasn't able to reboot the computer, it would just freeze while booting, sometimes giving the startup chime and white Apple loading sc