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

IDOC vs BONNUMER

Hi. I have an IDOC number. How to check from the level of code (some FModules?, examples) which BONNUMER is in that IDOC?

I try:

DATA: INT_EDIDD LIKE EDIDD OCCURS 0.

  CALL FUNCTION 'EDI_DOCUMENT_OPEN_FOR_EDIT'
       EXPORTING
            DOCUMENT_NUMBER               = '0000000014184173'
*           ALREADY_OPEN                  = 'N'
*      IMPORTING
*           IDOC_CONTROL                  =
       TABLES
            IDOC_DATA                     = INT_EDIDD
       EXCEPTIONS
            DOCUMENT_FOREIGN_LOCK         = 1
            DOCUMENT_NOT_EXIST            = 2
            DOCUMENT_NOT_OPEN             = 3
            STATUS_IS_UNABLE_FOR_CHANGING = 4
            OTHERS                        = 5.

but INT_EDIDD is empty 😔 I'd be very thankful for some complete tutorial code.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2007 at 11:50 AM

    Hi,

    Go thru this table and FM.

    Table : EDIDC

    FM: IDOC_GET_APPLICATION_OBJECT

    Regards

    Srinu

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      1. The EDIDC table has no BONNUMER

      2. I try

      DATA: o_type LIKE TBD05-FOBJTYPE.
      DATA: o_id LIKE TBD05-FOBJVALUE.
      
      CALL FUNCTION 'IDOC_GET_APPLICATION_OBJECT'
        EXPORTING
          idoc_number = '14184173'
        IMPORTING
          object_type = o_type
          object_id = o_id
      .

      but I receive an error: B1 283 <i>No ALE link object has been defined for the WPUFIB message type.</i>

  • Posted on Dec 05, 2007 at 12:30 PM

    Hi,

    First of all check the BONNUMBER in ur idoc,go to each segment and search for the field.as u r getting the data into i_edidd internal table..

    Now loop the i_edidd internal table and basing on segment name catch ur bonnumber field

    like this

    LOOP at i_edidd.

    case i_edidd-segnam.

    when '<segname>'.

    bonnumber = i_edidd+0(10).

    endcase

    endloop.

    here i am just giving some value for i_edidd+0(10)...u have to check it in ur cae.

    Regards,

    Nagaraj

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2007 at 12:43 PM

    Hi,

    U r getting that error b'coz that fn. module will be used sy-mandt to fetch records.

    I think these will work in ur case. Try with these. U will have more than one record for each docnumber so, use condition with ur seg.name in selection criteria.

    SELECT * FROM EDID4 APPENDING CORRESPONDING FIELDS OF

    TABLE LIST_CONTAINER_PROCESS

    WHERE DOCNUM EQ DOCNUM.

    SELECT * FROM EDID2 APPENDING CORRESPONDING FIELDS OF

    TABLE LIST_CONTAINER_PROCESS

    WHERE DOCNUM EQ DOCNUM.

    SELECT * FROM EDIDD_OLD APPENDING CORRESPONDING FIELDS OF

    TABLE LIST_CONTAINER_PROCESS

    WHERE DOCNUM EQ DOCNUM.

    regards,

    Subbu

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.