Regarding Inbound Idoc creation
Hi,
I am trying to create a Idoc from a xml file without using XI.
I can read the details from the file and populate a internal table.
I am not clear when the IDoc number will be generated.
Can any one gtel me which FM actually starts the inbound proces?
Which FM will generate the IDOC no for the incoming Idoc ?
I am not clear as to which function module i should pass my internal table with data to create a IDoc.
Please help
Regards,
Vignesh
Hi,
try MASTER_IDOC_DISTRIBUTE function module for create idoc.
rgds
shibu
Similar Messages
-
Problem in Inbound Idoc creation
Hi experts,
My requirement is i want to send purchase order from one system to another system as sales order using ALE and IDOC concept...
I have done configuration settings in both systems..i am using standard message type ORDERS....i am getting outbound IDOC sucessfully...but i am getting error in inbound idoc like Sales organization,distribution channel is not determined for customer 1000 and vendor 1005...
Can anybody tell me how to rectify this?
Thanks & Regards,
Praveena....Dear praveena,
...salesorganization ..distribution channel ..division not determined for customer 1000...
i think this is because in your inboud system customer is not created in that sales org, distribution channel and division.
Just extend this customer to slaes org, distribution channel and division what appearing in error using XD01, then try.
might be that is the reason. -
Hi ,
Trying to create an INBOUND IDOC for material.
Using the FM MASTER_IDOC_DISTRIBUTE . But the problem is that this is creating an idoc as an outbound .although I have set the parmeter for direction as inbound.
Could some please advise me which Fm should I use to create an IDOC as inbound ?
since I can see there are more FM like 'IDOC_WRITE_AND_START_INBOUND' and CCDL_MASTER_IDOC_CREATE and more.
Thanks and Regards,
AnkurHi,
The FM that you have specified here are the one which are used for saving the data from IDOC to SAP.
But in this scenarion I want to create an IDOC with inbound direction . to be more eleborative I will get incomplete information from External system in IDOC and based on this I neeed to create an Standard IDOC filling the more required information and then this Standard IDOC will be processed by Standard FM like the one you have specified here 'IDOC_INPUT_XXXX',
What i need is the FM for Creating this Standard IDOC as inbound.
hope this explain .
Thanks and Regards,
Ankur -
Regarding Custom IDOC Creation
Hi All,
I Am New to ABAP , Any one Please Give me the Step -By Step Procedure to create Custom IDOC.
I Have this Link with me.
Step by step custom IDOC creation
But I Don't Know that What should i Give field names and Data elements
How to create Field names And Data elements
Regards
VamsiHi,
U need a custom IDOC when the elements in the standard IDOC is not there according to requirement. ex. in IDOC cremas04 u want the Country code should be there.
Then U go for custom iDOC and create a Y/Z i.e custom idoc and add one structure and add the required fiellds.
Check this link for Step by Step guide
http://www.erpgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
CHeck this link for a IDOC ...The steps are mentioned in details about creating custom idoc..
http://www.allsaplinks.com/idocbasicsunderstanding.html
http://www.allsaplinks.com/idoc.html
http://www.allsaplinks.com/idoc_sample.html
Please check this link.
http://help.sap.com/saphelp_46c/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
Regards -
Inbound idoc creation by reading data from flat file in same system
Hi..
I have a flat file on my application server. I know the idoc type , message type and the FM to post the application document in SAP at the end when an idoc is created.
Can someone tell me how do i create an idoc in sap reading the flat file data on application server and what setting do i need to make later once idoc is created to post the application document using hte existing FM.
Appreciate your helpYou need to use FM <b>MASTER_IDOC_DISTRIBUTE</b>
REG_CONTROL-MESTYP = 'ISU_MR_UPLOAD'.
REG_CONTROL-IDOCTP = 'ISU_MR_UPLOAD01'.
REG_CONTROL-RCVPRT = 'LS'.
REG_CONTROL-RCVPRN = 'ZALE'.
LOOP AT TABLE_LECTURA.
ZMENSAJE-MRIDNUMBER = TABLE_LECTURA-NUMORDEN.
ZMENSAJE-METERREADER = TABLE_LECTURA-IDLECTURISTA.
IF TABLE_LECTURA-PRIMERVOLUMEN NE SPACE.
VOLUMEN = TABLE_LECTURA-PRIMERVOLUMEN.
ELSEIF TABLE_LECTURA-PRIMERVOLUMEN NE SPACE.
VOLUMEN = TABLE_LECTURA-SEGUNDOVOLUMEN.
ELSE.
VOLUMEN = TABLE_LECTURA-TERCERVOLUMEN.
ENDIF.
IF VOLUMEN EQ SPACE.
VOLUMEN = '0'.
ENDIF.
ZMENSAJE-READINGRESULT = VOLUMEN.
ZMENSAJE-MRREASON = TABLE_LECTURA-NOTALECTURA.
ZMENSAJE-ACTUALMRTIME = TABLE_LECTURA-HORALECTURA.
ZMENSAJE-ACTUALMRDATE = TABLE_LECTURA-FECHALECTURA.
I_EDIDD-SEGNAM = 'E1BPEABLU'.
I_EDIDD-SDATA = ZMENSAJE.
APPEND I_EDIDD.
ENDLOOP.
CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
EXPORTING
MASTER_IDOC_CONTROL = REG_CONTROL
TABLES
COMMUNICATION_IDOC_CONTROL = I_COMM_IDOCS
MASTER_IDOC_DATA = I_EDIDD
EXCEPTIONS
ERROR_IN_IDOC_CONTROL = 1
ERROR_WRITING_IDOC_STATUS = 2
ERROR_IN_IDOC_DATA = 3
SENDING_LOGICAL_SYSTEM_UNKNOWN = 4
OTHERS = 5.
Greetings,
Blag. -
Dear all,
I need to clarify scneario below:
INBOUND process
Receive an Idoc, and inbound FM Z_TEST_IN will be executed. In inbound FM Z_TEST_IN, i have to update both Table ZHEADER and ZITEM. Since they are Header and item table, so if one of the table updating failed I've to perform rollback.
This is what i plan to do. Create 2 update task FM, one for ZHEADER update and one for ZITEM update. It will look like this:
Function Z_TEST_IN
CALL FUNCTION 'Z_UPDATE_HEADER'
IN UPDATE TASK
CALL FUNCTION 'Z_UPDATE_ITEM'
IN UPDATE TASK
ENDFUNCTION
My question would be:
1. Is there a system COMMIT WORK predefined in ALE layer? Or should i code an explicit COMMIT WORK in Inbound FM Z_TEST_IN?
2. Let's say update fail on one of the table, then ROLLBACK WORK will be triggered. So i'm aspecting data will not update to both tables, but how about the Inbound Idoc creation? Will the idoc still be created and shown in WE05?
Your comment is highly appreciated. Thanks in advance.Hi,
1.You are using the Zfunction module,So you need to commit explicitly.
2.For standard ,implicitly done.
3.There is no need to create inbound IDoc.While processing only the Inbound idoc created.
4.Suppose if u want to create just go for We30.
5.We05 for just gives the list of idocs created.
To Create Idoc we need to follow these steps:
Create Segment ( WE31)
Create Idoc Type ( WE30 )
Create Message Type ( WE81 )
Assign Idoc Type to Message Type ( WE82 )
Creating a Segment
Go to transaction code WE31
Enter the name for your segment type and click on the Create icon
Type the short text
Enter the variable names and data elements
Save it and go back
Go to Edit -> Set Release
Follow steps to create more number of segments
Create IDOC Type
Go to transaction code WE30
Enter the Object Name, select Basic type and click Create icon
Select the create new option and enter a description for your basic IDOC type and press enter
Select the IDOC Name and click Create icon
The system prompts us to enter a segment type and its attributes
Choose the appropriate values and press Enter
The system transfers the name of the segment type to the IDOC editor.
Follow these steps to add more number of segments to Parent or as Parent-child relation
Save it and go back
Go to Edit -> Set release
Create Message Type
Go to transaction code WE81
Change the details from Display mode to Change mode
After selection, the system will give this message The table is cross-client (see Help for further info). Press Enter
Click New Entries to create new Message Type
Fill details
Save it and go back
Assign Message Type to IDoc Type
Go to transaction code WE82
Change the details from Display mode to Change mode
After selection, the system will give this message The table is cross-client (see Help for further info). Press Enter.
Click New Entries to create new Message Type.
Fill details
Save it and go back
Regards,
Shiva. -
Hi,
here i am picking the file from APPS and also inbound IDOC creation.
just anyone check my code and give some suggestions in the areas of impovemet technically.
thanks
report znsd007.
*tables : zih001, zid001.
tables: zstbm_lots, zstbm_stages, zibmordertype.
data: t_zstbmlot like zstbm_lots occurs 0 with header line,
t_zstbmstage like zstbm_stages occurs 0 with header line.
parameters :
fromdir like rsmrgstr-path lower case default
'/apps/MQBridge/idocmsgs/',
fromfile like rsmrgstr-name lower case default '*.txt',
todir like rsmrgstr-path lower case default
'/apps/MQBridge/idoctemp/',
tofile like edi_path-pthnam lower case no-display,
procdir like rsmrgstr-path lower case default
'/apps/MQBridge/idocproc/',
procfile like edi_path-pthnam lower case no-display,
toport like edipo-port no-display.
constants: c_tst(7) value 'IBM_TST',
c_bi(6) value 'IBM_BI',
c_mrk(7) value 'IBM_MRK',
c_sbt(7) value 'IBM_SBT'.
data: w_tst(1) type c,
w_bi(1) type c,
w_mrk(1) type c,
w_sbt(1) type c,
w_err(1) type c,
w_processcd(20) type c.
data :
file_list like rsfillst occurs 100 with header line,
pattern like rsmrgstr-name,
tmpfile(128),
begin of in1 occurs 100,
dir(128),
file(128),
data(63000) occurs 0,
data(1063) occurs 0,
end of in1,
str(63000),
*str(1063),
str2 like str,
*outfile(63000) occurs 100 with header line,
*outfile(128),
crtl like edi_dc40,
*counter type i,
segment like edi_dd40-segnam,
segment_no(6) type n,
data like edi_dd40-sdata,
productid_ecid(25),
edidd40 like edi_dd40.
field-symbols : <fs2>,<fs>.
data: messtab like bdcmsgcoll occurs 0 with header line.
start-of-selection.
break-point.
perform getfile_list tables file_list using fromdir fromfile.
delete file_list where type = 'directory'.
toport = 'FILE'.
loop at file_list.
perform getfile tables in1 using file_list.
endloop.
sort in1 by dir file.
check not in1[] is initial.
loop at in1.
at new file.
concatenate todir '/' in1-file into tofile.
replace '//' with '/' into tofile.
condense tofile no-gaps.
open dataset tofile for output in text mode encoding default.
if sy-subrc ne 0.
message e168(j4) with tofile.
endif.
Copy the populated dataset to be saved into a processed directory
concatenate procdir '/' in1-file into procfile.
replace '//' with '/' into procfile.
condense procfile no-gaps.
open dataset procfile for output in text mode encoding default.
if sy-subrc ne 0.
message e168(j4) with procfile.
endif.
clear : edidd40, crtl.
crtl-tabnam = 'EDI_DC40'.
crtl-mandt = sy-mandt.
crtl-docrel = '620'.
crtl-direct = '02'.
concatenate 'SAP' sy-sysid into crtl-rcvpor.
crtl-rcvprt = 'LS'.
crtl-rcvprn = 'SSD_PN0001'.
crtl-mestyp = 'ZCPAOC'.
crtl-idoctyp = 'ZCPAOC01'.
crtl-sndpor = 'SSD0000001'.
crtl-sndprt = 'LS'.
crtl-sndprn = 'SSD_PN0001'.
transfer crtl to : procfile.
clear segment_no.
endat.
refresh t_zstbmlot.
refresh t_zstbmstage.
loop at in1-data into str.
clear edidd40.
edidd40-mandt = sy-mandt.
check not str is initial.
search str for ','.
if sy-subrc = 0.
segment = str+0(sy-fdpos).
sy-fdpos = sy-fdpos + 1.
data = str+sy-fdpos.
case segment.
when 'ZSTBM_LOT'.
clear t_zstbmlot.
split data at ',' into t_zstbmlot-aufnr
t_zstbmlot-ordertype
t_zstbmlot-plant
t_zstbmlot-productid
t_zstbmlot-ec
t_zstbmlot-lotlabel
t_zstbmlot-other_lot_label1
t_zstbmlot-orderqty
t_zstbmlot-customercd
t_zstbmlot-srcevendor
t_zstbmlot-waferid
t_zstbmlot-lotowner
t_zstbmlot-lottype
t_zstbmlot-prty
t_zstbmlot-planstart
t_zstbmlot-planfinish
t_zstbmlot-linecodejc
t_zstbmlot-qualitycod
t_zstbmlot-poi
t_zstbmlot-poi_text
t_zstbmlot-cot
t_zstbmlot-cot_text
t_zstbmlot-lotprodtyp
t_zstbmlot-productcd
t_zstbmlot-familycd
t_zstbmlot-lot_cmmnt
t_zstbmlot-devassem
t_zstbmlot-devassemtx
t_zstbmlot-numdevices
t_zstbmlot-date_of_mfg
t_zstbmlot-pur_order
t_zstbmlot-process_cd.
append t_zstbmlot.
edidd40-segnam = 'ZSTBM_LOT'.
edidd40-hlevel = '2'.
segment_no = segment_no + 1.
edidd40-segnum = segment_no.
edidd40-sdata = t_zstbmlot.
when 'ZSTBM_STAGE'.
clear t_zstbmstage.
split data at ',' into t_zstbmstage-stage.
move data to t_zstbmstage-stage.
append t_zstbmstage.
edidd40-segnam = 'ZSTBM_STAGE'.
edidd40-hlevel = '3'.
edidd40-psgnum = segment_no.
edidd40-sdata = t_zstbmstage.
endcase.
transfer edidd40 to : procfile.
endif.
endloop.
t_zstbmlot-date_of_mfg = t_zstbmlot-date_of_mfg(8).
Determine the order type here using t_zstbmstage and t_zstbmlot
and update order type int t_zstbmlot.
clear w_tst. clear w_bi. clear w_mrk. clear w_sbt. clear w_err.
clear w_processcd.
loop at t_zstbmstage.
if t_zstbmstage-stage = c_tst.
w_tst = 'X'.
elseif t_zstbmstage-stage = c_bi.
w_bi = 'X'.
elseif t_zstbmstage-stage = c_mrk.
w_mrk = 'X'.
elseif t_zstbmstage-stage = c_sbt.
w_sbt = 'X'.
endif.
endloop.
if t_zstbmlot-process_cd = 'SubStock Release' or
t_zstbmlot-process_cd = 'SUBSTOCK RELEASE'.
w_processcd = 'SUBSTOCK RELEASE'.
endif.
select single * from zibmordertype
into zibmordertype where
ibm_tst = w_tst and
ibm_bi = w_bi and
ibm_mrk = w_mrk and
ibm_sbt = w_sbt and
processcd = w_processcd.
if sy-subrc = 0.
t_zstbmlot-ordertype = zibmordertype-ordertype.
else.
write: 'Order type not determined for lot label:',
t_zstbmlot-lotlabel.
endif.
Put into zih001 to create idoc
clear : edidd40, crtl.
crtl-tabnam = 'EDI_DC40'.
crtl-mandt = sy-mandt.
crtl-docrel = '620'.
crtl-direct = '02'.
concatenate 'SAP' sy-sysid into crtl-rcvpor.
crtl-rcvprt = 'LS'.
crtl-rcvprn = 'SSD_PN0001'.
crtl-mestyp = 'ZCPAOC'.
crtl-idoctyp = 'ZCPAOC01'.
crtl-sndpor = 'SSD0000001'.
crtl-sndprt = 'LS'.
crtl-sndprn = 'SSD_PN0001'.
transfer crtl to : tofile.
clear : edidd40.
edidd40-segnam = 'ZIH001'.
edidd40-mandt = sy-mandt.
edidd40-hlevel = 1.
edidd40-sdata = t_zstbmlot.
transfer edidd40 to : tofile.
check not in1-data[] is initial.
at end of file.
close dataset : procfile, tofile.
call function 'EDI_DATA_INCOMING'
EXPORTING
pathname = tofile
port = toport.
check sy-subrc = 0.
Remove file from idocmsgs directory after idoc processing
clear tmpfile.
concatenate in1-dir '/' in1-file into tmpfile.
replace '//' with '/' into tmpfile.
condense tmpfile no-gaps.
delete dataset tmpfile.
endat.
endloop.
form getfile_list tables intab1 structure rsfillst using inval1 inval2 .
call function 'SUBST_GET_FILE_LIST'
exporting
dirname = inval1
filenm = ''
pattern = inval2
tables
file_list = intab1
EXCEPTIONS
ACCESS_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. "getfile_list
*& Form getfile
text
-->P_FIELD_LIST text
form getfile tables intab1 structure in1
using inval structure file_list.
data : xfile(128).
clear xfile.
concatenate inval-dirname '/' inval-name into xfile.
replace '//' with '/' into xfile.
open dataset xfile for input message messtab
in text mode encoding default.
check sy-subrc = 0.
clear : str, intab1. refresh intab1-data.
do.
replace ALL OCCURRENCES OF
cl_abap_char_utilities=>horizontal_tab
in xfile with space.
replace all occurrences of '#' in xfile with space.
replace all occurrences of ':' in xfile with space.
replace all occurrences of '_' in xfile with space.
read dataset xfile into str.
replace all occurrences of '#' in str with space.
replace all occurrences of ':' in str with space.
replace all occurrences of '_' in str with space.
if sy-subrc <> 0.
exit.
endif.
intab1-file = inval-name.
intab1-dir = inval-dirname.
append str to intab1-data.
enddo.
if not intab1-data[] is initial.
append intab1.
endif.
close dataset xfile.
endform. " getfile
form showdata changing inval indat.
data : xxtab like sval occurs 100 with header line,
ff0(100), ff1(30), ff2(30), yesno.
inval = indat.
do.
assign component sy-index of structure inval to <fs>.
Z1STB_HDR TO <FS>.
if sy-subrc <> 0. exit. endif.
describe field <fs> help-id ff0.
split ff0 at '-' into ff1 ff2.
clear xxtab.
xxtab-tabname = ff1. xxtab-fieldname = ff2. xxtab-value = <fs>.
append xxtab.
enddo.
call function 'POPUP_GET_VALUES_USER_HELP'
EXPORTING
popup_title = 'Enter Order Information'
TABLES
fields = xxtab
EXCEPTIONS
error_in_fields = 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. "showdatahi
i can see views are increasing inmy post. bu ti am not unable to see any when i enter. where are the views stored for this thread. now i am just clicking the reply to this thread.
please let me know where can i see th eviews.
thanks -
Creation of Sales Order and Service Contract from Inbound IDOC
Hi Experts,
My requirement is to create a Sales Order as well as a Service Contract from one Inbound IDOC. I am getting the Inbound IDOC from a third Party. The message type is ORDERS and Basic Type is ORDERS02. How ever i am using an extension type IDOC which carries all the required data for Sales Order and Service Contract. My requirement is like, to create a Sales Order first.
I have created a Z FM which is attached to the Process Code and subsequently to the message type. Inside the FM i an calling FM 'IDOC_INPUT_ORDERS' for creation of Sales Order. After that i am changing the IDOC data for the Document Type. I am changing the document type which is responsible for Contract Creation.
Then I am again calling the FM 'IDOC_INPUT_ORDERS' for creation of Contract with the help of IDOC data. But here the Contract is not getting created. It's getting failed during the Batch input session.
I need to solve this problem as soon as possible. Please help me. If there are any other options also please share.
Thanks in Advance.
Regards,
PriyabrataActually there is problem with BDCDATA. Inside the FM it's calling transaction with help of BDCDATA. If i am creating a Sales order or contract alone its creating successfully. But when i am trying to create both, it's retuning sy-subrc '1001' after calling the transaction on the second attempt. Is there any problem with BDCDATA like we can't handle with less time gap? Please help and give your inputs.
Regards,
Priyabrata -
Creation of Service Contract from Inbound IDOC
Hi Experts,
I am using Inbound IDOC type ORDERS02 with message type ORDERS for creation of Sales Order. Now my requirement is like to create a Service Contract from that Inbound IDOC. The IDOC type contains all the data require to create a Service Contract. The scenario is like, after creation of Sales Order it will check for the corresponding Service Contract exits or not by querying on a Z table which contains all those entries.
So my idea is to create a Z Program, in which it will check for the Service Contract and will create the same by reprocessing the same IDOC or by calling some Function Module. Please suggest how shall i proceed to create a Service Contract.
Is there any way to reprocess the IDOC or to collect the Data from the IDOC segments pass them to a FM which is responsible for creation of Inbound IDOC. Please suggest if this is feasible.
Thanks in Advance.
Regards,
Priyabrata.Actually there is problem with BDCDATA. Inside the FM it's calling transaction with help of BDCDATA. If i am creating a Sales order or contract alone its creating successfully. But when i am trying to create both, it's retuning sy-subrc '1001' after calling the transaction on the second attempt. Is there any problem with BDCDATA like we can't handle with less time gap? Please help and give your inputs.
Regards,
Priyabrata -
Using Inbound IDOC from Java system creation of Outbound delivery
Dear Experts,
The scenario we are having is really very interesting. Hopefully its a good learning for me and also for others also.
The scenario is,
After sales order creation the details will be sent to one Non SAP system (Java) for performing some tasks related to forwarding agent decision, shipping date and etc. Once the details are finalized in that Java system then, the details needs to be transferred to SAP as "Inbound IDOC" process. For this proposed to use the SAP Jco middle ware.
Once the details transfered from Java system to SAP then, the outbound IDOC needs to get generated automatically. Assuming the stock for that sales order line item is available. Also one more complexity is, our client is using custom transaction (ZVl10C) for delivery creation.
Now Query is,
1. Which IDOC, message type and Functional module needs to be used for creating the delivery automatically..??
2. As per assumption, stock of that sales order line item should be available. Due to some business reason the stock was removed during inbound IDOC transfer then, what will happen to the IDOC..?. How to avoid this situation..??
3. As we told we are re going to use SAP Jco b/w SAP & Java system. In this case, how the data will get transfered from Java system to SAP..?
Thanks in advance for the replies I am going to get
Regards,
VELThanks for the feedback. This question is resolved
-
Outbound delivery creation with inbound IDOC transfer from Java system
Dear Experts,
The scenario we are having is really very interesting. Hopefully its a good learning for me and also for others also.
The scenario is,
After sales order creation the details will be sent to one Non SAP system (Java) for performing some tasks related to forwarding agent decision, shipping date and etc. Once the details are finalized in that Java system then, the details needs to be transferred to SAP as "Inbound IDOC" process. For this proposed to use the SAP Jco middle ware.
Once the details transfered from Java system to SAP then, the outbound IDOC needs to get generated automatically. Assuming the stock for that sales order line item is available. Also one more complexity is, our client is using custom transaction (ZVl10C) for delivery creation.
Now Query is,
1. Which IDOC, message type and Functional module needs to be used for creating the delivery automatically..??
2. As per assumption, stock of that sales order line item should be available. Due to some business reason the stock was removed during inbound IDOC transfer then, what will happen to the IDOC..?. How to avoid this situation..??
3. As we told we are re going to use SAP Jco b/w SAP & Java system. In this case, how the data will get transfered from Java system to SAP..?
Thanks in advance for the replies I am going to get
Regards,
VELDidn't get any feedback from experts for long time. So we are closing the question
-
Creation of Inbound IDOC from a flat file.
Hi all,
I hav to create Purchse Order using inbound IDOC in which I hav to take data from a .xls or any flat file.
Can any one help me with this. i.e wat r the steps involed to do so.
Regards.
RahulHello,
Why do u want to create a Idoc for creating PO from flat file - you can simply use BAPI. Ok if you want to create PO only using Idoc.
I think message type is ACC_PURCHASE_ORDER0.
I just made one sample program to you how to create a PO with Idoc method. Here i am doing for Material Master Creation. Let me know if want any clarification.
********Poorna********
TABLES : MARA, MAKT, EDP13.
DATA : I_EDIDC LIKE EDIDC OCCURS 0 WITH HEADER LINE,
I_EDIDD LIKE EDIDD OCCURS 0 WITH HEADER LINE.
PARAMETERS : P_MATNR LIKE MARA-MATNR.
START-OF-SELECTION.
REFRESH I_EDIDC.
SELECT * FROM EDP13 WHERE MESTYP = 'ZMATMASTER'.
MOVE-CORRESPONDING EDP13 TO I_EDIDC.
I_EDIDC-IDOCTP = EDP13-IDOCTYP.
APPEND I_EDIDC.
ENDSELECT.
READ TABLE I_EDIDC INDEX 1.
I_EDIDD-SEGNAM = 'ZMATMASTER'.
SELECT SINGLE * FROM MARA WHERE MATNR = P_MATNR.
SELECT SINGLE * FROM MAKT WHERE MATNR = P_MATNR
AND SPRAS = SY-LANGU.
I_EDIDD-SDATA+0(18) = MARA-MATNR.
I_EDIDD-SDATA+18(40) = MAKT-MAKTX.
I_EDIDD-SDATA+58(4) = MARA-MTART.
I_EDIDD-SDATA+62(1) = MARA-MBRSH.
I_EDIDD-SDATA+63(3) = MARA-MEINS.
APPEND I_EDIDD.
CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
EXPORTING
master_idoc_control = I_EDIDC
OBJ_TYPE = ''
CHNUM = ''
tables
communication_idoc_control = I_EDIDC
master_idoc_data = I_EDIDD
EXCEPTIONS
ERROR_IN_IDOC_CONTROL = 1
ERROR_WRITING_IDOC_STATUS = 2
ERROR_IN_IDOC_DATA = 3
SENDING_LOGICAL_SYSTEM_UNKNOWN = 4
OTHERS = 5
COMMIT WORK.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. -
Inbound Delivery creation in ECC6.0 through IDoc (DELVRY03.DESADV)
Inbound Delivery creation in ECC6.0 through IDoc (DELVRY03.DESADV)
From SCM ICH system Supplier creates ASN on the WEBUI & sends it ECC 6.0 using XI.
This is Proxy (DespatchedDeliveryNotification) to IDOC (DELVRY03.DESAV) scenario
But at the receiver end i.e. ECC6.0 its giving me error at Tcode WE02 as action is not supported.
Can you suggest me how to tackle this issue.
Thanks in Advance.
Regards,
N>B.Shanmukhahi,
>>>giving me error at Tcode WE02 as action is not supported.
there are many segments in delvry03 with a first field - action (like, delete, create, 001,002, etc)
check all of them as probably you're using one which is not supported
and this is the real cause of the error
you can check it like this:
open this IDOC in We19
then open action field and F4 and see if the one you use in the idoc is in F4
change the wrong one and it will work :for 100%
Regards,
Michal Krawczyk -
Creation of a line item in the existing PO by inbound idoc (ORDERS05)
Hi friends,
I have the following requirement.This is for the inbound idoc ( orders05).
If there is an extra item line in the confirmation idoc, for which no corresponding purchase order line is found, check if the extra line's NOB-number is found in the new NOB-number check -table.
Fetch NOB-number check table with database keys:
E1EDP19-IDTNR (when E1EDP19-QUALF = ZNO) = NOB-number in the table
EKPO-WERKS (from 1st purchase order item line) = site number in the table.
If the NOB-number + WERKS is found in the control table, create a new item line in the purchase order.
If the NOB-number + WERKS is not found in the control table, put the idoc into error.
Can you please tell me that how to create a new item line in the purchase order.
Waiting for your help.
With Regards,
Ajit Prasad.You like to add new line item in existing purchase order or new po.
Thanks,
Narayan -
Creation of Inbound Idoc for the Outbound Idoc in same client
Hi,
My requirement:
Whenver an PO is created an Outbound IDOC is generated in system ABC with client 100.I want to pass this IDOC data to create an Inbound Idoc for Sales Order(SO) in the same client.
It would be helpful if anyone can answer on how to Transfer the Outbound Idoc after it crosses the port.
I found there is a field for function module in WE21,can this be used to get the requirement done.
Please suggest.
Regards,
AmarExample of a program that create and post an inbound idoc....maybe that will help you:
report zzinbound_idoc.
data: g_idoc_control_record like edi_dc40 occurs 0 with header line.
data: g_edidd like edi_dd40 occurs 0 with header line.
data: g_e1bpache09 like e1bpache09.
parameter: mode type c default 'A'.
refresh: g_idoc_control_record, g_edidd.
clear: g_idoc_control_record, g_edidd.
*-Build Control Record -*
g_idoc_control_record-mestyp = 'ACC_DOCUMENT'. "Message type
g_idoc_control_record-idoctyp = 'ACC_DOCUMENT03'. "IDOC type
g_idoc_control_record-direct = '2'. "Direction
* Receiver
case sy-sysid.
when 'DE2'.
g_idoc_control_record-rcvpor = 'SAPDE2'. "Port
g_idoc_control_record-rcvprn = 'IDOCLEGACY'. "Partner number
endcase.
g_idoc_control_record-rcvprt = 'LS'. "Partner type
g_idoc_control_record-rcvpfc = ''. "Partner function
* Sender
g_idoc_control_record-sndpor = 'A000000002'. "tRFC Port
case sy-sysid.
when 'DE2'.
g_idoc_control_record-sndprn = 'IDOCLEGACY'. "Partner number
endcase.
g_idoc_control_record-sndprt = 'LS'. "Partner type
g_idoc_control_record-sndpfc = ''. "Partner function
g_idoc_control_record-refmes = 'Customer clearing'.
append g_idoc_control_record.
*-Build Idoc Segments -*
*---E1KOMG
clear g_edidd.
clear g_e1bpache09.
g_edidd-segnam = 'E1BPACHE09'.
g_edidd-segnum = 1.
move g_e1bpache09 to g_edidd-sdata.
append g_edidd.
*-Create idoc -*
*-Syncronous
if mode = 'S'.
call function 'IDOC_INBOUND_SINGLE'
exporting
pi_idoc_control_rec_40 = g_idoc_control_record
* PI_DO_COMMIT = 'X'
* IMPORTING
* PE_IDOC_NUMBER =
* PE_ERROR_PRIOR_TO_APPLICATION =
tables
pt_idoc_data_records_40 = g_edidd
exceptions
idoc_not_saved = 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.
*-Asynchronus
else.
call function 'IDOC_INBOUND_ASYNCHRONOUS'
in background task as separate unit
tables
idoc_control_rec_40 = g_idoc_control_record
idoc_data_rec_40 = g_edidd.
commit work.
endif.
write: / 'Well done!'.
Maybe you are looking for
-
Urgent help needed in configuring X1151A for RAC cluster
for RAC requirements I have to configure this card to use the interface name of ce1 but I have tried changing slots and puting /etc/hostname.ce1 file out there but it fails .. it always comes up as ce0. my question is : How can I cofigure this card t
-
Office 2011 not working on OS x version 10.9.4
I recently updated to macOS x version 10.9.4 due to some hardware problems Then i download the office 2011 service pack 2 but while installing gives some issues. Could some please help me,It will be really appreciated
-
When i go to networks and pick one it says unable to join so then i look at the net work and it shows no ip address for my pad ?
-
If I'm in Lightroom, and want to drag a video clip into Premiere, it seems I have to right-click to View in Explorer and drag it from there. Why can't I drag a video clip from one Adobe product to another?
-
MAC Filtering via Radius not working
Hi Folks, I'm having problems with MAC filtering via RADIUS. I have a combination of a local database on the controllers and remote MAC addresses provisioned on a Cisco ACS. My problem is that even when I've set the controllers to use Radius and I'