IDOC Segment mapping change

Hi,
How can i change the field attached to a IDOC segment.
Actually we have this Invoice IDOC,in which the E1EDK03 012(Qualifier) is passing the IDOC creation date instead of Billing date.
So i need to change this mapping to Billing date.
Please help.

Hi Salz,
I just checked my version of SAP (4.7) and you should get an invoice date.  Check out the subroutine FILL_E1EDK03 in function module IDOC_OUTPUT_INVOIC.  The first section of this code creates an E1EDK03 segment with the invoice date (if there is an invoice date), with qualifyer 026.
Is there a possibility that in fact you are getting an E1EDK03 segment with the invoice date, but you are also getting other E1EDK03 segments (such as the one you mention with qualifyer 012) and they are obscuring the one you are looking for?
If there are definitely none being created then can I suggest that you debug the subroutine FILL_E1EDK03 in function module IDOC_OUTPUT_INVOIC to check what is happening.  You may need to change the timing of your output record to 1 and run the program RSNAST00 online to get the breakpoint to be hit correctly. 
If, in your version, the code doesn't include this date, then you have an exit function module EXIT_SAPLVEDF_002 (called via the subroutine CUSTOMER_FUNCTION in function module IDOC_OUTPUT_INVOIC) where you can actually add your own segment data.  For example you an change the contents of an existing segment (as per your original request), or append your own E1EDK03 segment with your own data.  I would recommend adding your own segment rather than changing whats there.
It is possible to extend idocs to add your own custom segments (eg Z1EDK03), but I wouldn't recommend it in your case, because in later versions of SAP the date is provided and by not creating a new segment (Z1EDK03) you will have no mapping changes to do when you upgrade.  You can just delete your userexit code.
Hope that all makes sense and helps you with your problem.
Cheers,
Brad

