09-09-2008 11:35 AM
Hi,
I want to send some vendor details from SAP side to other system.And for that I am submitting BD14 using some vendor numberand message type cremas.
Now whenever we execute BD14 transaction with a vendor it will create one idoc number.
Now please let me know can we get this idoc number?
If i go to we02 i can see that but i want the table from where i can get this idoc number as i want show it in my final report output.
Edited by: Julius Bussche on Sep 12, 2008 4:45 PM
09-13-2008 7:21 AM
Hi
Its very simple.
Use function module SREL_GET_NEXT_RELATIONS
where :
GWA_OBJECT-OBJKEY = VENDOR_NUMBER.
GWA_OBJECT-OBJTYPE = 'LFA1'.
CALL FUNCTION 'SREL_GET_NEXT_RELATIONS'
EXPORTING
OBJECT = GWA_OBJECT
TABLES
ROLES = GT_ROLES .
DELETE GT_ROLES WHERE OBJKEY EQ VENDOR_NUMBER AND OBJTYPE EQ 'LFA1'.
After that, you will get IDOC number in the OBJKEY field where OBJTYPE = 'IDOC'
09-09-2008 1:03 PM
Hi,
You can get more details from tables EDIDC, EDID4 and EDIDS tables.
Regards,
Naresh.
09-09-2008 6:30 PM
Hello,
If you want to Programatically get the Most recent IDoc Number which was generated, then use the GET PARAMETER ID "DCN" to get the Latest IDoc Number.
However, if you want to view the most recent IDoc in any transaction, goto either WE02 / WE05 and specify your message type / IDoc Type / Extension. Or go to WE19, then the First thing that you'll see is the Most recent IDoc Number which was generated. Copy the IDoc Number and then go to WE02 / WE05 to view the Same IDoc.
Hope that was helpful.
Thanks and Regards,
Venkat Phani Prasad Konduri
09-12-2008 2:55 PM
But as i am executing my program with multiple vendor so multiple idoc can be generated.
And I need all those idoc number.
GET PARAMETER ID 'DCN' will going to give me only one idoc right?
09-12-2008 9:06 PM
i think your fastest option is to go to the table EDIDC
in your query pass the sy-datum (or any date ) value to the field UPDDAT , also give the field MESTYP the value 'CREMAS'
obviously the problem with that is that it will return all the idocs created on that day , so , you also have to "play" with the field UPDTIM to select the lastest idocs created
you might as well do a subquery selecting the last hour that an idoc that you are using was created and then give like a range of 5 minutes or something like that (i dont know how often do you create an idoc)
hope this will help you
09-13-2008 7:21 AM
Hi
Its very simple.
Use function module SREL_GET_NEXT_RELATIONS
where :
GWA_OBJECT-OBJKEY = VENDOR_NUMBER.
GWA_OBJECT-OBJTYPE = 'LFA1'.
CALL FUNCTION 'SREL_GET_NEXT_RELATIONS'
EXPORTING
OBJECT = GWA_OBJECT
TABLES
ROLES = GT_ROLES .
DELETE GT_ROLES WHERE OBJKEY EQ VENDOR_NUMBER AND OBJTYPE EQ 'LFA1'.
After that, you will get IDOC number in the OBJKEY field where OBJTYPE = 'IDOC'
09-13-2008 8:39 AM
Thanx Asik.This Function module is very helpful for me and it will solve my purpose...
Thank You all for all your effort.
Thank You very much
09-13-2008 8:45 AM