Change sales order values from Inbound Idoc
Hi all,
In my scenario i have to change sales document automatically(Workflow) by getting the values from the inbound idoc ordchg (one more thing i dont want to create another sales document). Is there is any function module? please tell me how to do this.
Regards,
Adithan S.
Hi Adithan;
You can read the IDoc information using the function IDOC_READ_COMPLETELY as demonstrated in the example below:
DATA: int_edidd TYPE STANDARD TABLE OF edidd WITH HEADER LINE,
wf_docnum type edidc-docnum.
MOVE: 'IDOC_NUMBER' to wf_docnum.
CLEAR int_edidd.
REFRESH int_edidd.
CALL FUNCTION 'IDOC_READ_COMPLETELY'
EXPORTING
document_number = wf_docnum
TABLES
int_edidd = int_edidd
EXCEPTIONS
document_not_exist = 1
document_number_invalid = 2
OTHERS = 3.
After that call, you can loop through int_edidd to get at the segment information you need.
You can update the sales order using BAPI_SALESORDER_CHANGE. Below is an example of updating line 10 of a sales order with a new material number.
DATA: l_vbeln LIKE bapivbeln-vbeln,
so_headx TYPE bapisdh1x,
change_return LIKE bapiret2 OCCURS 0 WITH HEADER LINE,
so_item_in TYPE bapisditm OCCURS 0 WITH HEADER LINE,
so_item_inx TYPE bapisditmx OCCURS 0 WITH HEADER LINE.
MOVE 'U' TO so_headx-updateflag.
MOVE <insert sales order number here> to l_vbeln.
MOVE: '00010' TO so_item_in-itm_number,
'MATERIAL_NUMBER' TO so_item_in-material.
APPEND so_item_in.
MOVE: '00010' TO so_item_inx-itm_number,
'U' TO so_item_inx-updateflag,
'X' TO so_item_inx-material.
APPEND so_item_inx.
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
salesdocument = l_vbeln
order_header_inx = so_headx
TABLES
return = change_return
order_item_in = so_item_in
order_item_inx = so_item_inx.
Cheers,
John
Similar Messages
-
Changing Sales Order PARTNER from 'MASS' transaction
Hi,
I have a requirement to change partner details (e.g. SHIP TO party from SH1 to SH2) for sales order. I need to use tcode 'MASS' (Mass maintainance) for BUS2032. But it does not have the option to change partner details.
Can anybody let me any approach to achieve this. If we can do it through a config or may be creating a custom business object etc...
I could found out the thread below talking about the same issue, but there is no solution to that. I want to build the solution around SAP standard and not interested for BDC/LSMW/CATT etc.
Mass changes Sales order partners
Thanks,
Madhu
Edited by: Madhu K on Nov 1, 2011 11:58 PMAlan
I am ok to create a custom tcode for MASS. Do I need to copy the BUS2032 or the whole TCODE?
My major concern is, how to get the VBPA structure to the selection screen so that it ll show me the I/P fields to enter Old Ship to and New ship to..
Can You please give me some idea on this.
Thanks
Madhu -
Changing internal order's via Inbound IDOC
Hi,
We are having Inbound interface set for creating internal order's using message type 'INTERNAL_ORDER_CREATE01'.
But when any existing internal order is changed it is giving status 51 with error 'Order already exists'.
I am wondering how can we handle the changed order situation via inbound IDOC . Is it possible to do it via message type 'INTERNAL_ORDER_CREATE01'.
Regards,
ganeshHi ganesh,
The idoc Status 51 for indound idoc is....
51 Application document not posted
the possible solution is checkthe Partner profile for the Idoc and Port number..
and go to T_code we20 and check the Partner.and check the Syntax in the application tool bar...
then you will come to know the problem..
and if you wan to changed order situation via inbound IDOC , yes it is possibel.
go to t-code we57 and check the Function module attached to the message type .
and go to FM and find hte customer exit and read the segment which contains order situation and modify the segment..
i hope this will solve the problem..
Regards,
Prabhudas -
How to Avoid Open Sales Order Value from Credit Check
Hello Everyone,
We have a problem with Credit Management, When my user run the execute credit master sheet, system is considering open sales order value under Credit limit used. My user do not want consider open sales order value, they want only Open delivery and Open Billing value need to appear in Credit limit used.
Is it possible to avoid open sales order values, if yes what setting i need to do....please help me.
Thanks
SudheerSudheer,
You need to check the update rule given in the definition of the Credit control Area which you are using for credit management. If you want only the open deliveries then you need to have update rule 15 in the credit control area.
In the credit controal settings, you need to have settings for the credit check at the delivery level.
Hope this will solve your issue.
Regards,
Chetan
Edited by: Chetan Gupte on Jul 15, 2010 8:56 PM -
NO MATERIALs in the Sales order created through inbound idoc file
hi,
i have maintained the customer material number as well the SAP Material number in the tcode VD51,but still the inbound
idoc type ORDERS03 is posting the application document(Sales order) without the materials.
for instance,
I have cust.material as CUSTMAT1 in the idoc file.
I have maintained the CUSTMAT1 as cust material and 1001 as material no in VD51.
After posting the inbound idoc file using RSEINB00 prg,the idoc is created and i can see the CUSTMAT1 in the material segment field
The Sales order is created successfully ,but without the materials.
i need the application document has to be posted with materialsm,can any one help me to solve this issue.?
ThanksHi ganesh ram
In order to determine the Material Number with you custom material then you needs to have some configurations.
Check with your Functional consultant to add the Access sequence for determining the Material Number with you custom material
In Sale order processes...
Thanks
Ramesh -
Exclude sales order value from Credit exposure
Hi Experts:
Can I only credit limit for a customer by Receivables(AR)??
ShwanDesh Shwan
Check the configuration Credition Control Area, you will find update group. Each Update group has different meaning and updates the document accordingly
No update from SD documents
000012 Open order value on time axis, delivery and bill.doct value
000015 Open delivery and billing document value
000018 Open delivery value for sales order, open billing doct value
blank means No Update from SD Documents and
and 000015 open sales orders are excluded, but as delivery are commitments and which should have been billed it takes into account delivery.
I think 000015 will suit your requirement
Regards
Jitesh -
Issue while trying to create Sales Order from Inbound Idoc ORDER05
Hi All,
I am trying to create a sales order through an Inbound idoc ORDERS05 created out of a Purchase order. The header pricing conditions from the Purchase orders gets populated in E1EDK05 segment and this needs to go to the Sales order header conditions while trying to create the Sales order.
But when the fields are getting incorrectly mapped to the Sales order. Issue being, the segment E1EDK05-BETRG contains the condition value. But this fields gets populated to the KOMV-KWERT (condition value) screen field on the Sales order header conditions. But this should have got mapped to field KOMV-KBETR (Rate). If I look at the Purchase order, E1EDK05-BETRG is the field getting fetched from field KOMV-KBETR on the Purchase order. So this should have correspondingly got mapped to KOMV-KBETR on the Sales order as well.
This looks like a standard behavior. But if any of you have encountered this issue before please let me know if any Correction instructions are available for the same. If this some issue in Pricing conditions configuration, do let me know.Hi Paaavan
You can set a break-point include "FV45PFAP_VBAP_BEARBEITEN_VORBE" that is called by both the SAP Standard and BAPI where the data is prepared and checked in the internal table XVBAP. Compare both SAP standard VA01 and your 'Z' program for what may be different in XVBAP.
I think the problem my be with regards to the business_object number that is hardcoded in the standard function module. It has given me issues before and hence I tend to use the function module SD_SALESDOCUMENT_CREATE to create sales documents with.
Regards,
Marius -
How to find Outbound Idoc number from inbound Idoc number.
Hi,
I have one inbound Idoc in my system, then
How to find the idoc number from the system which sends that idoc(Outbound Idoc number).Hello
You can use fm SREL_GET_NEXT_NEIGHBORS for this purpose.
Scenario: An EDI purchase order is received by SAP-XI and forwarded as Inbound ORDERS IDoc to R/3. SAP-XI generates an (outbound) IDoc number which differs from the (inbound) ORDERS05 IDoc in the R/3 system.
Calling fm SREL_GET_NEXT_NEIGHBORS with the following parameters:
OBJECT-OBJKEY = <IDoc number, 16-digits>
OBJECT-OBJTYPE = 'IDOC'
MAX_HOPS = '99' " <<< get all links
I get the following result:
0000000000133906 IDOC CUSTOMER OUTIDOC
0000000000407402 IDOC INIDOC
000000370383 BUS2012 CUSTOMER OUTBELEG
0010057944 BUS2032 INBELEG
Outbound IDoc number
Inbound IDoc number (ORDERS05)
PO number
Sales order (created from inbound ORDERS IDoc)
Regards
Uwe -
I am testing creating Sale Order from inbound IDOC with WE19.
Partn. number = AAA001
Partn. type = KU
Partn.func = PY
Message Type = ORDERS
Process Code = ORDE
I get message 51 "Error: Application document not posted" in IDOC status:
VKORG, VTWEG, SPART cannot be determined for customer AAA001 , vendor
Message no. VG 204
Diagnosis
No sales organization, distribution channel or division were sent to the
IDOC. This data is necessary if a sales order is to be added
automatically. If this data is unavailable, you cannot create a sales
order document.
Procedure
If data on the sales organization, distribution channel and division
have not been entered in the IDOC, it must be determined using a user
exit defined in the program.I will receive IDOC from external non-SAP system.
How can i populate E1EDK14 segment with appropriate values:
E1EDK14 -QUALF = 006
E1EDK14 -ORGID = Division (VBAK-SPART)
E1EDK14 -QUALF = 007
E1EDK14 -ORGID = Distribution Chanel (VBAK-VTWEG)
E1EDK14 -QUALF = 008
E1EDK14 -ORGID = Sales Organisation (VBAK-VKORG)
If external system does not know this values?
Edited by: S S on Feb 28, 2009 12:46 PM -
Hello,
I am getting this Error message"error determining posting period(infostructure S008,Variant Z2,RC3)" while creating Sales order from Inbound Idocs in the IDOC,which is affecting sales order creation.
While viewing this Info structure S008, I could see no records have been maintained. Wanted to know the reasons behind this Hard error?
Is it something related to Date Field used in the Update Rules for this Infostructure which is causing this posting period error?
Appreciate your inputs on this.
Thanks and Regards
Mohammed RoshanThank you Jelena,I checked the Ship. Delivery dates in the IDOC which are for Current Fiscal Year- 20140703 and 20140711,Could there be any other reason for this error?
Could it be an issue with e Update rule in this Infostructire S008
Secondly when we try change the update rule thru MC25 for this Infostructure S008,It gives a message"
"Maintenance of SAP standard updates not allowed"
Kindly advice
Thanks and Regards
Mohammed Roshan -
Open sales order value for credit check need to be changed (S066)
Hi all,
I need to change open sales order value which is already there in S066 table.
Previously we had used open order value for credit check. Open order values are already updated in the S066 table.
Now we dont want to consider open order value for credit check (which is already included in the credit exposure field in FD32).
When we create sales order system is taking old open order value for credit. Now i have changed not to update open order value for credit check. Now its not updating open order value. But my issue is how to change existing or (previous) open order value for credit?
Can i change S066 table data directly to '0'. Is it advisable to chage open order value directly from this table?
Please advise me.
Regards,
Babu
Edited by: babs on May 19, 2010 4:26 PMHi Babs,
If you doesn't want to reflect the open order value in the structure for this order value ,If the order is not processed kindly delete the line items and the order. Then save the document. Then try to see the structure S066.. This will be modified.
If you want to modify the value then follow the below process.
Otherwise delete the line item in the order and change the pricing date and the document date. Re enter the line item again so that it will take it up the new changes.
I hope it will help.
Regards,
SK -
Find Sales order number from IDOC number
I have a bunch of SO idocs, in status 64. They are then posted and Sales orders are created.
How can I programatically find the Sales order Number from the Sales Order idoc number once it is in status 53 (other than going to EDIDS and checking if status = '53' and grabbing the 'STAPA2' field there ).Look at table EDIDS for sales order idocs and you can see SO number in any of STAPA1/2/3/4 variable for specific message id and message number.
-
Information about the deleted sales order line item in idoc.
Hi Experts,
I am new to IDOC.We have the following idoc requirement,
When a line item is deleted from the sales order(VA02) ,
the outbound idoc getting triggered for the sales order has the information about the rest all line items other than the deleted line item.We now want the information about the deleted line item in the Idoc .
Please help me in proceeding further.Hi,
I am facing the same scenario of capturing the deleted sales order line item in idoc.
I am using ORDRSP message type , where in E1EDP01- ACTION contains value "000" .
And the Deletion line item is not been captured, is there any configuration setting required to
capture the deleted line item in Idoc.
Based on the posting in this thread i understand that there is an indicator which has to be set .
Please let me know what is that indicator and how to set it?
Thanks
Sathish -
Applying Price list for sales order created from Internal Requisition
I am using 12.0.5. I have created a price list and applicable discount. I am creating Internal Requisitions and Importing them into Order Management as Sales Order using "Create Internal Order" and "Import Request". But when the sales orders are created, the pricing flag is "Freeze Price" and to apply the price list, I have to change the pricing flag of each line and re-price order/ line. Is this a way around this such that Sales orders created from Internal Requisitions pick up the correct discounted selling pricing automatically after import?
Hi Ravichandran,
When the Internal Sales Orders are created via Order Import program, the pricing flag will be "Freeze Price" because the value of CALCULATE_PRICE_FLAG will be set to 'N' in the OE interface line table by the Create Internal Orders program. This is the standard functionality of the Oracle.
However, if your requirement is to re-price the line (automatic application of discounts at the time of booking) after the SO is created then to avoid the manual repricing steps, you can write a custom program to update the CALCULATE_PRICE_FLAG to 'Y' for the OE Line records present in the interface tables itself. You need to make sure that this update happens before the Order Import program. You can create a Request Set to acheive this, for example...
XXX Create Internal Orders (Custom Request Set)
- Create Internal Order (Standard Oracle Program)
- XXX Update PriceFlag for ISO (Custom Program to update the price flag)
First run the above request set & then run standard Order Import program. So when SO is being booked, CALCULATE_PRICE_FLAG will be 'Y' i.e., Calculate Price, the required discounts will be pulled & the line will be re-priced automatically.
I hope this is what you wanted to achieve. Let me know if you have any questions.
Regards,
Hemanth -
Not Updating Open Sales Orders Value for CreditManagement
Hi Frendz,
This is the first time am implementing creditmanagement in my system tested simple credit limit check working fine.
Now testing Static and Dynamic(Automatic) it also working fine but Its not caliculating open sales orders value either static or dynamic while Creating s.o, settings made clicked on open s.o, i have already created sales orders value of 10th.
EX:- customer balance is 2lacs, credit limit is 1lac while creating s.o it always showing balance 1lac only(Instead of 1lac10th) with open sales order value is 10th.
Let me know Where i have missd settings.
Hari Prasadhello,
it is maintained against the cr control area in ent structure.
one needs to change there.
r u in prd system or development?
becoz if prd, then this change will effect a lot of ongoing docs.
rgs,
AK
Maybe you are looking for
-
I, like many others before me, have noticed some lagginess with the core animations (expose, minimizing, dock magnification) after doing an upgrade installation of leopard. I want to perform a clean install, as people who have done this say that it r
-
Iphone 5 back camera problem after update to IOS 8. Focus doesn't work on back camera!
My device is Iphone 5 64gb IOS 8. I have problem after update to IOS 8. When i run camera.. I hear some scratch inside my phone. And focus of back camera doesn't work. 1. How can i fix it? 2. Or how to rollback to IOS 7+ ? 3. Should i come to app sto
-
How to remove text from .swf animation?
how to remove text from .swf animation? Can no find this text in fla file. Flash 8.
-
Calling standard program with logical database
Hi all, I am trying to call a standard report (RPTBAL00) from a custom program without displaying the selection screen. I want to fill some of the select-options programmatically. My code is somethig like this submit RPTBAL00 with per
-
Hi, In our test system suddenly the sales org info is missing for all the materials in COMMPRO01 transaction. We have checked the transports,jobs and there was nothing abnormal any one have any idea how to bring the sales org information back thanks