12-05-2007 11:42 AM
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.
12-05-2007 11:50 AM
Hi,
Go thru this table and FM.
Table : EDIDC
FM: IDOC_GET_APPLICATION_OBJECT
Regards
Srinu
12-05-2007 11:50 AM
Hi,
Go thru this table and FM.
Table : EDIDC
FM: IDOC_GET_APPLICATION_OBJECT
Regards
Srinu
12-05-2007 12:17 PM
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>
12-05-2007 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
12-05-2007 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