Filling in E1BPACREV IDOC segment

I've been unsuccessfully trying to figure out how to fill in properly the data for message type ACC_GL_POSTING_REVERSE, which uses IDOC ACC_GL_POSTING_REVERSE01 and data segment B1PACREV.
Specifically, I need help in understanding how do I fill the following fields:
OBJ_TYPE
OBJ_KEY
(I thought Obj_type referred to BKPF-blart and Obj_key to BKPF-belnr, but it doesn't seem so).
In some cases, which I can't exactly identify, I'm asked to provide a value for OBJ_KEY_R.
For those who are into the subject, follows the name of the BAPI who is related to this IDOC, in case it might help: BAPI_ACC_GL_POSTING_REV_POST.
Thanks in advance,
Avraham

Hi,
The details needs to be paased are like as follows.
OBJ_TYPE  = 'BKPF'
OBJ_KEY = '<Combination of companycode,Accounting Document number, Fiscal Year>'.
OBJ_KEY_R - is the reversal document number.
Regards,
Prasana.

Similar Messages

  • Fill IDOC segment, E1IDBW1. For PEXR2002 Basic Type

    Hello Team.
    We send the IDOC for the Basic Type PEXR2002, Message Type PAYEXT.
    This IDOC doesn't fill the Segment E1IDBW1 (IDoc header - special instructions (INP) )
    I'm review some notes(1164524) and said to fill this segment it's neccesarie config the IHC.
    But doesn't have this functionality.
    It's possible fill the segment E1IDBW1 in a user exit or any other enhacement at creation idoc moment?
    My idea is used the FM
      CALL FUNCTION 'GET_SEGMENT_POS_FOR_INSERT'
        EXPORTING
          I_BASIS_TYPE            = ch_edidc-idoctp
          I_EXT_TYPE              = ch_edidc-cimtyp
          I_SEGMENT_TYPE          = 'E1IDBW1'
        IMPORTING
          E_INDEX                 = li_tabix
        TABLES
          IT_EDIDD                = t_edidd
        EXCEPTIONS
          BASIS_TYPE_NOT_FOUND    = 1
          EXTENSION_NOT_FOUND     = 2
          EXTENSION_ERROR         = 3
          INVALID_IDOC_DEFINITION = 4
          IDOC_ERROR              = 5
          INVALID_SEGMENT_TYPE    = 6
          INVALID_START_INDEX     = 7
          NO_MORE_POSITION        = 8
          TOO_MANY_SEGMENTS       = 9
          OTHERS                  = 10.
    To Fill 2 constants in this segment.
    Do you have any other idea?
    Thanks
    Edited by: David Lezama Gonzalez on Sep 1, 2011 2:51 PM

    Hi,
    Basically the segment E1IDBW1 will always be filled via user exit.
    If you work with the IHC (In-House-Cash) application you have to fill
    the E1IDBW1 segment as described in note 626577.
    If you don't work in an IHC environment the following conditions must
    be fulfilled:
    1. The payment program has to fill certain fields (e. g. REGUH-DTAWS,
    REGUH-DTWS1 - REGUH-DTWS4).
    2. If this is fulfilled the payment data (REGUH, REGUP tables) will
    be filled. The instruction keys will be moved to IDOC segment
    E1IDKU3.
    3. In user exit EXIT_SAPLIEDP_002 you can take over the instruction
    keys from segment E1IDKU3 into E1IDBW1.
    You may also read note 496663, this note explains about user exit
    EXIT_SAPLIEDP_002 to populate this field in the idoc.
    Also, you can check the note:
    580321 - RFFOEDI1: BTE process 00002441 (Change IDoc)
    REgards,
    Cristiano

  • Adding field in standard IDOC Segment E1EDL24

    Hello Friends,
    I have an urgent requirement that I have to extend IDOC segment E1EDL24 with two fields PABNR and LFSNR.
    When I tries to change the segment in WE31, it shows an error message that you can only modify the segments of customer namespace and cannot modify Standard IDOC Segments.
    Can we modify the standard IDOC segments, and if yes, how can we modify the standard IDOC segments. Please clarify.
    Points will be rewarded generously.
    Regards,
    Navin

    Hi Naveen,
    We cannot Modify the Standard segments. But we have to Create a new Segment and Add these fields.
    Then Create an Extended Idoc type
    Implement User Exits in Outbound And Inbound ..
    This is the Complete Steps and Info on this...with an Example...
    Enhancing ALE
    For example, if in an outbound interface you find that the IDOC type does not contain all the data you need to pass to the other system, you can extend the IDOC to accommodate the additional fields and enhance the ALE function modules to populate the fields. Similarly, if in an inbound interface, there is additional data that needs to be posted to the R/3 application, you can extend the IDOC type to have additional fields populated by the external system or translator or the other R/3 system and then enhance the inbound ALE function modules to post the additional data to the R/3 application.
    let us use the SAP Customer Master application as an example. Specifically, letâs focus on the IDOC extension and ALE function module enhancement of IDOC type DEBMAS02 and message type DEBMAS (Customer Master) and the IDOC reduction of message type MATMAS.
    IDOC EXTENSIONS
    Letâs first look at the concept of IDOC extension. SAP delivers Basic IDOC types such as DEBMAS02, MATMAS02, ORDERS02, and WMMBID01. By extending the Basic IDOC type, you are actually creating a new IDOC type. You create a new segment with the additional fields. This new segment has to be associated with one of the existing Basic IDOC segments. Then you create a new extension type, which is associated with the Basic IDOC type. This results in a new IDOC type. In order for ALE function modules to relate to this new IDOC type, the IDOC type is linked to the corresponding message type.
    Note that you should not add fields to existing segments but should create a new segment and associate it with an existing segment. This, in a nutshell, is the process of creating IDOC extensions.
    In our example, the Basic IDOC type DEBMAS02 is used to communicate Customer Master data to the SAP Customer Master application. Even though the application has a screen to enter and store a contact personâs business address (see Figure 1), DEBMAS02 does not have a segment or fields that communicate the contact personâs business address. If your business requires that this business address be communicated to the other system through the ALE interface for Customer Master, then you have to extend the DEBMAS02 IDOC type, and enhance the corresponding ALE function module.
    In DEBMAS02 the contact person fields are present in segment E1KNVKM and the business address of the contact person is stored on the SADR SAP table. You need to create a new segment, Z1SADRX, that is associated with E1KNVKM. This will be done in the process of creating an extension type ZDEBMASX. This extension type will then be associated with a new IDOC type, ZDEBMASZ. IDOC type ZDEBMASZ will be linked to message type DEBMAS for Customer Master. The final step in the IDOC extension process is to check the new objects. This check also verifies the structural integrity of the IDOC type. Letâs look at each of these steps in more detail.
    1. Create an Extension Type and a New Segment.
    Determine the fields on table SADR that you are going to provide for in the new segment Z1SADRX. You need fields for name, street, city, region, and country to give the business address of the contact person. You also need fields for the address number. ADRNR is a field in SAP tables such as SADR that uniquely identifies the address of an entity. This field is cross-referenced from other tables to the SADR table to obtain the full description of the address. Because this is an IDOC type for master data, the first field of the new segment will be MSGFN. The message function field informs the receiving system of the action to be taken for that particular segment. In the code that you write for populating the new segment, the value of the message function is the same as that of the parent segment E1KNVKM. In all, you will have 12 fields in segment Z1SADRX (see Table 1).
    To create an extension type and new segment:
    • Use transaction WE30 or from WEDI go to Development -> IDOC types.
    • Enter ZDEBMASX for Object Name.
    • Choose Extension Type.
    • Click on Create.
    • You will see a pop-up screen. Choose Create New, and enter a description. For version 4.x, enter DEBMAS02 in the Linked Basic Type field. Enter.
    • You will see a screen with ZDEBMASX and its description in the first line. Click on this line, and press Create. For version 4.x, expand the tree of segments, and place the cursor on E1KNVKM.
    • You will see a pop-up screen. Enter E1KNVKM as the reference segment. Enter.
    • For 4.x, press Create after placing the cursor on segment E1KNVKM.
    • You will see a line appear with E1KNVKM hierarchically below ZDEBMASX, with a description "Customer Master contact person (KNVK)."
    • Click on this line and press Create. You will receive a message indicating that the new segment being created will be a child segment of E1KNVKM. Enter. A pop-up box appears for the new segment.
    • Enter Z1SADRX as the segment type, 1 for Minimum, 1 for Maximum. Leave Mandatory segment unchecked. These entries imply that there is only one Z1SADRX segment for every occurrence of the E1KNVKM segment, and also that this segment is not mandatory. Note that if the parent segment is not mandatory, then the child segment should not be mandatory, because this could result in a syntax error during the creation or processing of the IDOC.
    • For 4.x, you must first create the IDOC segment Z1SADRX (Iâll explain why in a moment) from the menu path WEDI -> IDOC -> Development -> IDOC Segment.
    • Click on Segment Editor.
    • On the next screen, click on Create.
    • Enter a development class for the object. Enter.
    • This will take you to the screen for segment definition. Enter a description for the segment. Enter the field name, data element, and the data element documentation name. In most cases, all three fields may have the same values. If you are using a field in the segment that is not present in the ABAP/4 data dictionary, you must first create the domain, data element, field, and appropriate documentation before using it in the new segment.
    • Enter these three columns for all 12 fields. Save.
    • Click on Generate/Activate, F3 to step back.
    • From screen Maintain Segment, go to Segment Type -> Release. A checkbox now appears beside the segment definition Z1SADRX (see Figure 2). Check this box. Save.
    • Save again to store the descriptions of the segment, F3 to step back.
    • Save the extension type.
    It is possible to have several new segments with relevant Basic IDOC type parent segments in a single extension type. However, you can form only one IDOC type based on a single extension type.
    2. Create an IDOC Type.
    The next step is to create an IDOC type by associating the extension type that you created with the Basic IDOC type. This is a simple process:
    • From transaction WE30 or WEDI go to Development -> IDOC Types.
    • Enter ZDEBMASZ for Object Name.
    • Click on IDOC Type.
    • Click on Create.
    • Enter DEBMAS02 for Basic IDOC type.
    • Enter ZDEBMASX for extension type.
    • Enter a description.
    • Enter.
    • You will see a display of the composite IDOC type with all segments, including Z1SADRX (see Figure 3).
    It is possible to associate only one extension type with a Basic IDOC type for a given IDOC type. However, you can have multiple new segments in an extension type.
    3. Link IDOC Type to Message Type.
    The next step is to link the new IDOC type to its corresponding message type. This is important, because this relationship is referenced in the partner profile parameters where you specify the message type and IDOC type to be used for that particular representative system. To link the message type:
    • Use transaction WE82, or from WE30, go to Environment -> IDOC Type / Message Type, or from WEDI go to Development -> IDOC Type -> Environment Î IDOC Type / Message Type.
    • Click on Display <-> Change.
    • Click on New Entries.
    • Enter DEBMAS for message type.
    • Enter DEBMAS02 for Basic IDOC type.
    • Enter ZDEBMASX for extension type.
    • Enter your SAP R/3 release number for Release.
    • Save.
    This data is stored on the EDIMSG table and is accessed by several ALE processes to relate the message type to the IDOC type.
    4. Check the IDOC Type.
    Before checking the IDOC type for consistency, it is important to perform another step that releases the extension type to the IDOC type:
    • From WEDI go to Development -> IDOC Types -> Extras -> Release Type, or from transaction WE30 go to Extras -> Release Type.
    • For the Object Name ZDEBMASX and radio button Extension Type, click Yes.
    • The extension type has now been "released."
    You canât edit the extension type once itâs released. To cancel the release for further editing or deactivation, go to WE30 Î Extras Î Cancel release. The final step in the IDOC extension process is checking the validity of the IDOC type:
    • From transaction WE30 or WEDI go to Development -> IDOC types.
    • Enter ZDEBMASX for Object name.
    • Click on Extension Type.
    • From the Development Object menu select Check.
    • Repeat the operation for IDOC type ZDEBMASZ.
    • A check log will be generated for each run with details of correctness or errors (see Figure 4).
    In some situations it is possible to receive errors during the check process, especially segment length errors. The incorrect IDOC segment can be repaired and corrected by executing program RSEREPSG. This program checks the formal consistency and repairs incorrect segments. In test mode it will generate a log of formal correctness for the specified segment only. For the program to repair segments in normal mode, the underlying IDOC structures (DDIC structures) must be active. This program rectifies the lengths of the DDIC structures and not the fields themselves. RSEREPSG can also be used to change the person responsible for the object and the release flag.
    Menu paths may vary slightly depending on the release/version of SAP R/3, but the procedures and the principles are the same.
    ALE FUNCTION MODULE ENHANCEMENTS
    Having extended the IDOC type to contain additional fields for an inbound or outbound application, you now want to enhance ALE function modules for populating the additional segment on the outbound or applying the additional segment data on the inbound application.
    The core working code for ALE processes for a given application area is always encapsulated in ABAP/4 function modules. These function modules are associated with such control information as message types and process codes. So the ALE process checks this control information and derives the name of the function module to invoke for that particular IDOC processing from certain database tables. These function modules contain objects known as customer functions, which can be considered SAP Enhanced user exits. A function module is called at a particular point during the processing of the main program or function module, and it can be used to influence data processing at that point by adding code to the customer function. The customer function behaves like a normal function module and has import and export parameters, tables (internal tables) statement, and exception processing. Unlike a conventional user exit, customer functions give you the ability to modify only data available to you by the function moduleâs parameters and internal tables. While most ALE/EDI function modules are supported by customer functions, there are ALE/EDI processes that still use conventional user exits. There are a few ways to determine which function module to enhance for a given message type/process code:
    • For master data distribution, from SALE go to Extensions -> Master data distribution -> Setup additional data for message types. Search for message type DEBMAS in this example. You see an entry for DEBMAS associated with function module MASTERIDOC_CREATE_SMD_DEBMAS. This data is stored on table TBDME. The function module names for all master data message types follow this pattern: MASTERIDOC_CREATE_SMD_messagetype. This function module calls another function module of name MASTERIDOC_CREATE_DEBMAS or MASTERIDOC_CREATE_messagetype. Search for the words customer function, and you find several hits that can be used to add code to the function module.
    • From WEDI got to Control -> Inbound process codes -> Inbound with ALE service -> Processing by function module (transaction WE42), or from WEDI go to Control -> Outbound process codes -> Outbound with ALE service -> With function module (transaction WE41). There will be function modules associated with the process codes. For inbound, the function modules usually follow this pattern: IDOC_INPUT_messagetype: for example, IDOC_INPUT_CHRMAS for inbound characteristics master.
    • Use transaction WE57 or from WEDI go to Development -> Message/Application Object. The entries list the function module, Business Object, message type, and IDOC type that are used for inbound ALE/EDI interfaces.
    Customer functions are not specific only to ALE and EDI but also to all programs/modules in SAP R/3. Customer function is a SAP enhancement component; the other two types are menu and screen enhancements.
    All customer function exits are maintained in SAP enhancements and are found by using transaction SMOD. After executing transaction SMOD, pull down (F4) on the enhancement name field, and execute again. This provides you with a list of all SAP enhancements available. SAP enhancements are grouped by development class pertaining to an application area. Choose Application development R/3 SD master data distribution for development class VSV to lead to a screen that lists VSV00001 as an enhancement (see Figure 5). Press Component +/- to display its function exit components. There are four possible components listed, all of which are function exits (and are function modules) that are called from the ALE function modules in the form Call Customer Function Î001â. This is a special occurrence of the ABAP statement Call. Go to item Exit_SAPLVV01_ 001, which you need to enhance for the Customer Master outbound example of an IDOC extension. In the ALE-function module MASTERIDOC_CREATE_DEBMAS, the statement CALL Customer Function 001 is translated in the background to call component EXIT_SAPLVV01_001. Although this function exit can be edited using transaction SE37, you will use a simpler approach.
    When you use SAP enhancements and their components, you manage them with an SAP object known as a project, which is like an envelope containing the selected enhancements and their components. A project can be used to control the execution of components and to transport them to other clients and instances in SAP. Basically, the process involves creating a project, including enhancements and components that are to be enhanced, editing the components, and then activating the project. The following process creates a project for our example Customer Master IDOC extension:
    • Execute transaction CMOD.
    • Enter name of project, say CSTMAST1.
    • Click on Create.
    • Enter a description of the project.
    • Save.
    • Click on SAP Enhancements.
    • Enter VSV00001 for Enhancement.
    • Save.
    Once youâve created the project, edit the function exit components and activate the project. Remember that the code in the function exit enhancement will execute only if the project is activated. In fact, this is a convenient SAP enhancements feature, whereby the work in progress (developing code in the customer function) will not affect users of that application. When the code is completed, the project can be activated so the enhanced functionality takes effect. It can also be deactivated for maintenance.
    As mentioned earlier, customer functions (function exits) are embedded in ALE function modules and can be used to influence the creation and modification of IDOC data on an outbound application or to post additional or modified IDOC data to an inbound R/3 application. Function exits are similar to regular function modules, with import/export parameters, tables (internal tables), and exceptions.
    The two important factors to consider while developing the customer function are:
    1. The point in the ALE function module where the function exit occurs
    2. The data made available by the customer function that can be modified or posted to the R/3 application, based on the direction.
    Because some function modules have several customer functions, it is critical to choose the function exit best suited for that particular enhancement. Do not attempt to perform activities that the function exit is not designed for. The importance of this point is illustrated by the following description of enhancing function modules for outbound and inbound ALE interfaces.
    Outbound interfaces. In an outbound ALE interface you use function exits (customer functions) to populate additional segments created by an IDOC extension or to modify the existing IDOC data segments as per business requirements. Previously, you identified that enhancement VSV00001 has a component EXIT_SAPLVV01_001 (function exit), which can be used for populating the additional data segment Z1SADRX that you created in the IDOC extension ZDEBMASX (IDOC type ZDEBMASZ, based on Basic IDOC type DEBMAS02). You also learned that the ALE function module that calls this function exit is MASTERIDOC_CREATE_DEBMAS, which has a statement Call Customer Function 001.
    Browse the function module MASTERIDOC_CREATE_DEBMAS using transaction SE37. You will find that this customer function is invoked for every segment of IDOC type DEBMAS02. In fact, the function exit is called soon after the creation of an existing segment has been populated with data and appended to the IDOC data table (internal table). Also, the function exit is exporting the message type, IDOC type, and the segment name and is importing the IDOC extension type. It is also passing the IDOC data internal table. This indicates that the ALE function module is allowing you to populate additional segments for every existing segment and modify the existing segmentâs data.
    Letâs write ABAP/4 code to accomplish the task of populating IDOC segment Z1SADRX with a contact personâs business address:
    • From SE37, display function module MASTERIDOC_CREATE_ DEBMAS.
    • Find Customer Function 001.
    • Double-click on 001.
    • The function EXIT_SAPLVV01_001 will be displayed.
    • Double-click on INCLUDE ZXVSVU01.
    • You will be asked to create a new include object. Proceed as desired.
    • Enter code (as in Listing 1).
    • Be sure to perform a main program check (Function Module -> Check -> main program) and extended program check (Function module -> Check -> Extended check).
    Now that you have extended the IDOC and enhanced the ALE function module based on the requirements for the contact personâs business address on the Customer Master, letâs test the interface. You should create a logical system and define a port for this interface. You should also configure the Customer Distribution Model to indicate that message type DEBMAS is being distributed to this logical system. The only difference in configuration between a regular outbound ALE interface and an enhanced one is the partner profile definition. While maintaining the outbound parameters of the partner profile, make sure the IDOC type is ZDEBMASZ. The fields for Basic IDOC type and extension type are automatically populated with DEBMAS02 and ZDEBMASX, respectively.
    To maintain the contact personâs business address of a customer:
    • Use transaction BD12 or from BALE go to Master Data ->Customer -> Send and send that Customer Master record by executing the transaction after filling in the relevant fields such as customer number, message type, and logical system.
    • Use transaction WE02 or WE05 to verify the IDOC created. You should see the new segment Z1SADRX populated with the correct data.
    With SAP releases below 4.5B, you cannot capture changes to business address through change pointers because a change document object is not available for capturing business address changes, and also earlier releases have not been configured to write change documents for a contact personâs business address. If you would like this functionality, you can either create change document objects, generate function modules to create change documents, and perform ALE configuration to tie it in, or make a cosmetic change to the contact person screen data while changing the contact personâs business address so that it gets captured as a change to the Customer Master. Subsequently, the ALE enhancement that you performed captures the contact personâs business address.
    Inbound interfaces. The process for enhancing inbound ALE interfaces is similar for outbound, with a few exceptions; specifically in the coding of customer functions (function exits) for the ALE/EDI function modules.
    The first step is to create an IDOC extension for the specific Basic IDOC type by adding new segments at the appropriate hierarchy level: that is, associated to the relevant existing segment. Populate the data fields on the new segments with application data by the translator or external system/program before importing them into the R/3 System. Then, find the ALE function module that is invoked by the inbound processing. By browsing through the code or reading the documentation on the function exit enhancements using the SMOD transaction, identify the function exit in which you should place your code. The technique used in the code to post the additional or modified IDOC data to the application can vary based on the application rules and requirements, the data available at that point in processing, and the application function modules available to update the application tables. It is important to search first for application modules that process the data and see if they can be called within the function exit. If the additional data in the extended segments in specific to a custom table or resides in nonkey fields of a single or small set of tables, you may be able to update it directly by SQL statements in the function exit. This approach should be carefully evaluated and is certainly not highly recommended.
    Another option is to use Call Transaction from within the function exit to process the additional data. For example, in the case of message type WMMBXY for inbound goods movements from a warehouse management system, the standard interface creates batches for materials, but does not update its characteristics. In such a case, you can use Call Transaction MSC1 to create the batch and assign characteristic values to it from within the function exit provided.
    Error handling is a very important consideration when making enhancements to inbound ALE/EDI objects. In ALE and EDI inbound processing, workflow is used for handling errors at different levels such as technical and application. If workflow has been configured for the interface, the error messages and workflow items flow to the inbox of the named recipient(s).
    It is also critical to enhance the workflow that handles notifications of the inbound ALE/EDI process. In most scenarios this is not a very difficult task because SAP lets you influence the workflow parameters and messages in function exits (customer functions). You typically do this using flags and message codes to trigger certain workflow actions. If you conform to the status codes and flags stipulated for workflow processing, the enhancement could be error-free and seamless. In the case of an inbound IDOC with an extension, you should populate the EDIDC fields IDOCTYP (new IDOC type) and CIMTYP (extension type) accordingly.
    Reward if Helpful

  • 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.

  • How to populate IDOC segments...

    Hello Experts,
    I was just tasked to add new fields in an IDOC segment. My question is, how do I populate
    those newly created fields? The data will be coming from a purchase order.
    Thank you guys and take care!

    Hi,
    U cannot edit the existing segment u have to create a zsegment with the fields and then under the main segment u have to add this new segment..also u have create a extended idoc in ur case...then only u can add this new segment..also once u  create  a segment u have to release it...
    u have to write the code in the userexit only...
    check the sample code which i have done for my requirement for sales order..
    *&  Include           ZXVEDU02
    Program:        Function Module:EXIT_SAPLVEDC_002     Creation Date: 12-04-2006          *
    Program Type  : Outbound IDOC Enhancement                                                *
    Program Description:OutBound IDOC Enhancement                                            *
    Modification ID:001                                                                      *
    Date         : 25-05-2006                                                                *
    Description  : 1.The sales organization master data needs to be sent as supplier party
                     details.New segment ZZSALORG is created and attached to the parent
                     segment E1EDK01
                   2.Data required to be sent are:
                      1.NAME1- Sales organization name
                      2.STRAS- Address
                      3.TELFX- Fax number
                      4.TELF1- phone number.
                   3.ZZSALORG is filled with the above information.
    Modification ID:002                                                                      *
    Date         : 09-06-2006                                                                *
    Description  : A new field zstceg added to the segment zzdochdr and it was populated     *
                    by selecting stceg field from Kna1 table                                 *
    Modification ID:001                                                                      *
    Date         : 15-06-2006                                                                *
    Description  : 1.New segment ZZE1EDP01 is created and attached to the parent segment E1EDP01
                   2.Data required to be sent are:
                      1.POSEX- Item number
                      2.UEBTO- Overdelivery tolerance
                      3.UNTTO- Underdelivery tolerance
                   3.ZZE1EDP01 is filled with the above information.
    *-- Data Declaration--
    *-- Constant Declaration--
    CONSTANTS: c_1(1)          TYPE c VALUE '1',
               c_langu         LIKE t005t-spras VALUE 'E',
               c_parvw         LIKE vbpa-parvw VALUE 'RG',
               c_e1edk01(7)    TYPE c VALUE 'E1EDK01',
               c_e1edk02(7)    TYPE c VALUE 'E1EDK02',
               c_e1edk17(7)    TYPE c VALUE 'E1EDK17',
               c_e1edka1(7)    TYPE c VALUE 'E1EDKA1',
               c_e1edk14(7)    TYPE c VALUE 'E1EDK14',
               c_004(3)        TYPE c VALUE '004',
               c_001(3)        TYPE c VALUE '001',
               c_002(3)        TYPE c VALUE '002',
               c_re(2)         TYPE c VALUE 'RE',
               c_we(2)         TYPE c VALUE 'WE',
               c_ag(2)         TYPE c VALUE 'AG',
               c_0010(4)       TYPE c VALUE '0010',
               c_zzdochdr(8)   TYPE c VALUE 'ZZDOCHDR',
               c_ze1edk02(8)   TYPE c VALUE 'ZE1EDK02',
               c_zze1edk17(9)  TYPE c VALUE 'ZZE1EDK17',
               c_zze1edka1(9)  TYPE c VALUE 'ZZE1EDKA1',
               c_pe(2)         TYPE c VALUE 'PE',
               c_y(1)          TYPE c VALUE 'Y',
               c_zze1email(9)  TYPE c VALUE 'ZZE1EMAIL',
               c_zzsalorg(8)   TYPE c VALUE 'ZZSALORG',
               c_zze1edp01(9)  TYPE c VALUE 'ZZE1EDP01',
               c_e1edp01(7)   TYPE c VALUE 'E1EDP01'.
    *-- Variables Declaration--
    DATA: lv_vbeln   LIKE vbak-vbeln,
          lv_country LIKE t005t-landx,
          lv_text1   LIKE t042z-text1,
          lv_vzskz   LIKE knb1-vzskz,
          lv_inco    LIKE tinct-bezei,
          lv_cadnr   LIKE akkp-cadnr,
          lv_pernr   LIKE pa0105-pernr,
          lv_parvw   LIKE tpar-parvw,
          lv_adrnr   LIKE tvko-adrnr,
          lv_zinso   LIKE t056z-zinso,
    Begin of Mod-002
          lv_stceg   TYPE stceg.
    End of Mod-002
    Begin of MOD-003
         lv_min_tol TYPE KWMENG,
         lv_max_tol TYPE KWMENG.
    End Of MOD-003
    TYPES:BEGIN OF t_vbfa,
            vbelv LIKE vbfa-vbeln,
            erdat TYPE erdat,
          END OF t_vbfa.
    DATA: i_akkp TYPE akkp.
    *-- WorkArea Declaration--
    DATA : wa_zdochdr   TYPE  zzdochdr,
           wa_ze1edk02  TYPE  zze1edk02,
           wa_ze1edk17  TYPE  zze1edk17,
           wa_zze1email TYPE  zze1email,
           wa_zzsalorg  TYPE  zzsalorg,
           wa_zze1edp01 TYPE  zze1edp01,
           wa_e1edk02   TYPE  e1edk02,
           wa_e1edk17   TYPE  e1edk17,
           wa_e1edka1   TYPE  e1edka1,
           wa_e1edk01   TYPE  e1edk01,
           wa_e1edp01   TYPE  e1edp01,
           wa_adrc      TYPE  adrc,
           wa_pa0105    TYPE  pa0105,
           wa_zze1edka1 TYPE  zze1edka1,
           wa_zzdochdr  TYPE  zzdochdr,
           wa_vbfa      TYPE  t_vbfa,
           wa_vbpa      TYPE  vbpa.
    *-- Move data to ZZDOCHDR Segment--
    CASE int_edidd-segnam.
      WHEN c_e1edk01.
        MOVE int_edidd-sdata TO wa_e1edk01.
    *--Begin of MOD001+(Modification ID 001)--
    *-- Filling of ZZSALORG segment--
        SELECT SINGLE adrnr
        FROM tvko
        INTO lv_adrnr
       WHERE vkorg EQ dxvbak-vkorg.
        IF sy-subrc EQ 0.
          SELECT SINGLE *
                   FROM adrc
                   INTO wa_adrc
                  WHERE addrnumber EQ lv_adrnr.
          wa_zzsalorg-salorg  = dxvbak-vkorg.
          wa_zzsalorg-name1   = wa_adrc-name1.
          wa_zzsalorg-name2   = wa_adrc-name2.
          wa_zzsalorg-stras   = wa_adrc-street.
          wa_zzsalorg-telf1   = wa_adrc-tel_number.
          wa_zzsalorg-telfx   = wa_adrc-fax_number.
          wa_zzsalorg-land1   = wa_adrc-country.
          wa_zzsalorg-strs2   = wa_adrc-str_suppl1.
          wa_zzsalorg-street2 = wa_adrc-str_suppl2.
          wa_zzsalorg-street3 = wa_adrc-str_suppl3.
          wa_zzsalorg-ort01   = wa_adrc-city1.
          wa_zzsalorg-pstlz   = wa_adrc-post_code1.
          wa_zzsalorg-regio   = wa_adrc-region.
          int_edidd-segnam = c_zzsalorg.
          CLEAR int_edidd-sdata.
          MOVE wa_zzsalorg TO int_edidd-sdata.
          APPEND int_edidd.
          CLEAR: wa_adrc,
                 wa_zzsalorg.
        ENDIF.
    *--End of MOD001+(Modification ID 001)--
        SELECT SINGLE text1
                 FROM t042z
                 INTO lv_text1
                 WHERE land1 EQ dxvbpa-land1
                   AND zlsch EQ dxvbkd-zlsch.
        READ TABLE dxvbpa INTO wa_vbpa WITH KEY vbeln = dxvbpa-vbeln
                                          parvw = c_parvw.
        IF sy-subrc EQ 0.
    Begin of Mod-002
          SELECT SINGLE stceg
          FROM kna1
          INTO lv_stceg
           WHERE kunnr = wa_vbpa-kunnr.
    End of Mod-002
          SELECT SINGLE vzskz
                   FROM knb1
                   INTO lv_vzskz
                   WHERE kunnr EQ wa_vbpa-kunnr
                     AND bukrs EQ dxvbak-bukrs_vf.
          IF sy-subrc EQ 0.
            SELECT SINGLE zinso
                     FROM t056z
                     INTO lv_zinso
                     WHERE vzskz EQ lv_vzskz
                       AND waers EQ wa_e1edk01-curcy.
            wa_zzdochdr-zdoctitle  = dobject-objky.
            wa_zzdochdr-zdate      = dobject-erdat.
            wa_zzdochdr-zmestyp    = dobject-kschl.
            wa_zzdochdr-zmedium    = dobject-nacha.
            wa_zzdochdr-zlang      = dobject-spras.
            wa_zzdochdr-zttype     = dxvbkd-kdkg1.
            wa_zzdochdr-zpaymethod = dxvbkd-zlsch.
            wa_zzdochdr-zpaytext   = lv_text1.
            wa_zzdochdr-zintonpymt = lv_zinso.
    Begin of Mod-002
            wa_zzdochdr-zstceg     = lv_stceg.
    End of Mod-002
            int_edidd-segnam = c_zzdochdr.
            CLEAR int_edidd-sdata.
            MOVE wa_zzdochdr TO int_edidd-sdata.
            APPEND int_edidd.
            CLEAR : wa_zzdochdr.
          ENDIF.
        ENDIF.
    *-- Move data to ZZE1EDK02 Segment--
      WHEN c_e1edk02.
        MOVE int_edidd-sdata TO wa_e1edk02.
        IF wa_e1edk02-qualf EQ c_004.
          SELECT SINGLE vbelv FROM vbfa INTO wa_vbfa
                             WHERE vbeln EQ lv_vbeln
                             AND   vbtyp_v EQ 'B'.
          IF sy-subrc EQ 0.
            SELECT SINGLE erdat FROM vbak INTO wa_vbfa
            WHERE vbeln EQ wa_vbfa-vbelv.
            int_edidd-segnam = c_ze1edk02.
            CLEAR int_edidd-sdata.
            MOVE wa_vbfa TO int_edidd-sdata.
            APPEND int_edidd.
            CLEAR wa_vbfa.
          ENDIF.
        ENDIF.                                  " IF ended for "IF wa_e1edk02-qualf = '004'" condition.
    **-- Move data to ZZE1EDK17 Segment--
      WHEN c_e1edk17.
        MOVE int_edidd-sdata TO wa_e1edk17.
        IF NOT dxvbkd-lcnum IS INITIAL.
          SELECT SINGLE inco1
                        inco2
                   FROM akkp
                   INTO i_akkp
                  WHERE lcnum EQ dxvbkd-lcnum.
          IF sy-subrc EQ 0.
            IF wa_e1edk17-qualf EQ c_001.
              wa_ze1edk17-lkond = i_akkp-inco1.
              wa_ze1edk17-qualf = wa_e1edk17-qualf.
              SELECT SINGLE bezei
                       FROM tinct
                       INTO lv_inco
                      WHERE spras EQ 'E'
                        AND inco1 EQ i_akkp-inco1.
              IF sy-subrc EQ 0.
                wa_ze1edk17-lktext = lv_inco.
              ENDIF.
            ELSEIF wa_e1edk17-qualf EQ c_002.
              wa_ze1edk17-qualf = wa_e1edk17-qualf.
              wa_ze1edk17-lktext = i_akkp-inco2.
            ELSE.
            ENDIF.
            int_edidd-segnam = c_zze1edk17.
            CLEAR int_edidd-sdata.
            MOVE wa_ze1edk17 TO int_edidd-sdata.
            APPEND int_edidd.
            CLEAR wa_ze1edk17.
          ENDIF.
        ENDIF.                                       " IF ended for not initial condition.
    *--Move data to zze1edka1 Segment--
      WHEN c_e1edka1.
        MOVE int_edidd-sdata TO wa_e1edka1.
    *--Checking the wa_e1edka1-parvw field for 'RE'--
        IF wa_e1edka1-parvw EQ c_re.
          IF NOT dxvbkd-lcnum IS INITIAL.
            SELECT SINGLE cadnr
             FROM akkp
             INTO lv_cadnr
            WHERE lcnum EQ dxvbkd-lcnum.
            IF sy-subrc EQ 0.
              SELECT SINGLE *
                       FROM adrc
                       INTO wa_adrc
                      WHERE addrnumber EQ lv_cadnr.
              wa_zze1edka1-parvw = wa_e1edka1-parvw.
              wa_zze1edka1-partn = wa_e1edka1-partn.
              wa_zze1edka1-land1 = wa_adrc-country.
              wa_zze1edka1-name1 = wa_adrc-name1.
              wa_zze1edka1-name2 = wa_adrc-name2.
              wa_zze1edka1-stras = wa_adrc-street.
              wa_zze1edka1-strs2 = wa_adrc-str_suppl1.
              wa_zze1edka1-ort01 = wa_adrc-city1.
              wa_zze1edka1-pstlz = wa_adrc-post_code1.
              wa_zze1edka1-regio = wa_adrc-region.
              int_edidd-segnam = c_zze1edka1.
              CLEAR int_edidd-sdata.
              MOVE wa_zze1edka1 TO int_edidd-sdata.
              APPEND int_edidd.
              CLEAR: wa_adrc,
                     wa_zze1edka1.
            ENDIF.
          ENDIF.
        ENDIF.                                               " IF ended for "IF wa_e1edka1-parvw EQ 'RE'" condition.
    *--Checking the wa_e1edka1-parvw field for 'WE'--
        IF wa_e1edka1-parvw EQ c_we.
          IF NOT dxvbkd-lcnum IS INITIAL.
            SELECT SINGLE cadnr
              FROM akkp
              INTO lv_cadnr
             WHERE lcnum EQ dxvbkd-lcnum.
            IF sy-subrc EQ 0.
              SELECT SINGLE *
                       FROM adrc
                       INTO wa_adrc
                      WHERE addrnumber EQ lv_cadnr.
              wa_zze1edka1-parvw = wa_e1edka1-parvw.
              wa_zze1edka1-partn = wa_e1edka1-partn.
              wa_zze1edka1-land1 = wa_adrc-country.
              wa_zze1edka1-name1 = wa_adrc-name1.
              wa_zze1edka1-name2 = wa_adrc-name2.
              wa_zze1edka1-stras = wa_adrc-street.
              wa_zze1edka1-strs2 = wa_adrc-str_suppl1.
              wa_zze1edka1-ort01 = wa_adrc-city1.
              wa_zze1edka1-pstlz = wa_adrc-post_code1.
              wa_zze1edka1-regio = wa_adrc-region.
              int_edidd-segnam = c_zze1edka1.
              CLEAR int_edidd-sdata.
              MOVE wa_zze1edka1 TO int_edidd-sdata.
              APPEND int_edidd.
              CLEAR: wa_adrc,
                     wa_zze1edka1.
            ENDIF.
          ENDIF.
        ENDIF.                                             " IF ended for "IF wa_e1edka1-parvw EQ 'WE'" condition.
    *--Checking the wa_e1edka1-parvw field for 'AG'--
        IF wa_e1edka1-parvw EQ c_ag.
          IF NOT dxvbkd-lcnum IS INITIAL.
            SELECT SINGLE cadnr
              FROM akkp
              INTO lv_cadnr
             WHERE lcnum EQ dxvbkd-lcnum.
            IF sy-subrc EQ 0.
              SELECT SINGLE *
                       FROM adrc
                       INTO wa_adrc
                      WHERE addrnumber EQ lv_cadnr.
              wa_zze1edka1-parvw = wa_e1edka1-parvw.
              wa_zze1edka1-partn = wa_e1edka1-partn.
              wa_zze1edka1-land1 = wa_adrc-country.
              wa_zze1edka1-name1 = wa_adrc-name1.
              wa_zze1edka1-name2 = wa_adrc-name2.
              wa_zze1edka1-stras = wa_adrc-street.
              wa_zze1edka1-strs2 = wa_adrc-str_suppl1.
              wa_zze1edka1-ort01 = wa_adrc-city1.
              wa_zze1edka1-pstlz = wa_adrc-post_code1.
              wa_zze1edka1-regio = wa_adrc-region.
              int_edidd-segnam = c_zze1edka1.
              CLEAR int_edidd-sdata.
              MOVE wa_zze1edka1 TO int_edidd-sdata.
              APPEND int_edidd.
              CLEAR: wa_adrc,
                     wa_zze1edka1.
            ENDIF.
          ENDIF.                                       " IF ended for "IF NOT dxvbkd-lcnum IS INITIAL" condition.
        ENDIF.                                         " IF ended for "IF wa_e1edka1-parvw EQ c_ag" condition.
    *--Checking the wa_e1edka1-parvw field for 'Y'--
        IF wa_e1edka1-parvw+0(1) EQ c_y.
          SELECT SINGLE parvw
                  FROM  tpar
                  INTO  lv_parvw
                  WHERE parvw EQ wa_e1edka1-parvw
                    AND nrart EQ c_pe.
          IF sy-subrc EQ 0.
            SELECT SINGLE pernr
              FROM vbpa
              INTO lv_pernr
              WHERE vbeln EQ dxvbpa-vbeln
              AND   parvw EQ lv_parvw.
            IF sy-subrc EQ 0.
              SELECT SINGLE usrid_long
               FROM pa0105
               INTO wa_pa0105-usrid_long
               WHERE  pernr EQ lv_pernr
                 AND usrty EQ c_0010.    " communication type email
              wa_zze1email-zparvw  = wa_e1edka1-parvw.
              wa_zze1email-zname   = wa_e1edka1-name1.
              wa_zze1email-zemail  = wa_pa0105-usrid_long.
              int_edidd-segnam = c_zze1email.
              CLEAR int_edidd-sdata.
              MOVE wa_zze1email TO int_edidd-sdata.
              APPEND int_edidd.
              CLEAR: wa_adrc,
                     wa_zze1email,
                     wa_pa0105.
            ENDIF.
          ENDIF.
        ENDIF.                              " IF ended for "IF wa_e1edka1-parvw EQ 'Y'" condition.
    *--Begin of MOD003 (Modification ID 003)--
    *-- Move data to ZZE1EDP01 Segment--
      WHEN c_e1edp01.
        MOVE int_edidd-sdata TO wa_e1edp01.
        wa_zze1edp01-posex = wa_e1edp01-posex.
         wa_zze1edp01-uebto = dxvbap-kwmeng + ( dxvbap-kwmeng * dxvbap-uebto / 100 ).
         wa_zze1edp01-untto = dxvbap-kwmeng - ( dxvbap-kwmeng  * dxvbap-untto / 100 ).
        wa_zze1edp01-uebto = dxvbap-uebto.
        wa_zze1edp01-untto = dxvbap-untto.
        int_edidd-segnam = c_zze1edp01.
        CLEAR int_edidd-sdata.
        MOVE wa_zze1edp01 TO int_edidd-sdata.
        APPEND int_edidd.
        CLEAR: wa_zze1edp01.
    *--End of MOD003 (Modification ID 003)--
      WHEN OTHERS.
    ENDCASE.
    Regards,
    Nagaraj

  • IDOC segment for VBKD-BSTKD_E

    Hi,
    I am using ORDERS04 as basic type for order creation from iDOC.
    For one of my requirment I need the iDOC segment for VBKD-BSTKD_E field. The field is in purchase order data at header > Ship to party view > Purchase order no.
    Thanks
    Sanjay

    Hi,
    you have to fill the segment E1EDK02 with:
    E1EDK02-QUALF (qualifier) = '044' (purchase order number consignee)
    E1EDK02-BELNR = Purchase Order Number
    E1EDk02-DATUM = Purchase Order Date
    Kind Regards.
    Andrea

  • Procedure to find mandatory field in an IDoc Segment

    Hi all,
    Please guide me to find mandatory field in an IDoc Segment.
    Ex: I went to MATMAS05 IDoc type. I know that E1MARAM and E1MAKTM are the mandatory segments for MATMAS05 IDoc Type.
    But, I would like to know what are the mandatory fields for E1MARAM or E1MAKTM segment.
    Please guide me to find mandatory field in an IDoc Segment (for the above example).
    Thanks,
    Sudarsan

    hi,  here I have a good suggestion to solve your problem.
    Assuem you are research which field is mandatory in your mastr data inbound. Let's suppost it's a material.  You already known how to create it in online t-code, which field should be filled, which view should be inputed.
    Then, configure you material related IDOC for outbound, make sure that system will send out a material IDOC to other partner system (it can be a dummy system)when you create it.
    Then check the sent IDOC, you can find out how SAP system fill the IDOC according to your input.
    You can get to know how to fill your IDOC in this way.

  • Chanding the content in an IDOC segment at runtime

    Hi Experts,
    I have funny issue with modification of the data in an IDOC segment. Below is the description of the issue:
         I am using the IDoc type FIDCC2.FIDCCP02. I have to populate the value for field 'KTOSL' of the
         segment E1FISEG. I wrote the logic in user exit EXIT_SAPLF050_006. It is getting triggered and the
         logic is updating the values in the IDOC_DATA internal table properly.
         When the IDoc is generated, I observed that the value for this field is not updated in IDoc Segment.
    Could you please suggest where I went wrong.
    Ramana

    Hi Neha,
    Thank you for the responce.
    We need not to fill all the 21 fields before the field KTOSL. Because I was using the work area to modify the internal table based on the index.
    One thing I can conclude is that we cannot change the values in the standard segments of a stanrd Idoc type. By the time you enter in the processing Functinal Module, the Idoc number would have been generated. So the modification we carry out are just updating the internal table which of no effect. The right way is that find the place where the values getting updated to the data base and change values as required. These changed values can be founf in the data base but not in the IDoc generated.
    Neha one more query for the clarification,could you ever delt with the down payment requests through IDocs. If so please share the details.
    Ramana

  • Custom Idoc-segments

    Hi,
    I am working on inbound processing of idocs. The issue is to post production confirmations into SAP using idocs sent by the middleware. I have to create a custom idoc for this purpose. I know the steps for creating a custom idoc type and message type.
    The problem is that the number of segments of each idoc sent by the middleware is not fixed. They wanted the idoc to be setup in such a way that each time they send an idoc they want segments repeated based on the entries in the flat file.
    Please help me out.Thanks

    HI,
    For this i have a solution.
    you can make two segments one is header and other is item.
    in Header segment only setno field ocours. and in item segment all three fields will be there. like this.
    HEADER INFORMATION:
    1
    ITEM INFORMATION:
    1 a i
    1 b o
    i c o
    Now you fill your each idoc for each setno. and distribute it. and in receving system you will got a IDOC for each SETNO. Then you can loop in header segment and find all its items from item segment.
    Regards,
    HRA
    <b>Reward points if my post helps you.</b>

  • How to pass item payment term through Idoc segment E1EDP18

    We use ORDERS idoc to create sales orders and our customers want to replace the default payment term at item level. I found segment E1EDP18 for this purpose but I don't exactly know how to use it, like where to put the payment term key. Can any one expain with the help of a clear  example how to indicate the payment term there ?
    Below is a exerpt of the incoming idoc file I used for testing. In this test I put the paymentt term 0010 in but the information sent in idoc segment is just ignored.
    E1EDP01                     10         625.00
        E1EDP05                        ZD64
        E1EDP05                        ZD66
        E1EDP19                     00269020000
        E1EDP18                     0020010
    Many thanks

    Hi,
             SAP program IDOC_INPUT_ORDERS is not using the item level payment terms sent in IDOC segment P18 to fill the sales order so you need user exit to do this. The program is moving the item level information to an internal table xe1edp18 when the data is parsed from IDOC so you can use this to populate the screen information in the user exit 'CALL CUSTOMER-FUNCTION '002' (IDOC_INPUT_ORDERS).
    Let me explain the process from EDI to SAP.
    1) EDI 850 will have ITD segment at item level (Example ITD013  *2     *        *10 *        *30 *          *        *) you can ask your EDI team to map them to P18 segment as it has the number of days and also the percentage for cash discount. P18 has 3 qualifiers so you can map 3 different temrs (For example the above sample is 1 Term is 2% in 10 days and Term 2 is net 30 days)
    2) During IDOC parsing the program is already filling internal table xe1edp18.
    3) In the user exit CUSTOMER-FUNCTION '002' you need to search for the SAP payment terms with the number of days and percentage (This is available in the table T052). Once you find the SAP terms key, you need to populate it for each item. You need to do this after the program filled the item billing data.
    Dynpro item business data billin details -
        PERFORM VA01_DYNPRO_POSITION_PDE3 USING XVBAP-POSNR.
    *-Zusätzliche Daten für Dynpros vorsehen (Kundenerweiterungen)----
    *-additional data's for new dynpro fields (customer exit)----
        SY-SUBRC = 0.
        PERFORM CUSTOMER_FUNCTION_DYNPRO.  -- THis is the user exit call
    Hope this is useful.
    Ram

  • Error while Filling custom extended idoc

    i have extended segment e1edpa1 with ZLOC segment in INVOIC01 idoc .now i'm filling this extended idoc from exit EXIT_SAPLIEDI_101 but it is giving me error like "EDI: Syntax error in IDoc (mandatory segment missing)" can anyone tell me what could be the reason?below is my code.
    WHEN 'E1EDPA1'.
          MOVE idoc_data-sdata TO e1edpa1.
          IF e1edpa1-parvw = 'WE'.
            SELECT SINGLE * FROM kna1 INTO w_kna1 WHERE kunnr = e1edpa1-partn.
            IF sy-subrc = 0.
              MOVE: w_kna1-locco TO zloc-locco,
                    w_kna1-bahne TO zloc-bahne.
              MOVE 'ZLOC' TO idoc_data-segnam.    " administrative section
              MOVE zloc TO idoc_data-sdata.       " data section
              APPEND idoc_data.
    thx

    Why do you need to add a segment via code in an inbound IDOC? we dont populate segments in inbound processing, rather you shoul dbe getting value from the source system in the IDOC, and reading the custom segment to process the values.
    if source is not sending the values , and you need those then you are supposed to read and process the values to move those to corresponding structure for SAP program to process the data. Adding a segment in inbound is not going to get you anything.

  • How to use E1BPPAREX - IDoc Segment enhancement

    Hi,
    can you provide me with some details on "how to use the E1BPPAREX" IDoc Segment ?
    I want to enhance the standard PRICECATALOGUE02 IDoc with some customer defined fields.
    There is a use of a STRUCTURE FIELD and 4 VALUEPARTS.
    What kind of structure do i have to use ?
    I red something about to enter 2 kind of structures ?
    a) the first part = wrf_pricat_key*
    b) second part = DDIC userdefined structure.
    Thx,
    Gordon

    Hi Gordon,
    1. Map customer data in E1BPPAREX segment fields:
    STRUCTURE     CHAR     30     0     Structure name of  BAPI table extension
    VALUEPART1     CHAR     240     0     Data part of BAPI extension parameter
    VALUEPART2     CHAR     240     0     Data part of BAPI extension parameter
    VALUEPART3     CHAR     240     0     Data part of BAPI extension parameter
    VALUEPART4     CHAR     240     0     Data part of BAPI extension parameter
    2. Build a new implementationof BADI interface IF_EX_PRICAT_OUT_EXTIN  (PRICAT_IN_EXTIN definition name) using SE19
    3. Write the ABAP code for UPDATE_INBOUND_EXTENSIONIN method to manage your additional customer data:
    UPDATE_INBOUND_EXTENSION: This method enables the data from the
    ExtensionIn table parameter to be processed. This parameter may contain
    customer-specific data that is either to be integrated into standard
    tables in the price catalog, or stored in customer-defined tables.
    BAPI_Table_Extensions are used for this integration into the standard
    tables from the price catalog. These are enhancement concept objects for
    BAPIs. SAP delivers them with the key elements, and customers enhance
    them for their own fields in appends. The method receives the
    Table_Extensions using the interface and then it can fill them. Once the
    entries are returned after the method has been called, they are mixed
    with the standard tables. If a customer wishes to update
    customer-defined tables, a user-defined update module can be called in
    the method and it will update the customer-defined tables.
    When the method is called, the changing parameters are empty. They may
    be filled in the method. They are used to provide customer-defined
    fields in the standard tables. If entries are made in these structures
    and tables, the 'entries_made' parameter must be set to 'X' so that the
    entries are transferred from these structures and tables to the standard
    tables in the price catalog. These parameters are BAPI table extensions.
    These structures can be enhanced in the customer system with APPENDS.
    This enhancement is exactly the same as the enhancement for the standard
    tables involved. The customer-specific fields are transexported to the
    standard tables after the method has been called using a
    MOVE_CORRESPONDING. This involves the enhancement technology that
    supports BAPIs in the standard system.
    Reward points if useful.
    Roger

  • IDOC - segment Qualifier

    Dear all,
    Do you know the transaction or an document which give the link between the Qualifier segment of an segment IDOC and the SAP field ?
    for example : IDOC ORDERS05
    segment E1EDK03
    qualifier 002 : wished delivery date in VA01
    segment E1EDK02
    qualifier 050 : Delivery Order in segment description but correspond to PO number in VA01
    I search to fill in the field PO Date but I don't find the qualifer segment.
    Could you please help me ?
    thanks
    Véronique

    Hi friends,
      i thing your problem will solve.
    E1EDK01 : IDoc: Document header general data
    Segment definition E2EDK01005 Released since Release 45B , Segment length: 0357
    ACTION : Action code for the whole EDI message
    internal data type : CHAR
    Internal length : 000003 characters
    Position in segment : 001, Offset : 0063. external length : 000003
    KZABS : Flag: order acknowledgment required
    internal data type : CHAR
    Internal length : 000001 characters
    Position in segment : 002, Offset : 0066. external length : 000001
    CURCY : Currency
    internal data type : CHAR
    Internal length : 000003 characters
    Position in segment : 003, Offset : 0067. external length : 000003
    HWAER : EDI local currency
    internal data type : CHAR
    Internal length : 000003 characters
    Position in segment : 004, Offset : 0070. external length : 000003
    WKURS : Exchange rate
    internal data type : CHAR
    Internal length : 000012 characters
    Position in segment : 005, Offset : 0073. external length : 000012
    ZTERM : Terms of payment key
    internal data type : CHAR
    Internal length : 000017 characters
    Position in segment : 006, Offset : 0085. external length : 000017
    KUNDEUINR : VAT Registration Number
    internal data type : CHAR
    Internal length : 000020 characters
    Position in segment : 007, Offset : 0102. external length : 000020
    EIGENUINR : VAT Registration Number
    internal data type : CHAR
    Internal length : 000020 characters
    Position in segment : 008, Offset : 0122. external length : 000020
    BSART : Document type
    internal data type : CHAR
    Internal length : 000004 characters
    Position in segment : 009, Offset : 0142. external length : 000004
    BELNR : IDOC document number
    internal data type : CHAR
    Internal length : 000035 characters
    Position in segment : 010, Offset : 0146. external length : 000035
    NTGEW : Net weight
    internal data type : CHAR
    Internal length : 000018 characters
    Position in segment : 011, Offset : 0181. external length : 000018
    BRGEW : Net weight
    internal data type : CHAR
    Internal length : 000018 characters
    Position in segment : 012, Offset : 0199. external length : 000018
    GEWEI : Weight unit
    internal data type : CHAR
    Internal length : 000003 characters
    Position in segment : 013, Offset : 0217. external length : 000003
    FKART_RL : Invoice list type
    internal data type : CHAR
    Internal length : 000004 characters
    Position in segment : 014, Offset : 0220. external length : 000004
    ABLAD : Unloading Point
    internal data type : CHAR
    Internal length : 000025 characters
    Position in segment : 015, Offset : 0224. external length : 000025
    BSTZD : Purchase order number supplement
    internal data type : CHAR
    Internal length : 000004 characters
    Position in segment : 016, Offset : 0249. external length : 000004
    VSART : Shipping Conditions
    internal data type : CHAR
    Internal length : 000002 characters
    Position in segment : 017, Offset : 0253. external length : 000002
    VSART_BEZ : Description of the Shipping Type
    internal data type : CHAR
    Internal length : 000020 characters
    Position in segment : 018, Offset : 0255. external length : 000020
    RECIPNT_NO : Number of recipient (for control via the ALE model)
    internal data type : CHAR
    Internal length : 000010 characters
    Position in segment : 019, Offset : 0275. external length : 000010
    KZAZU : Order Combination Indicator
    internal data type : CHAR
    Internal length : 000001 characters
    Position in segment : 020, Offset : 0285. external length : 000001
    AUTLF : Complete delivery defined for each sales order?
    internal data type : CHAR
    Internal length : 000001 characters
    Position in segment : 021, Offset : 0286. external length : 000001
    AUGRU : Order reason (reason for the business transaction)
    internal data type : CHAR
    Internal length : 000003 characters
    Position in segment : 022, Offset : 0287. external length : 000003
    AUGRU_BEZ : Description
    internal data type : CHAR
    Internal length : 000040 characters
    Position in segment : 023, Offset : 0290. external length : 000040
    ABRVW : Usage Indicator
    internal data type : CHAR
    Internal length : 000003 characters
    Position in segment : 024, Offset : 0330. external length : 000003
    ABRVW_BEZ : Description
    internal data type : CHAR
    Internal length : 000020 characters
    Position in segment : 025, Offset : 0333. external length : 000020
    FKTYP : Billing category
    internal data type : CHAR
    Internal length : 000001 characters
    Position in segment : 026, Offset : 0353. external length : 000001
    LIFSK : Delivery block (document header)
    internal data type : CHAR
    Internal length : 000002 characters
    Position in segment : 027, Offset : 0354. external length : 000002
    LIFSK_BEZ : Description
    internal data type : CHAR
    Internal length : 000020 characters
    Position in segment : 028, Offset : 0356. external length : 000020
    EMPST : Receiving point
    internal data type : CHAR
    Internal length : 000025 characters
    Position in segment : 029, Offset : 0376. external length : 000025
    ABTNR : Department number
    internal data type : CHAR
    Internal length : 000004 characters
    Position in segment : 030, Offset : 0401. external length : 000004
    DELCO : Agreed delivery time
    internal data type : CHAR
    Internal length : 000003 characters
    Position in segment : 031, Offset : 0405. external length : 000003
    WKURS_M : Indirectly quoted exchange rate in an IDoc segment
    internal data type : CHAR
    Internal length : 000012 characters
    Position in segment : 032, Offset : 0408. external length : 000012
    E1EDK14 : IDoc: Document Header Organizational Data
    Segment definition E2EDK14 Released since Release 30A , Segment length: 0038
    QUALF : IDOC qualifer organization
    internal data type : CHAR
    Internal length : 000003 characters
    Position in segment : 001, Offset : 0063. external length : 000003
    ORGID : IDOC organization
    internal data type : CHAR
    Internal length : 000035 characters
    Position in segment : 002, Offset : 0066. external length : 000035
    E1EDK03 : IDoc: Document header date segment
    Segment definition E2EDK03 Released since Release 30A , Segment length: 0017
    IDDAT : Qualifier for IDOC date segment
    internal data type : CHAR
    Internal length : 000003 characters
    Position in segment : 001, Offset : 0063. external length : 000003
    DATUM : IDOC: Date
    internal data type : CHAR
    Internal length : 000008 characters
    Position in segment : 002, Offset : 0066. external length : 000008
    UZEIT : IDOC: Time
    internal data type : CHAR
    Internal length : 000006 characters
    Position in segment : 003, Offset : 0074. external length : 000006
    E1EDK04 : IDoc: Document header taxes
    Segment definition E2EDK04001 Released since Release 40B , Segment length: 0107
    MWSKZ : VAT indicator
    internal data type : CHAR
    Internal length : 000007 characters
    Position in segment : 001, Offset : 0063. external length : 000007
    MSATZ : VAT rate
    internal data type : CHAR
    Internal length : 000017 characters
    Position in segment : 002, Offset : 0070. external length : 000017
    MWSBT : Value added tax amount
    internal data type : CHAR
    Internal length : 000018 characters
    Position in segment : 003, Offset : 0087. external length : 000018
    TXJCD : Tax Jurisdiction
    internal data type : CHAR
    Internal length : 000015 characters
    Position in segment : 004, Offset : 0105. external length : 000015
    KTEXT : Text Field
    internal data type : CHAR
    Internal length : 000050 characters
    Position in segment : 005, Offset : 0120. external length : 000050
    E1EDK05 : IDoc: Document header conditions
    Segment definition E2EDK05001 Released since Release 40A , Segment length: 0185
    ALCKZ : Surcharge or discount indicator
    internal data type : CHAR
    Internal length : 000003 characters
    Position in segment : 001, Offset : 0063. external length : 000003
    KSCHL : Condition type (coded)
    internal data type : CHAR
    Internal length : 000004 characters
    Position in segment : 002, Offset : 0066. external length : 000004
    KOTXT : Condition text
    internal data type : CHAR
    Internal length : 000080 characters
    Position in segment : 003, Offset : 0070. external length : 000080
    BETRG : Fixed surcharge/discount on total gross
    internal data type : CHAR
    Internal length : 000018 characters
    Position in segment : 004, Offset : 0150. external length : 000018
    KPERC : Condition percentage rate
    internal data type : CHAR
    Internal length : 000008 characters
    Position in segment : 005, Offset : 0168. external length : 000008
    KRATE : Condition record per unit
    internal data type : CHAR
    Internal length : 000015 characters
    Position in segment : 006, Offset : 0176. external length : 000015
    UPRBS : Price unit
    internal data type : CHAR
    Internal length : 000009 characters
    Position in segment : 007, Offset : 0191. external length : 000009
    MEAUN : Unit of measurement
    internal data type : CHAR
    Internal length : 000003 characters
    Position in segment : 008, Offset : 0200. external length : 000003
    KOBTR : IDoc condition end amount
    internal data type : CHAR
    Internal length : 000018 characters
    Position in segment : 009, Offset : 0203. external length : 000018
    MWSKZ : VAT indicator
    internal data type : CHAR
    Internal length : 000007 characters
    Position in segment : 010, Offset : 0221. external length : 000007
    MSATZ : VAT rate
    internal data type : CHAR
    Internal length : 000017 characters
    Position in segment : 011, Offset : 0228. external length : 000017
    KOEIN : Currency
    internal data type : CHAR
    Internal length : 000003 characters
    Position in segment : 012, Offset : 0245. external length : 000003
    E1EDKA1 : IDoc: Document Header Partner Information
    Segment definition E2EDKA1003 Released since Release 45A , Segment length: 0995
    PARVW : Partner function (e.g. sold-to party, ship-to party, ...)
    internal data type : CHAR
    Internal length : 000003 characters
    Position in segment : 001, Offset : 0063. external length : 000003
    PARTN : Partner number
    internal data type : CHAR
    Internal length : 000017 characters
    Position in segment : 002, Offset : 0066. external length : 000017
    LIFNR : Vendor number at customer location
    internal data type : CHAR
    Internal length : 000017 characters
    Position in segment : 003, Offset : 0083. external length : 000017
    NAME1 : Name 1
    internal data type : CHAR
    Internal length : 000035 characters
    Position in segment : 004, Offset : 0100. external length : 000035
    NAME2 : Name 2
    internal data type : CHAR
    Internal length : 000035 characters
    Position in segment : 005, Offset : 0135. external length : 000035
    NAME3 : Name 3
    internal data type : CHAR
    Internal length : 000035 characters
    Position in segment : 006, Offset : 0170. external length : 000035
    NAME4 : Name 4
    internal data type : CHAR
    Internal length : 000035 characters
    Position in segment : 007, Offset : 0205. external length : 000035
    STRAS : Street and house number 1
    internal data type : CHAR
    Internal length : 000035 characters
    Position in segment : 008, Offset : 0240. external length : 000035
    STRS2 : Street and house number 2
    internal data type : CHAR
    Internal length : 000035 characters
    Position in segment : 009, Offset : 0275. external length : 000035
    PFACH : PO Box
    internal data type : CHAR
    Internal length : 000035 characters
    Position in segment : 010, Offset : 0310. external length : 000035
    ORT01 : City
    internal data type : CHAR
    Internal length : 000035 characters
    Position in segment : 011, Offset : 0345. external length : 000035
    COUNC : County code
    internal data type : CHAR
    Internal length : 000009 characters
    Position in segment : 012, Offset : 0380. external length : 000009
    PSTLZ : Postal code
    internal data type : CHAR
    Internal length : 000009 characters
    Position in segment : 013, Offset : 0389. external length : 000009
    PSTL2 : P.O. Box postal code
    internal data type : CHAR
    Internal length : 000009 characters
    Position in segment : 014, Offset : 0398. external length : 000009
    LAND1 : Country Key
    internal data type : CHAR
    Internal length : 000003 characters
    Position in segment : 015, Offset : 0407. external length : 000003
    ABLAD : Unloading Point
    internal data type : CHAR
    Internal length : 000035 characters
    Position in segment : 016, Offset : 0410. external length : 000035
    PERNR : Contact person's personnel number
    internal data type : CHAR
    Internal length : 000030 characters
    Position in segment : 017, Offset : 0445. external length : 000030
    PARNR : Contact person's number (not personnel number)
    internal data type : CHAR
    Internal length : 000030 characters
    Position in segment : 018, Offset : 0475. external length : 000030
    TELF1 : 1st telephone number of contact person
    internal data type : CHAR
    Internal length : 000025 characters
    Position in segment : 019, Offset : 0505. external length : 000025
    TELF2 : 2nd telephone number of contact person
    internal data type : CHAR
    Internal length : 000025 characters
    Position in segment : 020, Offset : 0530. external length : 000025
    TELBX : Telebox number
    internal data type : CHAR
    Internal length : 000025 characters
    Position in segment : 021, Offset : 0555. external length : 000025
    TELFX : Fax number
    internal data type : CHAR
    Internal length : 000025 characters
    Position in segment : 022, Offset : 0580. external length : 000025
    TELTX : Teletex number
    internal data type : CHAR
    Internal length : 000025 characters
    Position in segment : 023, Offset : 0605. external length : 000025
    TELX1 : Telex number
    internal data type : CHAR
    Internal length : 000025 characters
    Position in segment : 024, Offset : 0630. external length : 000025
    SPRAS : Language key
    internal data type : CHAR
    Internal length : 000001 characters
    Position in segment : 025, Offset : 0655. external length : 000001
    ANRED : Form of Address
    internal data type : CHAR
    Internal length : 000015 characters
    Position in segment : 026, Offset : 0656. external length : 000015
    ORT02 : District
    internal data type : CHAR
    Internal length : 000035 characters
    Position in segment : 027, Offset : 0671. external length : 000035
    HAUSN : House number
    internal data type : CHAR
    Internal length : 000006 characters
    Position in segment : 028, Offset : 0706. external length : 000006
    STOCK : Floor
    internal data type : CHAR
    Internal length : 000006 characters
    Position in segment : 029, Offset : 0712. external length : 000006
    REGIO : Region
    internal data type : CHAR
    Internal length : 000003 characters
    Position in segment : 030, Offset : 0718. external length : 000003
    PARGE : Partner's gender
    internal data type : CHAR
    Internal length : 000001 characters
    Position in segment : 031, Offset : 0721. external length : 000001
    ISOAL : Country ISO code
    internal data type : CHAR
    Internal length : 000002 characters
    Position in segment : 032, Offset : 0722. external length : 000002
    ISONU : Country ISO code
    internal data type : CHAR
    Internal length : 000002 characters
    Position in segment : 033, Offset : 0724. external length : 000002
    FCODE : Company key (France)
    internal data type : CHAR
    Internal length : 000020 characters
    Position in segment : 034, Offset : 0726. external length : 000020
    IHREZ : Your reference (Partner)
    internal data type : CHAR
    Internal length : 000030 characters
    Position in segment : 035, Offset : 0746. external length : 000030
    BNAME : IDoc user name
    internal data type : CHAR
    Internal length : 000035 characters
    Position in segment : 036, Offset : 0776. external length : 000035
    PAORG : IDOC organization code
    internal data type : CHAR
    Internal length : 000030 characters
    Position in segment : 037, Offset : 0811. external length : 000030
    ORGTX : IDoc organization code text
    internal data type : CHAR
    Internal length : 000035 characters
    Position in segment : 038, Offset : 0841. external length : 000035
    PAGRU : IDoc group code
    internal data type : CHAR
    Internal length : 000030 characters
    Position in segment : 039, Offset : 0876. external length : 000030
    KNREF : Customer description of partner (plant, storage location)
    internal data type : CHAR
    Internal length : 000030 characters
    Position in segment : 040, Offset : 0906. external length : 000030
    ILNNR : Character field, length 70
    internal data type : CHAR
    Internal length : 000070 characters
    Position in segment : 041, Offset : 0936. external length : 000070
    PFORT : PO Box city
    internal data type : CHAR
    Internal length : 000035 characters
    Position in segment : 042, Offset : 1006. external length : 000035
    SPRAS_ISO : Language according to ISO 639
    internal data type : CHAR
    Internal length : 000002 characters
    Position in segment : 043, Offset : 1041. external length : 000002
    TITLE : Title
    internal data type : CHAR
    Internal length : 000015 characters
    Position in segment : 044, Offset : 1043. external length : 000015
    E1EDKA3 : IDoc: Document Header Partner Information Additional Data
    Segment definition E2EDKA3 Released since Release 30D , Segment length: 0073
    QUALP : IDOC Partner identification (e.g.Dun&Bradstreet number)
    internal data type : CHAR
    Internal length : 000003 characters
    Position in segment : 001, Offset : 0063. external length : 000003
    STDPN : Character field, length 70
    internal data type : CHAR
    Internal length : 000070 characters
    Position in segment : 002, Offset : 0066. external length : 000070
    E1EDK02 : IDoc: Document header reference data
    Segment definition E2EDK02 Released since Release 30A , Segment length: 0058
    QUALF : IDOC qualifier reference document
    internal data type : CHAR
    Internal length : 000003 characters
    Position in segment : 001, Offset : 0063. external length : 000003
    BELNR : IDOC document number
    internal data type : CHAR
    Internal length : 000035 characters
    Position in segment : 002, Offset : 0066. external length : 000035
    POSNR : Item number
    internal data type : CHAR
    Internal length : 000006 characters
    Position in segment : 003, Offset : 0101. external length : 000006
    DATUM : IDOC: Date
    internal data type : CHAR
    Internal length : 000008 characters
    Position in segment : 004, Offset : 0107. external length : 000008
    UZEIT : IDOC: Time
    internal data type : CHAR
    Internal length : 000006 characters
    Position in segment : 005, Offset : 0115. external length : 000006
    E1EDK17 : IDoc: Document Header Terms of Delivery
    Segment definition E2EDK17 Released since Release 30A , Segment length: 0076
    QUALF : IDOC qualifier: Terms of delivery
    internal data type : CHAR
    Internal length : 000003 characters
    Position in segment : 001, Offset : 0063. external length : 000003
    LKOND : IDOC delivery condition code
    internal data type : CHAR
    Internal length : 000003 characters
    Position in segment : 002, Offset : 0066. external length : 000003
    LKTEXT : IDOC delivery condition text
    internal data type : CHAR
    Internal length : 000070 characters
    Position in segment : 003, Offset : 0069. external length : 000070
    E1EDK18 : IDoc: Document Header Terms of Payment
    Segment definition E2EDK18 Released since Release 30A , Segment length: 0089
    QUALF : IDOC qualifier: Terms of payment
    internal data type : CHAR
    Internal length : 000003 characters
    Position in segment : 001, Offset : 0063. external length : 000003
    TAGE : IDOC Number of days
    internal data type : CHAR
    Internal length : 000008 characters
    Position in segment : 002, Offset : 0066. external length : 000008
    PRZNT : IDOC percentage for terms of payment
    internal data type : CHAR
    Internal length : 000008 characters
    Position in segment : 003, Offset : 0074. external length : 000008
    ZTERM_TXT : Text line
    internal data type : CHAR
    Internal length : 000070 characters
    Position in segment : 004, Offset : 0082. external length : 000070
    E1EDK35 : IDoc: Document Header Additional Data
    Segment definition E2EDK35000 Released since Release 45A , Segment length: 0078
    QUALZ : Qualifier for IDoc additional data
    internal data type : CHAR
    Internal length : 000003 characters
    Position in segment : 001, Offset : 0063. external length : 000003
    CUSADD : Data Element Type CHAR Length 35
    internal data type : CHAR
    Internal length : 000035 characters
    Position in segment : 002, Offset : 0066. external length : 000035
    CUSADD_BEZ : Character field of length 40
    internal data type : CHAR
    Internal length : 000040 characters
    Position in segment : 003, Offset : 0101. external length : 000040
    E1EDK36 : IDOC: Doc.header payment cards
    Segment definition E2EDK36000 Released since Release 45A , Segment length: 0114
    CCINS : Payment cards: Card type
    internal data type : CHAR
    Internal length : 000004 characters
    Position in segment : 001, Offset : 0063. external length : 000004
    CCINS_BEZEI : Description
    internal data type : CHAR
    Internal length : 000020 characters
    Position in segment : 002, Offset : 0067. external length : 000020
    CCNUM : Payment cards: Card number
    internal data type : CHAR
    Internal length : 000025 characters
    Position in segment : 003, Offset : 0087. external length : 000025
    EXDATBI : IDOC: Date
    internal data type : CHAR
    Internal length : 000008 characters
    Position in segment : 004, Offset : 0112. external length : 000008
    CCNAME : Payment cards: Name of cardholder
    internal data type : CHAR
    Internal length : 000040 characters
    Position in segment : 005, Offset : 0120. external length : 000040
    FAKWR : Maximum amount
    internal data type : CURR
    Internal length : 000015 characters
    000002 decimal places, without sign
    Position in segment : 006, Offset : 0160. external length : 000017
    E1EDKT1 : IDoc: Document Header Text Identification
    Segment definition E2EDKT1002 Released since Release 45A , Segment length: 0089
    TDID : Text ID
    internal data type : CHAR
    Internal length : 000004 characters
    Position in segment : 001, Offset : 0063. external length : 000004
    TSSPRAS : Language Key
    internal data type : CHAR
    Internal length : 000003 characters
    Position in segment : 002, Offset : 0067. external length : 000003
    TSSPRAS_ISO : Language according to ISO 639
    internal data type : CHAR
    Internal length : 000002 characters
    Position in segment : 003, Offset : 0070. external length : 000002
    TDOBJECT : Texts: Application Object
    internal data type : CHAR
    Internal length : 000010 characters
    Position in segment : 004, Offset : 0072. external length : 000010
    TDOBNAME : Name
    internal data type : CHAR
    Internal length : 000070 characters
    Position in segment : 005, Offset : 0082. external length : 000070
    E1EDKT2 : IDoc: Document Header Texts
    Segment definition E2EDKT2001 Released since Release 40A , Segment length: 0072
    TDLINE : Text line
    internal data type : CHAR
    Internal length : 000070 characters
    Position in segment : 001, Offset : 0063. external length : 000070
    TDFORMAT : Tag column
    internal data type : CHAR
    Internal length : 000002 characters
    Position in segment : 002, Offset : 0133. external length : 000002
    E1EDP01 : IDoc: Document Item General Data
    Segment definition E2EDP01007 Released since Release 640 , Segment length: 0542
    POSEX : Item number
    internal data type : CHAR
    Internal length : 000006 characters
    Position in segment : 001, Offset : 0063. external length : 000006
    ACTION : Action code for the item
    internal data type : CHAR
    Internal length : 000003 characters
    Position in segment : 002, Offset : 0069. external length : 000003
    PSTYP : Item Category
    internal data type : CHAR
    Internal length : 000001 characters
    Position in segment : 003, Offset : 0072. external length : 000001
    KZABS : Flag: order acknowledgment required
    internal data type : CHAR
    Internal length : 000001 characters
    Position in segment : 004, Offset : 0073. external length : 000001
    MENGE : Quantity
    internal data type : CHAR
    Internal length : 000015 characters
    Position in segment : 005, Offset : 0074. external length : 000015
    MENEE : Unit of measure
    internal data type : CHAR
    Internal length : 000003 characters
    Position in segment : 006, Offset : 0089. external length : 000003
    BMNG2 : Quantity in price unit
    internal data type : CHAR
    Internal length : 000015 characters
    Position in segment : 007, Offset : 0092. external length : 000015
    PMENE : Price Unit of Measure
    internal data type : CHAR
    Internal length : 000003 characters
    Position in segment : 008, Offset : 0107. external length : 000003
    ABFTZ : Agreed cumulative quantity
    internal data type : CHAR
    Internal length : 000007 characters
    Position in segment : 009, Offset : 0110. external length : 000007
    VPREI : Price (net)
    internal data type : CHAR
    Internal length : 000015 characters
    Position in segment : 010, Offset : 0117. external length : 000015
    PEINH : Price unit
    internal data type : CHAR
    Internal length : 000009 characters
    Position in segment : 011, Offset : 0132. external length : 000009
    NETWR : Item value (net)
    internal data type : CHAR
    Internal length : 000018 characters
    Position in segment : 012, Offset : 0141. external length : 000018
    ANETW : Absolute net value of item
    internal data type : CHAR
    Internal length : 000018 characters
    Position in segment : 013, Offset : 0159. external length : 000018
    SKFBP : Amount qualifying for cash discount
    internal data type : CHAR
    Internal length : 000018 characters
    Position in segment : 014, Offset : 0177. external length : 000018
    NTGEW : Net weight
    internal data type : CHAR
    Internal length : 000018 characters
    Position in segment : 015, Offset : 0195. external length : 000018
    GEWEI : Weight unit
    internal data type : CHAR
    Internal length : 000003 characters
    Position in segment : 016, Offset : 0213. external length : 000003
    EINKZ : Flag: More than one schedule line for the item
    internal data type : CHAR
    Internal length : 000001 characters
    Position in segment : 017, Offset : 0216. external length : 000001
    CURCY : Currency
    internal data type : CHAR
    Internal length : 000003 characters
    Position in segment : 018, Offset : 0217. external length : 000003
    PREIS : Gross price
    internal data type : CHAR
    Internal length : 000018 characters
    Position in segment : 019, Offset : 0220. external length : 000018
    MATKL : IDOC material class
    internal data type : CHAR
    Internal length : 000009 characters
    Position in segment : 020, Offset : 0238. external length : 000009
    UEPOS : Higher-Level Item in BOM Structures
    internal data type : CHAR
    Internal length : 000006 characters
    Position in segment : 021, Offset : 0247. external length : 000006
    GRKOR : Delivery group (items delivered together)
    internal data type : CHAR
    Internal length : 000003 characters
    Position in segment : 022, Offset : 0253. external length : 000003
    EVERS : Shipping instructions
    internal data type : CHAR
    Internal length : 000007 characters
    Position in segment : 023, Offset : 0256. external length : 000007
    BPUMN : Denominator for Conv. of Order Price Unit into Order Unit
    internal data type : DEC
    Internal length : 000005 characters
    No decimal places, without sign
    Position in segment : 024, Offset : 0263. external length : 000006
    BPUMZ : Numerator for Conversion of Order Price Unit into Order Unit
    internal data type : DEC
    Internal length : 000005 characters
    No decimal places, without sign
    Position in segment : 025, Offset : 0269. external length : 000006
    ABGRU : Reason for rejection of quotations and sales orders
    internal data type : CHAR
    Internal length : 000002 characters
    Position in segment : 026, Offset : 0275. external length : 000002
    ABGRT : Description
    internal data type : CHAR
    Internal length : 000040 characters
    Position in segment : 027, Offset : 0277. external length : 000040
    ANTLF : Maximum number of partial deliveries allowed per item
    internal data type : CHAR
    Internal length : 000001 characters
    Position in segment : 028, Offset : 0317. external length : 000001
    FIXMG : Delivery date and quantity fixed
    internal data type : CHAR
    Internal length : 000001 characters
    Position in segment : 029, Offset : 0318. external length : 000001
    KZAZU : Order Combination Indicator
    internal data type : CHAR
    Internal length : 000001 characters
    Position in segment : 030, Offset : 0319. external length : 000001
    BRGEW : Total weight
    internal data type : CHAR
    Internal length : 000018 characters
    Position in segment : 031, Offset : 0320. external length : 000018

  • Creating IDOC segments

    currently we have custom program that  is creating IDOC segments.
    Please provide some documentation or step by step process to create segments in IDOC type.
    Thanks,
    Tanya

    Hi Tanya,
    It is very difficult to list all the steps here. I am trying to briefly explain the steps:
    TO CREATE IDOC WE NEED TO FOLLOW THESE STEPS:
       1. CREATE SEGMENT (WE31),
       2. CREATE IDOC TYPE (WE30),
       3. CREATE MESSAGE TYPE (WE81) AND
       4. ASSIGN IDOC TYPE TO MESSAGE TYPE (WE82).
    CREATING A SEGMENT
       1. GO TO WE31.
       2. ENTER THE NAME FOR THE SEGMENT AND CLICK ON THE CREATE ICON.
       3. TYPE THE SHORT TEXT.
       4. ENTER THE VARIABLES AND DATA ELEMENTS.
       5. SAVE IT AND GO BACK.
       6. GO TO EDIT -> SET RELEASE.
       7. FOLLOW STEPS TO CREATE MORE NUMBER OF SEGMENTS.
    CREATE IDOC TYPE
       1. GO TO WE30.
       2. ENTER THE OBJECT NAME; SELECT BASIC TYPE AND CLICK CREATE ICON.
       3. SELECT THE CREATE NEW OPTION AND ENTER A DESCRIPTION FOR BASIC IDOC TYPE AND PRESS ENTER.
       4. SELECT THE IDOC NAME AND PRESS ENTER.
       5. THE SYSTEM PROMPTS TO ENTER A SEGMENT TYPE AND ITS ATTRIBUTES.
       6. CHOOSE THE APPROPRIATE VALUES AND PRESS u2018ENTERu2019.
       7. THE SYSTEM TRANSFERS THE NAME OF THE SEGMENT TYPE TO THE IDOC EDITOR.
    CREATION OF IDOC TYPE
       1. FOLLOW THESE STEPS TO ADD MORE NUMBER OF SEGMENTS TO PARENT OR AS PARENT-CHILD RELATION.
       2. SAVE IT AND GO BACK.
       3. GO TO EDIT -> SET RELEASE.
    CREATE MESSAGE TYPE
       1. GO TO WE81.
       2. CHANGE THE DETAILS FROM DISPLAY MODE TO CHANGE MODE.
       3. AFTER SELECTION, THE SYSTEM WILL GIVE THIS MESSAGE u201CTHE TABLE IS CROSS-CLIENT (SEE HELP FOR FURTHER INFO)u201D. PRESS ENTER.
       4. CLICK NEW ENTRIES TO CREATE NEW MESSAGE TYPE.
       5. FILL DETAILS.
       6. SAVE IT AND GO BACK.
    ASSIGN MESSAGE TYPE TO IDOC TYPE
       1. GO TO WE82.
       2. CHANGE THE DETAILS FROM DISPLAY MODE TO CHANGE MODE.
       3. AFTER SELECTION, THE SYSTEM WILL GIVE THIS MESSAGE u201CTHE TABLE IS CROSS-CLIENT (SEE HELP FOR FURTHER INFO)u201D. PRESS ENTER.
       4. CLICK NEW ENTRIES TO CREATE NEW MESSAGE TYPE.
       5. FILL DETAILS.
       6. SAVE IT AND GO BACK.
    Please let me know if you require any further information
    Rgds,
    Harmees

  • How SAP handles Child Idoc segment data insertion automatically

    Hello,
    We have some Infotypes with extra segments and IDocs are getting created with Parent and child segments.
    To fill the data into the parent/child segments, we are currently using User-Exits.
    Is there any settings/config in table level(e.g. T777D etc), or any other way, so that SAP handles the data filling into parent/child segments automatically.
    Thanks.

    No I dont want to change the value in WE19.... In runtime I am changing the value of schedule Line quantity and the same is getting update in SDSA also but when a new idoc is getting created that value is not getting reflected in that Idoc segment field.
    Kindly suggest.

Maybe you are looking for