IDoc Number of that Document
Hi Guru's,
I want to know the Table/Field from which i can get the IDoc number that was created for that particular document. I know we can see the IDoc number in the 'Processing Log' from the Ouput screen but don't know where that info is stored.
thanks,
Kumar.
Hi,
May check for fm
GET_IDOCNR_FROM_OBJECT
a®
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 -
Finding the idoc number for material document
Hi,
I have a material document which was created by an idoc. How do I know the idoc number that has created this material doc?
We have lots of idocs coming from external systems which do GI, GR, transfer postings etc. With the material document , not able to trace which idoc created it.
RegardsHi Ramees,
"Refer the Tables MKPF / MSEG inorder to get the IDOC no's for Material Docs. "
But how can it be found for Transfer posting documents where no PO history exist !!
Alex. -
Getting valid idoc number from the sales document
hi,
Iam sending the code for getting the idoc number from sales document.
but iam not getting the result.
please see the code and correct the code so that i will get the idoc number from the sales document.
tables edid4.
data l_docnum like edid4-docnum.
parameters:p_vbeln like vbak-vbeln.
call function 'CONVERSION_EXIT_ALPHA_INPUT'
exporting
input = p_vbeln
IMPORTING
OUTPUT = p_vbeln
select single docnum from edid4 into l_docnum where sdata like '&p_vbeln&'.
if sy-subrc = 0.
write edid4-docnum.
else.
write ' the record is not found'.
endif.
it is very urgent..............
thanks in advance......See the below code :
report zxyz.
tables edid4.
data l_docnum like edid4-docnum.
parameters:p_vbeln like vbak-vbeln.
<b>data sdata like edid4-sdata.</b>
start-of-selection.
call function 'CONVERSION_EXIT_ALPHA_INPUT'
exporting
input = p_vbeln
IMPORTING
OUTPUT = p_vbeln
<b>concatenate '%' p_vbeln '%' into sdata.</b>
select single docnum from edid4 into l_docnum
where sdata like <b>sdata.</b>
if sy-subrc = 0.
write edid4-docnum.
else.
write ' the record is not found'.
endif.
Thanks
Seshu -
Saving IDOC Number from control_record_out before IDOC goes out.
Hi,
How would I save the IDOC number so that I can maintain a table with
Idocnumber
Document Number
Date
Etc
The IDOC num is not populated until the system finally does save the idoc and send it? Right?
Need that IDOC number via an exit or something.
thanks.Use function SREL_GET_NEXT_RELATIONS to rather get the link after the IDOC has gone out.
Any better/easier ways?
regards -
Using SO_OBJECT_SEND with Transaction code and IDOC number
Hi All - from within the inbound_idoc_orders FM - when an idoc errors I want to generate a sap office document (with more verbage than workflow, so that is why a sap office doc) and with SO_OBJECT_SEND - but I want to be able to pass the idoc number and either Tcode VA01 or FM of inbound_idoc_orders - so that user can usee doc execute menu path and be launched into VA01 with the idoc data...
We do this today with VA01 and the sales order number - here is different in I want to pass the idoc number so that data can be used....
I did this prior but one system referesh flushed the code ... Thanks for the help - JanetHi All - from within the inbound_idoc_orders FM - when an idoc errors I want to generate a sap office document (with more verbage than workflow, so that is why a sap office doc) and with SO_OBJECT_SEND - but I want to be able to pass the idoc number and either Tcode VA01 or FM of inbound_idoc_orders - so that user can usee doc execute menu path and be launched into VA01 with the idoc data...
We do this today with VA01 and the sales order number - here is different in I want to pass the idoc number so that data can be used....
I did this prior but one system referesh flushed the code ... Thanks for the help - Janet -
How to save IDOC number in BPM to use in ALEAUD
Hi Experts,
I am doing IDOC - BPM - sync SOAP scenario, i am using async to sync bridge in BPM, how can i get original IDOC number so that i can use it in webservice response message to ALEAUD mapping??hi
you have to use Configurable Parameters in the ccBPM. in runtimeyou assign the IDOCNUM field value to the parameter and then use it in the response mapping (WSDL-ALEAUD). you have to define the parameter in the Message Mapping under the Signature Tab.
Also you have to bind the parameter in the Operation Mapping. to do this,define a new parameter in the Operation mapping and then bind it with the parameter defined in the message mapping.
see this blog to know how:
SAP PI 7.1 Mapping Enhancements Series: Parameterized Message Mappings
rgds
RP
Edited by: Rodrigo Alejandro Pertierra on Nov 3, 2011 3:49 PM -
Idoc number have status is 51 Error: Application document not posted
hi friend
i have error in idoc number status 51 Error: Application document not posted. basic type is ORDERS05 Purchasing/Sales
what i do for solve this issue
with regards
dinesh
Edited by: code acess on Feb 9, 2011 4:35 AMHi,
{1.how i check in the delivery documents have idoc number ? }
Go into the delivery, output. Check if any output has been triggered for EDI. If yes, then select the output and click on 'Process details' (it is the button just after communication where you give the print name). It will display the Idoc number.
{ what are the required for cofiguration of EDI. Pls Send me the configuration setting . i didnt have help here ..iam expecting configuration setting }
Though it is difficult to share all the config settings in this thread, what I will do is to put in a few steps which are general settings. Only a few things vary.
For EDI / ALE - Idoc the common settings are
a. The port should be enabled for sending and receiving the data thru Idocs. Usually basis does this.
b. Partner profile should be configured in WE20. Example if you are sending a sales order confirmation to ship to party then, You should set up a partner profile in WE20 for partner number in KU (Customer) folder. You can copy any of the existing customer. What you have to make sure is you have added the message type and the Basic Type in the outbound parameters of the partner in WE20. Also, you have to make sure that you are giving the output type and the process type as well.
This is same even when you are receiving the Idocs from customer. Say for example customer PO. However, instead of outbound, you will add all these details in inbound.
Similarly, if you are sending PO to your vendos, then, you have to make changes in folder for partner LS. There are so many other folders as well.
Check WE60/61 for the documentation for what is Basic types, Message types and segments. It is very important for you to know about these when you are dealing with Idocs. To start with, you can give Orders01 in Basic types in WE60 selection screen and read out the details.
c. Once the partner profile is set up, there is a table called VOE4. This is the table where you can maintain the customer cross reference for incoming idocs.
d. Output type should be set up for EDI trigger (Tcode NACE) . You can use the existing programs. You can Check BA00 which is normally set up for EDI trigger as well. You can try triggering that first. You may get some errors at first. But do not panic. Just read those errors and then search the form for errors. You will get to know the next step.
e. Once you have the above settings, I think you are pretty much ready for EDI... you can try these. If you get struck in between, the form is there to help you...
Hope this helps...
Regards,
Mukund S -
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 -
IDOC Number for a Application document
Hi frinds,
Using Idocs we create application documents like Sales orders(inbound),invoices, delivery etc (outbound) to create application document in some other system or used in case of B2B scenario.
my requirement is can we get the Idoc # form the slaesorders number using some function module (to get the idoc #'s of huge number of sales orders). however we can find the sales order number form the Idoc number using WE05 i want the reverse way.
Thanks,
vin.Hi,
If your requirement is like Xi generates an outbound idoc to R/3 which is different to inbound idoc number of R/3.
USe SREL_GET_NEXT_NEIGHBORS ,
object-objkey = idoc num object-objtyp = 'IDOC', max_hops = '99'.
You can get the list of outbound,inbound idoc numbers and sales order .
Thanks and Regards,
P.Bharadwaj
Edited by: Bharadwaj p on Jun 14, 2010 8:31 AM -
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 -
Message with IDOC number, created by LSMW, missing in job log in SM37
Hi gurus,
We have a temporary interface which uses LSMW to create IDOCs and update in SAP. It's used for materials, BOMs and document info records. In LSMW we have defined standard message types MATMAS_BAPI, BOMMAT and DOCUMENT_LOAD for the IDOCs. All these have the same problem.
A background job runs and starts LSMW. In the job log in SM37 I want to see which IDOCs were created. For some reason this is different in my development system and my test system, and as far as I know all settings should be the same. In the test system LSMW creates more message lines in the job log, than it does in the dev system. Message number E0-097 is "IDOC XXXX added", and this is missing in the dev system.
This is what it looks like in the dev system:
Data transfer started for object 'MATMAS' (project 'X', subobject 'Y') /SAPDMC/LSMW 501 I
Import program executed successfully /SAPDMC/LSMW 509 I
File 'XXX.lsmw.read' exists /SAPDMC/LSMW 502 I
Conversion program executed successfully /SAPDMC/LSMW 513 I
Data transfer terminated for object 'MATMAS' (project 'X', subproject 'Y') /SAPDMC/LSMW 516 I
And this is what it looks like in the test system. More information, which is exactly what I want in dev system too:
Data transfer started for object 'MATMAS' (project 'X', subobject 'Y') /SAPDMC/LSMW 501 I
Import program executed successfully /SAPDMC/LSMW 509 I
File 'XXX.lsmw.read' exists /SAPDMC/LSMW 502 I
Conversion program executed successfully /SAPDMC/LSMW 513 I
File 'XXX.lsmw.conv' exists /SAPDMC/LSMW 502 I
IDoc '0000000002489289' added E0 097 S
File 'XXX.lsmw.conv' transferred for IDoc generation /SAPDMC/LSMW 812 I
Data transfer terminated for object 'MATMAS' (project 'X', subproject 'Y') /SAPDMC/LSMW 516 I
In both cases the IDOC is created and update works fine.
My only issue is that I can't see the IDOC number in the dev system. I know I can get the IDOC number in WE02, but in this case we have program logic which reads the job log to be able to check IDOC status before sending OK message back to the other side of the interface.
I hope any of you can have an idea how I can update somewhere to get message E0-097 with IDOC number into the log.
Regards,
LisbethHi Arun,
If you want to show your messages in the job log you have to use the MESSAGE statement. In case you use WRITE statements an output list be created which can be found in the spool (there is an icon to go to the spool directly).
Regards,
John. -
Get IDoc-number from flat IDoc using dynamic configuration
Dear experts
In an IDoc2File scenario I have added the IDoc-number to dynamic configuration using the folling code in an UDF:
DynamicConfiguration conf = (DynamicConfiguration)
container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey FileName = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/File","DOCNUM");
conf.put(FileName, a);
The information is stored in the SOAP message
<SAP:DynamicConfiguration SOAP:mustUnderstand="1">
<SAP:Record namespace="http://sap.com/xi/XI/System/File" name="DOCNUM">0000000000012345</SAP:Record>
</SAP:DynamicConfiguration>
Can anybody tell me how I can access this information in the "variable substitution" section of the CC? Perhaps something like "message:docnum"?
Additional information:
Taking the IDoc-number from the payload using e.g. "payload:ORDERS05,1,IDOC,1,EDI_DC40,1,DOCNUM,1" does not work, since the XML-IDoc has been converted to an flat-IDoc.
Thanks in advance for any good ideas
MarkusDear Rodrigo and Sarvesh
Thanks for your help so far! I applied your hints and now it is working fine.
But now I have the following additional questions
1.) My message mapping only maps the input IDoc to an output IDoc of the same type and structure. The MM is only required to process the UDF. Is there another, better solution to achieve my requirement that the IDoc-number shall be part of the filename?
2.) In the CC you have the possibility to use temporary files (section "Processing", Option "Put File" = "Use Temporary File". I think this will not work with the given solution, will it?
To possibly help somebody else or clarify the mechanism once again, I wrote down how my solution now looks like.
My UDF in the message-mapping looks like this
- Input = DOCNUM of IDoc, e.g. ORDERS05/IDOC/EDIDC/DOCNUM
- Outpt = DOCNUM of IDoc, e.g. ORDERS05/IDOC/EDIDC/DOCNUM
- UDF:
public String putDynamicConfiguration(String docnum, Container container) throws StreamTransformationException{
try
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String filename = "Prefix_" + docnum + ".txt";
conf.put(key, filename);
return docnum;
catch (Exception e)
return docnum;
In the CC the settings are now as follows
File Name Scheme = . -> only a dot or something else, because this field is obligatory, even if it is not used in this case.
Variable substitution (...)
Enable -> unchecked
Adapter-Specific Message Attributes
Use Adapter-Specific Message Attributes -> checked
Fail If Adapter-Specific Message Attributes Missing -> checked
File Name -> checked
Directory, File Type, Temporary Name Scheme for Target File Name -> unchecked
When I send an IDoc to PI and view the Adapte-Engine Version of the message (the SOAP-document, not the payload) I can find the Filename:
<SAP:DynamicConfiguration SOAP:mustUnderstand="1">
<SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileName">Prefix_0000000000012345.txt</SAP:Record>
</SAP:DynamicConfiguration> -
Invoice Accounting doc related IDOC number
Hi Gurus,
Now that I'd like to know what's the idoc number for particular accounting document, I know I can get the idoc number one by one by simplely checking the [Relationship] button in FB03 on the topleft of the window.
But now, I have about 4000 accounting documents, I need to retrieve idoc for them all.
Do you know is there any table or program to trigger the idoc infomation for certain accounting document as a whole?
Your answer is really appreciated!
regards,
MaximumHi,
Use T-Code WE09 (Idoc Search for business data)
Give parameters same like you give in we02 for idoc search, but you will have a tab in the bottom - Criteria for search in data records - give the segment, field names: and the value. May be you find out the segment and field name for idoc for the accounting document, and then in value-give the accounting document number, or do an open search without giving an accounting document, and export the idoc result and then cross map with required accounting documents.
Thanks
Balla -
Idoc Number which posts the GR doc..
Hi All,
Please let me know how the incoming idoc number can be identified which posts the GR for a PO.
Thanks
ChandruHi ,
Go to MIGO display the document there you will get servicess for object icon ,Click that button then click display relashion ship icon.It will show you corresponding Idoc number.
Regards,
JS
Maybe you are looking for
-
"No Airport card installed" after 10.5.8 update
Just upgraded the latest Leopard update 10.5.8 and, after restart, the Airport icon in my menu bar says "No Airport card installed". I've been into System Prefs and tried to switch it on, but nothing. I've even been into the system profiler and, when
-
Word email attachments get corrupted from desktop to laptop
I've been sending Microsoft Word attachments via email from my iMac (mid-2007 Intel running Yosemite) to my laptop (Macbook Pro running Mavericks). The downloads always come through as corrupt, though the original files are fine. (If I put them on a
-
How to create a file on a remote machine using PrintStream
I want to create an HTML file on a remote machine connect via LAN the path is "\\vineet\akh\" akh is folder where I want to save the HTML file. Now in PrintStream i can give only a local file. Please help how to do it
-
There seems to be a 512 character limit to footers in Acrobat Pro, starting with Acrobat Pro 9. We have a publication with legalese at bottom of each page, 512 characters is not enough to fit it. Any way around this limitation? The text changes each
-
Installed Flash CC, but I need CS6 back!
I installed Flash CC, and unintalled my previous version to save hard disk space. But, I just got a job for some banner ads, which have Actionscript 2.0 in them! Flash CC doesn't support AS 2.0. According to my Creative Cloud I have Flash CS6, and it