2006 Feb 28 9:31 PM
Hi all,
Coming to the concept of Idoc, I have ceated a segment type called zvkseg, idoc type zvkidoc and mesage type zvkmtyp. Now I am trying to populate data into this Idoc. I know we should write a custom program for this, can anyone please help with guidelines on how to write this program its fine even if you send me code for any of them you have written. Is the program executable program or function pool program. PLease help me in this regard. Guys can anone help me with this ?
Regards,
Vijay.
Message was edited by: vijay kalava
2006 Mar 01 1:35 AM
Hi Vijay,
Try writing an executable program. First select all your data to be sent to IDoc and then try using the 'MASTER_IDOC_DISTRIBUTE' Function module. There may be additional steps involved... but, hope this gives you an idea on how to start.
Regards,
Rajani Kumar
Hi all,
Coming to the concept of Idoc, I have ceated a segment type called zvkseg, idoc type zvkidoc and mesage type zvkmtyp. Now I am trying to populate data into this Idoc. I know we should write a custom program for this, can anyone please help with guidelines on how to write this program its fine even if you send me code for any of them you have written. Is the program executable program or function pool program. PLease help me in this regard. Guys can anone help me with this ?
Regards,
Vijay.
Message was edited by: vijay kalava
2006 Mar 01 1:35 AM
Hi Vijay,
Try writing an executable program. First select all your data to be sent to IDoc and then try using the 'MASTER_IDOC_DISTRIBUTE' Function module. There may be additional steps involved... but, hope this gives you an idea on how to start.
Regards,
Rajani Kumar
2006 Mar 01 2:51 AM
1.FIRST STEP IS BE CLEAR WHICH FIELDS U WANT TO TRANSFER?
2. ONCE U R CLEAR WITH THE FIELDS, U JUST CREATE A SEGMENT IN WE31 WITH THOSE FIEDLS AND RELASE THE SEGMENT
3. NOW GO TO WE30, CREATE AN Z IDOC TYPE AND ATTACH THE SEGMENT TO IT.
4. GO TO WE81 AND CREATE A Z MESSAGE TYPE (WHICH GIVES THE MEANING OF THE IDOC)
5. GO TO WE82 AND ATTACH MESSAGE TYPE TO IDOC TYPE CREATED IN WE30.
6. NOW GO TO SALE AND CONFIGURE ALE SETTINGS
7. WRITE A ZPROGRAM, WHICH GENERATES COMMUNICATION IDOCS FROM MASTER IDCOS.
THE LOGIC WOULD BE LIKE THIS.
A) CREATE A INTERNAL TABLES LIKE EDIDD,EDIDC.
EDIDD(DATA RECORDS)
EDIDC(CONTROL RECORDS WITH DETAILS OF PARTNERS).
B) LOOP AT CONTROL RECORD,
GENERATE COMMUNICATION IDOCS FROM MASTER IDCOS
WITH DATA RECORDS
FN MODULE IS 'MASTER_IDOC_DDISTRIBUTE'.
😎 IN THE INBOUND, WRITE A FN MODULE TO POST DATA INTO UNDERLYING DATABASE.
2006 Mar 01 4:04 AM
Hi,
Chk out this program.
report zgh_outbound .
data: i_edidc like edidc occurs 0 with header line,
i_edidc1 like edidc occurs 0 with header line,
i_edidd like edidd occurs 0 with header line,
zequip like zequip.
*Assign control data
i_edidc-rcvpor = 'ZTESTPORT'.
i_edidc-rcvprt = 'LS'.
i_edidc-rcvpfc = 'LS'.
i_edidc-rcvprn = 'ENTCLNT100'.
i_edidc-sndpor = 'A000000281'.
i_edidc-sndprt = 'LS'.
i_edidc-sndprn = 'PDCCLNT210'.
i_edidc-mestyp = 'ABC'.
i_edidc-idoctp = 'ZEQUIP'.
append i_edidc.
i_edidd-segnum = 1.
i_edidd-segnam = 'ZEQUIP'.
zequip-equnr = '00000099'.
zequip-datsl = '0876'.
zequip-eqtyp = 'S'.
zequip-shtxt = 'test idoc equip data'.
i_edidd-sdata = zequip.
append i_edidd.
*Distribute data
call function 'MASTER_IDOC_DISTRIBUTE'
exporting
master_idoc_control = i_edidc
tables
communication_idoc_control = i_edidc1
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.
call function 'EDI_DOCUMENT_DATA_DISPLAY'
exporting
docnum = i_edidc1-docnum
exceptions
no_data_record_found = 1
others = 2
.Regards,
Gayathri
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |