Mapping for Sales Order Idoc

Hi Experts,
I am facing problem with mapping for standard SalesOrder Idoc ORDERS.ORDER05.
My Source Structure is: X12 EDI850
<G_SPO1> (occrance 1..100000)
<S_PO1> (occurance is 1..1)
                  <D_234/>
                  <D_234_2/>
                  <D_234_3/>
                  <D_234_4/>
                  <D_234_5/>
                  <D_234_6/>
                  <D_234_7/>
                  <D_234_8/>
                  <D_234_9/>
                  <D_234_10/>
</S_PO1>
</G_SPO1>
Target Structure is:
E1EDP01
    --->E1EDP19
                --->IDTNR
Functionality is passing material numbers of EDI customers to IDTNR field in E1EDP19 filed under segment E1EDP01.
From source i will get set of material numbers, for one set 10 material numbers(In source you can find 10 fields for 10 material numbers)
Requirement: I need to send those material numbers to IDTNR (One to one mapping ).
For getting 10 material numbers i just duplicated segment E1EDP19 in target side and mapped one field of source to IDTNR target in each segment. Totally mapped 10 source fields in 10 segments.
If 20 material numbers I will get two sets <G_SPO1> will repeat two times, each time 10 material numbers. So I mapped G_SPO1 to E1EDP01
S_PO1 to E1EDP19.
My out put is coming as 10 E1EDP19 segments under E1EDP01 if 10 materail numbers.
But problem is ECC team asking to get one E1EDP19 line item value under E1EDP01 line item header. They are not accepting duplicate E1EDP19 segments under header E1EDP01.
How to acheive this with my requirement.
Appreciate your hellp on this.
Thanks & Regards,
A.Neelima.

There is no relation between D_234 and D_356.
I want to pass D_356 to KTEXT in all E1EDP01 segments which ever i will get based on the condition we implemented for E1EDP01.
Present its coming only for E1EDP01 first segment (for which i used condition with D_234), its not coming for remaining 9 E1EDP01 segments (for which i used conditions with D_234_2 to D_234_10)
If i pass sample input payload:
<S_ST>
<S_PID>
<D_350>Description</D_350>
</S_PID>
<G_SPO1>
<S_PO1>
<D_234>1</D_234>
<D_234_2/>2</D_234_2>
<D_234_3/>
<D_234_4/>
<D_234_5/>
<D_234_6/>
<D_234_7/>
<D_234_8/>
<D_234_9/>
<D_234_10/>
</S_PO1>
</G_SPO1>
<G_SPO1>
<S_PO1>
<D_234>3</D_234>
<D_234_2>4<D_234_2>
<D_234_3/>
<D_234_4/>
<D_234_5/>
<D_234_6/>
<D_234_7/>
<D_234_8/>
<D_234_9/>
<D_234_10/>
</S_PO1>
</G_SPO1>
</S_ST>
Coming Output Now: (KTEXT field is missing in last two segments)
<E1EDP01>
<E1EDP19>
<IDTNR>1</IDTNR>
<KTEXT>Decription</KTEXT>
</E1EDP19>
</E1EDP01>
<E1EDP01>
<E1EDP19>
<IDTNR>3</IDTNR>
<KTEXT>Decription</KTEXT>
</E1EDP19>
</E1EDP01>
<E1EDP01>
<E1EDP19>
<IDTNR>2</IDTNR>
</E1EDP19>
</E1EDP01>
<E1EDP01>
<E1EDP19>
<IDTNR>4</IDTNR>
</E1EDP19>
</E1EDP01>
Expected Output:
<E1EDP01>
<E1EDP19>
<IDTNR>1</IDTNR>
<KTEXT>Decription</KTEXT>
</E1EDP19>
</E1EDP01>
<E1EDP01>
<E1EDP19>
<IDTNR>3</IDTNR>
<KTEXT>Decription</KTEXT>
</E1EDP19>
</E1EDP01>
<E1EDP01>
<E1EDP19>
<IDTNR>2</IDTNR>
<KTEXT>Decription</KTEXT>
</E1EDP19>
</E1EDP01>
<E1EDP01>
<E1EDP19>
<IDTNR>4</IDTNR>
<KTEXT>Decription</KTEXT>
</E1EDP19>
</E1EDP01>
Thnaks & Regards,
A.Neelima.

