Dates fields issue in the sales orders through IDOC

Hi all,
I'm trying to create a sales order through Inbound IDOC using IDOC_INPUT_ORDERS.
I have 2 custom fields in the sales order which are date fields.
I'm populating them from the IDOC segments(using E1EDKT1-tdid, E1EDKT2-tdline) in the user-exit just before the call trasacation statement. These dates are not coming for a few orders... but are getting populated normally for few of them.
But the tricky part is that... if I process the same IDOC for the second time.. the order created is having the dates.
My issue is that.. i need all the orders to be populated with the dates which IDOC have.
Could anyone please help me with this issue.
All the answers/replies are highly appreciated!!
Thanks for you help!

hi,
the following may be of help
There are 2 major exceptions to the batch input internal table. All text data from the segments E1EDKT1/2 and E1EDPT1/2 are not part of the batch input session. Text elements from these segments are posted directly to the data base AFTER the sales order has been created (please note: in order that item texts are posted correctly to the sales order the field POSEX from segment E1EDP01 MUST be transmitted). Also, configurable material information from the IDOC is exported to a global memory and therefore will not be part of the batch input session. Configurable material data is performed in Form CHECK_CONFIGURATION and the data is exported to global memory in the following code:
Exportiert IDOC Daten ins globale Memory     
export IDOC data to global memory            
  call function 'CUXC_IDOC_TO_MEMORY'          
       tables                                  
            cfg_instref = xe1curef             
            cfg_ref     = xe1cucfg             
            inst        = xe1cuins             
            part_of     = xe1cuprt             
            value       = xe1cuval             
       exceptions                              
            error       = 1                    
            others      = 2.                   
One extra piece of useful infomartion if you wish to debug the process is to set your breakpoints at the following points
for Function module IDOC_INPUT_ORDERS
include LVEDAF0F..
  CALL TRANSACTION 'VA01' USING bdcdata
                            MODE  input_method
                            UPDATE 'S'
                            MESSAGES INTO xbdcmsgcoll.
Now input_method is A foreground process and N for background processing but try changing it to P (pass through mode)
If you have breakpoints in va01, e.g. MV45AF0B_BELEG_SICHERN,(the part where the sales document is saved)
they will be hit, e.g
perform userexit_save_document_prepare.
perform userexit_save_document.
Lastly, don't forget using program SDJEDI , see note 380603 for more information on this
Hope this is useful
Paul Quinn