Similar Messages

  • Changing filed name description - idoc segment creation/change

    HI,
    is it possible to change the fieldname description in an IDoc Segment without changing the DataElement ?
    Exampel:
    I Used CHAR40 as dataelement for my own ZZFIELD. In the Idoc the fieldname description of the data element CHAR40 is shown.
    Can i change this description ?
    thx,
    Gordon

    No, The IDOC always displays the texts based on the Data Element which is assigned to that field. If you want to display your own text you have two options:
    1. Create an enhancement and change the text of the data element which is not recopmmended because it will be changed wherever that data element is used.
    2. Instead just create an own data element where you can maintain any texts you need.
    Hope that helps,
    Michael

  • Any FM/methods to update idoc segments without changing idoc status

    Hi All,
    My requirement is a reprocessor program which fills up some fields in the idoc segment before posting. So, after updating the segments, the idoc status should remain as before.
    Is there any function modules or methods to update idoc fields in segments without changing the idoc status?
    I have tried the FMs EDI_DOCUMENT_OPEN_FOR_EDIT, EDI_CHANGE_DATA_SEGMENT and EDI_DOCUMENT_CLOSE_EDIT, but it changes the idoc status.
    Thanks,
    Arun Mohan

    As for FM to do this, i don't know if there are any, but i think you can go directly to the tables with the IDOC data and change them without triggering the changes in status like FM do. Still, i am not sure this is completely true, but you could give it a try. Also, i don't know if this is the best way to do it, because of those legal/audit questions mentioned by Thomas.
    Here is a sample code of a program we have to change a field in a segment of WPUUMS.
    *& Report  YRE00021INTPG
    REPORT  yre00021reppg.
    TABLES: edid4 ,
            edidc ,
            mean .
    * Variaveis Auxiliares
    DATA: t_edidc TYPE edidc OCCURS 0 WITH HEADER LINE.
    DATA: t_edid4 LIKE edid4 OCCURS 0 WITH HEADER LINE .
    DATA: BEGIN OF t_docs OCCURS 0,
            docnum LIKE edidc-docnum ,
          END OF t_docs.
    DATA: wa_e1wpu02 LIKE e1wpu02 .
    DATA: wa_e1wpu03 LIKE e1wpu03 .
    DATA: t_itedidd LIKE edi_dd40 OCCURS 0 WITH HEADER LINE ,
          t_itedidc LIKE edi_dc40 OCCURS 0 WITH HEADER LINE ,
          fw_itedidc LIKE edi_dc40 ,
          fw_itedidd LIKE edi_dc40 .
    DATA: l_matnr TYPE mara-matnr,
          l_tam TYPE i.
    DATA: l_idoc_number TYPE edidc-docnum.
    * Ecran de selecção
    SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS: s_docnum FOR  edid4-docnum ,
                    s_credat FOR  edidc-credat DEFAULT sy-datum ,
                    s_cretim FOR  edidc-cretim .
    PARAMETER:      p_mestyp LIKE edidc-mestyp DEFAULT 'WPUUMS' ,
                    p_status LIKE edidc-status DEFAULT '51' .
    *SELECTION-SCREEN SKIP.
    *PARAMETER:      p_ean11 TYPE mean-ean11.
    SELECTION-SCREEN : END OF BLOCK b1.
    AT SELECTION-SCREEN.
      IF p_status <> '51'.
        MESSAGE e001(yre) WITH 'Apenas pode modificar IDOCS com erro'.
      ENDIF.
      IF p_mestyp <> 'WPUUMS'.
        MESSAGE e001(yre) WITH 'Apenas pode lançar WPUUMS'.
      ENDIF.
    *AT SELECTION-SCREEN ON p_ean11.
    *  SELECT SINGLE * FROM mean WHERE
    *    ean11 = p_ean11.
    *  IF sy-subrc <> 0.
    *    MESSAGE e001(yre) WITH 'Ean não existente'.
    *  ENDIF.
    START-OF-SELECTION.
      SELECT docnum INTO TABLE t_docs FROM edidc
                         WHERE status =  p_status
                         AND   mestyp =  p_mestyp
                         AND   docnum IN s_docnum
                         AND   credat IN s_credat
                         AND   cretim IN s_cretim .
      CHECK sy-subrc = 0 .
      LOOP AT t_docs.
        CLEAR : wa_e1wpu02.
        SELECT * FROM edidc INTO TABLE t_edidc
          WHERE docnum = t_docs-docnum.
        CHECK sy-subrc = 0.
        SELECT * FROM edid4 INTO TABLE t_edid4
                      WHERE docnum = t_docs-docnum AND
                            segnam = 'E1WPU02'.
        CHECK sy-subrc = 0.
        SORT t_edid4 BY segnum.
        LOOP AT t_edid4 .
          wa_e1wpu02 = t_edid4-sdata.
          WRITE wa_e1wpu02-artnr TO l_matnr NO-ZERO.
          CONDENSE l_matnr.
    *      l_tam = STRLEN( l_matnr ).
    *      IF l_tam <= 6.
            SELECT SINGLE ean11 INTO wa_e1wpu02-artnr FROM ytre00004 WHERE
              codcurto = l_matnr.
            IF sy-subrc = 0.
              WRITE : /1 'Código ', l_matnr, ' alterado para ', wa_e1wpu02-artnr.
            ELSE.
              WRITE : /1 'Código ', l_matnr, ' não encontrado na tabela de conversão'.
              CONTINUE.
            ENDIF.
    *        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    *          EXPORTING
    *            input  = p_ean11
    *          IMPORTING
    *            output = wa_e1wpu02-artnr.
    *      ENDIF.
          UPDATE edid4 SET   sdata   = wa_e1wpu02
                       WHERE docnum  = t_edid4-docnum
                       AND   counter = t_edid4-counter
                       AND   segnum  = t_edid4-segnum .
          IF sy-subrc <> 0 .
            ROLLBACK WORK .
            WRITE: / t_edid4-docnum .
          ELSE.
            COMMIT WORK.
          ENDIF.
        ENDLOOP.
      ENDLOOP.
    END-OF-SELECTION.

  • IDOC Segment field change

    Hi,
    Can anyone tell about how to change the field VALUE of IDOC type QALITY02,segment E1ADRM1,field PARTNER_ID? Currently the system is pulling the value from system address table, where as I need to pull from KNKK-KRAUS. Can the transaction code BD66 be used for this?

    EXIT_SAPLQCE1_005 is the last user exit that is triggered in this IDoc processing function module. You should be able to change the field value. You have to loop at the internal table INT_EDIDD and have a CASE INT_EDIDD-SEGNAM inside the loop. When segnam is your segment, you can make the changes to the field you want to. Declare a structure of your segment type, move INT_EDIDD-SDATA to that structure and then you can individually refer to the fields of that segment. Once you make the change, you can go back and modify the INT_EDIDD internal table.
    Srinivas

  • CRM IDOC Segments Changing in PI mappings

    Hi All,
    I had configured a scenario from CRM to PI and to SQL Table.
    When ever a BP is Created or Changed an idoc with that BP is sent to PI and to SQL. I had used this IDOC(CRMXIF_PARTNER_SAVE) for mapping.
    When i send BP of Person type the IDOC Segment is getting Changed and Mapping error occurs.
    So please suggest me whether to use IDOC or not?
    Is there any Adapter i can use for real time?
    I need to get data of BP automatically.
    Thanks in Advance.
    Sriram

    Did you try change pointers..........
    Regards
    Ravi Raman
    PS: Points..are the only rewards here...so..!!!!!!!

  • XI Mapping to Idoc - Multiple Identical Idoc Segments

    I am debuuging XI mapping. I see the same idoc segments in the mapping multiple times. However, the way the fields are mapped in each one is different.
    Why? Is this to handle different scenarios?
    Thanks.

    in IDOCs each segment could occur multiple times. Lets say if its a address segment, u could see it multiple times for billing, shipping etc etc. so, depending on business logic the mapping will change. Some fields you'll map to one segment and some fields to some other segment.
    --Archana

  • ALE: mapping IDoc fields to change document fields - TBD22 for ADRMAS iDoc

    Hi,
    I am currently try to find a table or way to extract the information of the TBD22 table (ALE: mapping IDoc fields to change document fields) for the iDocs/ Message Types:
    ADRMAS
    INTERNAL_ORDER
    PROJECT
    I am looking for a table that shows me to which SAP R/3 tables and fields the segments and fields of the above mentioned messages will be mapped to.
    When I add one of the above mentioned message types to the table TBD22 selection criteria I always receive the notification: "No table entries found for specific key".
    Could anybody determine Which table I have to use or why I cannot extract this information?
    Thanks in advance!
    Best regards

    Hi,
       Since we can not map the target IDOC when any of the field changes using nodefunctions , you can write UDF and check the same i.e if field1 changes or field2 changes or field3 changes then trigger new IDoc. This is one of the options that you can try...please try it once.
    Regards
    Priyanka

  • Unable to change the length of field in idoc segment

    Dear all,
    My requirement is to change the length of a field(Z field) in a segment (Z Segment). I tried the following but in vain
    1)Tried to  Cancel the release and then change the length of the domain. Unfortunately it is givin an error saying "Error while resetting release of segment ZC9DEMARA01".
    I also tried cancelling hte release of extension and then cancelled the release of segment
    2) Created a new version, but in new version the earlier fields are diabled. So I am unable to edit.
    I have gone through some of the links available in SDN but I could not solve as I am unable to cancel the release in the first step.
    [Idoc segment field length changes]
    Could you please help me.
    Thanks in advance!
    regards,
    Aravind

    Hello Aravind,
    I Have created one Segment type with some fields, changed the field length also its working.
    just try to cancel the release and change the length of the filed and do it set release again.
    Try it .
    Thanks,
    santhosh

  • Idoc segment field length changes

    Hi friends,,
    I am new to idoc.
    My requirement is in my segment
    i am having 5 fields and also this segment is already realeased one.
    i wnat to change the field length from 10 to 20 . how to do this ?
    actually what i did is
    1. i cancel the release for that segment.
    2. in that field inside the dataelement i changed the field length from 10 to 20.
    3. data elemnt get chaged from 10 to 20 but Export length for that field in Idoc segment still retain the 10 only
    can you plz how to resolve this
    deva

    Hi,
    The way you used is right. ( cancel release or create a new segment )
    After you cancel release, try delete that field, and insert a new one.
    If it isn't valid still,  create a new segment instead.
    Regards
    Sam

  • Idoc error mapping error for segment "E1EDT13 006" in DESADV idoc

    Hi SAP Gurus,
    DESADV IDOC for few articles is not getting passed from SAP to legacy system. It is missing one segment"E1EDT13 006" for goods issue.
    Why is this mapping error happening. How can this be resolved.
    Regards.
    Sumi

    Hi Nsangle/SAP gurus,
    Thanks for  that. But, I have already compared the failing idoc with the successful one. It's the segment E1EDT13 006 missing in the wrong idoc. I have already added that idoc and reprocessed it.
    But, I wanted to know why such kind of idoc segment missing/ mapping error happens.
    Regards.
    Sumi

  • How to map idoc segment field E1IDB02-FIIKONTO with BSEG-ESRNR.

    Hi,
    I have searched for lot of threads in the forum , and also i tried myself but i am not able to map this fields segment with my logic, so please anyone kindly contribute in mapping idoc segment field  with the logic given below:
    idoc type :PAYEXT  outbound idoc.
    message type: PEXR2002
    This is my logic: i need to populate the ISR number(BSEG-ESRNR  ) in idoc segment field( E1IDB02-FIIKONTO)
    DATA : str1 TYPE string,
          len1  TYPE i,
          len2  TYPE i,
          str2  TYPE string,
          str3  TYPE string.
    str1 = '01-1234-4'. ---> BSEG-ESRNR  "ISR Subscriber Number
    REPLACE FIRST OCCURRENCE OF '-' IN str1 WITH '_'.
    REPLACE ALL OCCURRENCES OF  '-' IN str1 WITH space.
    CONDENSE str1.
    len1 = STRLEN( str1 ).
    IF len1 LT '9'.
    len2 = '9' - len1.
    CASE len2.
       WHEN '1'.
         REPLACE ALL OCCURRENCES OF '_' IN str1 WITH '00'.
       WHEN '2'.
         REPLACE ALL OCCURRENCES OF '_' IN str1 WITH '000'.
       WHEN '3'.
         REPLACE ALL OCCURRENCES OF '_' IN str1 WITH '0000'.
       WHEN '4'.
         REPLACE ALL OCCURRENCES OF '_' IN str1 WITH '000000'.
       WHEN OTHERS.
    ENDCASE.
    ELSEIF len1 EQ '9'.
    REPLACE ALL OCCURRENCES OF '_' IN str1 WITH '0'.
    ELSEIF len1 GT '9'.
    REPLACE ALL OCCURRENCES OF '_' IN str1 WITH space.
    CONDENSE str1.
    ENDIF.
    Thanks in Advance.

    Resolved.

  • Inbound Idoc segment change

    Hi All,
    How can We modify or append a segment to the inbound IDOC. The scenario is as follow
    We have an inbound IDOC to create/change contract order. There are some segments in the IDOC to hold the error records.
    while processing the inbound IDOC we need to fill these blank segments with relevant data, so that we can reprocess the IDOC with ease.
    I am trying the modify the IDOC_DATA inside the processing function module. Till the end of the function module IDOC_DATA is having the added segment data, however when I am checking from WE02, the segments are appearing to be blank.
    Please let me know, what is missing above.
    Thanks & Regards
    D. Pradhan

    Which exit / BAdI are yous using for adding the segment & what is your inbound processing function module ?
    Anyways i also had the same problem a few weeks back i was trying to delete a segement though
    My understanding is in WE02 it displays the data from EDIDC & EDIDD. In your I/B processing FM you only modify the data in the IDOC_DATA table & not in EDIDD.
    Check in EDIDD, the segment would not be there.
    BR,
    Suhas

  • Changing the content in an IDOC segment at runtime with EXIT_SAPLF050_006

    I am using IDOC FIDCC2 type. I have to change some values of the segment E1FISEG.
    In EXIT: EXIT_SAPLF050_006, I am making these changes, but after the execution.
    When the IDOC is generated, I noticed that the value of this field is not updated in the IDOC segment.
    I'll have something misconfigured?
    The code is as follows:
    CREATE OBJECT wa_obj.                                         "Creando el Objeto.
    BREAK dchirra.
    IF idoc_contrl-mescod EQ 'MPA'.                            "Chequeando Variante lógica de mensaje valida.
      LOOP AT idoc_data INTO e_idoc_data WHERE segnam = 'E1FISEG'.
        CLEAR: ze1fiseg, ze1finbu.                                  "Limpiando estructuras.
        MOVE e_idoc_data-sdata TO ze1fiseg.                         "Llenando estructura del Segmento.
        CALL METHOD wa_obj->get_data                                "Llamando a estractor del objeto.
          EXPORTING
            reserve    = ze1fiseg-reserve                           "- Campo RESERVE.
            estructura = 'E1FISEG'                                  "- Estructura
          CHANGING
            ze1finbu   = ze1finbu                                   "- Segmento ZE1FINBU.
            ze1fiseg   = ze1fiseg.                                  "- Segmento ZE1FISEG.
    Buscando Segmentos Hijos.-
        LOOP AT idoc_data INTO e_idoc_data2 WHERE segnam = 'E1FINBU' AND psgnum = e_idoc_data-segnum.
          MOVE e_idoc_data2-sdata TO ze1finbu.                      "Llenando estructura del Segmento.
          CALL METHOD wa_obj->get_data                              "Llamando a estractor del objeto.
            EXPORTING
              reserve    = ze1finbu-reserve                         "- Campo RESERVE.
              estructura = 'E1FINBU'                                "- Estructura
            CHANGING
              ze1finbu   = ze1finbu                                 "- Segmento ZE1FINBU.
              ze1fiseg   = ze1fiseg.                                "- Segmento ZE1FISEG.
          e_idoc_data2-sdata = ze1finbu.                            "Data Segmento.
          MODIFY idoc_data FROM e_idoc_data2.                       "Modificando data del IDOC
        ENDLOOP.
        e_idoc_data-sdata = ze1fiseg.                               "Data Segmento.
        MODIFY idoc_data FROM e_idoc_data.                          "Modificando data del IDOC
      ENDLOOP.
    ENDIF.

    IF idoc_contrl-mescod EQ 'MPA'
    is this condition is getting satisfied everytime since you are modifying only on this condition.
    I couldnot understand you comments as its not in English, however i tried understanding your logic,seems correct .
    Please check whether condition mentioned above is getting satisfied or not?
    Regards,
    Mayank

  • Mapping Items in XML string to multiple IDOC segments

    I would like to map an XML tag  <Text>Line1Line2Line3Line4</Text>
    to an IDOC segment E1ED1TEXT . Defined as occurring 0 to 999999.
    I would like to map each item separated by a tilde into a separate occurence of the IDOC text segment. Is ther anyway to repeat the mapping without duplicating the subtree.
    E1ED1TEXT
    Text_Id - "ZTXT"
    Text_Line = Line1
    E1ED1TEXT
    Text_Id - "ZTXT"
    Text_Line = Line2
    E1ED1TEXT
    Text_Id - "ZTXT"
    Text_Line = Line3

    Hello,
    This is only possible using UDF
    mapping is like this:
    Text -> UDF -> splitByValue:eachValue -> Text_Id
    UDF is of context type
    argument is input
    String temp[] = input[0].split("~");
    for(int a=0;a<temp.length;a++){
    result.addValue(temp[a]);
    Hope this helps,
    Mark

  • Inbound Invoice idoc segment feilds mapping to SAP feilds

    Hi,
    Could you please help me to find out the tables and feilds in SAP for the inbound invoice idoc type INVOIC01. I need to map the idoc segment fields with SAP fields and respective tables.
    Thanks in Advance
    Satish

    Hi Satish,
    That's quite a big case to get such mapping - why would you need it really? You can process Idoc with std process codes and you will see the std mapping then happening.
    You can also go through logic of processing modules:
    Function Module Name          Short text for function module
    IDOC_INPUT_INVOIC_FI           EDI: Invoice Receipt (INVOICE)
    IDOC_INPUT_INVOIC_MM           EDI: Invoice Receipt (INVOICE)
    IDOC_INPUT_INVOIC_MRM
    For sure you will get RBKP for header, RSEG for items, RBTX for taxes and some more, depending on what you get in the invoice and what are your booking and matching processes.
    Best Regards,
    Tomek

Maybe you are looking for

  • Windows 7 Installation Issue

    Hi there, my apologies if this has been answered somewhere - but I'm unable to find the same issue and a fix. I'm trying to install windows 7 on my 2012 mba using a superdrive and oem windows 7 disk - not an .iso.  Following bootcamp assitant instruc

  • Logical structure of database

    hi i really appreciate the answer i got fro u guys about the table , iam clear now i have a question why do i need to have a logical structure over a physical structure called table, ultimately my data is in db blocks , so can we say that when i quer

  • Why do I get two different results from the same coefficients?

    I am getting two different results from the Polynomial Evaluation function. For the first one, I am getting the coefficients from a Polynomial Fit function.  I feed the coefficients from the Fit function into the Poly Eval function and get the correc

  • Add photos from PC to cameral roll with metadata

    Hello, I have some pictures that I took from my iPhone to my computer by error and now I want to have them back on my iPhone "camera roll". I know I can send them to my iPhone by email and then save them to the camera roll but doing this delete all t

  • Setting attributes based on role.

    Hello, I'm trying to set up idm 7.0.0 in such a way that user groups are synchronized with redhat resources, and that the idm roles a particular user belongs to, determines "secondary groups" on the resources. What I've done: -configured redhat resou