on 10-30-2013 6:49 AM
Hi, I'm trying to extract more detailed information from an Idoc. Currently I have to extract the data from the table using EDID4 and then manipulate the file to get the data required.
I've also tried creating a SQVI to extract data, but this still does not allow me to extract data by article etc.
Is there another way that I can extract data from an Idoc, or view details without having to extract the info via EDID4?
Once created the idoc, you can use the FM 'IDOC_READ_COMPLETELY' passing the idoc number
CALL FUNCTION 'IDOC_READ_COMPLETELY'
EXPORTING
DOCUMENT_NUMBER = INPUT1
IMPORTING
IDOC_CONTROL = IDOC_CONTROL
NUMBER_OF_DATA_RECORDS = NUMBER_OF_DATA_RECORDS
NUMBER_OF_STATUS_RECORDS = NUMBER_OF_STATUS_RECORDS
TABLES
INT_EDIDS = INT_EDIDS
INT_EDIDD = INT_EDIDD
EXCEPTIONS
DOCUMENT_NOT_EXIST = 1
DOCUMENT_NUMBER_INVALID = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
After that !!
you can use a loop to see the idoc data and save it in each variable that you need to declare.
LOOP AT INT_EDIDD into lv_edidd.
IF lv_edidd-segnam = 'E1EDK01'.
purchase_order_number = lv_edidd-sdata+83(35).
ENDIF.
ENDLOOP.
hope it helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
96 | |
10 | |
9 | |
6 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.