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

Similar Messages

  • Finding the correspponding IDoc No's for values in a segment of the Idoc

    Hi,
    I have around 100 work order numbers, based on which I want to find out the failed Idoc numbers. These work order numbers are part of one of the segment fields in IDocs. I know the message type of the IDocs.
    I do not want to use transaction WE09 as it would be too time consuming, entering one work order number and finding the correspponding IDoc. Is there a way of finding all the correspponding IDoc numbers for the work order numbers that I have at one go.
    Any help would be greatly appreciated.
    Thanks and Regards,
    Mick

    Thanks Raja.
    But I dont want to write a report. I was just want to get the IDoc numbers using a table or a function module. Any idea if using Transaction SE16N can help?
    If yes how should I go about it, as I have already tried querying table edid4 passing all the work order numbers. But no result. What I have observed is that the data is stored in the field application data in the table and to get data querying the table, passing the work order number might not be possible. As the application data contains a lot of other data also.
    Regards,
    Mick

  • 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

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

  • Finding Mendatory fields in an segment of an IDOC

    Hi All,
    Can anyone tell me how to find out the mendatory fields required in a segment of an IDOC if we are going to upload data using IDOC technology.
    Thanks in Advance.

    Hi,
    Pls go thriugh the following forum link:
    Re: IDoc Mandatory feilds
    Regards,
    PePe

  • Finding Mendatory fields in a segment of an IDOC

    Hi All,
    Can anyone tell me how to find out the mendatory fields required in a segment of an IDOC if we are going to upload data using IDOC technology.
    Thanks in Advance.

    Hi Ginger,
    Can anyone tell me how to find out the mendatory fields required in a segment of an IDOC if we are going to upload data using IDOC technology.
    The fields in the IDOC can never be made mandatory but the Segments in the IDOC can be made mandatory.
    If segment is mandatory it means that atleast one field in the Segment should be filled.
    generally while defining the IDOC Header data is made as the mandatory segment with Minimum number  1 Maximum number  1 and rest all as optional and can occur more than once.
    Hope this clarifies!
    Regards
    Shital

  • 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

  • Unable to change the length of field in idoc segment

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

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

  • Get the value of a particular field in a segment of an Idoc

    Hi All,
    I have a requirement where I need to write a report which will fetch the value of a particular field in a segment of an idoc.
    I have the idoc number segment and field name as input parameters by which I can fetch Sdata from EDID4 but the confusion is how to find the exact field value from that Sdata. How to Map the SDATA to the segment structure.
    Please advice...

    Hi,
    I have one last doubt that may be you people can help with... The user will be giving the segment name and field name as input. So by following Kesav's code while i can get all the values in the segment structure at runtime please suggest how to display any one field from that structure given that that particular field will come at runtime.
    EX: user gives an idoc number 123 (say belonging to Orders basic type)
                                 segment E1EDK01
                                 field  BELNR.
    So i need to display the value of E1EDK01-BELNR of idoc number 123.
    Please suggest how to achieve this....

  • Missing fields in IDoc FIDCCP02

    Hello Experts ,
    I am using FIDCCP02 IDoc to create a customer invoice.My item level data contains a field XMWST (Calculate Tax) which i can not find anywhere in the IDoc.Even BSEG-ANFBN ,BSEG-ANFBU,BSEG-ANFBJ,BSEZ-EGMLD,BSEG-HZUON fields are not present in the IDoc.I am mapping the above fields using LSMW.Please let me know how to map the above also it would be helpful if these fields are named differently in the above IDoc.
    Thanks and regards,
    Vijay Simha CR
    Moderator message : Duplicate post locked. Continue with the earlier post [Missing fields in IDoc FIDCCP02|Missing fields in IDoc FIDCCP02].
    Edited by: Vinod Kumar on Aug 31, 2011 5:45 PM

    Hello Shafiq,
    Thanks for your comment. I think it's a good idea to deactivate option to send IDocs immediately and create an own job to trigger it regularly. It would be great if according user exits would be triggered also only when the IDoc job starts. Otherwise I would have to create a copy of RSNASTED and enhance it to fill according values. Depending on the outcome I'll reward your anwser. Nevertheless thank you very much until then.
    Eddy

  • Idoc segment field length changes

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

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

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

  • SQL Select using LEFT OUTER JOIN returning field values when I expect NULL

    I am having problems with this select statement:
    SELECT distinct pl.id, th.trip, pc.country, pph.location
    FROM people_list pl, people_travelhistory th, people_country pc
    LEFT OUTER JOIN people_info pph on pph.id=pl.id and pph.country=pc.country
    where people_list.active='Y' and people_list.id=th.id and th.trip = pc.trip;
    The criteria is that the pph table may not have no record for that id and country.
    The problem is that the pph.location field is returned with data even when no matching record for that id or country exists.
    If the record doesn't exist in the pph table, I want pph.location = NULL
    What am I doing wrong?
    Thanks in Advance!
    Developer

    Hi, You can try this :
    SELECT distinct pl.id, th.trip, pc.country, pph.location
    FROM people_list pl, people_travelhistory th, people_country pc
    left outer join people_info pph on pph.id = pl.id
    left outer join people_country pc on pc.country = pph.country
    left outer join people_travelhistory th on th.id = pl.id
    where pl.active='Y' and th.trip = pc.trip;
    Knowing that you requesting people active that have travelled to their own country.
    Regards

  • 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

Maybe you are looking for