Similar Messages

  • New/Change Indicator for Sales Order IDoc

    Hi Gurus,
    Does anyone knows if there's a field in the IDoc Segment for ORDERS that shows or indicate if it's a new or changed order.
    We are sending IDocs to our freight company for sales order, but we are trying to see if there's a way we can let them know if its a new or changed IDoc for sales order.
    Is there any field for this or any work around on this?
    Thanks for your help.

    Segment Field ACTION is not been changed. I've just tested it and made changes to the Sales Order, the ACTION field is still carrying "000".
    Like thomas said, can this be because I'm using message type ORDRSP instead of ORDCHG?
    Does this make any difference?
    Edited by: Basil Balogun on May 10, 2011 4:54 PM
    Edited by: Basil Balogun on May 10, 2011 9:43 PM

  • User exit for Saler order Idoc

    We´re trying to create Sales Order through IDOC. I need to add several fixed values. I wrote a user exit in EXIT_SAPLVEDA_009 ( VEDA0001):
    segmentE1EDK17----
       read table DEDIDD with key segnam = 'E1EDK17'.
       if sy-subrc eq 0.
          v_index = sy-tabix.
          v_e1edk17 = DEDIDD-sdata.
    *- Fixed values--
          v_e1edk17-QUALF = '001'.
          v_e1edk17-LKOND = 'CFT'.
          dedidd-sdata = v_e1edk17.
          modify dedidd index v_index
          transporting sdata.
        endif.
    I debugged the coding,  the structure receives the values , but  when I check the Sales order nothing appears .. Help !
    Is there something to flags ??

    But How Can I access the Structure from EXIT_SAPLVEDA_001 ??
    any example..
    I´ll appreciate it .

  • How to write a requirement for sales order outbound iDOC

    i need to write the requirement for sales order IDOC
    Please help

    Hi
    From the sales order screen itself you can create the delivery from the menu
    Sales order -> deliver/y
    or from VL01N , enter shipping point and Order number, create and save
    Reward points if useful
    Regards
    Anji

  • No batch input data for screen SAPMSSY3 0131 in Sales order IDOC

    I am processing Sales order IDOCS in status 64 using RBDAPP01 .Some of them error out to status 51 with the message -
    No batch input data for screen SAPMSSY3 0131 .
    I know the standard IDOC inbound process tries to simulate the posting in a BDC like process.
    Now, I went to we19 and the screen hangs up in a pop up in the partners tab with partner type 'WE' and my shipto (which is actually filled in the IDOC), missing..upon repeatedly hitting enter, it goes thru and an idoc is posted in status 53. But still unable to get through the root of this issue.
    Any, insight will help.

    Hi,
    I think the pop-up is generated through and user-exit for which recording is missing. This is why your idoc stays in status 64...
    Handle the screen recording in the user exit IDOC_INPUT_ORDERS
    user exit routine
    PERFORM customer_function_dynpro.
    FORM CUSTOMER_FUNCTION_DYNPRO.
      CALL CUSTOMER-FUNCTION '002'
        EXPORTING DXVBAK   = XVBAK
                  DVTCOMAG = VTCOMAG
                  DLAST_DYNPRO = LAST_DYNPRO
                  DXMESCOD = IDOC_CONTRL-MESCOD
        TABLES    DXBDCDATA = BDCDATA
                  DXVBAP    = XVBAP
                  DXVBEP    = XVBEP
                  DYVBEP    = YVBEP
                  DXVBADR   = XVBADR
                  DYVBADR   = YVBADR
                  DXVBPA    = XVBPA
                  DXVBUV    = XVBUV
                  DIDOC_DATA = IDOC_DATA
                  DXKOMV    = XKOMV
                  DXVEKP    = XVEKP
                  DYVEKP    = YVEKP
        EXCEPTIONS
                  USER_ERROR = 01.
    Regards,
    Krishnakumar

  • IDOC outbound for sales orders

    Hi developers,
    you can help with the name and the transaction where I can try the standard IDOC for sales orders?
    Thanks
    Domenico

    Domenico,
    WEDI is an area menu where you can find all the transactions regarding IDOCS.
    HOwever, If you trying to see the structure of a standard IDOC for sales order, you can go to WE30 and type the IDOC type(ORDERS01) and it should show you the structure of the same.
    Let me know if you have more questions.
    regards,
    Ravi
    Note : Please reward points if this helps you.

  • Segment for WBS element in Inbound Sales Order Idoc

    Hi gurus,
    I am trying to create an inbound idoc for sales order ' VA01'. I need to populate WBS element in the item level under Account Assignment Tab. I am using ORDERS05 basic type. Please help to find which segment to use for WBS element. Waiting for your reply. Please help.
    Regards,
    Satyajit

    Hello,
            As far as I know, there is no Segment / Field definition in ORDERS05 for WBS Element as it is not mandatory information to be filled in order for the Sales Order to be Complete. So, you need to create an Extension of the IDoc Type ORDERS05. For your requirement, here is the Approach I have.
    1. Create an extension for IDoc Type ORDERS05 to ZORDER05 with a Custom Segment Z1EDP01 in which you'll have the Custom Field Name VBAP-PS_PSP_PNR which is the WBS Element field in VBAP Table.
    2. Now, use the Customer Exit EXIT_SAPLVEDA_001 in the Enhancement VEDA0001 in which you can actually populate the Field WBS Element that would be already available in the Inbound IDoc to store it in a Work Area. As you are aware, you'll need to create a Project in CMOD for the same.
    3. Export the same to some MEMORY ID 'XXX'.
    4. Come back to the Selection Program for ORDER05 which is IDOC_INPUT_ORDERS in which you'll find the below CASE Statement.
        CASE xaprau.
              WHEN ' '.
                PERFORM call_va01_new_orders USING ok.
              WHEN 'Q'.
    Aufruf Transaktion Auftragerfassung VA01 mit Bezug auf Angebot
    call transaction Order Entry VA01 with refer to quote number.
                PERFORM call_va01_new_orders_angbt USING ok.
              WHEN 'C'.
    Aufruf Transaktion Auftragerfassung VA01 mit Bezug auf Kontrakt
    call transaction Order Entry VA01 with refer to contract number
                PERFORM call_va01_new_orders_contk USING ok.
              WHEN 'L'.
    5. Now, since our Standard Order Type (VBAK-VBTYP) is 'C',
        we'll have to choose the Subroutine for the 'C' Option.
    6. In this Subroutine, there is another Subroutine va01_dynpro_kopf_kaufmann_kde2 which is for populating Custom Dynpro Fields for the Sales Order. So, we need to choose the same Subroutine inside which we have to Create an Enhancement Implementation.
    7. In this Enhancement Implementation (Implicit), we have to IMPORT the value of the WBS Element which was exported in the Customer Exit.
    8. Check if it is initial. If it is not, then Call the Perform as below.
         IF NOT WA_Z1EDP01 IS INITIAL. "Checking if the Segment
                                                           " is Empty
       PERFORM DYNPRO_SETZEN USING 'COBL-PS_POSID' WA_Z1EDP01-ZZWBSELEMENT.
    ENDIF.
    9. Since the Sales Orders are posting using BDC here, by calling the above Subroutine DYNPRO_xxx, we are appending our Custom Segment / Field value to the BDC_DATA table.
    10. In Step 8, I've given the Notation for Work Area. It will also be applicable when there are multiple Line Items. All you have to do is to EXPORT an Internal Table instead of Work Area and use the same here for each Line Item.
    11. I've given you above procedure because I've worked on similar requirement in which I had to populate the Special Processing Indicator instead of WBS Element.
    Hope it would be helpful for you.
    Thanks and Regards,
    Venkat Phani Prasad Konduri

  • PRICING Procedure in SAP for an Incomming Sales Order IDOC

    Hi Friends,
    Here is a situation what we have and what we intend to do.
    We would be getting a Sales Order IDOC and when it hits the SAP..it comes with
    -Material, Qty and Price per material
    -Total Freight
    -Total Tax
    i.e the Pricing conditions are not maintained in SAP at all..we would just get the IDOC externally and the SAP needs to read the material, Qty at line item,
    take the total freight as it comes, and total Tax as it comes in the Idoc.
    My thoughts were to have all the Conditons PR00 (ZR00), KF00 (ZF00), UTXJ (ZTXJ) . ZR00 to set as Manual condition. ZF00 as header Freight and Manual condition, ZTXJ as header condition and Manual.
    I therefore was trying to figure out the best way to set the pricing procedure.
    Please let me know if I am on right track if not which is the way I need to set.
    Thank you
    Ravi

    HI Ravi,
    I think your issue is solved now...so for the benefit of SDN members....can you share the solution..as I am also working on the same requirement !!
    Thanks in advance
    Mayank

  • IDOC for Sales order

    Dear Guru's,
                could anybody help me in creating the IDOC for sales order.
    As per My client Business Requirment we require the following Fields in One Basic Type only.
    The Fields are as follows.
    Order Type,Sales Area,Sales Office,Sales Group,Material Number,Order Quantity,Purchase order Number,Purchase order Date,
    Sold to party,Ship to party,Bill to party,Payer,
    Vendor no ( It is Third Party order)
    Contract Start Date, Contract End Date (in order we will give these dates for periodic billing purpose )..
    Now i want all the fields will include in one single Basic Type.
    Thank you
    suribabu

    hi,
    please check this link:
    this might be help ful.
    http://wwwdotsaptechnicaldotcom/Tutorials/ALE/Guide/Index.htm
    balajia

  • Outbound IDOC BW to R/3 for sales order information

    Hello everybody,
    is there someone, who has any experience with transferring data (sales order data) <b>from BW to R/3</b> via IDOC.
    The customer has already implemented an EDI interface for R/3 via IDOC for generating sales orders. This IDOC interface should be used also for transferring BW data to R/3. So BAPI and flatfile interface BW-R/3 is not favored!
    Is there any good documentation how to proceed which can be provided to me?
    In particular i am interested how to create a function module to fill an IDOC structure from a standard data base table in BW (ODS table), how to create new message types etc.
    Thanks in advance
    Gunnar

    Is it possible in general?
    Yes, theoretically at least.
    You do not have SAP standard IDOCs (ORDERS*) for Sales Orders, neither is the functions or message types etc available on BW system. This would mean you will have to create custom idocs/message-type/process-code and configuration setup. In addition, if you are going to read data from a cube (to create the orders), it is going to be a slow and painful work.
    Another option, if you do have to create sales order IDOCs, would be to extract order data from BW to a , say Infospoke file, on BW. You can process this file in R/3 system to create/post a sales order idoc. This would help as the necessary components (eg sales order IDOC) are available there already. If you need help on that (creating sales order IDOC or BAPI posting, from a file), ABAP forum would be more helpful.

  • What is the IDOC Basic Type for sales order creation

    Hi Experts,
    Can anyone tell me Idoc Basic type for sales order creation.
    Thanks
    Prashant

    Hi,
    The basic types for creating the order are:
    1.Orders01
    2.Orders02
    3.Orders03
    4.Orders04
    5.Orders05.
    The basic type for SIS order is:
    SISCSO01.
    Regards,
    Krishna.

  • Want the code for sales order confirmation idoc

    New SAP output type ZA23 (with condition logic)for sales order confirmation  is needed to create ORDRSP IDoc when the following 3 cases are true: 1) Item Added, 2) Line Item Changed,3) Item Deleted.
    Changes to existing lines (option 002) can include:
    - qty
    - date
    - price

    Look at the function exits under the enhancement SDEDI001 you have many exits, i think the outbound idoc is primariy created by the function module: IDOC_OUTPUT_ORDRSP.
    Hope this helps.
    Rajeev

  • Add segment to outbound Idoc for Sales order

    HI experts,
    I need to add segment E1EDP02 under Existing segment E1EDP01 for outbound IDOC for Sales order. FM" IDOC_OUTPUT_ORDRSP".
    I have used the Exit : "EXIT_SAPLVEDC_003" for the FM "IDOC_OUTPUT_ORDRSP"  in the include of the Exit   i wrote my code also for adding segment and activate it.
    But when i am trying to debug the code it's not working
    So please guide me how to debug it
    I have followed below steps to Debug.
    1. In VA02 i have repeat the output.
    2. Put the breakpoint in the Exit include program .
    3. put the Breakpoint in ALE processing Routine in RSNASTED program also
    4. Trigger the program RSNAST00 by giving the  Parameter value of SALES ORDER number and execute.
    But not working
    And i need to know whether i have used the Correct EXIT or not.In that case how to identify the correct exit's
    Thanks In advance

    Hi,
    I hope you have to add your segments through WE30 first for your IDOC type.
    Cheers,
    Raja.D

  • Urgent: Creating ALE IDOC for SALES ORDER

    hi
    please tell me <b>step by step procedure to create ALE IDOC for SALES ORDER?</b>
    reward for sure
    regards
    ravish

    Hi,
         ALE IDOC
    Sending System(Outbound ALE Process)
    Tcode SALE ? for
    a) Define Logical System
    b) Assign Client to Logical System
    Tcode SM59-RFC Destination
    Tcode BD64 ? Create Model View
    Tcode BD82 ? Generate partner Profiles & Create Ports
    Tcode BD64 ? Distribute the Model view
    Message Type MATMAS
    Tcode BD10 ? Send Material Data
    Tcode WE05 ? Idoc List for watching any Errors
    Receiving System(Inbound ALE )
    Tcode SALE ? for
    a) Define Logical System
    b) Assign Client to Logical System
    Tcode SM59-RFC Destination
    Tcode BD64 ? Check for Model view whether it has distributed or not
    Tcode BD82 -- Generate partner Profiles & Create Ports
    Tcode BD11 Getting Material Data
    Tcode WE05 ? Idoc List for inbound status codes
    ALE IDOC Steps
    Sending System(Outbound ALE Process)
    Tcode SALE ?3 for
    a) Define Logical System
    b) Assign Client to Logical System
    Tcode SM59-RFC Destination
    Tcode BD64 !V Create Model View
    Tcode BD82 !V Generate partner Profiles & Create Ports
    Tcode BD64 !V Distribute the Model view
    This is Receiving system Settings
    Receiving System(Inbound ALE )
    Tcode SALE ?3 for
    a) Define Logical System
    b) Assign Client to Logical System
    Tcode SM59-RFC Destination
    Tcode BD64 !V Check for Model view whether it has distributed or not
    Tcode BD82 -- Generate partner Profiles & Create Ports
    Tcode BD11 Getting Material Data
    Tcode WE05 !V Idoc List for inbound status codes
    Message Type MATMAS
    Tcode BD10 !V Send Material Data
    Tcode WE05 !V Idoc List for watching any Errors
    1)a Goto Tcode SALE
    Click on Sending & Receiving Systems-->Select Logical Systems
    Here Define Logical Systems---> Click on Execute Button
    go for new entries
    1) System Name : ERP000
    Description : Sending System
    2) System Name : ERP800
    Description : Receiving System
    press Enter & Save
    it will ask Request
    if you want new request create new Request orpress continue for transfering the objects
    B) goto Tcode SALE
    Select Assign Client to Logical Systems-->Execute
    000--> Double click on this
    Give the following Information
    Client : ERP 000
    City :
    Logical System
    Currency
    Client role
    Save this Data
    Step 2) For RFC Creation
    Goto Tcode SM59-->Select R/3 Connects
    Click on Create Button
    RFC Destination Name should be same as partner's logical system name and case sensitive to create the ports automatically while generating the partner profiles
    give the information for required fields
    RFC Destination : ERP800
    Connection type: 3
    Description
    Target Host : ERP000
    System No:000
    lan : EN
    Client : 800
    User : Login User Name
    Password:
    save this & Test it & RemortLogin
    3)
    Goto Tcode BD64 -- click on Change mode button
    click on create moduleview
    short text : xxxxxxxxxxxxxx
    Technical Neme : MODEL_ALV
    save this & Press ok
    select your just created modelview Name :'MODEL_ALV'.
    goto add message type
    Model Name : MODEL_ALV
    sender : ERP000
    Receiver : ERP800
    Message type :MATMAS
    save & Press Enter
    4) Goto Tcode BD82
    Give Model View : MODEL_ALV
    Partner system : ERP800
    execute this by press F8 Button
    it will gives you sending system port No :A000000015(Like)
    5) Goto Tcode BD64
    seelct the modelview
    goto >edit>modelview-->distribute
    press ok & Press enter
    6)goto Tcode : BD10 for Material sending
    Material : mat_001
    Message Type : MATMAS
    Logical System : ERP800
    and Execute
    7)goto Tcode : BD11 for Material Receiving
    Material : mat_001
    Message Type : MATMAS
    and Execute --> 1 request idoc created for message type Matmas
    press enter
    Here Master Idoc set for Messge type MATMAS-->press Enter
    1 Communication Idoc generated for Message Type
    this is your IDOC
    Change Pointers
    I know how to change the description of a material using ALE Change Pointers.
    I will give the following few steps
    1) Tcode BD61---> check the change pointers activated check box
    save and goback.
    2) Tcode BD50---> check the MATMAS check box save and comeback.
    3) Tcode BD51---> goto IDOC_INPUT_MATMAS01 select the checkbox save and comeback.
    4) Tcode BD52---> give message type : matmas press ok button.
    select all what ever you want and delete remaining fields.
    save & come back.
    5) 5) go to Tcode MM02 select one material and try to change the description and save it
    it will effects the target systems material desciption will also changes
    6) goto Tcode SE38 give program Name is : RBDMIDOC and Execute
    give Message type : MATMAS and Executte
    ALE/IDOC Status Codes/Messages
    01 Error --> Idoc Added
    30 Error --> Idoc ready for dispatch(ALE Service)
    then goto SE38 --> Execute the Program RBDMIDOC
    29 Error --> ALE Service Layer
    then goto SE38 --> Execute the Program RSEOUT00
    03 Error --> Data Passed to Port ok
    then goto SE38 --> Execute the Program RBDMOIND
    12 Error --> Dispatch ok
    Inbound Status Codes
    50 Error --> It will go for ALE Service Layer
    56 Error --> Idoc with Errors added
    51 Error --> Application Document not posted
    65 Error --> Error in ALE Service Layer
    for 51 or 56 Errors do the following steps
    goto WE19 > give the IDOC Number and Execute>
    Press on Inbound function Module
    for 65 Error --> goto SE38 --> Execute the Program RBDAPP01 then your getting 51 Error
    Regards

  • User exit for  Sales order

    hi,
       i need to eliminate leading zeros for PO number which comes in SO created trough ALE.i found the enhancement for the FM idoc_input_orders.in that enahancement we have 12 FM's.my Leading zeros are comming for field belnr which comes in e1edk01 segment of idoc orders05.now i had coded my part of coding in FM exit_saplved.._oo1 and i had activated that.but it is not working for me.than i tought of going to other FM exit_sapl..._009.in which i'm not able go into the include either.plz help me out.thank you.

    Hi, Krishna!
    With IDOC_INPUT_ORDERS during IDoc interpretation PO number is assigned to XVBAK-BSTKD field which is later used for sales order creation with reference to PO.
    So all you need is to use some customer exit with changing parameters containing XVBAK after IDoc interpretation is completed. For example you can use EXIT_SAPLVEDA_009 which is called at the end of IDoc check after interpretation.
    Regards,
    Maxim.

Maybe you are looking for