Similar Messages

  • Rename the Field Label  in the sales order application.

    Hi,
              Please suggest me how to rename one of the field name in the sales order application.
            I have add a new field called YOUR_REF_SHIP and simultaneously have to  rename it from your reference to Carrier Account No. this field  is available in the filed group SLO_DETAILS_GENERAL1.
             This field is located in the General data tab of the sales order application.
    I have created the Text Key in the Define Interface Texts and used the same text key in the Rename Field Label, but it is not working.
    and i dont want to change it with the CMOD transaction.
    Please suggest me where i have went wrong.
    Thanks.
    Anilkumar

    Hello Anil,
    The field groups are to be regenerated.
    However, I have done a similar thing and in the past, the layout generation helped me. In the recent example, the name is not reflected as per the interface text.
    Let me know if you find anything on this.
    Regards
    Priyanka

  • Copy data customer PO and PO date field from quotation to sales order

    Hi Friends,
    Can you please let me know what copy control settings I need to maintain in order to copy customer PO# and PO date field data in quotation to sales order.
    All the data is getting copied from quotation to sales order when I create sales order with reference to quotation but the customer PO no. and PO date is not getting copied.
    Can anyone please help.
    Regards,
    Wasim.

    HI
    Not sure if this is possible via Customization or not but you can try the user-exits or Routines for the Sales Order program for this
    You need to change the include FV45C102 (assuming you have copied standard order and the copy controls). ABAP team should be able to make changes to this routine and achieve your requirement.
    In VTAA, after choosing the Source and Target order type and choosing the right Quatation item, check the routine for 'Bus.data/item compl.' and it will be what has been mentioned above.
    Please check &Revert
    Thanks&Regards
    Raghu.k

  • COGS issue in the sales order

    Need your help to resolve below issue.
    A sales order is created with multiple line items. The user created delivery and invoice document for one of the line item in the sales order. The line item cost was active in the sales order and invoice document. The value was determined from the material master record.  The user then created delivery document for other line items in the sales order, but invice document creation ends with an error message that "Sales order is incomplete so billing can not be carried out" VF 069
    The first invoiced item has become inactive in the sales order now and the sales order goes into incomplete status. The system is blocking the invoice document creation for rest of line items. Could you tell me why the line item cost became inactive. Also tell me how to resolve this issue.

    I dont think,
                   There is any problem with Cost in Sales order line item.
    Cost copied from MMR is statiscial & always in display mode.
    Goto VA02- key in order no n press entere.
    now from menu bar- Goto- Edit - Incompletion log ( Cntrl + F8).
    if any field is missing , then maintain the field  to complete the sale sorder.
    incompletion log will be maintaiend @ order n item level. check in Item category for the incompletion procedure & check the fields maintained in incompletion procedure in Tx: OVA2.
    Regards,
    Reazuddin MD

  • Authority check at field level in the sales order

    Dear all, our business requirement is the following:
    only some users should be able to see the prices (including netwr, netpr,...) in the sales order depending on the authority check performed on the sales group field.
    This means that for an order of sales group 'A':
    a user of sales group 'A' can see the prices and change the order, a user of sales group 'B' cannnot see the prices but can change the order, a user of sales group 'C' can display the order but cannnot see the prices.
    I ask you if such a scenario can be realized in SAP.
    We currently run SAP ECC 5.0.
    thx all !
    bye Roberto

    Hi
    In general different users will be given different authorizations based on their role in the orgn.
    We create ROLES and assign the Authorization and TCODES for that role, so only that user can have access to those T Codes.
    USe SUIM and SU21 T codes for this.
    Much of the data in an R/3 system has to be protected so that unauthorized users cannot access it. Therefore the appropriate authorization is required before a user can carry out certain actions in the system. When you log on to the R/3 system, the system checks in the user master record to see which transactions you are authorized to use. An authorization check is implemented for every sensitive transaction.
    If you wish to protect a transaction that you have programmed yourself, then you must implement an authorization check.
    This means you have to allocate an authorization object in the definition of the transaction.
    For example:
    program an AUTHORITY-CHECK.
    AUTHORITY-CHECK OBJECT <authorization object>
    ID <authority field 1> FIELD <field value 1>.
    ID <authority field 2> FIELD <field value 2>.
    ID <authority-field n> FIELD <field value n>.
    The OBJECT parameter specifies the authorization object.
    The ID parameter specifies an authorization field (in the authorization object).
    The FIELD parameter specifies a value for the authorization field.
    The authorization object and its fields have to be suitable for the transaction. In most cases you will be able to use the existing authorization objects to protect your data. But new developments may require that you define new authorization objects and fields.
    http://help.sap.com/saphelp_nw04s/helpdata/en/52/67167f439b11d1896f0000e8322d00/content.htm
    To ensure that a user has the appropriate authorizations when he or she performs an action, users are subject to authorization checks.
    Authorization : An authorization enables you to perform a particular activity in the SAP System, based on a set of authorization object field values.
    You program the authorization check using the ABAP statement AUTHORITY-CHECK.
    AUTHORITY-CHECK OBJECT 'S_TRVL_BKS'
    ID 'ACTVT' FIELD '02'
    ID 'CUSTTYPE' FIELD 'B'.
    IF SY-SUBRC <> 0.
    MESSAGE E...
    ENDIF.
    'S_TRVL_BKS' is a auth. object
    ID 'ACTVT' FIELD '02' in place 2 you can put 1,2, 3 for change create or display.
    The AUTHORITY-CHECK checks whether a user has the appropriate authorization to execute a particular activity.
    This Authorization concept is somewhat linked with BASIS people.
    As a developer you may not have access to access to SU21 Transaction where you have to define, authorizations, Objects and for nthat object you assign fields and values. Another Tcode is PFCG where you can assign these authrization objects and TCodes for a  profile and that profile in turn attached to a particular user.
    Take the help of the basis Guy and create and use.
    <b><REMOVED BY MODERATOR></b>
    regards
    Anji
    Message was edited by:
            Alvaro Tejada Galindo

  • To update the status of the Sale Order through Pl/sql(backend)

    Hi folks.
    May I how to alter the status of Sale Order from 'Entered' to 'Awaiting for Approval' when the sale order was booked.After approval only it needs to change into 'BOOKED'.
    Requirement Scenaria as follows:
    Activity Status
    1) Sale Order Creation Entered
    2) Booking the Sale Order Awaiting For Approval
    3) After Approved 'Booked'
    or
    4) After Rejected Rejected --- should not be available for pick and ship.
    Please tell me the solution to alter the status and I had already tried both normal update statement and update through sale order API.Both didnt work.
    kindly find me an appropriate solution
    Note:I had already altered the OE order header workflow to go for approval when Sale order booked
    Thanks in advance

    Apparently, your Sales Order Type has Approval Workflow associated. Have the approver approve it from the Notifications window. Alternatively have a script to approve the workflow with userid as the approver's, in order for approval and booking.
    In case of forced Booking, use OE_ORDER_PUB.PROCESS_ORDER API to pass the Order Details along with BOOKED_FLAG='Y' and FLOW_STATUS_CODE='BOOKED'.
    let me know,
    Dip

  • While saving the sales order through Va01 and Va02 and email has to send

    Hi Experts,
    My requirement is to send an email with PDF formatted display of the Sales order to the sold to party's email id while saving the Salesorder through Va01 and Va02.
    I need the following .
    How to send an email with PDF formatted attachment of Salesorder display ? (we have done the formatting of display through SMARTFORMS )
    I think we can do it by userexits program name is MV45AFZZ while saving the document.
    Please suggest me the best possible way.
    Thanks ,
    Saritha

    Hi, there is no need for a customer devlopment on this. A standard smartform output will do with output medium '5' (external send). Then the smartform output will be send as PDF to the e-mail address in the output partner. Have a look at transaction NACE.
    Regards Jack

  • In Sales Order form populate charges field after saving the Sales Order

    Can we populate Charges field in Sales Order form after saving the sales Order automatically.
    The charges to be calculated based on the amount entered and the item selected in Sales Order.
    In the Manual process it is done by hitting the Actions Button and then select the Charges.
    The charge type would be "Freight Costs"

    by using process_order API, I am able to update the charges field.

  • Field missing in the sales order.

    Hi Experts,
    We have notification for which the sales orders are created.
    Whenever some changes are made in the notification they get reflected in teh sales order once u open it an save it again.
    But this time when we made some changes on the notification and hence opened and saved the sales order along with reflecting the changes in the sales order as per the notification one crucial field got cleared.
    But we are not able to trace how is this field getting cleared.
    We have tried creating new sales orders and again tried the same changes  but this time no field got cleared and everything is fine.
    But the original sales order still have the field blank which is important.
    Please advice.

    Hi,
    The copying controls are same as for other notifications.
    We have tried creating sales orders without changing the copy controls. But this prob has not occurred with the sales orders we are creating now. But the prob that has occured in case of original sales order still persist.
    Please advice.

  • Uploading Purchase Order Against the Sales Order through DTW

    Hi Experts,
    I searched the forum but could not see anything regarding this.
    Can I upload Purchase Orders against the Sales Orders using DTW upload facility? Manually we do it through the Logistics Tab in Sales Order.
    Thank you in advance.
    Kind Regards,
    IC

    Hi,
    You can use the BaseType, BaseEntry and BaseLine columns for this in the row level template (DLN1):
    BaseType: it's the Object Type of base document (ORDR.ObjType) which is '17' in case of Sales Order
    BaseEntry: it's the Document Entry of the base document (ORDR.DocEntry)
    BaseLine: it's the row number of the line in the base document (RDR1.LineNum)
    If you import your Delivery Notes with this info, the link to the Sales Order will be updated just as if you used Copy To in SAP.
    Regards,
    Nat

  • I wish to modify the name of one of the field name in the sales order.

    HELLO GURRRUS,
                 i wish to modify teh name of one of the field name in the sales ordder.
    what is the procdure,path and steps involved in that.it would be of great help of me if u take some  time and suggest me.
    bye take care hav a happy and peaceful life

    Hi Sameer,
    If you want to change the name or description of the field in the Sales order,
    you have to use the userexit MV45AFZZ and use the Form USEREXIT_FIELD_MODIFICATION.
    Get the help of the ABAPer and decide where do you want to make the change in the Header or the Line items.  Accordingly give the requirements to the ABAPer.
    He will do it.
    Thanks
    Augustine Ponraj

  • Problem in blocking that amount in the sales order through routein

    Dear Experts,
    We are facing a problem in Routine,
    We have developed a Z rebate module in that we are saving the accrual value for a perticular customer in "Z" Table.
    We are having a senerio of adjusting that perticular accrued amount in the next month sales order as a discount  at the item level. In table  itself we fix this much amount as to flow to sales order for a Perticular material (EX- for 100001 material 5 rs per TON).
    We have devaloped 901 routine that will go to "z" table and check any accrued amount is there then depending on the quantity ordered it will take accrual amount (simultanusly it will block the respective amount in the "z" table) and it will come and update in sales order pricing. Once we save sales order then it will reduse the perticular amount in from "z" table.
    Now we are facing a problem, when we create a sales order first time depending on quantity routine will pull the value from "z" table and it will block respective amount in the "z" table. but before saving the sales order if you change the quantity again (EX- from 100 qty to 200 qty) then the routine is not pulling any value because the amount is already blocked. 
    Can any one tell me how check in run time this was the earlier quantity and this is changes quantity Or is there any logic to block that perticular amount.
    Regards
    Nagesh

    HI Sree
    Could you please justify your post stating
    "Now we are facing a problem, when we create a sales order first time depending on quantity routine will pull the value from "z" table and it will block respective amount in the "z" table. but before saving the sales order if you change the quantity again (EX- from 100 qty to 200 qty) then the routine is not pulling any value because the amount is already blocked. "
    Your discount is based on qty, so when you are adding new item means order qty increased, so discount is applicable.
    Or please put your requirement clearly

  • Open Sales orders through IDOC

    Hi
    We are trying to send the list of open sales orders of a customer in an IDOC to the customer. For example, if the customer has got 15 sales order to be delivered to him , he needs the details of all these 15 orders in an single IDOC
    Is there any IDOC message type available for this in SAP R/3 4.7 version  or is there a standard solution of sending these details through IDOC
    Regards
    Anandh

    Hi
    We are trying to send the list of open sales orders of a customer in an IDOC to the customer. For example, if the customer has got 15 sales order to be delivered to him , he needs the details of all these 15 orders in an single IDOC
    Is there any IDOC message type available for this in SAP R/3 4.7 version  or is there a standard solution of sending these details through IDOC
    Regards
    Anandh

  • Sending sales order through idoc

    hai,
    Is it possible to send IDOC of sales order in IDES.
    If so can anyone pls let me the solution

    Yes, You can send IDOC's in IDES for Testing (Client to Client 800 to 000).
    For Configuration related you can search in ABAP General Forum
    Regards,
    Ramesh

  • Error while updating the sales order through Process Order API

    Hi,
    Please any one will help plz.
    I am updating the promise_date through oe_order_pub.process_order(Process Order API) i am getting the following error.
    FND_AS_UNEXPECTED_ERROR N PKG_NAME OE_Order_Cache N PROCEDURE_NAME get_tax_calculation_flag N ERROR_TEXT ORA-01403:no data found
    Please any one will help plz
    Below is my code.
    Declare      
    l_archive_file_name VARCHAR2(1000);
    l_shipment_exists NUMBER:=0;
    l_header_id NUMBER;
    l_line_id NUMBER;
    p_header_rec Oe_Order_Pub.Header_Rec_Type;
    l_line_tbl oe_order_pub.line_tbl_type := oe_order_pub.g_miss_line_tbl;
    l_header_rec OE_ORDER_PUB.Header_Rec_Type;
    l_header_val_out_rec OE_ORDER_PUB.Header_Val_Rec_Type;
    l_header_adj_out_tbl OE_Order_PUB.Header_Adj_Tbl_Type;
    l_header_adj_val_out_tbl OE_Order_PUB.Header_Adj_Val_Tbl_Type;
    l_header_price_att_out_tbl OE_ORDER_PUB.Header_Price_Att_Tbl_Type;
    l_header_adj_att_out_tbl OE_ORDER_PUB.Header_Adj_Att_Tbl_Type;
    l_header_adj_assoc_out_tbl OE_ORDER_PUB.Header_Adj_Assoc_Tbl_Type;
    l_header_scredit_out_tbl OE_Order_PUB.Header_Scredit_Tbl_Type;
    l_header_scredit_val_out_tbl OE_Order_PUB.Header_Scredit_Val_Tbl_Type;
    l_line_rec OE_ORDER_PUB.line_rec_type;
    l_line_out_tbl OE_ORDER_PUB.Line_Tbl_Type;
    l_line_val_out_tbl OE_ORDER_PUB.Line_Val_Tbl_Type;
    l_line_adj_out_tbl OE_ORDER_PUB.Line_Adj_Tbl_Type;
    l_line_adj_val_out_tbl OE_ORDER_PUB.Line_Adj_Val_Tbl_Type;
    l_line_price_att_out_tbl OE_ORDER_PUB.Line_Price_Att_Tbl_Type;
    l_line_adj_att_out_tbl OE_ORDER_PUB.Line_Adj_Att_Tbl_Type;
    l_line_adj_assoc_out_tbl OE_ORDER_PUB.Line_Adj_Assoc_Tbl_Type;
    l_line_scredit_out_tbl OE_Order_PUB.Line_Scredit_Tbl_Type;
    l_line_scredit_val_out_tbl OE_Order_PUB.Line_Scredit_Val_Tbl_Type;
    l_lot_serial_out_tbl OE_Order_PUB.Lot_Serial_Tbl_Type;
    l_lot_serial_val_out_tbl OE_Order_PUB.Lot_Serial_Val_Tbl_Type;
    l_action_request_out_tbl OE_Order_PUB.Request_Tbl_Type;
    l_msg_count NUMBER;
    l_msg_data VARCHAR2(2000);
    l_return_status VARCHAR2(1);
    l_index NUMBER;
    l_rows_processed NUMBER:=0;
    l_line_mawb VARCHAR2(240);
    l_line_hawb VARCHAR2(240);
    l_line_flight_num VARCHAR2(240);
    l_org_id NUMBER :=143;--FND_GLOBAL.ORG_ID;
    l_resp_id NUMBER:=FND_GLOBAL.RESP_ID;
    l_resp_appl_id NUMBER:=FND_GLOBAL.RESP_APPL_ID;
    l_user_id number := FND_GLOBAL.USER_ID;
    l_promise_date date;
    BEGIN
    SELECT ol.org_id, oh.header_id, ol.line_id,ol.promise_date
    INTO l_org_id, l_header_id, l_line_id,l_promise_date
    FROM apps.oe_order_headers_all oh, apps.oe_order_lines_all ol
    WHERE ol.header_id=oh.header_id
    AND ol.line_id =1319526; --&line_id
    -- apps.fnd_global.apps_initialize(&l_USER_ID,&l_resp_id,&l_resp_appl_id);
    apps.fnd_global.apps_initialize(67778,51017,660);
    p_header_rec := OE_ORDER_PUB.G_MISS_HEADER_REC;
    p_header_rec.header_id :=835035;-- l_header_id;
    p_header_rec.operation := OE_GLOBALS.G_OPR_UPDATE;
    l_line_tbl := oe_order_pub.g_miss_line_tbl;
    -------------------------Line Record -------------------------------
    l_line_tbl(1) := oe_order_pub.g_miss_line_rec;
    l_line_tbl(1).header_id := 835035;
    l_line_tbl(1).line_id := 1319526;
    l_line_tbl(1).promise_date := sysdate;
    l_line_tbl(1).operation := oe_globals.g_opr_update;
    BEGIN
    apps.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_true
    ,x_return_status => l_return_status
    ,x_msg_count => l_msg_count
    ,x_msg_data => l_msg_data
    ,p_header_rec => p_header_rec
    ,p_line_tbl => l_line_tbl
    -- out variables
    ,x_header_rec => l_header_rec
    ,x_header_val_rec => l_header_val_out_rec
    ,x_header_adj_tbl => l_header_adj_out_tbl
    ,x_header_adj_val_tbl => l_header_adj_val_out_tbl
    ,x_header_price_att_tbl => l_header_price_att_out_tbl
    ,x_header_adj_att_tbl => l_header_adj_att_out_tbl
    ,x_header_adj_assoc_tbl => l_header_adj_assoc_out_tbl
    ,x_header_scredit_tbl => l_header_scredit_out_tbl
    ,x_header_scredit_val_tbl => l_header_scredit_val_out_tbl
    ,x_line_tbl => l_line_out_tbl
    ,x_line_val_tbl => l_line_val_out_tbl
    ,x_line_adj_tbl => l_line_adj_out_tbl
    ,x_line_adj_val_tbl => l_line_adj_val_out_tbl
    ,x_line_price_att_tbl => l_line_price_att_out_tbl
    ,x_line_adj_att_tbl => l_line_adj_att_out_tbl
    ,x_line_adj_assoc_tbl => l_line_adj_assoc_out_tbl
    ,x_line_scredit_tbl => l_line_scredit_out_tbl
    ,x_line_scredit_val_tbl => l_line_scredit_val_out_tbl
    ,x_lot_serial_tbl => l_lot_serial_out_tbl
    ,x_lot_serial_val_tbl => l_lot_serial_val_out_tbl
    ,x_action_request_tbl => l_action_request_out_tbl
    --dbms_output.put_line('l_msg_data-->' ||l_msg_data ||' l_return_status --> ' ||l_return_status);  
    END;
    commit;
    END;
    Regards,
    Sangu

    Hi Sangu,
    See if the following notes help you:
    Error when calling API from SQL*Developer, eg. ORA-01403 in API OE_ORDER_PUB.PROCESS_ORDER (Doc ID 1054295.1)
    Cancellation Of Transfer Orders Is Not Possible - ORA-01403: no data found in Package OE_Order_PVT Procedure Process_Order (Doc ID 391307.1)
    Thanks &
    Best Regards,

Maybe you are looking for