Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

reg idoc interface

Former Member
0 Kudos

hi all,

its regarding idoc interface,try to help me.

i have a programRHALEINI and defined in Work Item WA00012 - "IDOC Extract for HR Master Data"

This IDoc will be created in SAP but not delivered to any external system.

The interface created in this work item will then read these IDOCs and the required fields will be identified and reformatted so that it can be processed by the FMS system.

Program RHALEINI is executed to create the IDoc’s for all employees. Refer to Work Item WA00012 - "IDOC Extract for HR Master Data

WI WA00012 will also provide Function Module Z_TP_INI_IDOCS to pull all the IDOCs needed to extract all of the employee data (latest employee extract).

The purpose of this interface program is to read all IDOCs created by program in WA00012 and map the required data into a flat file structure.

here to map i have header trailor and body data how to do this.

provide me solution asap with an example

thanking u

9 REPLIES 9

former_member378318
Contributor
0 Kudos

Looks like you understand the requirement really well and will not have a problem implememting the interface. Go for it.

Reward points if useful

0 Kudos

hi

thank u for ur reply.there is no problem in doing interface means i didnt get u clearly.

0 Kudos

Hi,

Once you get the idocs then you have to read the info from these idocs and then you have to populate it into your file.

It depends on the data format that they want to create it.

cretae a file of type l_v_filename TYPE draw-filep,

then start creating header structure item structure and footer structure.

keep passing data to these structures and transfer it to file

TRANSFER l_wa_header TO l_v_filename_temp

same thing you cna do for ur item data,

loop on this and pass line by line to the file.

same way populate the footer data also.

It entirely depends ont he way they want to populate in the final file.

Reward points if you find useful.

Regards,

Sasi

0 Kudos

hi thank u for ur reply,

actually i am not clear with ur answer.i have z_tp_idocread function module which gives the idoc data i have to populate this data first.so tell me the code for this.

after we get the data .i have basic type zrmd_a07 for custom fields.and hrmd_a07 for normal fields.so suppose in 'header field' is record type of type char and in 'trailer field' i have 'record count' of type char,and in body i have to retrieve emp_last and the idoc field for this is e1p0002-name2.

so like this i have to map in header trailer and body format.

so plz try to give me code for this its very urgent.

Clemenss
Active Contributor
0 Kudos

Hi zaheera sulthana,

use function modules to extract IDoc data - there are plenty, ie. FM IDOC_READ_COMPLETELY.

File Header: Information about file contents - ask for requirement or do as you like

File Body: information records

File trailor: Ensures integrity, may contain checksum, numer of records or what you like.

First characters of record may define the record type, like 01 Header, 02, 93,... for different type body records, 99 for trailer record.

Regards,

Clemens

Former Member
0 Kudos

hi thanks for ur reply,

actually i am not clear with ur answer.i have z_tp_idocread function module which gives the idoc data i have to populate this data first.so tell me the code for this.

after we get the data .i have basic type zrmd_a07 for custom fields.and hrmd_a07 for normal fields.so suppose in 'header field' is record type of type char and in 'trailer field' i have 'record count' of type char,and in body i have to retrieve emp_last and the idoc field for this is e1p0002-name2.

so like this i have to map in header trailer and body format.

so plz try to give me code for this its very urgent.

Clemenss
Active Contributor
0 Kudos

Hi zaheera sulthana,

I'm afraid the coding is your job.

actually i am not clear with ur question: You said you have "z_tp_idocread function module which gives the idoc data". The you say you "have to populate this data first". Do you getr empty data records you want to populate?.

so plz try to give me logic for this.

Regards,

Clemens

abdul_hakim
Active Contributor
0 Kudos

Hi

Please let us know in brief what are you trying to send using the transaction PFAL.

Regards,

Abdul Hakim

0 Kudos

hi,

thanks for ur reply,i have to do outbound interface with already existing idoc data

in the form of header trailer and body,the data we can populate from z_tp_idocread function module.so i want sample example program for this so that i can get clear idea.

plz help me out

thanking you,