Finding Idoc Number
Hi,
Can some one tell me how to identify an iDOC number for an sales order in CRM.
Regards,
Raj
Hi Praveen,
ITs very easy ....
Use function module
FM SREL_GET_NEXT_RELATIONS
logic :
L_R_OBJECT-OBJKEY = Likp-VBELN.
L_R_OBJECT-OBJTYPE = LIKP.
CALL FUNCTION 'SREL_GET_NEXT_RELATIONS'
EXPORTING
OBJECT = L_R_OBJECT
ROLETYPE =
RELATIONTYPE =
MAX_HOPS = 1
TABLES
LINKS =
ROLES = L_T_relROLES
EXCEPTIONS
INTERNAL_ERROR = 1
NO_LOGSYS = 2
OTHERS = 3
DELETE L_T_RELROLES WHERE OBJKEY EQ VBELN AND OBJTYPE EQ OBJTYPE.
After this in the L_T_RELROLES table u can find the idoc number in the field OBJKEY
Please check this.... its works and let me know if u need any further help.
......Patil
Similar Messages
-
Problem in finding Idoc number from Delivery document number(VERY URGENT)
Hi experts,
I have a delivery document number.Now i have to find the Idoc number for thet delivery document and extract some necessary data from one of the segment of that Idoc.So I am not able to find a link through tables .
So I exact query is 'what is the selection method i have to follow to get the idoc number given the delivery document number'.
Regards,
Praveen.
Edited by: Praveen Jada on Mar 14, 2008 12:15 PMThat's what I meant, do the following query:
DATA: LT_DOCNUM TYPE TABLE OF EDI_DOCNUM.
SELECT DOCNUM
INTO TABLE LT_DOCNUM
FROM EDID4
WHERE SEGNAM EQ 'E1EDL20'
AND SDATA EQ '0001234567%'.
This will list you all the IDOC numbers in which delivery number 0001234567 appear in the delivery header segment.
Depending on your process it's probably going to be one entry only.
Hope that clarifies it,
Michael -
in WE02, I find the receiving idoc number 24792 in client 800, the partner number shows client 500, how to know the sending idoc number in client 500? thanks
Hi,
The issue is solved. It seems that a parameter is missing in user profile as per our basis guy.
Thank you
Ravi Boppana -
To find IDoc number for a Scheduling agreement.
Hi all,
I am new to this area. I need to find out IDoc number for a Scheduling agreement. I have been instructed to go to VA33. And then after entering SA number and going in they instructed me to systems--> service for objects. But when I go there it is giving me message "NO SERVICE AVAILABLE". Can anyone help me out with this.
Thanks in advance.
Ravi BoppanaHi,
The issue is solved. It seems that a parameter is missing in user profile as per our basis guy.
Thank you
Ravi Boppana -
I have created some outbound IDOCs for a PO. Is there an easier way to programatically find the IDOC numbers corresponding to the PO ? (Other than querying on EDID4 table and scanning the SDATA field ).
THanks.Hi Shareen,
To get IDOC no from a PO no you will have to write a custome function module to do this,
you can use the follwing code for custome function module, which will take PO number, IDOC message type and Idoc type(basic type) as an input parameter and provide details of the IDOCs.
FUNCTION ZSTEST.
""Local interface:
*" IMPORTING
*" REFERENCE(PONUMBER) LIKE EKKO-EBELN
*" REFERENCE(MESTYP) LIKE EDIDC-MESTYP
*" REFERENCE(IDOCTYPE) LIKE EDIDC-IDOCTP
*" TABLES
*" IDOCINFO STRUCTURE EDIDC
DATA: int_edidc TYPE edidc OCCURS 100 WITH HEADER LINE.
DATA: int_edidc1 TYPE edidc OCCURS 100 WITH HEADER LINE.
DATA: int_edidd TYPE edidd OCCURS 100 WITH HEADER LINE.
DATA: time_0 LIKE edidc-updtim VALUE '000000',
time_24 LIKE edidc-updtim VALUE '240000'.
DATA: value1_2 TYPE edipar0002-edi_value.
DATA: SEGMENT1 LIKE EDISYN-SEGTYP value 'E1EDK01'.
DATA: found1_1 TYPE c, found_1 TYPE c.
DATA: offset1_1 TYPE i value '84', end1_1 TYPE i value '118'.
RANGES : CRETIM FOR EDIDC-CRETIM,
CREDAT FOR EDIDC-CREDAT,
UPDTIM FOR EDIDC-UPDTIM,
upddat FOR EDIDC-upddat,
direct FOR EDIDC-direct,
docnum FOR EDIDC-docnum,
status FOR EDIDC-status,
IDOCTP FOR EDIDC-IDOCTP,
cimtyp FOR EDIDC-cimtyp,
mestyp1 FOR edidc-mestyp,
sndpor FOR EDIDC-sndpor,
sndprt FOR EDIDC-sndprt,
sndprn FOR EDIDC-sndprn,
rcvpor FOR EDIDC-rcvpor,
rcvprt FOR EDIDC-rcvprt,
rcvprn FOR EDIDC-rcvprn.
CRETIM-SIGN = 'I'.
CRETIM-OPTION = 'BT'.
CRETIM-LOW = time_0.
CRETIM-HIGH = time_24.
APPEND CRETIM TO CRETIM.
CREDAT-SIGN = 'I'.
CREDAT-OPTION = 'BT'.
CREDAT-HIGH = SY-DATUM.
APPEND CREDAT TO CREDAT.
UPDTIM-SIGN = 'I'.
UPDTIM-OPTION = 'BT'.
UPDTIM-HIGH = time_24.
APPEND UPDTIM TO UPDTIM.
IDOCTP-SIGN = 'I'.
IDOCTP-OPTION = 'EQ'.
IDOCTP-LOW = IDOCTYPE.
APPEND IDOCTP TO IDOCTP.
mestyp1-SIGN = 'I'.
mestyp1-OPTION = 'EQ'.
mestyp1-low = mestyp.
APPEND mestyp1 TO mestyp1.
found1_1 = ' '.
found_1 = ' '.
SELECT * FROM edidc INTO TABLE int_edidc
WHERE upddat >= credat-low
AND cretim IN cretim
AND credat IN credat
AND updtim IN updtim
AND upddat IN upddat
AND direct IN direct
AND docnum IN docnum
AND status IN status
AND idoctp IN idoctp
AND cimtyp IN cimtyp
AND mestyp IN mestyp1
AND sndpor IN sndpor
AND sndprt IN sndprt
AND sndprn IN sndprn
AND rcvpor IN rcvpor
AND rcvprt IN rcvprt
AND rcvprn IN rcvprn
ORDER BY PRIMARY KEY.
LOOP AT INT_EDIDC.
IF NOT PONUMBER IS INITIAL.
CLEAR INT_EDIDD.
REFRESH INT_EDIDD.
CALL FUNCTION 'IDOC_READ_COMPLETELY'
EXPORTING
document_number = int_edidc-docnum
IMPORTING
IDOC_CONTROL =
NUMBER_OF_DATA_RECORDS =
NUMBER_OF_STATUS_RECORDS =
TABLES
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.
IF NOT segment1 IS INITIAL.
LOOP AT int_edidd WHERE segnam = segment1.
found1_1 = ' '.
SEARCH int_edidd-sdata FOR PONUMBER STARTING AT offset1_1
ENDING AT end1_1.
IF sy-subrc = 0.
found1_1 = 'X'.
ENDIF.
IF found1_1 = 'X'.
MOVE-CORRESPONDING int_edidc TO int_edidc1.
APPEND int_edidc1.
CLEAR int_edidd-sdata.
found_1 = 'X'.
EXIT.
ENDIF.
ENDLOOP.
IF found_1 = 'X'.
IDOCINFO[] = int_edidc1[].
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.
ENDFUNCTION. -
Finding an idoc number from a given sales document
hi,
please send me the code for the finding idoc number for a given sales document.
it is urgent............
thanks in advance..........I written the code to find the idoc number for given Purchase order number,so you can change the code depends on your requirement
TYPE-POOLS: slis.
tables : edid4 , edidc ,edids ,lfa1,teds2.
DATA: t_fieldcatalog TYPE slis_t_fieldcat_alv.
DATA: s_fieldcatalog TYPE slis_fieldcat_alv.
DATA: s_layout TYPE slis_layout_alv.
DATA: text11 LIKE E1EDP02.
DATA: text111 LIKE E1MBXYI.
DATA: s_keyinfo TYPE slis_keyinfo_alv.
DATA: v_repid TYPE syrepid.
DATA: V_MSGNO LIKE T100-MSGNR.
*DATA: V_TEXT(90).
DATA : WA_EDIDS TYPE EDIDS.
data : begin of itab_edids occurs 0,
user like edids-UNAME,
date like edids-CREDAT,
time like edids-cretim,
idoc like edids-docnum,
MESSAGETYPE like edidc-MESTYP,
VENDOR LIKE EDIDC-SNDPRN,
name like lfa1-name1,
icon(1),
EXPAND TYPE C,
end of itab_edids.
data : itab type edid4.
data : begin of itab_edidc occurs 0,
doc_num like edidc-docnum,
MESSAGETYPE like edidc-MESTYP,
IDOCTYPE like edidc-DOCTYP,
PARTNERNUMBER like edidc-RCVPRN,
PARTNERTYPE like edidc-RCVPRT,
MESSAGECODE like edidc-MESCOD,
VENDOR LIKE EDIDC-SNDPRN,
data like edidc-credat,
*include structure edidc.
end of itab_edidc.
data : begin of itab_status occurs 0,
idoc like edids-docnum,
date_stauus like edids-logdat,
status_counter like edids-countr,
staTus like edids-status,
*descrp like teds2-descrp,
DESCRP(70),
ponumber like ekpo-ebeln,
MESS LIKE edidc-MESTYP,
*appdoc like edids-stapa1,
end of itab_status.
data : text like edid4-sdata.
DATA: text1 LIKE E1EDK01.
data : begin of itab_teds1 occurs 0.
include structure teds1.
data end of itab_teds1.
*selection-screen begin of block sb with frame title text-001.
*select-options:
s_rsdat for edidc-CREDAT.
*selection-screen end of block sb.
DATA: f_fieldcatalog TYPE slis_fieldcat_alv.
selection-screen begin of block sb with frame title text-001.
parameters:
p_su radiobutton group gp1,
p_re radiobutton group gp1,
p_al radiobutton group gp1.
select-options:
s_rsdat for edids-creDAT,
s_user for edids-uname.
selection-screen end of block sb.
initialization.
PERFORM INITIALIZATION.
start-of-selection.
PERFORM DATA_RETRIVAL.
PERFORM DATA_BASED_SELECTION.
PERFORM PASSING_ALV.
*select docnum mestyp doctyp rcvprn rcvprt mescod credat into
*table itab_edidc from edidc
*where credat in s_rsdat.
*CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
*EXPORTING
*i_program_name = v_repid
*I_INTERNAL_TABNAME = 'ITAB_STATUS'
*CHANGING
*ct_fieldcat = t_fieldcatalog.
*CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
*EXPORTING
*i_program_name = v_repid
*I_INTERNAL_TABNAME = 'ITAB_EDIDS'
*CHANGING
*ct_fieldcat = t_fieldcatalog.
s_LAYOUT-ZEBRA = 'X'.
*s_LAYOUT-SUBTOTALS_TEXT = 'SUBTOTAL'.
*s_LAYOUT-TOTALS_TEXT = 'TOTAL'.
*& Form INITIALIZATION
text
--> p1 text
<-- p2 text
FORM INITIALIZATION.
V_REPID = SY-REPID.
s_keyinfo-header01 = 'IDOC'.
s_keyinfo-item01 = 'IDOC'.
*s_layout-subtotals_text = 'SUBTOTAL TEXT'.
*s_layout-key_hotspot = 'X'.
*s_layout-expand_fieldname = 'EXPAND'.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = V_REPID
I_INTERNAL_TABNAME = 'ITAB_STATUS'
I_INCLNAME = V_repid
CHANGING
ct_fieldcat = T_fieldcatalog
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = V_REPID
I_INTERNAL_TABNAME = 'ITAB_EDIDS'
I_INCLNAME = V_repid
CHANGING
ct_fieldcat = T_fieldcatalog
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3.
f_fieldcatalog-just = 'L'.
MODIFY t_fieldcatalog FROM f_fieldcatalog
TRANSPORTING just
WHERE ( fieldname = 'IDOC' OR FIELDNAME = 'STATUS_COUNTER' ).
f_fieldcatalog-SELTEXT_L = 'Status Message'.
MODIFY t_fieldcatalog FROM f_fieldcatalog
TRANSPORTING SELTEXT_L
WHERE fieldname = 'DESCRP'.
f_fieldcatalog-TECH = 'X'.
MODIFY t_fieldcatalog FROM f_fieldcatalog
TRANSPORTING TECH
WHERE fieldname = 'EXPAND'.
f_fieldcatalog-REPTEXT_DDIC = 'Vendor Name'.
MODIFY t_fieldcatalog FROM f_fieldcatalog
TRANSPORTING REPTEXT_DDIC
WHERE fieldname = 'NAME'.
*f_fieldcatalog-REPTEXT_DDIC = 'V Code 32122'.
*MODIFY t_fieldcatalog FROM f_fieldcatalog
*TRANSPORTING REPTEXT_DDIC
*WHERE fieldname = 'VENDOR'.
ENDFORM. " INITIALIZATION
*& Form DATA_RETRIVAL
text
--> p1 text
<-- p2 text
FORM DATA_RETRIVAL.
select uname credat cretim docnum into table
itab_edids from edids
where credat in s_rsdat and
uname in s_user and
countr = ' '.
select uname credat cretim docnum from edids
*APPENDING CORRESPONDING FIELDS OF TABLE itab_edids
where logdat in s_rsdat and
uname in s_user.
SELECT budat hkont belnr shkzg wrbtr FROM bsas
*APPENDING CORRESPONDING FIELDS OF TABLE it_temp WHERE hkont = w_glacct
*"wa_cb-gl_account
*AND bukrs IN (so_bukrs-low)
*AND budat < so_date-low.
delete adjacent duplicates from itab_edids.
if not itab_edids[] is initial.
select docnum mestyp doctyp rcvprn rcvprt mescod SNDPRN credat into
table itab_edidc from edidc for all entries in itab_edids
where docnum = itab_edids-idoc.
endif.
LOOP AT ITAB_edids.
READ TABLE ITAB_EDIDC WITH KEY DOC_NUM = ITAB_EDIDS-IDOC.
itab_edids-messagetype = ITAB_EDIDC-MESSAGETYPE.
itab_edids-VENDOR = ITAB_EDIDC-VENDOR.
MODIFY ITAB_EDIDS.
CLEAR ITAB_EDIDS.
ENDLOOP.
DELETE ITAB_EDIDC WHERE MESSAGETYPE = 'ORDERS'.
loop at itab_edids.
read table itab_edidc with key doc_num = itab_edids-idoc.
if sy-subrc ne 0.
delete itab_edids.
endif.
endloop.
select docnum logdat countr status into table itab_status from edids for
all entries in itab_edidc where docnum = itab_edidc-doc_num.
LOOP AT ITAB_STATUS.
READ TABLE ITAB_EDIDC WITH KEY DOC_NUM = ITAB_STATUS-IDOC.
ITAB_STATUS-MESS = ITAB_EDIDC-MESSAGETYPE.
MODIFY ITAB_STATUS.
CLEAR ITAB_STATUS.
ENDLOOP.
loop at itab_status.
clear : text ,text1 , text11, text111, itab.
select single descrp from teds2 into itab_status-descrp
where status = itab_status-STATUS AND
LANGUA = 'E'.
select single sdata into text from edid4 where
DOCNUM = itab_status-idoc and
segnam = 'E1EDK01'.
*MOVE: text TO text1,
text1-BELNR TO itab_status-ponumber.
itab_status-ponumber = text1-belnr.
move text+83(30) to itab_status-ponumber.
MODIFY ITAB_STATUS.
clear itab_status.
IF itab_status-MESS = 'WMMBXY'.
select single * from edid4 INTO ITAB where segnam = 'E1MBXYI' AND
HLEVEL = '02' AND DOCNUM = itab_status-idoc.
MOVE : ITAB-SDATA TO TEXT111 ,
text111-EBELN TO itab_status-ponumber.
**text1-BELNR TO ponumber.
ELSE.
select single * from edid4 INTO ITAB where segnam = 'E1EDP02' AND
HLEVEL = '03' AND DOCNUM = itab_status-idoc.
MOVE : ITAB-SDATA TO TEXT11 ,
*text1-EBELN TO ponumber.
text11-BELNR TO itab_status-ponumber.
endif.
MODIFY ITAB_STATUS.
clear itab_status.
endloop.
ENDFORM. " DATA_RETRIVAL
*& Form PASSING_ALV
text
--> p1 text
<-- p2 text
FORM PASSING_ALV.
s_LAYOUT-EXPAND_FIELDNAME = 'EXPAND'.
DATA: t_events TYPE slis_t_event.
DATA: s_events LIKE LINE OF t_events.
s_events-form = 'TOP_OF_PAGE'.
s_events-name = 'TOP_OF_PAGE'.
APPEND s_events TO t_events.
s_layout-lights_fieldname = 'ICON'.
sort itab_status by status_counter descending. " -
mod3
CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
EXPORTING
i_callback_program = v_repid
is_layout = s_layout
it_fieldcat = t_fieldcatalog
i_callback_user_command = 'USER_COMMAND'
i_tabname_header = 'ITAB_EDIDS'
i_tabname_item = 'ITAB_STATUS'
IT_EVENTS = t_events
is_keyinfo = s_keyinfo
TABLES
t_outtab_header = itab_EDIDS
t_outtab_item = itab_STATUS
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " PASSING_ALV
*& Form DATA_BASED_SELECTION
text
--> p1 text
<-- p2 text
FORM DATA_BASED_SELECTION.
if p_su eq 'X'.
*loop at itab_status where status = '53'.
*select single stapa1 from edids into itab_status-appdoc
where docnum = itab_status-idoc and status = '53'.
*delete itab_status where status ne '53'.
*modify itab_status.
*endloop.
delete itab_status where status ne '53'.
loop at itab_edids.
read table itab_status with key idoc = itab_edids-idoc binary search.
if sy-subrc ne 0.
delete itab_edids.
ELSE.
*SHIFT ITAB_EDIDS-IDOC LEFT DELETING LEADING '0'.
MODIFY ITAB_EDIDS.
endif.
endloop.
LOOP AT ITAB_STATUS WHERE MESS NE 'WMMBXY'.
SELECT SINGLE * FROM EDIDS INTO WA_EDIDS WHERE DOCNUM = ITAB_STATUS-IDOC
AND COUNTR = ITAB_STATUS-STATUS_COUNTER.
IF WA_EDIDS-STATXT CA '&'.
V_MSGNO = WA_EDIDS-STAMNO.
IF V_MSGNO NE '000'. "----mod3
CALL FUNCTION 'MESSAGE_PREPARE'
EXPORTING
msg_id = WA_EDIDS-STAMID
msg_no = V_MSGNO
MSG_VAR1 = wa_edids-stapa1
MSG_VAR2 = WA_EDIDS-STAPA2
MSG_VAR3 = WA_EDIDS-STAPA3
MSG_VAR4 = WA_EDIDS-STAPA4
IMPORTING
MSG_TEXT = itab_status-descrp.
CONDENSE ITAB_STATUS-DESCRP.
ENDIF."---- mod3
ELSE .
ITAB_STATUS-DESCRP = WA_EDIDS-STATXT.
ENDIF.
*SHIFT ITAB_STATUS-IDOC LEFT DELETING LEADING '0'.
*SHIFT ITAB_STATUS-STATUS_COUNTER LEFT DELETING LEADING '0'.
MODIFY ITAB_STATUS.
ENDLOOP.
LOOP AT ITAB_STATUS WHERE MESS EQ 'WMMBXY'.
SHIFT ITAB_STATUS-IDOC LEFT DELETING LEADING '0'.
SHIFT ITAB_STATUS-STATUS_COUNTER LEFT DELETING LEADING '0'.
ITAB_STATUS-DESCRP = 'APPLICATION DOCUMENT POSTED'.
MODIFY ITAB_STATUS.
ENDLOOP.
delete adjacent duplicates from itab_edids comparing idoc.
elseif p_re eq 'X'.
loop at itab_status where status = '53'.
delete itab_edids where idoc = itab_status-idoc.
endloop.
loop at itab_status.
read table itab_edids with key idoc = itab_status-idoc binary search.
if sy-subrc ne 0.
delete itab_status.
endif.
endloop.
LOOP AT ITAB_STATUS.
SELECT SINGLE * FROM EDIDS INTO WA_EDIDS WHERE DOCNUM = ITAB_STATUS-IDOC
AND COUNTR = ITAB_STATUS-STATUS_COUNTER.
IF WA_EDIDS-STATXT CA '&'.
V_MSGNO = WA_EDIDS-STAMNO.
IF V_MSGNO NE '000'. "----mod3
CALL FUNCTION 'MESSAGE_PREPARE'
EXPORTING
msg_id = WA_EDIDS-STAMID
msg_no = V_MSGNO
MSG_VAR1 = WA_EDIDS-STAPA1
MSG_VAR2 = WA_EDIDS-STAPA2
MSG_VAR3 = WA_EDIDS-STAPA3
MSG_VAR4 = WA_EDIDS-STAPA4
IMPORTING
MSG_TEXT = itab_status-descrp.
CONDENSE ITAB_STATUS-DESCRP.
endif. "-----mod3
ELSE .
ITAB_STATUS-DESCRP = WA_EDIDS-STATXT.
ENDIF.
SHIFT ITAB_STATUS-IDOC LEFT DELETING LEADING '0'.
SHIFT ITAB_STATUS-STATUS_COUNTER LEFT DELETING LEADING '0'.
MODIFY ITAB_STATUS.
ENDLOOP.
LOOP AT ITAB_EDIDS.
SHIFT ITAB_EDIDS-IDOC LEFT DELETING LEADING '0'.
MODIFY ITAB_EDIDS.
ENDLOOP.
delete adjacent duplicates from itab_edids comparing idoc.
elseif p_al eq 'X'.
delete adjacent duplicates from itab_edids comparing idoc.
LOOP AT ITAB_STATUS." WHERE MESS NE 'WMMBXY'.
SELECT SINGLE * FROM EDIDS INTO WA_EDIDS WHERE DOCNUM = ITAB_STATUS-IDOC
AND COUNTR = ITAB_STATUS-STATUS_COUNTER.
IF WA_EDIDS-STATXT CA '&'.
V_MSGNO = WA_EDIDS-STAMNO.
IF V_MSGNO NE '000'. "----mod3
CALL FUNCTION 'MESSAGE_PREPARE'
EXPORTING
msg_id = WA_EDIDS-STAMID
msg_no = V_MSGNO
MSG_VAR1 = WA_EDIDS-STAPA1
MSG_VAR2 = WA_EDIDS-STAPA2
MSG_VAR3 = WA_EDIDS-STAPA3
MSG_VAR4 = WA_EDIDS-STAPA4
IMPORTING
MSG_TEXT = itab_status-descrp.
CONDENSE ITAB_STATUS-DESCRP.
endif. "----mod3
ELSE .
ITAB_STATUS-DESCRP = WA_EDIDS-STATXT.
ENDIF.
*SHIFT ITAB_STATUS-IDOC LEFT DELETING LEADING '0'.
*SHIFT ITAB_STATUS-STATUS_COUNTER LEFT DELETING LEADING '0'.
MODIFY ITAB_STATUS.
ENDLOOP.
endif.
LOOP AT ITAB_EDIDS.
if p_su EQ 'X'.
itab_edids-icon = '3'.
elseif p_re eq 'X'.
itab_edids-icon = '1'.
ELSE.
read table itab_sTATUS with key idoc = itab_EDIDS-idoc
STATUS = '53' ."binary search.
IF SY-SUBRC EQ 0.
itab_edids-icon = '3'.
ELSE.
itab_edids-icon = '1'.
ENDIF.
ENDIF.
select single name1 from lfa1 into itab_edids-name where
lifnr = itab_edids-vendor.
SHIFT ITAB_EDIDS-IDOC LEFT DELETING LEADING '0'.
MODIFY ITAB_EDIDS.
clear itab_edids.
ENDLOOP.
loop at itab_status.
SHIFT ITAB_STATUS-IDOC LEFT DELETING LEADING '0'.
SHIFT ITAB_STATUS-STATUS_COUNTER LEFT DELETING LEADING '0'.
if itab_status-descrp is initial.
select single descrp from teds2 into itab_status-descrp
where status = itab_status-STATUS AND
LANGUA = 'E'.
endif.
MODIFY ITAB_STATUS.
clear itab_status.
endloop.
sort itab_status by idoc.
sort itab_edids by idoc.
ENDFORM. " DATA_BASED_SELECTION
*& Form TOP_OF_PAGE
text
FORM TOP_OF_PAGE.
SKIP.
ULINE.
IF P_SU EQ 'X'.
WRITE : / 'TITLE : SUCCESSFULLY POSTED IDOC', 50 'DATE :', SY-DATUM..
ELSEIF P_RE EQ 'X'.
WRITE : / 'TITLE : REJECTED IDOCS' ,50 'DATE :', SY-DATUM.
ELSEIF P_AL EQ 'X'.
WRITE : / 'TITLE : ALL IDOCS' ,50 'DATE :', SY-DATUM.
ENDIF.
WRITE :/9 'Successful-Green light Unsuccessful-Red Light'.
format color COL_TOTAL intensified on.
WRITE : / 'NOTE : DOUBLE CLICK TO SEE CORREPONDING IDOC AND PO'.
WRITE :/9 'DOUBLE CLICK IDOC NO ON HEADER LIST'.
WRITE : 'AND PO NUMBER ON DETAIL LIST'.
format color off.
ULINE.
SKIP.
ENDFORM. "TOP_OF_PAGE
FORM user_command *
--> UCOMM *
--> SELFIELD *
FORM user_command USING ucomm LIKE sy-ucomm
selfield TYPE slis_selfield.
DATA: WA_IDOC9 LIKE EDIDC-DOCNUM.
DATA: SELTAB TYPE TABLE OF RSPARAMS,
SELTAB_WA LIKE LINE OF SELTAB.
RANGES : R_DATE FOR EDIDC-CREDAT." SY-DATUM.
IF ucomm = '&IC1'.
if SELFIELD-SEL_TAB_FIELD = 'ITAB_EDIDS-IDOC'.
READ TABLE itab_edids INDEX selfield-tabindex.
IF sy-subrc = 0.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = ITAB_edids-IDOC
IMPORTING
OUTPUT = WA_IDOC9.
*r_date-low = itab_edids-date.
*r_date-high = itab_edids-date.
*r_date-SIGN = 'I'.
*r_date-OPTION = 'BT'.
*append r_date.
SUBMIT RSEIDOC2 WITH DOCNUM = wa_idoc9
WITH CREDAT in R_DATE[] AND RETURN.
ENDIF.
ELSEIF SELFIELD-SEL_TAB_FIELD = 'ITAB_STATUS-PONUMBER'.
READ TABLE itab_STATUS INDEX selfield-tabindex.
IF sy-subrc = 0.
SET PARAMETER ID 'BES' FIELD itab_sTATUS-PONUMBER.
CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
ENDIF.
ENDIF.
ENDIF.
ENDFORM..
Thanks
Seshu -
Hello All,
I am working in HR. If I have a record created by IDOC, is ther any way for finding IDOC number that has created this record.
Regards,
RahulHi Sergie
The ALEAUD is a separate IDoc, so naturally it must have a different number than the original IDoc. However, the field E1STATE/DOCNUM in ALEAUD is a reference to the original IDoc.
How is your ALEAUD generated? If you are doing this "manually" via a message mapping, you need to include the original IDoc number in the message to your receiving system so that it can send an audit message back containing the original IDoc number. From this audit message you should be able to map a correct ALEAUD message.
Regards,
Thorsten -
How to find Idoc Number on sales order screen .Also any table that holds both Idoc number and sales order number?
Appreciate your Help Thanks!Hi
go to header-> output in the sales order and u will find the idoc no there
Ranga -
How to find the number of idocs generated for a customer on the basis of his purchase order in a day ?
Dear Friends,
I am absolutely agree with your answer .
But my question is,
Lets say.....
One customer sending X number of purchase orders in a day , so how many IDocs generated on that specific day for that specific customer .
So, Question is , How can we find the no of sales orders(IDocs) generated for the customers on the specific day ?
Hope you all understood my requirement .
Thanks & Regards,
Aditya -
Finding out Idoc number of the Invoice List
Hi!
how to find out Idoc numberr if I have number of Invoice List?
For example, I have number of Invoice List for checking it in tcode VF22, but how to get Idoc number of the Invoice List in order to check it in WE02?
Will reward,
MindaugasHi,
Use NAST with the invoice to get the latest record for that output type..
use the table CMFP to get the IDOC number..The combination is
NAST-CMFPNR = CMFP-NR..
Then in the column CMFP-MSGV1 you can find the idoc number
<b>Reward points</b>
Regards -
How can we find the Idoc number which posts the material document in SAP
Hi All,
How can we find the Idoc number which posts the material document in SAP. We could not able to find the IDOC number from the material document which was posted by Idoc.
Thanks
ChandruHi,
In MIGO you can go to service of object(Just above show overview) and check 5th option workflow you will find the idoc number.
regards
suresh -
Finding message in SAP Business Connector with IDoc number
Hi Experts,
Since there is no separate forum for Business Connector, posing my question here.
Does anyone have idea how we can find a message in SAP Business Connector if we know the source IDoc number, the same way we use IDX5 in PI.
Thanks,
DhawalAFAIK there is no simple way. What I usually do is compare timestamps. The Idoc is usually processed on the B.C. within the same minute.
We only have up to 10 Idocs within one minute and I do not have to search every day. So it works for me. -
Unable to find the IDOC number in WE02
HI All,
I have executed an outbound program from SM37 and i can see that job got finished in the log.
but when i check the spool, it doesnt contain any list and also i am unable to find the Idoc number in WE02.
I am not clear in this. Please expalin me in detail.Hi there,
Go to Sales order screen, In the main screen below the command line, one button will be there " Services for object" Click that...... It will open one tool bar.... on that tool bar one icon will be there with thee arrow ..... Click on that,,,,, and here you can see the idoc number....
Thanks,
Raja -
Find Sales order number from IDOC number
I have a bunch of SO idocs, in status 64. They are then posted and Sales orders are created.
How can I programatically find the Sales order Number from the Sales Order idoc number once it is in status 53 (other than going to EDIDS and checking if status = '53' and grabbing the 'STAPA2' field there ).Look at table EDIDS for sales order idocs and you can see SO number in any of STAPA1/2/3/4 variable for specific message id and message number.
-
How to find out the Idoc number triggered for any material transfer frm SAP
Hi Folks,
Can any body let me know How to find out the Idoc number triggered for any material transfer frm SAP?
Do we have any navigation for that in MM03?
Thanks,
SPMD.Hi Shabbirmdpasha,
If you know the user name then you can find the idoc numbers created by that user. But the problem here is it not only gives the material it gives all the idocs created by that user. Go to SE16 --> table name EDIDS --> here you can fill the approximate date and in UNAME give the userid and execute. This will give all the idocs created by that user. I know it is only a partial solution.
Also would suggest to post the same in abap forums for more answers:
ABAP Development
Regards,
---Satish
Maybe you are looking for
-
Data source executive could not be found
Hello there, I have recentley did my first dynamic website using coldfusion MX 7. After I uploaded all the files in the server of godaddy.com on a window platform which supports cfm, I had realised that all the DSN routes were still C:cfusion7\wwwroo
-
My phone is in recovery mode but its not recognized by my computer
I could not get in to my phone because I forgot my Passcode. I was finally able to get my iPhone in recovery mode but it is not recognize my device. I know the USB cord works because I also have an iTouch and it connects. I've also tried to connect o
-
I have an on going trend of reinstalling windows every few months and have run into a problem with iTunes Deauthorize program. Only able to deauthorize all computers once a year?!?! common thats just stupidity in my eyes. Anyway my problem is that I
-
Is there a 2 key step command for cleaning HD ?
-
There are some errors in the third and sixth sample greps included in the FindChangeByList.txt file that came bundled with CS4 (and also CS3, so perhaps these aren't very important errors). In both cases, the descriptions are wrong, each having been