PO header level error
Gurus,
I have an issue on the header level which says Source system is required field. Please specify.
Can some one tell me what this error is?
Regards
MV
Hi
If it is during creation of PO
check customization
SPRO>MM>Purchasing>Purchase Order>Define Screen Layout
there is
for your case Supplying Plant
and Source Stock Type
should be Opt.entry checked.
If it is Reqd.enty change please
Best Regards
Similar Messages
-
How do i pass the error message at header level in CRMD_order
Hi all,
i got one requirement like when i create/change the sevice order (CRMD_ORDER)
if net_value is more than 1000 i have to set the message 'E' like 'order is blocked'
else 'approved' at header level before going to save the order.
please help me out it is high priority and as i am new to CRM.
thanks in advance.
Thank you,
Madhu.Anil
You have to look for a BADI to add the Error Message.
Also use the FM CRM_MESSAGES_DISPLAY to display the message !
Thanks
<b>Allot points if this helps!</b> -
ME21N-Clear error at header level
Hello Experts,
I have a requirement to throw an error message in ME21N if the PR's Sale order has credit limit exceeded.
I have done this with exits. Once the error message is thrown, this error message sits at the header level. Even when deleting the erroraneous line item, this message is not cleared.
I want to remove this message at header level when this erroraneous record is deleted. Please guide me for this.
Thanks
SeemaHi,
Deactivate that Exit and do this with the BADI.
BADI for this is ME_PROCESS_PO_CUST.
There is one method Process_header. Do the validation in this method for the header level.
Hope this will be easy comparing with Exits.
With Regards,
Sumodh.P -
Error in confirmation of Transfer orders at Header level (TC LRF2)
Hello All,
A transfer order has single item. It has got confirmed at the item level for the full quantity. The confirmation switchbox at item level is checked in by the system automatically. But in header level the switch box is not checked in.
While trying to confirm the Transfer order at header level, the error message shows that the Transfer order is already confirmed. But the Transfer order still exists in LRF2.
Thanks in Advance.
Regards,
Sasi.Hi Marcos
Note 566995 is an old correction note, which is probably already implemented on your system but it describes the standard system design regarding confirmations posted in mass processing transactions:
When you enter an operation confirmation via the order info system or the mass processing the system now sets the confirmation type to 'Automatic final confirmation' as well as the indicator 'Post open reservations'. Thus the system automatically generates a final confirmation when you confirm the whole planned quantity and the operation receives status CNF (finally confirmed) instead of PCNF (partially confirmed).
System is designed that way because a mass processing transaction will be generally executed in background mode and a huge number of confirmations can be posted at the same time. Therefore, user will not be able to enter any value to the confirmation.
If you don't want this behaviour you could use the BAPI
BAPI_PRODORDCONF_CREATE_HDR to develop your own mass processing transaction to post confirmations.
BR
Caetano -
Error in entering header level conditional value - toomany line items to PO
Hi experts
I have an issue while processing a PO. While entering condition values like Freight, Customs duty etc in header level where the order contains more than 1000 line items, i am getting an error " too many line items, msg no.899". Can somebody, guide on this how this can be resolved.
rgds
RaghuHI Raghu,
The only possible way is to create two diffrent PO's.
As you have maintain various conditions, this will lead to updation of many FI documents at the time of GRN.
This is SAP Limitation.
Regards,
Amit
njoy SAP..
njou Life.... -
Heading level hierarchy errors when topics are in TOC more than once
I have discovered that the hierarchy in the Heading levels in
the Printed Documentation will differ from than in my online help
table of contents hierarchy, and that the problem is due to topics
that are intentionally in the TOC more than once.
For example, in chapter 5 of a particular help system the
hierarchy should be:
Heading 1 < Chapter 5 title from top-level book>
Heading 2 <title of second level book>
Heading 3 <title of topic that appears under second-level
book>*
What I actually get is:
Heading 1 < Chapter title from top-level book>
Heading 2 <title of second level book>
Heading 4 <title of topic that appears under second-level
book>*
* This same topic appeared in an earlier chapter. In that
chapter it was really at a Heading 4 level.
Due to company styles, etc. we use a numbering system at the
headings and in the TOC, so instead of
5
5.1
5.1.1
I erroneously get
5
5.1
5.1.1.1
This type of hierarchy issue appears multiple times in this
particular document (which I inherited by the way.)
Other than restructuring the document to not reuse topics in
different places in the TOC, is there a solution or a workaround
for this problem?
What I am doing so far, is generating the Print Documentation
one chapter at a time. As long as a topic is not reused with the
same chapter, my hierarchy of heading levels is maintained;
otherwise, it is not. Then I can put the chapters back together
after fixing the few places that still have heading level problems.
This however, will be quite cumbersome as this document is
translated into nine other languages.
I am using RoboHelp X5 for Word / Word 2003 for the source
and most of the translations; RoboHelp Asian Edition, Simplified
Chinese / Word 2003 for the Chinese translation. The heading level
hierarchy error occurs in both versions.>> AF: I've commented in sections...
Without Maintain Heading Levels, RH will apply heading levels
to the books and then the topic levels will get bumped down. So a
top level book will be Heading 1 and the Headings in the topic will
get bumped down to 2, 3 and 4 etc. If then you have another book
one level down so that it gets Heading 2 applied, the same topic
but under the level two book would then get 3, 4 and 5 applied.
That is not the original problem but hopefully we are agreed
that is how things work on that.
>> Yes - that is the expected behavior. When it didn't
happen as expected, that's what led me to the discovery of the
cause of the problem (topic reuse).
Your problem was that firstly Heading 3 got bumped to Heading
4 if the same topic was inserted into the TOC twice. I assume it
was OK in the first instance, or is it that when you add it twice
it goes wrong everywhere?
>> Your assumption is correct. First occurrence is
correct. Second, third, and fourth (yes - there is one topic that
is used 4 times! ) are not correct based on TOC hierarchy.
On the numbering, nothing surprises me. If you look at my
site you will see that for RH HTML, i gave up on getting it right.
I have had many queries on this and more than a few people have
indicated they will work on the problem and get it working. I'm
still waiting. There are many posts about outline numbering
problems. Has anyone got it working satisfactorily?
>> I don't really have numbering problems. The
numbering is following the RoboHelp-generated hierarchy and the
.dot template that I apply. It's just that the RH-generated
hierarchy and its heading levels don't correspond to the "real"
hierarchy because of the reuse issue.
I have seen various Word gurus maintain that numbering has
not worked entirely satisfactorily since Word 2! Also enough posts
to convince me this is a Word issue, not a RH issue.
If you want to create a new project and knock something up
that demonstrates this problem, by all means zip it up and send it.
I'll assume it will be a small project and zip to less than 5mb. If
more, contact me first.
>> Unless you have RoboHelp X3 Asian Edition,
Simplified Chinese, there is really no need. I plan to either avoid
the reuse issue in the source, or build the print doc in sections
which is easy enough in RoboHelp X5 for the non-Chinese languages.
It is in the older Asian edition where the problems are compounded
by the omitted reuse topics. If you do have RoboHelp X3 Asian
Edition, Simplified Chinese and want to experiment, I can send you
a cut-down version of the project. Don't feel obligated though;
unless you can read Chinese (I can't) it is very tedious to work
with. -
Header level pricing condition error
Hi Friends,
In a PO, I have 5 line items. I am giving freight condition type at header level for the entire po as Rs. 500. But the system calculates the freight charge as 500*5=2500. The freight condition type FRB1 is a fixed charge condition type.
The client wants the absolute freight charge should be for the entire PO.
Please advice how to solve this issue.
Thanks & Regards
SatyaHi,
the scales have nothing to do with this, they just allow different prices to be stored for different quantities.
But have you had a look at the "qty relevant" flag on the condition type?
Please do check the flags that are set, these do control the calculation.
Also make sure that you are using a condition type that has the "header conditions" flag set on. If you choose one that has only the item condition set on this may not be correct.
FRB1 (the one that you said that you are using) is an ITEM condition and should not be added to the header.
Steve B -
Error message at SC Header level
Hello,
I've made changes to check for approval notes to be mandatory when a shopping cart is rejected using the CHECK BAdI. The message doesn't come up when rejecting at header level, only when rejecting at item level is then that it comes up.
Your assistance will be appreciated.
TX
Chris.Hello,
I think this badi is not very efficient when rejecting from the inbox (header level), allready encounter pb with this.
Anyway, you'll need to go into the detail screen to add an approval note. Why not simply deactivate the direct approve and reject button from the inbox (dynamic columns for integrated inbox) ?
Rgds,
Pierre -
PGI status at delivery header level has not updated
Dear Friends,
We had created deliver, picking was completed and PGI was completed successfully. However when we try to create Billing, an error occurs stating that PGI is not completed.
Further when we check the delivery, the Goods Issue status at item level is completed but at the Header level the GM is B which is partially completed. In the Document flow we can see the PGI Status is completed.
I think there might be some table which was not update. Is there any way to update the status in the delivery?
Further we tried to reverse the PGI through VL09, but system is not able to find the delivery ..this might be because the system might be checking in some table where the statues has not updated.
Please suggest me how should I complete this.HI,
Go to transaction "SE16N" and enter table "VBUK" and give the delivery number in the field sales document number. Now you type "&SAP_EDIT" in the transaction bar and execute. Here you can change the status(Total goods movement). And see If you can actually bill the document. Kindly please let me know If you need any more information on this.
Regards,
Ram Pedarla -
Issue while creating a field at header level in CRM 4.0
Hi,
Using transaction EEWB, I tried to add a custom field at the header level to an existing Project. The Project already had an extension created to which I made the modifications i.e. added the field at header level. But, when I tried to generate the changes, <b>I got the following two errors : 1. No task for editing objects can be determined and 2. Creating of BAdi Implementation failed</b>.
Now, when I try to revert back the changes I am not allowed to do so. Please help me as I am new to CRM. Thanks a lot in advance.Hi,
if ur still not able to do that
goto EEWB
Enter the Project Name
Right click on the Enhancement---->Select back to previous version.
<b>Please Reward Points & Mark Helpful Answers</b>
To mark Helpful Answers ;click radio Button next to the post.
RadioButtons
<b>o</b> Helpful Answer
<b>o</b> Very helpful Answer
<b>o</b> Problem Solved.
Click any of the above button next to the post; as per the anwers
<b>To close the thread; Click Probelm solved Radio Button next to the post , which u feel is best possible answers</b> -
Freight Charges at Header Level using API oe_order_pub
Hello,
I am trying to process Header Level Freight Charges using oe_order_pub.process_order api. Please advice me as it is not entering charges. Here is my code. Thanks for your time and appreicate your help.
====
declare
l_header_rec Oe_Order_Pub.header_rec_type;
l_header_adj oe_order_pub.Header_Adj_Rec_Type;
l_header_scredit_tbl Oe_Order_Pub.header_scredit_tbl_type;
l_header_adj_tbl Oe_Order_Pub.header_adj_val_tbl_type;
l_action_request_tbl Oe_Order_Pub.request_tbl_type;
l_line_tbl Oe_Order_Pub.line_tbl_type;
l_line_adj_tbl Oe_Order_Pub.line_adj_tbl_type;
l_line_scredit_tbl Oe_Order_Pub.line_scredit_rec_type;
/*Out Parameters for Order API*/
l_header_rec_out Oe_Order_Pub.header_rec_type;
l_header_val_rec_out Oe_Order_Pub.header_val_rec_type;
l_header_adj_tbl_out Oe_Order_Pub.header_adj_tbl_type;
l_header_adj_val_tbl_out Oe_Order_Pub.header_adj_val_tbl_type;
l_header_price_att_tbl_out Oe_Order_Pub.header_price_att_tbl_type;
l_header_adj_att_tbl_out Oe_Order_Pub.header_adj_att_tbl_type;
l_header_adj_assoc_tbl_out Oe_Order_Pub.header_adj_assoc_tbl_type;
l_header_scredit_tbl_out Oe_Order_Pub.header_scredit_tbl_type;
l_header_scredit_val_tbl_out Oe_Order_Pub.header_scredit_val_tbl_type;
l_line_tbl_out Oe_Order_Pub.line_tbl_type;
l_line_val_tbl_out Oe_Order_Pub.line_val_tbl_type;
l_line_adj_tbl_out Oe_Order_Pub.line_adj_tbl_type;
l_line_adj_val_tbl_out Oe_Order_Pub.line_adj_val_tbl_type;
l_line_price_att_tbl_out Oe_Order_Pub.line_price_att_tbl_type;
l_line_adj_att_tbl_out Oe_Order_Pub.line_adj_att_tbl_type;
l_line_adj_assoc_tbl_out Oe_Order_Pub.line_adj_assoc_tbl_type;
l_line_scredit_tbl_out Oe_Order_Pub.line_scredit_tbl_type;
l_line_scredit_val_tbl_out Oe_Order_Pub.line_scredit_val_tbl_type;
l_lot_serial_tbl_out Oe_Order_Pub.lot_serial_tbl_type;
l_lot_serial_val_tbl_out Oe_Order_Pub.lot_serial_val_tbl_type;
l_action_request_tbl_out Oe_Order_Pub.request_tbl_type;
/*Local Variables*/
l_ret_stat VARCHAR2 (1);
l_msg_cnt NUMBER;
l_msg_data VARCHAR2 (2000);
x_return_status VARCHAR2 (1) := '';
l_order_type VARCHAR2(80);
l_order_type_id NUMBER;
l_accounting_rule_id NUMBER;
l_invoicing_rule_id NUMBER;
l_price_list_id NUMBER;
l_header_id NUMBER;
l_customer_id NUMBER;
l_order_number NUMBER;
l_line_xml XMLTYPE;
icount NUMBER;
l_item_id NUMBER;
l_count NUMBER;
p_status varchar2(10);
p_header_id number;
p_error varchar2(1000);
l_created_by number:=9930;
BEGIN
DBMS_APPLICATION_INFO.set_client_info ('104');
Fnd_Global.apps_initialize (9930,50257,660);
---Initialise In Parameters
l_header_rec := Oe_Order_Pub.g_miss_header_rec;
l_action_request_tbl (1) := Oe_Order_Pub.g_miss_request_rec;
l_line_tbl (1) := Oe_Order_Pub.g_miss_line_rec;
/*required Fields for Header Record*/
l_header_rec.orig_sys_document_ref :=8089;
l_header_rec.order_type_id := 1245;
l_header_rec.sold_to_org_id := 16273647;
l_header_rec.order_number := 8094; -- Currenlty commented, eventuall we need to use this as this needs be to unique.
l_header_rec.attribute1 := 8088; -- Currenlty capturing Order Number in ATT1
l_header_rec.price_list_id := 150022; -- l_price_list_id;
l_header_rec.payment_term_id := 1040;
l_header_rec.operation := Oe_Globals.g_opr_create; --'CREATE';
l_header_rec.flow_status_code := 'ENTERED';
--l_header_adj := Oe_Order_Pub.G_MISS_HEADER_ADJ_TBL;
l_header_adj.header_id := 9584924;
l_header_adj.automatic_flag :='N';
l_header_adj.list_header_id :=154010;
l_header_adj.list_line_id :=150071;
l_header_adj.list_line_type_code :='FREIGHT_CHARGE';
l_header_adj.change_reason_code :='MANUAL';
l_header_adj.change_reason_text :='TEST';
l_header_adj.updated_flag :='Y';
l_header_adj.applied_flag :='Y';
l_header_adj.operand :=10;
l_header_adj.arithmetic_operator:='LUMPSUMP';
l_header_adj.charge_type_code :='FREIGHT';
l_header_adj.modifier_level_code :='ORDER';
icount :=1;
-- FOR icount IN 1 .. l_line_tbl.COUNT LOOP
---Initialising Line table records
l_line_tbl (1) := Oe_Order_Pub.g_miss_line_rec;
/*required Fields for Line Record*/
l_line_tbl (icount).inventory_item_id := 71161;
l_line_tbl (icount).operation := Oe_Globals.g_opr_create;
l_line_tbl (icount).ordered_quantity := 3;
l_line_tbl (icount).unit_selling_price := 5;
l_line_tbl (icount).unit_list_price :=5;
l_line_tbl (icount).calculate_price_flag :='P';
---Reset message
Oe_Msg_Pub.initialize;
---Call API to Create Sales order with 2 lines in Entered Status
--dbms_output.put_line(l_header_rec.order_number||'-'||l_order_number);
apps.Oe_Order_Pub.process_order
(p_api_version_number => 1.0
,p_header_rec => l_header_rec
,p_line_tbl => l_line_tbl
,p_action_request_tbl => l_action_request_tbl
,x_header_rec => l_header_rec_out
,x_header_val_rec => l_header_val_rec_out
,x_header_adj_tbl => l_header_adj_tbl_out
,x_header_adj_val_tbl => l_header_adj_val_tbl_out
,x_header_price_att_tbl => l_header_price_att_tbl_out
,x_header_adj_att_tbl => l_header_adj_att_tbl_out
,x_header_adj_assoc_tbl => l_header_adj_assoc_tbl_out
,x_header_scredit_tbl => l_header_scredit_tbl_out
,x_header_scredit_val_tbl => l_header_scredit_val_tbl_out
,x_line_tbl => l_line_tbl_out
,x_line_val_tbl => l_line_val_tbl_out
,x_line_adj_tbl => l_line_adj_tbl_out
,x_line_adj_val_tbl => l_line_adj_val_tbl_out
,x_line_price_att_tbl => l_line_price_att_tbl_out
,x_line_adj_att_tbl => l_line_adj_att_tbl_out
,x_line_adj_assoc_tbl => l_line_adj_assoc_tbl_out
,x_line_scredit_tbl => l_line_scredit_tbl_out
,x_line_scredit_val_tbl => l_line_scredit_val_tbl_out
,x_lot_serial_tbl => l_lot_serial_tbl_out
,x_lot_serial_val_tbl => l_lot_serial_val_tbl_out
,x_action_request_tbl => l_action_request_tbl_out
,x_return_status => l_ret_stat
,x_msg_count => l_msg_cnt
,x_msg_data => l_msg_data
-- COMMIT;
DBMS_OUTPUT.PUT_LINE ('Return Status is ' || l_ret_stat);
DBMS_OUTPUT.PUT_LINE ( 'Order Number in ARB Org is '
|| l_header_rec_out.order_number||'-'||
l_header_rec_out.header_id
p_status := l_ret_stat;
p_header_id := l_header_rec_out.header_id;
-- p_error := ltrim(rtrim(l_msg_data));
Xx_Xmldb_Pkg.xx_insert_errors
('With or w/o Error After API'
,p_error
,p_header_id
,p_status
,SYSDATE
,l_created_by
/*Check Errors */
IF l_ret_stat <> 'S' THEN
p_status :='FAILURE';
IF l_msg_cnt > 0
THEN
FOR i IN 1 .. l_msg_cnt
LOOP
l_msg_data := Oe_Msg_Pub.get (p_msg_index => i
,p_encoded => 'F');
-- p_error := ltrim(rtrim(l_msg_data));
DBMS_OUTPUT.PUT_LINE ('Errors ...' || l_msg_data);
Xx_Xmldb_Pkg.xx_insert_errors
('Error After API'
,p_error
,p_header_id
,p_status
,SYSDATE
,l_created_by
END LOOP;
END IF;
END IF;
IF l_ret_stat = Fnd_Api.g_ret_sts_success
THEN
l_header_rec := Oe_Order_Pub.g_miss_header_rec;
l_action_request_tbl (1) := Oe_Order_Pub.g_miss_request_rec;
l_line_tbl (1) := Oe_Order_Pub.g_miss_line_rec;
---Book Order
l_action_request_tbl (1).request_type := Oe_Globals.g_book_order;
l_action_request_tbl (1).entity_code := Oe_Globals.g_entity_header;
l_action_request_tbl (1).entity_id := l_header_rec_out.header_id;
---Book the order
/* Oe_Msg_Pub.initialize;
---API Call to Book the Order
Oe_Order_Book_Util.complete_book_eligible
(1.0
,Fnd_Api.g_false
,l_header_rec_out.header_id
,l_ret_stat
,l_msg_cnt
,l_msg_data
-- COMMIT;
IF l_ret_stat <> 'S' THEN
p_status :='FAILURE';
IF l_msg_cnt > 0
THEN
FOR i IN 1 .. l_msg_cnt
LOOP
l_msg_data :=
Oe_Msg_Pub.get (p_msg_index => i
,p_encoded => 'F');
DBMS_OUTPUT.PUT_LINE (l_msg_data);
Xx_Xmldb_Pkg.xx_insert_errors ('Load XML Order Data, After api error .'
,l_msg_data
,null
,NULL
,SYSDATE
,1124
END LOOP;
END IF;
END IF;
IF l_ret_stat = Fnd_Api.g_ret_sts_success
THEN
x_return_status := l_action_request_tbl (1).return_status;
END IF;
ELSE
DBMS_OUTPUT.PUT_LINE ('Failure');
p_status :='FAILURE';
END IF;
end;
/Hi,
Can you pls try by passing this parameter value too.
l_header_adj.adjusted_amount := 5;
Thanks,
Praveen -
Total Computing not happening on Sub line, line and header level
Hi All,
Iam using below code to compute the contract total, but below api is not populating any values at sub line, line as well on header level.
Can someone please suggest me whether I am using the correct API or not and also if this is correct one why it is not populating total in service contracts form.
{DECLARE
l_input_details OKS_QP_PKG.INPUT_DETAILS;
l_output_details OKS_QP_PKG.PRICE_DETAILS;
l_modif_details QP_PREQ_GRP.LINE_DETAIL_TBL_TYPE;
l_pb_details OKS_QP_PKG.G_PRICE_BREAK_TBL_TYPE;
l_return_status VARCHAR2(20);
l_msg_count NUMBER;
l_msg_data VARCHAR2(2000);
l_status_tbl oks_qp_int_pvt.Pricing_Status_tbl;
l_final_status_tbl oks_qp_int_pvt.Pricing_Status_tbl;
l_count NUMBER;
BEGIN
l_input_details.intent := 'LP';
-- l_input_details.lse_id := 1;
l_input_details.chr_id :='245003';
l_input_details.line_id := '301498277568510712147018743801056692954';
l_input_details.subline_id := '301498277568522801405214890092803754714';
oks_qp_int_pvt.compute_price
p_api_version => 1.0,
p_init_msg_list => 'T',
p_detail_rec => l_input_details,
x_price_details => l_output_details,
x_modifier_details => l_modif_details,
x_price_break_details => l_pb_details,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data
dbms_output.put_line(l_return_status);
END;
Best Regards
Ragni GuptaI've never used this API, but you could use the following code to display any error message. (add declaration for l_msg_index_out NUMBER)
IF l_return_status != 'S'
THEN
FOR i IN 1..l_msg_count
LOOP
fnd_msg_pub.get (p_msg_index => -1,
p_encoded => 'F' ,
p_data => l_msg_data,
p_msg_index_out=> l_msg_index_out);
dbms_output.put_line(i||'.'||SUBSTR(l_msg_data,1,255));
END LOOP;
END IF;HTH
Alka -
BAPI_SALESORDER_CHANGE - Want to change the Ship-to-party at header level
Hi
I want to change the Ship-to-party at header level in the Sales Order created. I tried using the BAPI BAPI_SALESORDER_CHANGE as shown below.
When I run the program I get the log as Sales Order 45 saved succesfully. However, I don't find the SO changed. Apart from this I get an Express Message saying the Updation failure. Not sure of what'z wrong here.
Pls help
thanks
girish
REPORT ZBAPI_SALESORD_CHANGE.
data : zBAPISDHD type BAPISDH1,
zSALESDOCUMENT type BAPIVBELN-VBELN.
data : zORDER_ITEMS_IN like /AFS/BAPISDITM occurs 0 with header line,
zORDER_SCHEDULES_IN like /AFS/BAPISDSCHD occurs 0 with header line,
zORDER_PARTNERS like BAPIPARNR occurs 0 with header line,
zRETURN like BAPIRET2 occurs 0 with header line,
so_no type BAPIVBELN-VBELN,
zORDER_HEADER_INX TYPE BAPISDH1X,
zPARTNERCHANGES like BAPIPARNRC occurs 0 with header line.
clear : zBAPISDHD.
so_no = '0000000045'.
data : l_comp_qty like zORDER_ITEMS_IN-COMP_QUANT.
l_comp_qty = 10.
zBAPISDHD-SALES_ORG = 'BP01'.
zBAPISDHD-DISTR_CHAN = '02'.
zBAPISDHD-DIVISION = '01'.
zORDER_HEADER_INX-UPDATEFLAG = 'U'.
zORDER_HEADER_INX-SALES_ORG = 'X'.
zORDER_HEADER_INX-DISTR_CHAN = 'X'.
zORDER_HEADER_INX-DIVISION = 'X'.
Ship to pary
zORDER_PARTNERS-PARTN_ROLE = 'WE'.
zORDER_PARTNERS-PARTN_NUMB = 'BPAFS0007'.
append zORDER_PARTNERS.
zPARTNERCHANGES-DOCUMENT = '45'.
zPARTNERCHANGES-ITM_NUMBER = '10'.
zPARTNERCHANGES-UPDATEFLAG = 'U'.
zPARTNERCHANGES-PARTN_ROLE = 'WE'.
zPARTNERCHANGES-P_NUMB_OLD = 'BPAFS0001'.
zPARTNERCHANGES-P_NUMB_NEW = 'BPAFS0007'.
append zPARTNERCHANGES.
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
SALESDOCUMENT = so_no
ORDER_HEADER_IN = zBAPISDHD
ORDER_HEADER_INX = zORDER_HEADER_INX
SIMULATION =
BEHAVE_WHEN_ERROR = ' '
INT_NUMBER_ASSIGNMENT = ' '
LOGIC_SWITCH =
NO_STATUS_BUF_INIT = ' '
TABLES
RETURN = zRETURN
ORDER_ITEM_IN =
ORDER_ITEM_INX =
PARTNERS = zORDER_PARTNERS
PARTNERCHANGES = zPARTNERCHANGES.
PARTNERADDRESSES =
ORDER_CFGS_REF =
ORDER_CFGS_INST =
ORDER_CFGS_PART_OF =
ORDER_CFGS_VALUE =
ORDER_CFGS_BLOB =
ORDER_CFGS_VK =
ORDER_CFGS_REFINST =
SCHEDULE_LINES =
SCHEDULE_LINESX =
ORDER_TEXT =
ORDER_KEYS =
CONDITIONS_IN =
CONDITIONS_INX =
EXTENSIONIN =
data : s_BAPIRET2 like BAPIRET2.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
exporting
wait = 'X'
importing
return = s_bapiret2.Thanks Prashanth. It worked !!!!!!!!!!!!!
Now I am facing another type of problem. The requirement is to change the Sales Order Item Quantity. I basically planned to update the quantity of Schedule Item which needs to be changed. When I run the below code, it works and says the Sales Order changed succesfully. However I get an express message saying the Database update failure. I don't get any sort of technical information.
Appreciate if you could help me finding the error.
Thanks
regards
girish
Note --> I am trying to change the Quantity for 2 line item in SO '56' to 40 Units.
REPORT ZBAPI_SALESORD_CHANGE.
data : zBAPISDHD type /AFS/BAPISDHD,
zORDER_HEADER_INX TYPE /AFS/BAPISDHDX,
zSALESDOCUMENT type BAPIVBELN-VBELN.
data : zORDER_ITEMS_IN like /AFS/BAPISDITM occurs 0 with header line,
zORDER_ITEM_INX like /AFS/BAPISDITMX occurs 0 with header line,
zORDER_SCHEDULES_IN like /AFS/BAPISDSCHD occurs 0 with header line,
ZSCHEDULE_LINESX LIKE /AFS/BAPISDSCHDX occurs 0 with header line,
zORDER_PARTNERS like BAPIPARNR occurs 0 with header line,
zRETURN like BAPIRET2 occurs 0 with header line,
so_no type BAPIVBELN-VBELN,
zPARTNERCHANGES like BAPIPARNRC occurs 0 with header line.
data : l_comp_qty like zORDER_ITEMS_IN-COMP_QUANT.
data : g_qty like /AFS/BAPISDSCHD-REQ_QTY.
g_qty = 40.
l_comp_qty = 40.
clear : zBAPISDHD.
so_no = '0000000056'.
zBAPISDHD-REFOBJTYPE = '/AFS/ORDER'.
zBAPISDHD-SALES_ORG = 'BP01'.
zBAPISDHD-DISTR_CHAN = '02'.
zBAPISDHD-DIVISION = '01'.
zBAPISDHD-PMNTTRMS = '0001'.
zORDER_HEADER_INX-UPDATEFLAG = 'U'.
zORDER_HEADER_INX-SALES_ORG = 'X'.
zORDER_HEADER_INX-DISTR_CHAN = 'X'.
zORDER_HEADER_INX-DIVISION = 'X'.
zORDER_HEADER_INX-PMNTTRMS = 'X'.
**********ITEM ***************************************
zORDER_ITEMS_IN-ITM_NUMBER = '00020'.
zORDER_ITEMS_IN-MATERIAL = 'F1202'.
zORDER_ITEMS_IN-PLANT = 'BP01'.
zORDER_ITEMS_IN-ITEM_CATEG = 'TAS'.
zORDER_ITEMS_IN-SHIP_POINT = 'BP01'.
zORDER_ITEMS_IN-COMP_QUANT = l_comp_qty.
zORDER_ITEMS_IN-TARGET_QTY = l_comp_qty.
zORDER_ITEMS_IN-TARGET_QU = 'ST'.
append zORDER_ITEMS_IN.
zORDER_ITEM_INX-ITM_NUMBER = '00020'.
zORDER_ITEM_INX-UPDATEFLAG = 'U'.
zORDER_ITEM_INX-MATERIAL = 'X'.
zORDER_ITEM_INX-PLANT = 'X'.
zORDER_ITEM_INX-ITEM_CATEG = 'X'.
zORDER_ITEM_INX-SHIP_POINT = 'X'.
zORDER_ITEM_INX-COMP_QUANT = 'X'.
zORDER_ITEM_INX-TARGET_QTY = 'X'.
zORDER_ITEM_INX-TARGET_QU = 'X'.
append zORDER_ITEM_INX.
*********SCHEDULE LINE******************************
refresh zORDER_SCHEDULES_IN.
clear zORDER_SCHEDULES_IN.
zORDER_SCHEDULES_IN-ITM_NUMBER = '000020'.
zORDER_SCHEDULES_IN-SCHED_LINE = '0001'.
zORDER_SCHEDULES_IN-REQ_DATE = '20070525'.
zORDER_SCHEDULES_IN-DATE_TYPE = '1'.
zORDER_SCHEDULES_IN-SCHED_TYPE = 'CS'.
zORDER_SCHEDULES_IN-GRID_VALUE = 'BLK2728'.
zORDER_SCHEDULES_IN-REQ_CATEGORY = '1DE'.
zORDER_SCHEDULES_IN-REFOBJTYPE = '/AFS/ORDER'.
zORDER_SCHEDULES_IN-REQ_QTY = g_qty.
append zORDER_SCHEDULES_IN.
refresh ZSCHEDULE_LINESX.
clear ZSCHEDULE_LINESX.
ZSCHEDULE_LINESX-ITM_NUMBER = '000020'.
ZSCHEDULE_LINESX-SCHED_LINE = '0001'.
ZSCHEDULE_LINESX-UPDATEFLAG = 'U'.
ZSCHEDULE_LINESX-REQ_DATE = 'X'.
ZSCHEDULE_LINESX-DATE_TYPE = 'X'.
ZSCHEDULE_LINESX-SCHED_TYPE = 'X'.
ZSCHEDULE_LINESX-GRID_VALUE = 'X'.
ZSCHEDULE_LINESX-REQ_CATEGORY = 'X'.
ZSCHEDULE_LINESX-REFOBJTYPE = 'X'.
ZSCHEDULE_LINESX-REQ_QTY = 'X'.
append ZSCHEDULE_LINESX.
CALL FUNCTION '/AFS/BAPI_SALESORD_CHANGE'
EXPORTING
SALESDOCUMENT = so_no
ORDER_HEADER_IN = zBAPISDHD
ORDER_HEADER_INX = zORDER_HEADER_INX
SIMULATION =
BEHAVE_WHEN_ERROR = ' '
INT_NUMBER_ASSIGNMENT = ' '
LOGIC_SWITCH =
TABLES
RETURN = zRETURN
ORDER_ITEM_IN = zORDER_ITEMS_IN
ORDER_ITEM_INX = zORDER_ITEM_INX
ORDER_SCHEDULE_LINES = zORDER_SCHEDULES_IN
ORDER_SCHEDULE_LINESX = ZSCHEDULE_LINESX.
PARTNERS =
PARTNERCHANGES = zPARTNERCHANGES
PARTNERADDRESSES =
ORDER_CFGS_REF =
ORDER_CFGS_INST =
ORDER_CFGS_PART_OF =
ORDER_CFGS_VALUE =
ORDER_CFGS_BLOB =
ORDER_CFGS_VK =
ORDER_CFGS_REFINST =
ORDER_TEXT =
ORDER_KEYS =
CONDITIONS_IN =
CONDITIONS_INX =
EXTENSIONIN =
*CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
SALESDOCUMENT = so_no
ORDER_HEADER_IN = zBAPISDHD
ORDER_HEADER_INX = zORDER_HEADER_INX
TABLES
RETURN = zRETURN
ORDER_ITEM_IN = zORDER_ITEMS_IN
ORDER_ITEM_INX = zORDER_ITEM_INX
PARTNERS = zORDER_PARTNERS
PARTNERCHANGES = zPARTNERCHANGES
PARTNERADDRESSES =
ORDER_CFGS_REF =
ORDER_CFGS_INST =
ORDER_CFGS_PART_OF =
ORDER_CFGS_VALUE =
ORDER_CFGS_BLOB =
ORDER_CFGS_VK =
ORDER_CFGS_REFINST =
SCHEDULE_LINES = zORDER_SCHEDULES_IN
SCHEDULE_LINESX = ZSCHEDULE_LINESX.
ORDER_TEXT =
ORDER_KEYS =
CONDITIONS_IN =
CONDITIONS_INX =
EXTENSIONIN =
data : s_BAPIRET2 like BAPIRET2.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
importing
return = s_bapiret2. -
How can i change VBAK-Faksk of VAO1 at header level using BAPI_SALESORD_CHA
Hi Experts,
How can i change the value of VBAK-FAKSK (Billing doc value) at header level .
by using the bapi_salesorder_change.Could you please send the sample code
how to change the value of any field in VBAk . so that i can take as reference and work accordingly ..
It's urgent,
thanks
kumar.Hi,
Check this
PARAMETERS: p_vbeln type vbak-vbeln.
DATA: l_header_inx TYPE bapisdh1x,
l_header_in TYPE bapisdh1.
data: lt_return type standard table of bapiret2.
MOVE: 'U' TO l_header_inx-updateflag,
'X' TO l_header_inx-bill_block, " Billing
'ZL' TO l_header_in-bill_block. " Billing block.
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
salesdocument = p_vbeln
order_header_in = l_header_in
order_header_inx = l_header_inx
TABLES
return = lt_return.
* check for errors.
LOOP AT lt_return transporting no fields WHERE type = 'A' Or type = 'E'.
EXIT.
ENDLOOP.
If sy-subrc = 0.
write: / 'Error in updating'.
ELSE.
commit work and wait.
endif.
Thanks
Naren -
Price at header level then how to do billing
Dear All,
i have one scenario where the price is at header level.
and for that reasoni have made the item catagory is not price relevant other wise it will ask price per each line item.
now i faced the probel during the tiem of delivery
after PGI when i am doing the billingby selecting the delivery document number error is comning that item is not billing relevant.
so how can i do the billing.
even i have tried with order related billing but then also its giving error as the same.
so what is the bset possible way for this scenario.
where we are having price at header and stock at the item level then how to do the billing.
what will be the configuration steps.
with hope and
Regards
SubratDear Raj,
when ever i am givinbg price at header it is multiplying it self with the number of line item. so if we need to put any price we have to calculate it manually per unit price then we have to put the price in this . so its really giving a pain to us if the amount will be divided amonge the line item rather multiplying it self then it will be a solution for the issue.
like if i m puting 1000 in the header its multiplying to 10 line item and the header price is coming as 10000. but we need to put amount as 10000 and it should divide it self with 10 item and per item it should come as 1000 rupees just the reverse what it coming now
thanks for all ur support till now.
with hope
regards
Subrat
Maybe you are looking for
-
Sims game keeps quiting and giving me a type 3 error message!
Hi, I have been playing The Sims Original on my Power Macintosh 8600/300 for awhile now and all of a sudden after installing well over 800 new items (Like TVs,couches) it continuesly closes out and gives me a type 3 error message sometimes it freezes
-
I cannot click certain things on firefox and don't know how to fix it.
Okay so this problem started today. I know nothing about computers so a detailed response would be really helpful. When I go on any website, I can't click certain things. For example, on Facebook, I cannot click to update my status and I cannot click
-
Problem with plugins not rendering from Media Encoder CC 2014
Hi, I am exporting a video made in AE CC 2014 with several plugins, into Media Encoder CC 2014. When I try to render the video in Media Encorder at H.264, at 720PX in an MP4. The video renders but does not show any of the plugins that I had used. Any
-
How to load multiple target tables simultaneously in single interface?
I have a requirement where I have to load data into two target tables in single interface simultaneously. Reason is to populate parent-child relationship on target side as it is coming from the source side. For eg: I have 2 headers and 10 correspondi
-
Transferring Reunion 9 (Family Tree) Program/ from MacBook to MacBook Pro.
Hi all! I upgraded my 2 year old MacBook in November for a MacBook Pro. Before I updated I had purchased Reunion 9. Now I need Reunion 9 on my new MacBook Pro, but I have no idea how to transfer it! I was able to transfer the actual program to the ne