Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

IDOC vs BONNUMER

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Go thru this table and FM.

Table : EDIDC

FM: IDOC_GET_APPLICATION_OBJECT

Regards

Srinu

4 REPLIES 4

Former Member
0 Kudos

Hi,

Go thru this table and FM.

Table : EDIDC

FM: IDOC_GET_APPLICATION_OBJECT

Regards

Srinu

0 Kudos

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>

former_member404244
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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