2006 Feb 23 2:54 PM
Hi,
I have a requirement where I need to fetch records from a ztable , do some calculations on those records , store those records in an internal table and then transfer the data to an external/third party system.
I am thinking of using Idocs for the same, does anyone has any alternative way coming to mind?
If not can u tell me how to proceed , the fields are activity type, price and Calculated price that have to form the idoc?
I know how to create segments and Idocs..but I am not clear on::
Once i create the Idoc and assign segments to it , what else i need to do to ensure that the idoc is dispatched to the port provided?
Do i need to create a message type also ?
I wish to trigger the idoc generation once the calculted internal table is ready..what should be my approach to write the form/program for the same? I mean should i write a FM or a stand alone program to create idocs?
I am confused as :
If i create a standalone program then how do i call it in my z program with the ITAB(holding calculated data)?
If i create a Form/FM then i need to call it for each record in the internal table?? I mean for each record in the itab , an idoc is generated??
Pls help me ..its quiet urgent.
2006 Feb 24 6:52 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 Feb 24 1:52 AM
What is the nature of the interface to the external system?
If the objective of the idoc is to simply write a file to the file system, why not write your data to the file system as xml or a tab delimited file. It would be way less complicated.
2006 Feb 24 6:31 AM
YOU WILL HAVE TO LOOK FOR SUITABLE IDOC TYPE OR BASIC TYPE THAT MATCH YOUR REQUIREMENT AND FOR EXTRA FIELD THAT IS NOT THERE IN YOUR IDOC BASIC TYPE EXTEND YOUR BASIC TYPE AND FILL THAT EXTENDED SEGMENT USING USER EXIT.
PLEASE DO NOT FORGET TO GIVE POINTS.
2006 Feb 24 6:52 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 Feb 24 2:01 PM
Hi,
Thanks for the replies.
If anyone has some code for poulating the idoc and creating them or name of some standard program where i can see the code , pls let me know/send it to abaper_2006@yahoo.com.
Rogers, I need to write a number of records(fetch from ztable and calculate some extra fields and pass it to a third party that will take it from there) to the third party and they will upload it. If u think the way u suggested can be good one, can u pls let me know how to proceed in that and what is the way for the same.
Thanks
2006 Feb 24 2:03 PM
Hi,
Thanks for the replies.
If anyone has some code for poulating the idoc and creating them or name of some standard program where i can see the code , pls let me know/send it to abaper_2006@yahoo.com.
Rogers, I need to write a number of records(fetch from ztable and calculate some extra fields and pass it to a third party that will take it from there) to the third party and they will upload it. If u think the way u suggested can be good one, can u pls let me know how to proceed in that and what is the way for the same.
Thanks