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