Idoc nested segment fields update

Hi all,
I have a requirement like this
I have an IDOC say DOC1
DOC1 has a segment say SEG1
SEG1 has a child segment say CLD1
CLD1 has a filed  say FLD1 .
i need to update the data in field FLD1.
can any one  please tel me how to read data in the FLD1 and how can I update that.

Hi Vijay,
Basically, it is used the same approach to update parent/child segment(s). You need to loop at internal table EDIDD and find the corresponding segment. Then you move to work area, do the modification and lastly update the internal table EDIDD with new value(s).
Please follow step 2 to read and update the child segment field.
DATA: wa_cld1 like CLD1.
LOOP AT itab_edidd WHERE segnam = 'CLD1'.
  wa_cld1 = itab_edidd-sdata.
  IF wa_cld1-field1 = <the condition>.
    wa_cld1-field1 = <new value>.
    itab_edidd-sdata = wa_cld1.
    MODIFY itab_edidd.
    EXIT.
  ENDIF.
ENDLOOP.
Regards,
Ferry Lianto

Similar Messages

  • IDOC Missing Segment Field

    Hi,
    Some of my outbound IDOC's are missing a particular field in the Segment.....
    This is probably because that Segment field don't have any value and hence missing from IDOC.
    What can be the possible approach for Solving this probelm?

    Hi Abhishek,
    Can you please get the solution for such issue?
    I didnt aware of Enhancement Spot...
    Looking for your reply..
    Regards,
    Raghu
    Edited by: Raghu Raman on Jan 5, 2009 1:27 PM

  • SEGMENT field updation while Move-In creation (BAPI_ISUMOVEIN_CREATE)

    Hi,
    We are creating Move-In using BAPI_ISUMOVEIN_CREATE.
    But we found that in this BAPI, there is no provision to maintain the SEGMENT field for the Contract.
    Can you suggest any alternate solution to maintain the same.
    Kind Regards,
    Vandana

    Try to use this function module:
    ISU_S_MOVE_IN_CREATE   it will create with segment.
    Regards,
    Siva

  • Custom IDOC type Segment-field length change

    Hello,
    We have a custom segment developed for triggering Outbouds. I'm tring to change the Field length of a deta element used for one of the fields in the segment.
    But after chaning the data element and activating it also, the changes are not effecting in WE31/ in the structure of the segment.
    Process I'm following:
    we31 <segment>
    ......cancel release
    Change data element and activate
    ....set release.
    Please suggest if something else can be done
    Thanks,
    Lucky.

    > @Sarvesh: The IDOC segment has been released.  I also re-imported the IDOC into XI - is that what you mean by 'reloaded'?
    No, re-importing in XI is different from reloading the metadata into ABAP stack of XI using IDX2 transaction. So if you have not done this, then this could be the main reason of truncating the length.
    Regards,
    Sarvesh

  • Idoc - Sale Order - Field Updation

    Hi,
    In Idoc , Incoming Idoc which is creating Sale order ,  I want to map the field name3 to street2 field of Partner 'AG'.
    The field which is to be updated is STR_SUPPL1 but i am not able to find which field is to llinked to update this field.
    Please suggest.
    Thanks

    Hi,
    We do not have any settings as to how the cost will be updated in VPRS
    Best Regards
    surya

  • Segment/Field name for Unplanned delivery costs in Inbound Invoic Idoc?

    Hi Folks,
    Will you please let me know the name of the segment/field (IDoc type INVOIC) for unplanned delivery costs on Inbound Invoic Idoc??
    Thanks,
    Matt

    Hi,
    Am facing the same issue and did tried the E1EDS01 segment. SUMID = 20 and passing the value to field BEZNK, but its not updating the value.
    Could you please give me some more info. how to achieve it.
    Thanks,
    Aniket Korde

  • Idoc segment for updating Sales order item dates

    Hi All,
    I would ike to update the sales order item dates (loading date, Goods Issuance date etc) from an IDOC.
    please let me know the Idoc segment and fields that need to be filled in?
    Thanks in advance.
    Regards,
    Zeeshan.

    Hi,
    Here are some details of the segments in the idocs -
    SEGNAM Segment Name E1EDL20
    VBELN Sales and Distribution Documen 180001539
    SEGNAM Segment Name E1EDL18
    QUALF IDOC Qualifier: Control (Deliv PIC : Picking with flow records (inbound)
    SEGNAM Segment Name E1EDL18
    QUALF IDOC Qualifier: Control (Deliv PGI : Post delivery goods issue (inbound)
    SEGNAM Segment Name E1EDT13
    QUALF IDOC Qualifier: Date (Delivery 010 : Picking
    NTANF Constraint for activity start 20090808
    ISDD Actual start: Execution (date) 20090808
    SEGNAM Segment Name E1EDL24
    POSNR Item number of the SD document 10
    MATNR Material Number 1112
    WERKS Plant SG01
    KDMAT Material belonging to the cust 1112
    LFIMG Actual quantity delivered (in 55
    VRKME Sales unit EA
    POSEX External item number 10
    ORMNG Original Quantity of Delivery 55
    SEGNAM Segment Name E1EDL41
    QUALI Qualifier for Reference Data o 001 : Purchase order data of customer
    BSTNR Customer purchase order number 4500004668
    BSTDT Customer purchase order date 10
    POSEX Item Number of the Underlying 10
    SEGNAM Segment Name E1EDL37
    Regards,
    Shamma

  • Replaced value is not getting relected in IDOC segment field

    Hi,
    Need your help for the below issue.
    I am replacing the PO # with Delivery Doc # . But the replaced value is not getting reflected in the IDOC segment field(e1bp2017_gm_item_create-po_number.).
    Function Module  which I am using is IDOC_INPUT_MBGMCR as a copy.
    Here is my code given below:
    SELECT
                SINGLE vbeln
                  INTO lx_vbeln
                  FROM lips
                 WHERE vgbel EQ e1bp2017_gm_item_create-po_number.
    Move lx_vbeln TO e1bp2017_gm_item_create-po_number.
    MOVE-CORRESPONDING e1bp2017_gm_item_create
                   TO goodsmvt_item.
    Then this is passed as  TABLE in "BAPI_GOODSMVT_CREATE".
    Please do the needful.

    Hi Dheepa,
    Check it in debug whether the filed is empty or having po#, when ur code is executed for the replacement. if it is empty, po# is populated after ur code. in this case you need to write the code in suitable place.
    Reddy

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

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

    Resolved.

  • Missing/left-out segments/fields in IDocs - best practise

    Hi all,
    when SAP generates IDocs, occationally certain field/segments, instead of being blank, will not
    show up at all which causes mappings in XI to go awry. For instance, in a two line sales order,
    when you set a reason for rejection for order line 2, the corresponding line in the IDoc will have a
    ABGRU field populated with the reason of rejection's code, however the first line will not have a
    blank ABGRU field but instead it will not have any at all. Now, when you do the mapping of those
    to lines, because the first line doesn't have this field, the ABGRU queue will hold only one value
    which in all probability will end up in the first line when it should be mapped to the second.
    At this point, in lack of a better solution, what I'm doing is to add ABAP code to user exits and
    add a blank/dummy ABGRU field to the lines that do not have any in order to be able
    to map the IDoc correctly. That works but its not ideal. What other options are there?
    Am I missing something obvious?
    Thanks for your input.
    Frustrated,
    Sven

    Hi,
    You could try appending the node function mapWithDefault after the field so that the it will always have a default value instead of being suppressed.
    Hope this helps,
    Mark

  • Inbound idocs segment fields

    Hi,
    Iam new to idocs and a functional consultant. I need to know whenever we receive the inbound idocs and if i see the segments of the inbound idoc, do the fields which i see in the segments are the sap fields.????/ for instance if the inbound idoc needs to create a sales order, then the fields of the segments of such an inbound idoc are the normal sap sales order fields ??
    do i need to give functional specs to the abapers that whenever the inbound idocs is received the segments fields need to be mapped to sales order fields if such an idoc needs to create a sales order ??
    regards
    sachin

    Hi Sachin,
    Most of the IDoc segment fields are simmilar to SAP transaction fields e.g. most of the ORDERS IDoc segment fields will be simmilar to what you can see in VA01/VA02 screen fields.
    Some fields may have different names.
    In the case of few segments which may repeate in IDoc with different qualifiers (such as partner details, date segments), fields will be same but different qualifier value decides where these field values will be populated in the Order.
    If you are using standard function module to create Order, it will take care of mapping IDoc segment fields to VA01/VA02 screen fields. But if it is a Z function module, then you need to specify the mapping.
    Hope this information will help you.
    Regards,
    Mahesh Pakhale

  • Value for IDoc Segment field SEGMENT

    Hello,
    In the Integration Repository, while creating Message Mapping between a flat file (inbound) & an IDoc (outbound), I'm getting an error that not all target fields are mapped. In the target structure (IDoc), each segment has a field named <b>SEGMENT</b>. Can someone please tell me what value should go here. These are not part of the IDoc but seem to be a requirement in XI message mapping.
    There is also a segment called <b>BEGIN</b> (<u>Type</u> - xsd:string) which is defined as required. Please write as to what should be populated in this segment.
    Any help is greatly appreciated.
    Thanx in advance.
    Homiar.

    My current scenario is
    File Adapter -
    > XI -
    > SAP R/3 (Idoc Adapter).
    I will be using FIDCPP2 IDOC.  
    1. For an instance following is the structure, in this case how can I achieve getting a set of data in one IDOC and another set in other IDOC based on document no.
    CC        Doc No.        line items        
    UK01         456                 1
    UK01         456                 2  -
    > IDOC 1
    UK03         456                 3
    UK04         450                 1
    UK04         450                 2 -
    > IDOC 2
    UK04         450                 3
    i). Is there any way to create instances of idocs in XI or any alternative way out.
    ii). Where/ how can I give the condition, that based on Document No. should create another IDOC instance.

  • Idoc Segment Fields

    Hi,
    I am having a problem with the display of idoc segment fields. When i check the Idoc segment contents in WE02 it is displaying the fields which dont have the value in the DB table along with the fields which have the data. To avoid this what is the procedure. I dont want to display the fields in the content of segment which does not contains the data.
    Plz help me out.
    Regards
    Santosh

    Hi,
    U have to use for reduced message type...U need to filter the segments which  u don't want...In BD53 u need to create reduced message type....
    plz go through the below link..
    http://help.sap.com/saphelp_erp2005/helpdata/en/d3/06f6679aaf0e44b67ca6d6b58d91df/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/0b/2a6702507d11d18ee90000e8366fc2/content.htm
    Regards,
    Nagaraj

  • IDOC filter at Field / Segment Level

    Hi
    Can you please tell me how to set an IDOC filter at field and segment level in short?
    Thanks

    Hi,
    There are two filtering in IDoc.
    Segment Filtering:
    Segment filtering can be achieved using T/Code BD56. Here you can suppress a whole segment irrespective of data inside it . You have to give Message Type / Sender Prrtner / Receiver Partner.
    Data Filtering:
    Data filtering can be done in dustribution model (BD64) where you can restrict whole IDOCS or partials IDOCS to be send based on data in fields inside IDOC depending on whether the segment in which you filter is at the highest level or at a lower level. For example in MATMAS if you put a filter of E1MARCM for a particular plant , only data for this plant will go and other plants will be ignored.
    Please check this link for detail information.
    http://help.sap.com//saphelp_470/helpdata/EN/0b/2a611c507d11d18ee90000e8366fc2/frameset.htm
    Hope this will help.
    Regards,
    Ferry Lianto
    Please reward points if helpful.

  • Idoc segment field - maximum length ?

    Hi,
    what is the maximum of characters in a segment field of an idoc ?
    regards,
    Hans

    Max length = 1000 characters
    Check out
    http://help.sap.com/saphelp_nw04/helpdata/en/1c/9fad3a05fdb92de10000000a114084/content.htm
    FYI
    ALE Interface
    The following objects are generated from the application function module:
    · Message, IDoc structure and segments: Mapping of the complex data type
    · Outbound function module: Each IDoc always contains one application object only
    · Inbound function module: IDocs are always transferred to the application individually or in packets of objects.
    · Customizing objects required for the run
    Assigning names to generated objects
    · Default message (maximum 30 characters) proposed from the function module name.
    · IDoc (maximum 30 characters) is derived from the message – the last two characters are extended by 01 (message <= 28 characters) or are replaced by 01 (message > 28 characters).
    · Generated function module name
    Outbound (maximum 30 characters): ALE_function module name (default)
    Inbound (maximum 30 characters): IDOC_INPUT_message (default)
    · Segments
    The default segment name begins with E1 for SAP and Z1 for customers, or namespace /.../. A meaningful and unique segment name is assigned as follows:
    - In the application system (maximum 27 characters):
    The segment name is derived from the structure name:
    · If the structure name is shorter than 24 characters, the segment name is copied directly.
    · If the structure name is longer than 23 characters, it is shortened to 23 and the “less important” characters at the front are cut off. The remaining characters are used to form a number that establishes the uniqueness of the shortened name. If numbers 01 to 99 are used, assignment continues with numbers 100 to 999 until the segment name becomes unique. This ensures that new segment names are created for the same structure, when this structure is used many times in a complex data type.
    Hope this’ll give you idea!!
    P.S award the points.
    Good luck
    Thanks
    Saquib Khan
    "Some are wise and some are otherwise"

Maybe you are looking for

  • How do I keep the data on a line graph from overlapping?

    The numeric data on points on the graph that are close is overlapping, so you see two numbers in the same place.  We can't figure out how to fix this. 

  • KM Repository Manager

    Hi Experts,     Please give the code or documentation to develop the <b>KM Repository Manager</b> in NWDS.  Regards, Venkatesh.K. Points will be awarded.

  • Printing "for" loop interations

    Currently I'm stuck. I can't get more than the first interation of the two loops to print out on the same line. I can get the code to print all the interations if I run the loops seperately. But I'm trying to get the output of the two loops to print

  • Need a suggestion - Can I use Livecycle Output ES as below

    My company needs to generate documents on the fly and we are looking to find a solution where we can associate the data elements with the PDF template fields and at runtime we fill in application data to generate the documents. We don't need anything

  • Video size in iDVD

    I've got some old film clips on video and they look bad full-screen. How can I get iDVD to play them back half screen or less? thanks DB