Skip to Content
author's profile photo Former Member
Former Member

Add Field to IDOC Segment

Hi,

I am relatively new when it comes to IDOCs. I have identified an IDOC type but its missing some fields I need to output.

How do I add a certain field to a segment and ensure that it contains the correct value when I output the IDOC?

Please help.

Thanks.

Kenny

Add comment
10|10000 characters needed characters exceeded

6 Answers

  • Best Answer
    Posted on Mar 16, 2007 at 01:25 PM

    Hi

    You can use IDoc extension

    Here is steps

    /nWE31

    Here will create the segments for extend our idocs.

    Example: 'ZDUMMY'

    -> Write a short description and field name.

    -> Data element = CHAR1 (will create a new field in the idoc with 1 character extension)

    -> Save (developer permissions needed)

    2)

    /nWE30

    -> At development object select 'extension'

    -> Write a name for object name (8 char extension). For MATMAS IDOC extension i create ZMATEX01. Click on 'create' button.

    -> Now we will select the IDOC link. Select 'create new', and link to a basic type (MATMAS05 in our example). Don't forget to write a description (will be usefull in the future for identificate correspondances).

    -> Select IDOC substructure where wich will be extended. Click on header and 'create segment' (you can paste from clipboard with 'insert' button).

    -> Select ZDUMMY segment created before.

    -> Save and fill package and transport order for this modification.

    -> Release segment from toolbar (Utilities)

    /nWE82

    Add Message Type (MATMAS), Basic Type (MATMAS05), Extension (ZMATEX01) and Release.

    Finish

    All it's done! So now you can use your new IDOC. For SAP XI, must import again to your integration scenario. Check ZDUMMY field at the segment you have selected.

    aRs

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 16, 2007 at 01:28 PM

    Hi,

    Go to Transaction SE31 and enter segment. press change

    first from menu EDIT-> cancel Release

    then enter the fields in that segment with the data element entering.

    Save. then again you have to put RELEASE from menu.

    You have to search for the correct Exit(Program) for population of these custom fields which we added in this segment and write the code.

    then only it works.

    reward if useful.

    regards,

    anji

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Mar 16, 2007 at 01:34 PM

    Check your output function module , ex. for MATMAS --> MASTERIDOC_CREATE_MATMAS whether any custom exit available , if available then populate the ZDUMMY segment within that customer exist.

    Thanks

    aRs

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 21, 2007 at 06:04 AM

    Hi if you still want more info... tell me and give ur mail id. i will send a details step-by step documents 2 u

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Mar 16, 2007 at 01:40 PM

    Hi,

    and also check the transaction code WE57.

    aRs

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 16, 2007 at 01:55 PM

    Hi,

    To get custom fields on IDOC you need to add custom segment on IDOC and for that you have to create a extension IDOC with reference to Basic IDOC.

    You can do that as explain below.

    Here for example you have basic idoc ORDERS05 and you want to add additional segments at header level - ZE1EDK01 and line item level ZE1EDP01

    1. <b>TCode - WE31</b> : Create custom segments ZE1EDK01 and ZE1EDP01 with the fields you want and release these segments.

    2. <b>TCode - WE30</b> : Create extension IDOC

    - In WE20 enter extension IDOC name - ZORDERS05, select "Extension" option and hit "create" button. When it gives pop-up, select "create new" and enterd linked basis type as "ORDERS05". Enter proper description and save.

    3. On the next screen of WE30, select the segment under which you want to add your additional segment. Save everything.

    4. <b>TCode - WE82</b>. Here you link extension idoc to basic idoc and message type.

    - Go into change mode. Hit "New entries button" Enter Message type = "ORDERS", basic type = "ORDERS05" and extension type = "ZORDERS05".

    You can populate this segment and fields you want using the user-exit available in that perticular IDOC processing.

    Some common user-exits are:

    1. Purchase Order IDOC: ORDERS05

    Enhancement: <b>MM06E001</b> - User exits for EDI inbound and outbound purchasing documents

    2. Quotation IDOC: ORDERS05

    Enhancement: <b>VEDE0001</b> - SD EDI Outbound quotation (customer enhancement)

    3. Invoice IDOC ( bill. doc): INVOIC02

    Enhancement: <b>LVEDF001</b> - User exit for IDOC_OUTPUT_INVOICE

    Let me know what message type, process code, idoc type you are using and i will tell you what user-exit you can use for your requirement.

    Regards,

    RS

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      I have already reply to your question in my previus post. Let me know if i am missing anything.

      Also if you can give me the information line, where have you added your extra segment ( under which standard segment) and the code you are using to populate the data, i can help you.

      Let me know if you have any other issues.

      Regards,

      RS